|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Graph2DTraversal
Specifies the contract of cross-element-type Graph2D
traversals.
Cross-element-type traversals are useful when rendering and/or performing hit
tests on a Graph2D
as they can be interpreted as a global
z-ordering or visual layering of graph elements.
Field Summary | |
---|---|
static int |
ALL
Type bit mask representing all element types. |
static int |
BENDS
Type bit mask representing bends. |
static int |
EDGE_LABELS
Type bit mask representing edge labels. |
static int |
EDGES
Type bit mask representing edges. |
static int |
NODE_LABELS
Type bit mask representing node labels. |
static int |
NODE_PORTS
Type bit mask representing node ports. |
static int |
NODES
Type bit mask representing nodes. |
static int |
PORTS
Type bit mask representing ports. |
Method Summary | |
---|---|
java.util.Iterator |
firstToLast(Graph2D graph,
int elementTypes)
Creates an Iterator that traverses elements of the specified
types of the given Graph2D from first to last. |
java.util.Iterator |
lastToFirst(Graph2D graph,
int elementTypes)
Creates an Iterator that traverses elements of the specified
types of the given Graph2D from last to first. |
Field Detail |
---|
static final int ALL
firstToLast(Graph2D, int)
,
lastToFirst(Graph2D, int)
,
Constant Field Valuesstatic final int NODES
firstToLast(Graph2D, int)
,
lastToFirst(Graph2D, int)
,
Constant Field Valuesstatic final int EDGES
firstToLast(Graph2D, int)
,
lastToFirst(Graph2D, int)
,
Constant Field Valuesstatic final int PORTS
firstToLast(Graph2D, int)
,
lastToFirst(Graph2D, int)
,
Constant Field Valuesstatic final int BENDS
firstToLast(Graph2D, int)
,
lastToFirst(Graph2D, int)
,
Constant Field Valuesstatic final int NODE_LABELS
firstToLast(Graph2D, int)
,
lastToFirst(Graph2D, int)
,
Constant Field Valuesstatic final int EDGE_LABELS
firstToLast(Graph2D, int)
,
lastToFirst(Graph2D, int)
,
Constant Field Valuesstatic final int NODE_PORTS
firstToLast(Graph2D, int)
,
lastToFirst(Graph2D, int)
,
Constant Field ValuesMethod Detail |
---|
java.util.Iterator firstToLast(Graph2D graph, int elementTypes)
Iterator
that traverses elements of the specified
types of the given Graph2D
from first to last.
The order of elements returned by said Iterator
has to be the
exact reversal of the order implied by lastToFirst(Graph2D, int)
.
This traversal order is typically used when rendering a
Graph2D
.
Note that iterators for graph traversal are typically not fail-fast as one is used to from the Java™ Collections Framework, because there is no reliable way to check for concurrent modifications of the traversed graph.
graph
- the Graph2D
whose elements should be
traversed.elementTypes
- determines the types of graph elements that should be
included in the traversal. The elementTypes
argument is an
integer bit mask that may be ALL
or any bitwise union of
BENDS
, EDGES
, EDGE_LABELS
, NODES
,
NODE_LABELS
, PORTS
, and/or NODE_PORTS
.
Iterator
that traverses the elements of the
specified Graph2d
from first to last.lastToFirst(Graph2D, int)
java.util.Iterator lastToFirst(Graph2D graph, int elementTypes)
Iterator
that traverses elements of the specified
types of the given Graph2D
from last to first.
The order of elements returned by said Iterator
has to be the
exact reversal of the order implied by firstToLast(Graph2D, int)
.
This traversal order is typically used when performing hit tests for a
Graph2D
.
Note that iterators for graph traversal are typically not fail-fast as one is used to from the Java™ Collections Framework, because there is no reliable way to check for concurrent modifications of the traversed graph.
graph
- the Graph2D
whose elements should be
traversed.elementTypes
- determines the types of graph elements that should be
included in the traversal. The elementTypes
argument is an
integer bit mask that may be ALL
or any bitwise union of
BENDS
, EDGES
, EDGE_LABELS
, NODES
,
NODE_LABELS
, PORTS
, and/or NODE_PORTS
.
Iterator
that traverses the elements of the
specified Graph2d
from last to first.firstToLast(Graph2D, int)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |