org.jhotdraw.samples.pert.figures
Class TaskFigure
- java.lang.Object
-
- org.jhotdraw.beans.AbstractBean
-
- org.jhotdraw.draw.AbstractFigure
-
- org.jhotdraw.draw.AbstractCompositeFigure
-
- org.jhotdraw.draw.GraphicalCompositeFigure
-
- org.jhotdraw.samples.pert.figures.TaskFigure
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, CompositeFigure, Figure, DOMStorable
public class TaskFigure extends GraphicalCompositeFigure
TaskFigure.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.jhotdraw.draw.CompositeFigure
LAYOUT_INSETS
-
Fields inherited from interface org.jhotdraw.draw.Figure
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY
-
-
Constructor Summary
Constructors Constructor and Description TaskFigure()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddDependency(DependencyFigure f)TaskFigureclone()Returns a clone of the figure, with clones of all aggregated figures, such as children and decorators.java.util.Collection<Handle>createHandles(int detailLevel)Return default handles from the presentation figure.java.util.Set<DependencyFigure>getDependencies()intgetDuration()intgetLayer()AbstractFigure always returns 0.java.lang.StringgetName()java.util.List<TaskFigure>getPredecessors()Returns predecessor PertTasks which are directly connected via a PertDependency to this TaskFigure.intgetStartTime()java.util.List<TaskFigure>getSuccessors()Returns dependent PertTasks which are directly connected via a PertDependency to this TaskFigure.booleanisDependentOf(TaskFigure t)Returns true, if the current task is a direct or indirect dependent of the specified task.voidread(DOMInput in)voidremoveDependency(DependencyFigure f)voidsetDuration(int newValue)voidsetName(java.lang.String newValue)java.lang.StringtoString()voidupdateStartTime()voidwrite(DOMOutput out)-
Methods inherited from class org.jhotdraw.draw.GraphicalCompositeFigure
addNotify, chop, contains, draw, get, getAttributes, getBounds, getDrawingArea, getPresentationFigure, remap, removeNotify, set, setAttributeEnabled, setBounds, setPresentationFigure, transform
-
Methods inherited from class org.jhotdraw.draw.AbstractCompositeFigure
add, add, addAll, addAll, addCompositeFigureListener, basicAdd, basicAdd, basicAddAll, basicRemove, basicRemoveAll, basicRemoveAllChildren, basicRemoveChild, bringToFront, changed, contains, findChild, findChildIndex, findFigureInside, getAttributesRestoreData, getChild, getChildCount, getChildren, getChildrenFrontToBack, getDecomposition, getLayouter, getPreferredSize, getTransformRestoreData, indexOf, layout, remove, removeAll, removeAllChildren, removeChild, removeCompositeFigureListener, restoreAttributesTo, restoreTransformTo, sendToBack, setLayouter, willChange
-
Methods inherited from class org.jhotdraw.draw.AbstractFigure
addFigureListener, findCompatibleConnector, findConnector, fireAreaInvalidated, fireFigureChanged, getActions, getConnectors, getCursor, getEndPoint, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, requestRemove, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisible
-
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jhotdraw.draw.Figure
addFigureListener, addPropertyChangeListener, findCompatibleConnector, findConnector, getActions, getConnectors, getCursor, getEndPoint, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removePropertyChangeListener, requestRemove
-
-
-
-
Method Detail
-
createHandles
public java.util.Collection<Handle> createHandles(int detailLevel)
Description copied from class:GraphicalCompositeFigureReturn default handles from the presentation figure.- Specified by:
createHandlesin interfaceFigure- Overrides:
createHandlesin classGraphicalCompositeFigure- Parameters:
detailLevel- The detail level of the handles. Usually this is 0 for bounding box handles and 1 for point handles. The value -1 is used by the SelectAreaTracker and the HandleTracker to highlight figures, over which the mouse pointer is hovering.- Returns:
- a Collection of handles
- See Also:
Handle
-
setName
public void setName(java.lang.String newValue)
-
getName
public java.lang.String getName()
-
setDuration
public void setDuration(int newValue)
-
getDuration
public int getDuration()
-
updateStartTime
public void updateStartTime()
-
getStartTime
public int getStartTime()
-
clone
public TaskFigure clone()
Description copied from interface:FigureReturns 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:
clonein interfaceFigure- Overrides:
clonein classGraphicalCompositeFigure
-
read
public void read(DOMInput in) throws java.io.IOException
- Specified by:
readin interfaceDOMStorable- Overrides:
readin classGraphicalCompositeFigure- Throws:
java.io.IOException
-
write
public void write(DOMOutput out) throws java.io.IOException
- Specified by:
writein interfaceDOMStorable- Overrides:
writein classGraphicalCompositeFigure- Throws:
java.io.IOException
-
getLayer
public int getLayer()
Description copied from class:AbstractFigureAbstractFigure always returns 0. Override this method if your figure needs to be on a different layer.- Specified by:
getLayerin interfaceFigure- Overrides:
getLayerin classAbstractFigure
-
getDependencies
public java.util.Set<DependencyFigure> getDependencies()
-
addDependency
public void addDependency(DependencyFigure f)
-
removeDependency
public void removeDependency(DependencyFigure f)
-
getSuccessors
public java.util.List<TaskFigure> getSuccessors()
Returns dependent PertTasks which are directly connected via a PertDependency to this TaskFigure.
-
getPredecessors
public java.util.List<TaskFigure> getPredecessors()
Returns predecessor PertTasks which are directly connected via a PertDependency to this TaskFigure.
-
isDependentOf
public boolean isDependentOf(TaskFigure t)
Returns true, if the current task is a direct or indirect dependent of the specified task. If the dependency is cyclic, then this method returns true ifthisis passed as a parameter and for every other task in the cycle.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractFigure
-
-
DataMelt 3.0 © DataMelt by jWork.ORG