|
JHotDraw 7.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.draw.AbstractConnector
org.jhotdraw.draw.ChopRectangleConnector
org.jhotdraw.draw.StickyRectangleConnector
public class StickyRectangleConnector
A StickyRectangleConnector locates connection Points by choping the connection between the centers of the two figures at the display box.
The location of the connection Point2D.Double is computed once, when the user connects the figure. Moving the figure around will not change the location.
Constructor Summary | |
---|---|
StickyRectangleConnector()
Creates a new instance. |
|
StickyRectangleConnector(Figure owner)
|
|
StickyRectangleConnector(Figure owner,
java.awt.geom.Point2D.Double p)
|
Method Summary | |
---|---|
protected java.awt.geom.Point2D.Double |
chop(Figure target,
java.awt.geom.Point2D.Double from)
|
void |
draw(java.awt.Graphics2D g)
Draws the connector. |
java.awt.geom.Point2D.Double |
getAnchor()
Gets the anchor of the connector. |
double |
getAngle()
|
java.lang.String |
getParameters()
|
void |
read(DOMInput in)
|
void |
setAngle(float angle)
|
void |
updateAnchor(java.awt.geom.Point2D.Double p)
Updates the anchor of the connector. |
void |
write(DOMOutput out)
|
Methods inherited from class org.jhotdraw.draw.ChopRectangleConnector |
---|
findEnd, findStart |
Methods inherited from class org.jhotdraw.draw.AbstractConnector |
---|
clone, contains, findPoint, getBounds, getConnectorTarget, getDrawingArea, getOwner, isConnectToDecorator, setConnectToDecorator, setOwner, updateEndLocation, updateStartLocation |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StickyRectangleConnector()
public StickyRectangleConnector(Figure owner)
public StickyRectangleConnector(Figure owner, java.awt.geom.Point2D.Double p)
Method Detail |
---|
public void draw(java.awt.Graphics2D g)
Connector
draw
in interface Connector
draw
in class AbstractConnector
public void setAngle(float angle)
public double getAngle()
public void updateAnchor(java.awt.geom.Point2D.Double p)
Connector
updateAnchor
in interface Connector
updateAnchor
in class AbstractConnector
public java.awt.geom.Point2D.Double getAnchor()
Connector
getAnchor
in interface Connector
getAnchor
in class AbstractConnector
protected java.awt.geom.Point2D.Double chop(Figure target, java.awt.geom.Point2D.Double from)
chop
in class ChopRectangleConnector
public java.lang.String getParameters()
public void read(DOMInput in) throws java.io.IOException
read
in interface DOMStorable
read
in class AbstractConnector
java.io.IOException
public void write(DOMOutput out) throws java.io.IOException
write
in interface DOMStorable
write
in class AbstractConnector
java.io.IOException
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |