|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface represents the visualization of a model Port
that is contained and managed by a VisualNode.
This interface defines the characteristics of a single visual connection point
to a VisualNode from which a VisualEdge instance is
attached. In other words, an VisualEdge connects to a
VisualNode via one of the many VisualPort instances owned
and managed by a VisualNode, and not to the VisualNode directly.
A VisualPort uses a so-called VisualPortDenotation, which defines
the angular interval where incoming and outgoing edges are allowed to connect to the
associated VisualPort.
Visual ports have identifiers which can be returned to clients who request them.
The identifiers of a VisualPort and its associated model object
always correspond and are unique within a single Graph,
VisualGraph, Subgraph and VisualSubgraph.
These identifiers are set to -1 when no longer contained by a
parent component.
Each active VisualPort managed by a single VisualNode
instance can be retrieved by invoking the method getVisualNode().
The number of VisualEdge objects that are
currently connected to a VisualPort can be retrieved
by invoking the method getRegisteredVisualEdgeCount().
The actual VisualEdge objects that are
connected can be retrieved by invoking getRegisteredVisualEdges().
A VisualPort can have a number of different drawing states
which are defined by the constants prefixed with DRAWINGSTATE_
and which can be set by invoking the method setDrawingState(int).
This method is invoked internally by the library and usually there should
not be any to need to invoke this method manually.
A VisualPort can either be direct (a so-called leaf-port) or
indirect (a so-called wrapped-port). From the perspective of a library user,
the difference is not significant. Wrapped-ports can themselves be wrapped
up recursively. The method getDepth() can be used to find out the
depth of nesting. The VisualNode that
holds the leaf-port (the port that doesn't wrap-up other ports) can be
queried by invoking the method getWrappedVisualNode().
The methods getCoordinate() and getBoundingBoxCoordinate()
are used to find out the geometric position of a VisualPort.
The later method returns the position in the CoordinateSystem of
the enclosing VisualNode and thus is the one
that is likely to be used in most cases.
VisualNode,
VisualEdge,
Coordinate,
VisualPortDenotation,
Port,
PortDenotation| Field Summary | |
static int |
DRAWINGSTATE_FORBIDDEN
The drawing states for a VisualPort. |
static int |
DRAWINGSTATE_FREE
The drawing states for a VisualPort. |
static int |
DRAWINGSTATE_HIT
The drawing states for a VisualPort. |
static int |
DRAWINGSTATE_NONE
The drawing states for a VisualPort. |
| Method Summary | |
VisualPort |
deepCopy(VisualNode visualnode,
VisualGraph visualgraph,
Port port)
Makes a deep independent copy of this VisualPort. |
Coordinate |
getBoundingBoxCoordinate()
Returns the Coordinate of this VisualPort.
|
Composite |
getComposite()
Returns the Composite
this VisualPort uses for its visual representation. |
Coordinate |
getCoordinate()
Returns the Coordinate of this VisualPort.
|
VisualNode |
getDeepestVisualNode()
Notice:API internal method. |
VisualPort |
getDeepestVisualPort()
Notice:API internal method. |
int |
getDegree(boolean countIsolatedEdges)
|
VisualPortDenotation |
getDenotation()
Returns the VisualPortDenotation of this VisualPort. |
int |
getDepth()
Returns the wrapping depth of this VisualPort. |
int |
getDrawingState()
Drawing state, will trigger a different visualization for example when the port has a rule that forbids further attachments, when the port is hit or when the port is free for further attachments. |
int |
getHierarchicalDegree(boolean countIsolatedEdges)
|
int |
getHierarchicalIndegree(boolean countIsolatedEdges)
|
int |
getHierarchicalOutdegree(boolean countIsolatedEdges)
|
long |
getID()
Returns the id of this VisualPort. |
int |
getIndegree(boolean countIsolatedEdges)
|
int |
getOutdegree(boolean countIsolatedEdges)
|
Port |
getPort()
Returns the associated Port
from the graph model. |
int |
getRegisteredVisualEdgeCount()
Returns the count of the registered VisualEdge objects of
this VisualPort. |
java.util.List |
getRegisteredVisualEdges()
Returns a list of the registered VisualEdges of this
VisualPort. |
VisualNode |
getVisualNode()
Returns the associated VisualNode of this VisualPort. |
VisualNode |
getWrappedVisualNode()
Notice:API internal method. |
VisualPort |
getWrappedVisualPort()
Notice:API internal method. |
boolean |
isRegistered(VisualEdge visualedge)
Checks whether the given VisualEdge is registered at this port. |
boolean |
pointsToVisualNode(VisualNode visualnode)
Returns true if this instance points to the given VisualNode directly or indirectly. |
boolean |
pointsToVisualPort(VisualPort visualport)
Returns true if this instance points to the given VisualPort directly or indirectly. |
void |
setDrawingState(int drawingstate)
Sets the drawing state for this VisualPort.
|
| Methods inherited from interface com.tensegrity.composite.geometry.PunctualGeometryItem |
addGeometryValue, getGeometryValue, hasGeometryValue, setCoordinate |
| Field Detail |
public static final int DRAWINGSTATE_NONE
VisualPort.
public static final int DRAWINGSTATE_FREE
VisualPort.
public static final int DRAWINGSTATE_FORBIDDEN
VisualPort.
public static final int DRAWINGSTATE_HIT
VisualPort.
| Method Detail |
public long getID()
VisualPort.
VisualPort.public VisualPortDenotation getDenotation()
VisualPortDenotation of this VisualPort.
VisualPortDenotation of this VisualPort.VisualPortDenotationpublic Port getPort()
Port
from the graph model.
public VisualNode getVisualNode()
VisualNode of this VisualPort.
VisualNode of this VisualPort.public Coordinate getCoordinate()
Coordinate of this VisualPort.
The coordinate is returned in the CoordinateSystem of the
VisualNode this port belongs to.
getCoordinate in interface PunctualGeometryItemVisualPort.Coordinatepublic Coordinate getBoundingBoxCoordinate()
Coordinate of this VisualPort.
The coordinate is returned in the CoordinateSystem the
BoundingBox of the VisualNode this port belongs
to.
VisualPort.Coordinatepublic Composite getComposite()
Composite
this VisualPort uses for its visual representation.
Composite of this
VisualPort.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 boolean isRegistered(VisualEdge visualedge)
VisualEdge is registered at this port.
visualedge - check this VisualEdge for registration.
VisualEdge is already registered at this
instance.VisualEdgepublic java.util.List getRegisteredVisualEdges()
VisualEdges of this
VisualPort.
VisualEdges of this
VisualPort.VisualEdgepublic int getRegisteredVisualEdgeCount()
VisualEdge objects of
this VisualPort.
VisualEdge objects of this
VisualPort.VisualEdgepublic int getDrawingState()
VisualPort. The returned
value is one of the DRAWING-STATE constants defined in this interface.public void setDrawingState(int drawingstate)
VisualPort.
The value is one of the DRAWING-STATE constants defined in this interface.
drawingstate - the drawing state for this port.public VisualPort getWrappedVisualPort()
VisualPort that this instance is pointing to
indirectly. If this instance of the VisualPort doesn't
points indirectly to another VisualPort this method returns
null.
VisualPort that this instance is pointing to
indirectly or nullpublic VisualNode getWrappedVisualNode()
VisualNode that this instance is pointing to
indirectly. If this instance of the VisualPort doesn't
points indirectly to another VisualNode this method returns
null.
VisualNode that this instance is pointing to
indirectly or nullpublic boolean pointsToVisualPort(VisualPort visualport)
VisualPort directly or indirectly.
visualport - the VisualPort to look for downwards
in the hierarchy.
VisualPort.public boolean pointsToVisualNode(VisualNode visualnode)
VisualNode directly or indirectly.
visualnode - the VisualNode to look for downwards
in the hierarchy.
VisualNode.public int getDepth()
VisualPort.
VisualPort.public VisualPort getDeepestVisualPort()
VisualPort that this instance is pointing
to. If this instance of the VisualPort doesn't
points to another VisualPort this method returns
this instance.
VisualNode that this instance is pointing to
indirectlypublic VisualNode getDeepestVisualNode()
VisualNode that this instance is pointing
to indirectly. If this instance of the VisualPort doesn't
points indirectly to another VisualNode this method returns
the VisualNode this instance is pointing to.
VisualNode that this instance is pointing to
directly or indirectly
public VisualPort deepCopy(VisualNode visualnode,
VisualGraph visualgraph,
Port port)
VisualPort.
visualnode - the associated VisualNode.visualgraph - the VisualGraph that is being operated in.port - reference to the model's
Port the copy is to be
associated with.
VisualPort.VisualGraph,
VisualNode,
Port
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||