|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.LocalViewCreator y.view.LocalViewCreator.AbstractLocalViewCreator
public abstract static class LocalViewCreator.AbstractLocalViewCreator
Abstract base class for local view creator implementations that create local views based upon a subset of either nodes or edges of the model graph.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class y.view.LocalViewCreator |
---|
LocalViewCreator.AbstractLocalViewCreator, LocalViewCreator.AncestorGroups, LocalViewCreator.CommonParentGroup, LocalViewCreator.EdgeGroup, LocalViewCreator.FolderContents, LocalViewCreator.Neighborhood, LocalViewCreator.SourceAndTarget |
Field Summary | |
---|---|
static byte |
ELEMENT_TYPE_EDGE
Element type specifier for edges. |
static byte |
ELEMENT_TYPE_NODE
Element type specifier for nodes. |
Constructor Summary | |
---|---|
protected |
LocalViewCreator.AbstractLocalViewCreator(byte elementType)
Creates a AbstractLocalViewCreator for the
specified element type. |
Method Summary | |
---|---|
void |
addFocusEdge(Edge edge)
Adds the specified edge to the collection of input edges the creator uses to create local views. |
void |
addFocusNode(Node node)
Adds the specified node to the collection of input nodes the creator uses to create local views. |
void |
addSelectionTrigger()
Adds a Graph2DSelectionListener to the creator's
model graph that creates a local view on selection changes. |
void |
clearFocusEdges()
Removes all edges which the creator currently stores as input data for creating local views. |
void |
clearFocusNodes()
Removes all nodes which the creator currently stores as input data for creating local views. |
ViewMode |
createHoverTrigger()
Creates a ViewMode that triggers local view creation
after the mouse has been hovering over a graph element for a short
period of time (the trigger delay ). |
protected Graph2DSelectionListener |
createSelectionTrigger()
Creates a Graph2DSelectionListener that creates
local view upon selection changes. |
java.util.Iterator |
focusEdges()
Returns and Iterator over all edges that the creator
currently stores as input data for creating local views. |
java.util.Iterator |
focusNodes()
Returns and Iterator over all nodes that the creator
currently stores as input data for creating local views. |
byte |
getElementType()
Returns ELEMENT_TYPE_NODE if the creator uses nodes of the
model graph as input data and ELEMENT_TYPE_EDGE otherwise. |
int |
getTriggerDelay()
Returns the delay in milliseconds after which trigger events for local view creation are processed. |
boolean |
isFocusEdge(Edge edge)
Returns true if the specified edge is one of the edges
the creator currently stores as input data for creating local views;
false otherwise. |
boolean |
isFocusNode(Node node)
Returns true if the specified node is one of the nodes
the creator currently stores as input data for creating local views;
false otherwise. |
boolean |
isSingleFocus()
Returns true if the creator will only accept/use a single
graph element as input to create a local view and false
otherwise. |
void |
removeFocusEdge(Edge edge)
Removes the specified edge from the collection of input edges the creator uses to create local views. |
void |
removeFocusNode(Node node)
Removes the specified node from the collection of input nodes the creator uses to create local views. |
void |
removeSelectionTrigger()
Removes the Graph2DSelectionListener , that was added
using addSelectionTrigger() from the creator's model graph. |
void |
setSingleFocus(boolean singleFocus)
Specifies whether the creator should accept/use either one graph element only or multiple graph elements as input to create a local view. |
void |
setTriggerDelay(int triggerDelay)
Specifies the delay in milliseconds after which trigger events for local view creation are processed. |
Methods inherited from class y.view.LocalViewCreator |
---|
buildViewGraph, createDefaultLayouter, getLayouter, getModel, getModelEdge, getModelNode, getViewEdge, getViewGraph, getViewNode, layoutViewGraph, publishViewGraph, setLayouter, updateViewGraph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte ELEMENT_TYPE_NODE
LocalViewCreator.AbstractLocalViewCreator(byte)
,
getElementType()
,
Constant Field Valuespublic static final byte ELEMENT_TYPE_EDGE
LocalViewCreator.AbstractLocalViewCreator(byte)
,
getElementType()
,
Constant Field ValuesConstructor Detail |
---|
protected LocalViewCreator.AbstractLocalViewCreator(byte elementType)
AbstractLocalViewCreator
for the
specified element type.
elementType
- one of
java.lang.IllegalArgumentException
- if the specified type is not one
of the listed constants.Method Detail |
---|
public byte getElementType()
ELEMENT_TYPE_NODE
if the creator uses nodes of the
model graph as input data and ELEMENT_TYPE_EDGE
otherwise.
ELEMENT_TYPE_NODE
if the creator uses nodes of the
model graph as input data and ELEMENT_TYPE_EDGE
otherwise.public boolean isSingleFocus()
true
if the creator will only accept/use a single
graph element as input to create a local view and false
otherwise.
true
if the creator will only accept/use a single
graph element as input to create a local view and false
otherwise.public void setSingleFocus(boolean singleFocus)
singleFocus
- true
if the creator should accept/use
a single graph element only; false
otherwise.public int getTriggerDelay()
Defaults to 100
.
setTriggerDelay(int)
,
createSelectionTrigger()
,
createHoverTrigger()
public void setTriggerDelay(int triggerDelay)
Defaults to 100
.
triggerDelay
- the delay in milliseconds after which trigger
events for local view creation are processed.getTriggerDelay()
,
createSelectionTrigger()
,
createHoverTrigger()
public void addFocusEdge(Edge edge)
This method is a no-op if the creator's element type is
ELEMENT_TYPE_NODE
.
If the creator is in single focus mode, all previously added focus edges are silently removed.
edge
- an edge that will be used as input data when creating
a local view.
java.lang.IllegalArgumentException
- if the specified edge does not
belong to the creator's model graph.isSingleFocus()
,
setSingleFocus(boolean)
public void removeFocusEdge(Edge edge)
This method is a no-op if the creator's element type is
ELEMENT_TYPE_NODE
.
edge
- the edge that is to be removed from the collection of input
edges the creator uses to create local views.public boolean isFocusEdge(Edge edge)
true
if the specified edge is one of the edges
the creator currently stores as input data for creating local views;
false
otherwise.
This method will always return false
if the creator's
element type is ELEMENT_TYPE_NODE
.
edge
- the edge to check.
true
if the specified edge is one of the edges
the creator currently stores as input data for creating local views;
false
otherwise.public void clearFocusEdges()
This method is a no-op if the creator's element type is
ELEMENT_TYPE_NODE
.
public java.util.Iterator focusEdges()
Iterator
over all edges that the creator
currently stores as input data for creating local views.
Iterator
over all edges that the creator
currently stores as input data for creating local views.public void addFocusNode(Node node)
This method is a no-op if the creator's element type is
ELEMENT_TYPE_EDGE
.
If the creator is in single focus mode, all previously added focus nodes are silently removed.
node
- an node that will be used as input data when creating
a local view.
java.lang.IllegalArgumentException
- if the specified node does not
belong to the creator's model graph.isSingleFocus()
,
setSingleFocus(boolean)
public void removeFocusNode(Node node)
This method is a no-op if the creator's element type is
ELEMENT_TYPE_EDGE
.
node
- the node that is to be removed from the collection of input
nodes the creator uses to create local views.public boolean isFocusNode(Node node)
true
if the specified node is one of the nodes
the creator currently stores as input data for creating local views;
false
otherwise.
This method will always return false
if the creator's
element type is ELEMENT_TYPE_EDGE
.
node
- the node to check.
true
if the specified node is one of the nodes
the creator currently stores as input data for creating local views;
false
otherwise.public void clearFocusNodes()
This method is a no-op if the creator's element type is
ELEMENT_TYPE_EDGE
.
public java.util.Iterator focusNodes()
Iterator
over all nodes that the creator
currently stores as input data for creating local views.
Iterator
over all nodes that the creator
currently stores as input data for creating local views.public void addSelectionTrigger()
Graph2DSelectionListener
to the creator's
model graph that creates a local view on selection changes.
If the creator's element type is ELEMENT_TYPE_NODE
, the trigger
reacts only to node selection events; if the creator's element type is
ELEMENT_TYPE_EDGE
, the trigger reacts only to edge selection
events.
removeSelectionTrigger()
,
createSelectionTrigger()
public void removeSelectionTrigger()
Graph2DSelectionListener
, that was added
using addSelectionTrigger()
from the creator's model graph.
addSelectionTrigger()
,
createSelectionTrigger()
protected Graph2DSelectionListener createSelectionTrigger()
Graph2DSelectionListener
that creates
local view upon selection changes.
If the creator's element type is ELEMENT_TYPE_NODE
, the listener
reacts only to node selection events; if the creator's element type is
ELEMENT_TYPE_EDGE
, the trigger reacts only to edge selection
events.
If the creator is in single focus mode, selection events that are
fired because a node's or edge's selection state is set to
false
are ignored.
If not in single focus mode, the creator's collection of node's or
edge's is replaced by the currently selected elements of the appropriate
type in the creator's model graph.
Graph2DSelectionListener
that creates
local view upon selection changes.addSelectionTrigger()
,
removeSelectionTrigger()
public ViewMode createHoverTrigger()
ViewMode
that triggers local view creation
after the mouse has been hovering over a graph element for a short
period of time (the trigger delay
).
The element over which the mouse hovers will be used as the sole input
data for the creator, i.e. all previously stored focus elements will
be removed by the view mode.
ViewMode
that triggers local view creation
after the mouse has been hovering over a graph element for a short
period of time (the trigger delay
).getTriggerDelay()
,
setTriggerDelay(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 |