|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This is the general interface for any edge which should be arranged
by a Layout. It specifies a contract with the Layout
interface by providing methods that allow client code to retrieve, remove
and insert coordinate points. Moreover, edge type, marker, port and label
data is exposed by this interface.
| Field Summary | |
static int |
EDGE_TYPE_CURVE
Edge type specifier. |
static int |
EDGE_TYPE_DYNAMIC
Edge type specifier. |
static int |
EDGE_TYPE_ORTHOGONAL
Edge type specifier. |
static int |
EDGE_TYPE_STRAIGHT
Edge type specifier. |
static int |
LABEL_POSITION_CENTER
Label position specifier. |
static int |
LABEL_POSITION_CENTER_END
Label position specifier. |
static int |
LABEL_POSITION_CENTER_START
Label position specifier. |
static int |
LABEL_POSITION_FREE
Label position specifier. |
static int |
LABEL_POSITION_HEAD
Label position specifier. |
static int |
LABEL_POSITION_HEAD_END
Label position specifier. |
static int |
LABEL_POSITION_HEAD_START
Label position specifier. |
static int |
LABEL_POSITION_TAIL
Label position specifier. |
static int |
LABEL_POSITION_TAIL_END
Label position specifier. |
static int |
LABEL_POSITION_TAIL_START
Label position specifier. |
| Method Summary | |
Coordinate |
getCoordinateAt(int index)
Returns the Coordinate of the edge point at the index
specified by index.
|
int |
getCoordinateCount()
Returns the current number of Coordinates of which this edge
consist. |
Coordinate[] |
getCoordinates()
Returns the list of the current Coordinates of which this
edge consist. |
LayoutableNode |
getInnerSourceNode()
Gets the LayoutableNode at the source end of this
LayoutableEdge. |
LayoutableNode |
getInnerTargetNode()
Gets the LayoutableNode at the target end of this
LayoutableEdge. |
int |
getLabelAnchor()
Returns the anchor of the label's position of this edge. |
Coordinate |
getLabelLocation()
Returns the location of the label |
int |
getLabelPlacement()
Returns the placement of the label of this edge. |
int |
getLabelPositioning()
Returns the positioning of the label of this edge. |
Size |
getLabelSize()
Returns the size of the label. |
int |
getMarkerBeginSize()
Returns the size of the marker at the begin of the edge. |
int |
getMarkerEndSize()
Returns the size of the marker at the end of the edge. |
LayoutableNode |
getSourceNode()
Gets the LayoutableNode at the source end of this
LayoutableEdge. |
long |
getSourcePortId()
Returns the identifier of the port at the source node |
LayoutableNode |
getTargetNode()
Gets the LayoutableNode at the target end of this
LayoutableEdge. |
long |
getTargetPortId()
Returns the identifier of the port at the target node |
int |
getType()
Returns the type of the edge. |
boolean |
hasLabel()
Indicates whether this edge has a label |
void |
insertCoordinate(int index,
Coordinate coordinate)
Inserts the Coordinate given by coordinate at
the index given by index. |
void |
insertCoordinate(int index,
Coordinate coordinate,
Coordinate[] refCoordinate)
Inserts the Coordinate given by coordinate at
the index given by index. |
boolean |
isDetached()
Indicates whether the edge is detached.. |
void |
layoutLabel(Coordinate location)
Set the position of the label of this edge to the given Coordinate. |
boolean |
reassignSourcePortByID(long nodePortID)
Reassigns the source end of a edge to the desired port |
boolean |
reassignSourcePortByPredicate(VisualPortAssignmentPredicate predicate)
Reassigns the source end of the edge according of the specified VisualPortAssignmentPredicate. |
Coordinate |
reassignSourceToPortByAngle(double angle)
Reassigns the source end of the edge to the next reachable port using the given angle |
boolean |
reassignTargetPortByID(long nodePortID)
Reassigns the target end of a edge to the desired port |
boolean |
reassignTargetPortByPredicate(VisualPortAssignmentPredicate predicate)
Reassigns the target end of the edge according of the specified VisualPortAssignmentPredicate. |
Coordinate |
reassignTargetToPortByAngle(double angle)
Reassigns the target end of the edge to the next reachable port using the given angle |
void |
reassignToNextPort()
Reassigns this edge to the next ports at the source and target node according to the angle between the center of the source node and the center of the target node. |
void |
removeCoordinate(int index)
Removes the Coordinate at the index given by
index from the CompositeLines coordinates.
|
void |
removeCoordinates(int index1,
int index2)
Removes all Coordinates between the two indices given by
index1 and index2 from the
CompositeLines actual Coordinates. |
void |
setCoordinateAt(int index,
Coordinate coordinate)
Sets the Coordinate given by coordinate at the
index given by index of the edge current
coordinates.
|
void |
setCoordinates(Coordinate[] coordinates)
Uses the new points specified by coordinates. |
void |
setType(int type)
Sets the type of the edge. |
| Methods inherited from interface com.tensegrity.graph.layout.Layoutable |
getEdgeLayoutContext, getLayoutAttributeSet, getLayoutContext, getNodeLayoutContext, getUniqueID, setEdgeLayoutContext, setLayoutAttributes, setLayoutContext, setNodeLayoutContext |
| Field Detail |
public static final int LABEL_POSITION_FREE
public static final int LABEL_POSITION_HEAD
public static final int LABEL_POSITION_HEAD_START
public static final int LABEL_POSITION_HEAD_END
public static final int LABEL_POSITION_TAIL
public static final int LABEL_POSITION_TAIL_START
public static final int LABEL_POSITION_TAIL_END
public static final int LABEL_POSITION_CENTER
public static final int LABEL_POSITION_CENTER_START
public static final int LABEL_POSITION_CENTER_END
public static final int EDGE_TYPE_DYNAMIC
public static final int EDGE_TYPE_STRAIGHT
public static final int EDGE_TYPE_ORTHOGONAL
public static final int EDGE_TYPE_CURVE
| Method Detail |
public LayoutableNode getSourceNode()
LayoutableNode at the source end of this
LayoutableEdge.
LayoutableNode at the start of this
LayoutableEdge.public LayoutableNode getTargetNode()
LayoutableNode at the target end of this
LayoutableEdge.
LayoutableNode at the end of this
LayoutableEdge.public LayoutableNode getInnerSourceNode()
LayoutableNode at the source end of this
LayoutableEdge.
LayoutableNode at the start of this
LayoutableEdge.public LayoutableNode getInnerTargetNode()
LayoutableNode at the target end of this
LayoutableEdge.
LayoutableNode at the end of this
LayoutableEdge.public Coordinate[] getCoordinates()
Coordinates of which this
edge consist.
Coordinates that this edge currently
consists of.public void setCoordinates(Coordinate[] coordinates)
Coordinates
coordinates - the new Coordinates for the edge.public int getCoordinateCount()
Coordinates of which this edge
consist.
public Coordinate getCoordinateAt(int index)
Coordinate of the edge point at the index
specified by index.
If the index is less than zero or larger than the actual
count of Coordinates an exception will be thrown.
index - the index of the Coordinate to return
Coordinate at the given index
public void setCoordinateAt(int index,
Coordinate coordinate)
Coordinate given by coordinate at the
index given by index of the edge current
coordinates.
If the index is less than zero or larger than the actual
count of Coordinates an exception will be thrown.
index - where to set the given Coordinate tocoordinate - the Coordinate to set
public void insertCoordinate(int index,
Coordinate coordinate)
Coordinate given by coordinate at
the index given by index. If the first index is less than
zero it is adjusted to zero. If the second index is larger than the
actual count of Coordinates it is adjusted to the actual
count of Coordinates
index - the index where to insert the Coordinatecoordinate - the Coordinate to insert
public void insertCoordinate(int index,
Coordinate coordinate,
Coordinate[] refCoordinate)
Coordinate given by coordinate at
the index given by index. If the first index is less than
zero it is adjusted to zero. If the second index is larger than the
actual count of Coordinates it is adjusted to the actual
count of Coordinates
index - the index where to insert the Coordinatecoordinate - the Coordinate to insertrefCoordinate - the reference Coordinates to insertpublic void removeCoordinate(int index)
Coordinate at the index given by
index from the CompositeLines coordinates.
If the index is less than zero or larger than the actual count of
Coordinates an exception will be thrown.
index - the index of the Coordinate to remove
public void removeCoordinates(int index1,
int index2)
Coordinates between the two indices given by
index1 and index2 from the
CompositeLines actual Coordinates. If the first
index is less than zero it is adjusted to zero. If the second index is
larger than the actual count of Coordinates it is adjusted
to the actual count of Coordinates
index1 - the index of the first Coordinate to removeindex2 - the index of the last Coordinate to removepublic int getType()
public void setType(int type)
type - the type to set.public long getSourcePortId()
public long getTargetPortId()
public boolean reassignSourcePortByID(long nodePortID)
nodePortID - the new port id of the source node
true if the reassign successes,
otherwise false.public boolean reassignTargetPortByID(long nodePortID)
nodePortID - the new port id of the source node
true if the reassign successes,
otherwise false.public boolean reassignSourcePortByPredicate(VisualPortAssignmentPredicate predicate)
VisualPortAssignmentPredicate.
predicate - the predicate that is to be used.
true if the reassign successes,
otherwise false.public boolean reassignTargetPortByPredicate(VisualPortAssignmentPredicate predicate)
VisualPortAssignmentPredicate.
predicate - the predicate that is to be used.
true if the reassign successes,
otherwise false.public Coordinate reassignSourceToPortByAngle(double angle)
angle - the angle to reference point
Coordinate of the specified port.public Coordinate reassignTargetToPortByAngle(double angle)
angle - the angle to reference point
Coordinate of specified port.public void reassignToNextPort()
public boolean isDetached()
public int getLabelPositioning()
public int getLabelAnchor()
public int getLabelPlacement()
public void layoutLabel(Coordinate location)
Coordinate.
location - the new position of the top/left corner of the lable.public boolean hasLabel()
true if the edge has a label,
otherwise false.public Size getLabelSize()
public Coordinate getLabelLocation()
public int getMarkerBeginSize()
public int getMarkerEndSize()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||