public class TableConnectionPoint extends ConnectionPoint
node
Constructor and Description |
---|
TableConnectionPoint() |
TableConnectionPoint(TableNode table,
DiagramLink link,
boolean incoming,
int row) |
Modifier and Type | Method and Description |
---|---|
void |
addLinkToNode()
Adds the link associated with this connection point to the associated node.
|
boolean |
calculateIntersections()
Determines whether the end of a link should be aligned to the point where the node
contour is intersected by the line connecting the centers of the connected nodes.
|
android.graphics.PointF |
getAnchorPos(int anchorIdx)
Returns the point from the node's associated anchor pattern
(if any) with the specified index or the link's initial point.
|
boolean |
getAnchorPos(int anchorIdx,
android.graphics.PointF point)
Returns the point from the node's associated anchor pattern
(if any) with the specified index.
|
android.graphics.PointF |
getEndPoint()
Calculates the coordinates of the this connection point expressed in document coordinates.
|
android.graphics.PointF |
getInitialPoint()
Returns a point (usually the center of the bounding rectangle) contained within the associated node.
|
android.graphics.PointF |
getIntersection(android.graphics.PointF pt1,
android.graphics.PointF pt2)
Calculates the intersection point between the specified line segment and
the contour of the node associated with this connection point.
|
int |
getRow()
Gets the index of a constituent item within the associated node where the
link represented by this connection point is connected, or -1, if the link is
connected to the node itself.
|
TableNode |
getTable() |
boolean |
linkChanges(DiagramNode node,
android.graphics.PointF point)
Checks whether the relationship represented by the associated link would change
if the link is attached to the specified node at the specified point.
|
void |
readExternal(java.io.ObjectInput in)
Deserializes the connection point data.
|
void |
removeLinkFromNode()
Removes the link associated with this connection point from the associated node.
|
boolean |
sameNode(ConnectionPoint otherConnectionPoint)
Checks whether the current connection point and the specified
connection point are associated with the same node.
|
void |
saveEndRelative()
Updates the coordinates of the connection point represented by this
link, relative to the bounding rectangle of the associated node.
|
protected void |
updateFromPoint(android.graphics.PointF point)
Updates the connection state according to the specified point,
without changing the related node.
|
void |
writeExternal(java.io.ObjectOutput out)
Serializes the connection point data.
|
canMoveLink, getIncoming, getLink, getNode, getNodeRect, getRelativePosition, nodesIntersect, setRelativePosition
public TableConnectionPoint(TableNode table, DiagramLink link, boolean incoming, int row)
public TableConnectionPoint()
public int getRow()
ConnectionPoint
getRow
in class ConnectionPoint
public TableNode getTable()
public boolean linkChanges(DiagramNode node, android.graphics.PointF point)
ConnectionPoint
linkChanges
in class ConnectionPoint
protected void updateFromPoint(android.graphics.PointF point)
ConnectionPoint
updateFromPoint
in class ConnectionPoint
public boolean sameNode(ConnectionPoint otherConnectionPoint)
ConnectionPoint
sameNode
in class ConnectionPoint
public android.graphics.PointF getIntersection(android.graphics.PointF pt1, android.graphics.PointF pt2)
ConnectionPoint
getIntersection
in class ConnectionPoint
public android.graphics.PointF getInitialPoint()
ConnectionPoint
getInitialPoint
in class ConnectionPoint
public void addLinkToNode()
ConnectionPoint
addLinkToNode
in class ConnectionPoint
public void removeLinkFromNode()
ConnectionPoint
removeLinkFromNode
in class ConnectionPoint
public void saveEndRelative()
ConnectionPoint
saveEndRelative
in class ConnectionPoint
public android.graphics.PointF getEndPoint()
ConnectionPoint
getEndPoint
in class ConnectionPoint
public boolean calculateIntersections()
ConnectionPoint
calculateIntersections
in class ConnectionPoint
public android.graphics.PointF getAnchorPos(int anchorIdx)
ConnectionPoint
getAnchorPos
in class ConnectionPoint
public boolean getAnchorPos(int anchorIdx, android.graphics.PointF point)
getAnchorPos
in class ConnectionPoint
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
ConnectionPoint
writeExternal
in interface java.io.Externalizable
writeExternal
in class ConnectionPoint
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
ConnectionPoint
readExternal
in interface java.io.Externalizable
readExternal
in class ConnectionPoint
java.io.IOException
java.lang.ClassNotFoundException