|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.VisibilityFilter
public class VisibilityFilter
A Filter
for graph elements that accepts/reject elements
based on their visibility.
Field Summary | |
---|---|
static int |
ALL
Visibility state bit mask representing any visibility state. |
static int |
INVISIBLE
Visibility state bit mask representing the invisible state. |
static int |
VISIBLE
Visibility state bit mask representing the visible state. |
Constructor Summary | |
---|---|
VisibilityFilter(Graph2D graph)
Constructs a new VisibilityFilter for the specified
Graph2D that accepts only visible elements. |
|
VisibilityFilter(Graph2D graph,
int nodeVisibility,
int nodeLabelVisibility,
int edgeVisibility,
int edgeLabelVisibility)
Constructs a new VisibilityFilter for the specified
Graph2D . |
Method Summary | |
---|---|
boolean |
accept(java.lang.Object o)
Returns true , iff the specified graph element's visibility
matches this filter's current visibility setting for the corresponding
element type and false otherwise. |
int |
getEdgeLabelVisibility()
Returns the visibility bit mask against which the visibility state of edge labels is checked in this filter's accept method. |
int |
getEdgeVisibility()
Returns the visibility bit mask against which the visibility state of edges, ports, and bends is checked in this filter's accept
method. |
int |
getNodeLabelVisibility()
Returns the visibility bit mask against which the visibility state of node labels is checked in this filter's accept method. |
int |
getNodeVisibility()
Returns the visibility bit mask against which the visibility state of nodes and node ports is checked in this filter's accept method. |
void |
setEdgeLabelVisibility(int edgeLabelVisibility)
Specifies the visibility state of edge labels which are to be accepted by this filter. |
void |
setEdgeVisibility(int edgeVisibility)
Specifies the visibility state of edges, ports, and bends which are to be accepted by this filter. |
void |
setNodeLabelVisibility(int nodeLabelVisibility)
Specifies the visibility state of node labels which are to be accepted by this filter. |
void |
setNodeVisibility(int nodeVisibility)
Specifies the visibility state of nodes and node ports which are to be accepted by this filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ALL
public static final int VISIBLE
public static final int INVISIBLE
Constructor Detail |
---|
public VisibilityFilter(Graph2D graph)
VisibilityFilter
for the specified
Graph2D
that accepts only visible elements.
graph
- the Graph2D
whose elements are to be
filtered.public VisibilityFilter(Graph2D graph, int nodeVisibility, int nodeLabelVisibility, int edgeVisibility, int edgeLabelVisibility)
VisibilityFilter
for the specified
Graph2D
.
graph
- the Graph2D
whose elements are to be
filtered.nodeVisibility
- determines which nodes and node ports to
accept. The nodeVisibility
argument is an integer bit mask
that may be ALL
or a bitwise union of VISIBLE
and/or
INVISIBLE
.nodeLabelVisibility
- determines which node labels to accept.
The nodeLabelVisibility
argument is an integer bit mask that
may be ALL
or a bitwise union of VISIBLE
and/or
INVISIBLE
.edgeVisibility
- determines which edges, ports, and bends to
accept. The edgeVisibility
argument is an integer bit mask
that may be ALL
or a bitwise union of VISIBLE
and/or
INVISIBLE
.edgeLabelVisibility
- determines which edge labels to accept.
The edgeLabelVisibility
argument is an integer bit mask that
may be ALL
or a bitwise union of VISIBLE
and/or
INVISIBLE
.Method Detail |
---|
public int getNodeVisibility()
accept
method.
A node is considered to be visible if
graph.getRealizer(node).isVisible()
returns true
and invisible otherwise. The visibility state of a node port is considered
to be the visibility state of its associated node.
accept
method.setNodeVisibility(int)
,
accept(Object)
public void setNodeVisibility(int nodeVisibility)
graph.getRealizer(node).isVisible()
returns true
and invisible otherwise. The visibility state of a node port is considered
to be the visibility state of its associated node.
nodeVisibility
- determines which nodes and node ports to accept.
The nodeVisibility
argument is an integer bit mask that may
be ALL
or a bitwise union of VISIBLE
and/or
INVISIBLE
.public int getNodeLabelVisibility()
accept
method.
accept
method.setNodeLabelVisibility(int)
,
accept(Object)
public void setNodeLabelVisibility(int nodeLabelVisibility)
nodeLabelVisibility
- determines which node labels to accept. The
nodeLabelVisibility
argument is an integer bit mask that may
be ALL
or a bitwise union of VISIBLE
and/or
INVISIBLE
.public int getEdgeVisibility()
accept
method. An edge is considered to be visible if
graph.getRealizer(edge).isVisible()
returns true
and invisible otherwise. The visibility state of a port or bend is
considered to be the visibility state of its associated edge.
accept
method.setEdgeVisibility(int)
,
accept(Object)
public void setEdgeVisibility(int edgeVisibility)
graph.getRealizer(edge).isVisible()
returns true
and invisible otherwise. The visibility state of a port or bend is
considered to be the visibility state of its associated edge.
edgeVisibility
- determines which edges, ports, and bends to accept.
The edgeVisibility
argument is an integer bit mask that may
be ALL
or a bitwise union of VISIBLE
and/or
INVISIBLE
.public int getEdgeLabelVisibility()
accept
method.
accept
method.setEdgeLabelVisibility(int)
,
accept(Object)
public void setEdgeLabelVisibility(int edgeLabelVisibility)
edgeLabelVisibility
- determines which edge labels to accept. The
edgeLabelVisibility
argument is an integer bit mask that may
be ALL
or a bitwise union of VISIBLE
and/or
INVISIBLE
.public boolean accept(java.lang.Object o)
true
, iff the specified graph element's visibility
matches this filter's current visibility setting for the corresponding
element type and false
otherwise.
accept
in interface Filter
o
- the graph element to be tested.
true
, iff the specified graph element's visibility
matches this filter's current visibility setting for the corresponding
element type and false
otherwise.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |