|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--snap.ui.diagram.Link
Link is the UI abstraction of a Link between two visualizations. The Link object encapsulates all the information needed to build the UI representation of a connection within a layout.
Constructor Summary | |
Link(java.awt.Point start,
snap.ui.diagram.Visualization startViz,
java.awt.Point end,
snap.ui.diagram.Visualization endViz,
snap.ui.diagram.DiagramPanel container)
Class constructor |
Method Summary | |
boolean |
containsPoint(java.awt.Point testPoint)
Determines whether a point given as a parameter is within the clickable region of the Link object and returns boolean values as appropriate. |
void |
erase(java.awt.Graphics g)
Erases the iconic representation of the Link object. |
java.util.Vector |
getCoordinations()
Returns a Vector of Coordination objects. |
java.awt.Point |
getEndLocation()
Retrieves the location where the Link object ends. |
snap.ui.diagram.Visualization |
getEndVisualization()
Retrieves the Visualization object at the end of the connection. |
java.lang.String |
getName()
Retrieves the name of the Link object. |
java.awt.Point |
getStartLocation()
Retrieves the location where the Link object starts |
snap.ui.diagram.Visualization |
getStartVisualization()
Retrieves the Visualization object at the beginning of the connection |
void |
paintComponent(java.awt.Graphics g)
Draws the iconic represntation of the Link object at its location. |
void |
setEndLocation(java.awt.Point newPoint)
Sets the location where the Link should stop painting to a point passed in as a parameter. |
void |
setEndVisualization(snap.ui.diagram.Visualization newEnd)
Sets the visualization where the connection should end to that specified by the parameter. |
void |
setStartLocation(java.awt.Point newPoint)
Sets the location where the Link should begin painting to a point passed in as a parameter. |
void |
setStartVisualization(snap.ui.diagram.Visualization newStart)
Sets the visualization where the connection should begin to that specified by the parameter. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Link(java.awt.Point start, snap.ui.diagram.Visualization startViz, java.awt.Point end, snap.ui.diagram.Visualization endViz, snap.ui.diagram.DiagramPanel container)
start
- the starting point of the UI representationend
- the ending point of the UI representationMethod Detail |
public java.lang.String getName()
public java.util.Vector getCoordinations()
public java.awt.Point getStartLocation()
public java.awt.Point getEndLocation()
public snap.ui.diagram.Visualization getStartVisualization()
public snap.ui.diagram.Visualization getEndVisualization()
public void setStartVisualization(snap.ui.diagram.Visualization newStart)
newStart
- the new starting visualizationpublic void setEndVisualization(snap.ui.diagram.Visualization newEnd)
public void setStartLocation(java.awt.Point newPoint)
newPoint
- the new beginning location for the Linkpublic void setEndLocation(java.awt.Point newPoint)
newPoint
- the new ending location for the Linkpublic boolean containsPoint(java.awt.Point testPoint)
testPoint
- the point to test for containment
public void paintComponent(java.awt.Graphics g)
g
- the graphics context to use for paintingpublic void erase(java.awt.Graphics g)
g
- the graphics context to use for painting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |