| |
|
| java.lang.Object org.acm.seguin.uml.line.SegmentedLine
All known Subclasses: org.acm.seguin.uml.line.AssociationRelationship, org.acm.seguin.uml.line.ImplementsRelationship, org.acm.seguin.uml.line.InheretenceRelationship,
SegmentedLine | public class SegmentedLine implements ComponentListener(Code) | | SegmentedLine.
For future builds, it may be worth considering caching the points above and
below the line for an efficiency increase when there are lots of lines to
paint.
author: Chris Seguin author: Mike Atkinson |
Xs | protected int[] Xs(Code) | | This array is used only during the paint method for drawing polylines
|
Ys | protected int[] Ys(Code) | | This array is used only during the paint method for drawing polylines
|
scalingFactor | protected double scalingFactor(Code) | | Description of the Field
|
vertices | protected Vertex[] vertices(Code) | | The set of vertices on the line
|
SegmentedLine | public SegmentedLine(EndPointPanel start, EndPointPanel end)(Code) | | Constructor for the SegmentedLine object
Parameters: start - Panel that the segmented line starts at Parameters: end - End point of the panel |
componentHidden | public void componentHidden(ComponentEvent cevt)(Code) | | Description of the Method
Parameters: cevt - Description of Parameter |
componentMoved | public void componentMoved(ComponentEvent cevt)(Code) | | Description of the Method
Parameters: cevt - Description of Parameter |
componentResized | public void componentResized(ComponentEvent cevt)(Code) | | Description of the Method
Parameters: cevt - Description of Parameter |
componentShown | public void componentShown(ComponentEvent cevt)(Code) | | Description of the Method
Parameters: cevt - Description of Parameter |
drag | public void drag(Point point)(Code) | | Drag the current vertex
Parameters: point - New location of the current vertex |
drawArrow | protected void drawArrow(Graphics2D g)(Code) | | Draws the arrow and the last segment
Parameters: g - the graphics object |
drop | public void drop()(Code) | | The point was dropped
|
getArrowPointAbove | protected Point getArrowPointAbove()(Code) | | Determine the point at which the last segment should stop
the point |
getArrowPointBelow | protected Point getArrowPointBelow()(Code) | | Determine the point at which the last segment should stop
the point |
getShortPoint | protected Point getShortPoint()(Code) | | Determine the point at which the last segment should stop
the point |
hit | public boolean hit(Point attempt)(Code) | | Description of the Method
Parameters: attempt - Description of Parameter Description of the Returned Value |
isBothEndsSelected | public boolean isBothEndsSelected()(Code) | | Determines if both the start and end points are selected
true when both are selected |
load | public void load(String buffer)(Code) | | Loads a segmented line from a buffer
Parameters: buffer - the buffer containing the vertices |
match | public boolean match(EndPointPanel start, EndPointPanel end)(Code) | | Determines whether this panel matches the two desired end points
Parameters: start - the starting panel to be matched Parameters: end - the ending panel to be matched true if it matches |
paint | public void paint(Graphics g)(Code) | | Draws the segmented line
Parameters: g - Description of Parameter |
save | public void save(PrintWriter output)(Code) | | Saves a segmented to the output stream
Parameters: output - the output stream |
saveEndPanel | protected void saveEndPanel(PrintWriter output)(Code) | | Saves the end panel
Parameters: output - the output stream |
savePanel | protected void savePanel(PrintWriter output, EndPointPanel panel)(Code) | | Saves a panel
Parameters: output - the output stream Parameters: panel - the panel to be saved |
saveStartPanel | protected void saveStartPanel(PrintWriter output)(Code) | | Saves the start panel
Parameters: output - the output stream |
saveVertices | protected void saveVertices(PrintWriter output)(Code) | | Saves the vertices
Parameters: output - the output stream |
scale | public void scale(double value)(Code) | | Scales the entire line
Parameters: value - the amount to scale |
select | public void select(boolean way)(Code) | | Description of the Method
Parameters: way - Description of Parameter |
shift | public void shift(int x, int y)(Code) | | Shifts the entire line
Parameters: x - the amount to shift in the x coordinate Parameters: y - the amount to shift in the y coordinate |
updateEnd | protected void updateEnd()(Code) | | Updates the location of the end vertex
|
|
|
|