|
JHotDraw 7.0.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jhotdraw.draw.AbstractHandle
org.jhotdraw.draw.ChangeConnectionHandle
public abstract class ChangeConnectionHandle
ChangeConnectionHandle factors the common code for handles that can be used to reconnect connections.
ChangeConnectionEndHandle,
ChangeConnectionStartHandle| Field Summary |
|---|
| Fields inherited from class org.jhotdraw.draw.AbstractHandle |
|---|
listenerList, view |
| Constructor Summary | |
|---|---|
protected |
ChangeConnectionHandle(Figure owner)
Initializes the change connection handle. |
| Method Summary | |
|---|---|
protected java.awt.Rectangle |
basicGetBounds()
|
protected abstract boolean |
canConnect(Figure existingEnd,
Figure targetEnd)
|
protected abstract void |
connect(Connector c)
Connect the connection with the given figure. |
protected abstract void |
disconnect()
Disconnects the connection. |
void |
draw(java.awt.Graphics2D g)
Draws this handle. |
protected Connector |
findConnector(java.awt.geom.Point2D.Double p,
Figure f,
ConnectionFigure prototype)
|
protected ConnectionFigure |
getConnection()
|
protected abstract java.awt.geom.Point2D.Double |
getLocation()
Returns the start point of the connection. |
protected Connector |
getSource()
Gets the side of the connection that is unaffected by the change. |
protected abstract Connector |
getTarget()
Returns the target connector of the change. |
protected Figure |
getTargetFigure()
|
boolean |
isCombinableWith(Handle handle)
Returns true, if the given handle is an instance of the same class or of a subclass of this handle,. |
protected void |
setConnection(ConnectionFigure newConnection)
|
protected abstract void |
setLocation(java.awt.geom.Point2D.Double p)
Sets the location of the target point. |
protected void |
setTargetFigure(Figure newTarget)
|
void |
trackEnd(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
Connects the figure to the new target. |
void |
trackStart(java.awt.Point anchor,
int modifiersEx)
Disconnects the connection. |
void |
trackStep(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
Finds a new target of the connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ChangeConnectionHandle(Figure owner)
| Method Detail |
|---|
public boolean isCombinableWith(Handle handle)
AbstractHandle
isCombinableWith in interface HandleisCombinableWith in class AbstractHandleprotected abstract Connector getTarget()
protected abstract void disconnect()
protected abstract void connect(Connector c)
protected abstract void setLocation(java.awt.geom.Point2D.Double p)
protected abstract java.awt.geom.Point2D.Double getLocation()
protected Connector getSource()
public void trackStart(java.awt.Point anchor,
int modifiersEx)
anchor - the position where the interaction started
public void trackStep(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
anchor - the position where the interaction startedlead - the current position
public void trackEnd(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
anchor - the position where the interaction startedlead - the current position
protected abstract boolean canConnect(Figure existingEnd,
Figure targetEnd)
protected Connector findConnector(java.awt.geom.Point2D.Double p,
Figure f,
ConnectionFigure prototype)
public void draw(java.awt.Graphics2D g)
draw in interface Handledraw in class AbstractHandleprotected void setConnection(ConnectionFigure newConnection)
protected ConnectionFigure getConnection()
protected void setTargetFigure(Figure newTarget)
protected Figure getTargetFigure()
protected java.awt.Rectangle basicGetBounds()
basicGetBounds in class AbstractHandle
|
Copyright 1996-2006 © JHotDraw.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||