org.jhotdraw.samples.pert.figures
Class DependencyFigure
java.lang.Object
org.jhotdraw.beans.AbstractBean
org.jhotdraw.draw.AbstractFigure
org.jhotdraw.draw.AbstractAttributedFigure
org.jhotdraw.draw.BezierFigure
org.jhotdraw.draw.LineFigure
org.jhotdraw.draw.LineConnectionFigure
org.jhotdraw.samples.pert.figures.DependencyFigure
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, ConnectionFigure, Figure, DOMStorable
public class DependencyFigure
- extends LineConnectionFigure
DependencyFigure.
- Version:
- $Id: DependencyFigure.java 647 2010-01-24 22:52:59Z rawcoder $
- Author:
- Werner Randelshofer.
- See Also:
- Serialized Form
Methods inherited from class org.jhotdraw.draw.LineConnectionFigure |
addNotify, createHandles, getBezierPath, getEndConnector, getEndFigure, getLiner, getStartConnector, getStartFigure, handleMouseClick, lineout, read, readLiner, readPoints, remap, reverseConnection, setConnectable, setEndConnector, setEndPoint, setLiner, setNode, setPoint, setStartConnector, setStartPoint, transform, updateConnection, validate, write, writeLiner, writePoints |
Methods inherited from class org.jhotdraw.draw.BezierFigure |
addNode, addNode, chop, contains, drawCaps, drawFill, drawStroke, findCompatibleConnector, findConnector, findNode, findSegment, getBounds, getCappedPath, getCenter, getDrawingArea, getEndPoint, getNode, getNodeCount, getOutermostPoint, getPoint, getPoint, getPointOnPath, getStartPoint, getTransformRestoreData, invalidate, isClosed, joinSegments, joinSegments, layout, removeAllNodes, removeNode, restoreTransformTo, set, setBezierPath, setBounds, setClosed, setPoint, splitSegment, splitSegment |
Methods inherited from class org.jhotdraw.draw.AbstractAttributedFigure |
applyAttributesTo, draw, drawText, get, getAttributeKey, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, setAttributeEnabled, setAttributes, writeAttributes |
Methods inherited from class org.jhotdraw.draw.AbstractFigure |
addFigureListener, basicClone, changed, findFigureInside, fireAreaInvalidated, fireAreaInvalidated, fireAreaInvalidated, fireAttributeChanged, fireFigureAdded, fireFigureChanged, fireFigureChanged, fireFigureChanged, fireFigureHandlesChanged, fireFigureRemoved, fireFigureRequestRemove, fireUndoableEditHappened, getActions, getChangingDepth, getConnectors, getCursor, getDecomposition, getDrawing, getFontRenderContext, getLock, getPreferredSize, getTool, getToolTipText, handleDrop, includes, isChanging, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, removeFigureListener, requestRemove, setBounds, setRemovable, setSelectable, setTransformable, setVisible, toString, willChange |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jhotdraw.draw.Figure |
addFigureListener, addPropertyChangeListener, changed, contains, draw, findCompatibleConnector, findConnector, findFigureInside, get, getActions, getAttributes, getAttributesRestoreData, getBounds, getConnectors, getCursor, getDecomposition, getDrawingArea, getPreferredSize, getTool, getToolTipText, getTransformRestoreData, handleDrop, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, removeFigureListener, removePropertyChangeListener, requestRemove, restoreAttributesTo, restoreTransformTo, set, setBounds, willChange |
DependencyFigure
public DependencyFigure()
- Creates a new instance.
canConnect
public boolean canConnect(Connector start,
Connector end)
- Checks if two figures can be connected. Implement this method
to constrain the allowed connections between figures.
- Specified by:
canConnect
in interface ConnectionFigure
- Overrides:
canConnect
in class LineConnectionFigure
canConnect
public boolean canConnect(Connector start)
- Description copied from interface:
ConnectionFigure
- Checks if this
ConnectionFigure
can be connect to the specified
Connector
.
This is used to provide an early feedback to the user, when he/she
creates a new connection.
- Specified by:
canConnect
in interface ConnectionFigure
- Overrides:
canConnect
in class LineConnectionFigure
handleDisconnect
protected void handleDisconnect(Connector start,
Connector end)
- Handles the disconnection of a connection.
Override this method to handle this event.
- Overrides:
handleDisconnect
in class LineConnectionFigure
- See Also:
LineConnectionFigure.removeNotify(org.jhotdraw.draw.Drawing)
handleConnect
protected void handleConnect(Connector start,
Connector end)
- Handles the connection of a connection.
Override this method to handle this event.
- Overrides:
handleConnect
in class LineConnectionFigure
clone
public DependencyFigure clone()
- Description copied from interface:
Figure
- Returns a clone of the figure, with clones of all aggregated figures,
such as children and decorators. The cloned figure does not clone
the list of FigureListeners from its original.
- Specified by:
clone
in interface Figure
- Overrides:
clone
in class LineConnectionFigure
getLayer
public int getLayer()
- Description copied from class:
AbstractFigure
- AbstractFigure always returns 0.
Override this method if your figure needs to be on a different layer.
- Specified by:
getLayer
in interface Figure
- Overrides:
getLayer
in class AbstractFigure
removeNotify
public void removeNotify(Drawing d)
- Description copied from class:
LineConnectionFigure
- This method is invoked, when the Figure is being removed from a Drawing.
This method invokes handleDisconnect, if the Figure is connected.
- Specified by:
removeNotify
in interface Figure
- Overrides:
removeNotify
in class LineConnectionFigure
- See Also:
LineConnectionFigure.handleDisconnect(org.jhotdraw.draw.connector.Connector, org.jhotdraw.draw.connector.Connector)