|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface represents the functionality of any potential
Node representation. By incorporating the
functionality of a Composite object, it becomes
possible to assign complex shapes and styles to an instance
of this class.
IMPORTANT NOTE: Please keep in mind that there is a 1:n relationship
between Node and VisualNode. Thus the getNode() method of an
object of this class can be the same reference as the one that is
returned by other VisualNode instances.
Constructing a VisualNode is done by means of a
GraphViewFactory,
which will hide the particular implementation classes from client code.
The associated model Node can be obtained by invoking the
getNode() method.
VisualNode objects that are dereferenced will be garbage collected.
You must remove the instance from a Container first.
VisualNode can optionally be associated with
VisualNodeInfo objects. These user-defined
objects are one way to associate custom information with instances of this
class.
Node,
VisualNodeListener,
Composite| Field Summary | |
static int |
DEFAULT_PORT
constant that tells about the expected arguments when calling getVisualPorts(). |
static int |
DIRECTION_PORT
constant that tells about the expected arguments when calling getVisualPorts(). |
static int |
NO_ARGUMENT
a constant used as argument for the port reassignment |
static int |
SHORTESTPATH_ARGUMENT
a constant used as argument for the port reassignment |
static int |
SHORTESTPATH_ARGUMENT_FLAT
a constant used as argument for the port reassignment |
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Fields inherited from interface com.tensegrity.graph.layout.LayoutableNode |
BBOXMASK_INCLUDE_ALL, BBOXMASK_INCLUDE_EXTERNALS_ALL, BBOXMASK_INCLUDE_EXTERNALS_BACK, BBOXMASK_INCLUDE_EXTERNALS_BOTTOM, BBOXMASK_INCLUDE_EXTERNALS_FRONT, BBOXMASK_INCLUDE_EXTERNALS_LEFT, BBOXMASK_INCLUDE_EXTERNALS_RIGHT, BBOXMASK_INCLUDE_EXTERNALS_TOP, BBOXMASK_INCLUDE_MARKER, BBOXMASK_INCLUDE_SHADOW, BBOXMASK_INCLUDE_STROKE |
| Method Summary | |
void |
addVisualNodeListener(VisualNodeListener listener)
Adds a VisualNodeListener to this
VisualNode. |
void |
adjustEdges()
Updates all adjacent edgs which are registered at ports of this visualnode. |
VisualNode |
deepCopy(Node node)
Returns a deep copy of this visual node which is associated with the given node. |
void |
deepCopyPorts(VisualGraph visualgraph,
VisualNode visualnode,
Node node)
Performs a deep copy of the ports of this visualnode. |
java.util.List |
getAdjacentVisualEdges()
|
java.util.List |
getAdjacentVisualNodes()
|
Composite |
getComposite()
Returns the instance of the Composite associated to the
VisualNode instance. |
int |
getDegree(boolean countIsolatedEdges)
|
int |
getHierarchicalDegree(boolean countIsolatedEdges)
|
int |
getHierarchicalIndegree(boolean countIsolatedEdges)
|
int |
getHierarchicalOutdegree(boolean countIsolatedEdges)
|
java.util.List |
getInboundVisualEdges()
|
java.util.List |
getInboundVisualNodes()
|
int |
getIndegree(boolean countIsolatedEdges)
|
Node |
getNode()
Returns the reference to the node this VisualNode is associated
with. |
java.util.List |
getOutboundVisualEdges()
|
java.util.List |
getOutboundVisualNodes()
|
int |
getOutdegree(boolean countIsolatedEdges)
|
VisualNodeInfo |
getVisualNodeInfo()
Returns the VisualNodeInfo associated with this
VisualNode. |
VisualPort |
getVisualPortByID(long id)
Returns the VisualPort that has the id given by
id. |
VisualPort |
getVisualPortByName(java.lang.String name)
Returns the VisualPort with the name given by
name or null if no VisualPort was
found. |
java.util.List |
getVisualPorts()
Returns a list of the VisualPorts of this
VisualNode. |
void |
internalResetVisualPortNumbers()
This method is for internal use only and should never be invoked by the client directly. |
VisualPort |
reassignVisualPort(int specifier,
java.lang.Object[] args)
Returns the visual port that fits to the arguments given by args. |
void |
removeVisualNodeListener(VisualNodeListener listener)
Removes a VisualNodeListener from this
VisualNode. |
void |
repositionVisualPorts()
Internally readjust ports with the standard names "CenterPort", "WestPort", "EastPort", "NorthPort", "CenterPort" to their home positions. |
void |
setVisualNodeInfo(VisualNodeInfo visualNodeInfo)
Sets the VisualNodeInfo associated with this
VisualNode. |
void |
setVisualPorts(java.util.List visualports)
Sets the List of visual ports given by ports
as the new ports of this visual node. |
| Methods inherited from interface com.tensegrity.graph.view.VisualGraphObject |
deepCopy, getBaseComposite, getGraphObject, getID, getParentContainer, getRootContainer, getRule, getRuleRegistry, getUniqueID, isPinned, registerVetoableVisualEventMediator, registerVisualEventMediator, setPinned, setRule, setRuleRegistry |
| Methods inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
addAttributableOnSetListener, areAttributableEventsEnabled, disableAttributableEvents, enableAttributableEvents, getAttributes, getAttributesTree, removeAttributableOnSetListener, setAttributes, setAttributesTree |
| Methods inherited from interface com.tensegrity.generic.attribute.Attributable |
getAttribute, getAttributeType, getAttributeValue, setAttribute, setAttributeValue |
| Methods inherited from interface com.tensegrity.graph.layout.Layoutable |
getEdgeLayoutContext, getLayoutAttributeSet, getLayoutContext, getNodeLayoutContext, setEdgeLayoutContext, setLayoutAttributes, setLayoutContext, setNodeLayoutContext |
| Methods inherited from interface com.tensegrity.graph.layout.LayoutableNode |
getBoundingBox, getBoundingBox, getLocation, getPortCoordinate, getPortDirection, getPorts, getSize, layout, setLocation |
| Field Detail |
public static final int DEFAULT_PORT
getVisualPorts().
public static final int DIRECTION_PORT
getVisualPorts().
public static final int NO_ARGUMENT
public static final int SHORTESTPATH_ARGUMENT
public static final int SHORTESTPATH_ARGUMENT_FLAT
| Method Detail |
public Composite getComposite()
Composite associated to the
VisualNode instance.
Composite instancepublic Node getNode()
VisualNode is associated
with. (there is a 1:n relationship between
Nodes and VisualNodes)
VisualNode is associated with.public int getDegree(boolean countIsolatedEdges)
public int getIndegree(boolean countIsolatedEdges)
public int getOutdegree(boolean countIsolatedEdges)
public int getHierarchicalDegree(boolean countIsolatedEdges)
public int getHierarchicalIndegree(boolean countIsolatedEdges)
public int getHierarchicalOutdegree(boolean countIsolatedEdges)
public java.util.List getAdjacentVisualEdges()
public java.util.List getAdjacentVisualNodes()
public java.util.List getInboundVisualEdges()
public java.util.List getOutboundVisualEdges()
public java.util.List getInboundVisualNodes()
public java.util.List getOutboundVisualNodes()
public VisualNodeInfo getVisualNodeInfo()
VisualNodeInfo associated with this
VisualNode.
VisualNodeInfo associated with this
VisualNode. The returned value may be null if no
info is associated with this VisualNode.public void setVisualNodeInfo(VisualNodeInfo visualNodeInfo)
VisualNodeInfo associated with this
VisualNode.
visualNodeInfo - the VisualNodeInfo to associate with this
VisualNode.public VisualPort getVisualPortByID(long id)
VisualPort that has the id given by
id. If the VisualNode has no
VisualPort with the given id null is returned.
id - the id of the VisualPort to return
VisualPort specified through the
given id or nullpublic VisualPort getVisualPortByName(java.lang.String name)
VisualPort with the name given by
name or null if no VisualPort was
found.
name - the name of the VisualPort
nullpublic java.util.List getVisualPorts()
VisualPorts of this
VisualNode.
public void setVisualPorts(java.util.List visualports)
List of visual ports given by ports
as the new ports of this visual node.
visualports - the list of VisualPorts to use with this
VisualNodepublic void addVisualNodeListener(VisualNodeListener listener)
VisualNodeListener to this
VisualNode.
listener - the VisualNodeListener
to add to this VisualNode.public void removeVisualNodeListener(VisualNodeListener listener)
VisualNodeListener from this
VisualNode.
listener - the VisualNodeListener
to remove from this VisualNode.
public VisualPort reassignVisualPort(int specifier,
java.lang.Object[] args)
args. The specifier determines what arguments
are given. The following combinations are valid:DEFAULT_PORT |
args[0] = the old port
|
DIRECTION_PORT |
args[0] = the old port
args[1] = the degree to find the nearest port for
|
specifier - the specifier that determines what arguments are givenargs - the arguments to find a new port for
public void repositionVisualPorts()
public void adjustEdges()
public VisualNode deepCopy(Node node)
node - the node to associate the copied instance with.
public void deepCopyPorts(VisualGraph visualgraph,
VisualNode visualnode,
Node node)
visualgraph - the visualgraph the source are associated withvisualnode - the visualnode to copy the ports from.node - the deep copied node from the model.public void internalResetVisualPortNumbers()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||