JHotDraw 6.0b1

org.jhotdraw.samples.pert
Class PertFigure

java.lang.Object
  extended by org.jhotdraw.standard.AbstractFigure
      extended by org.jhotdraw.standard.CompositeFigure
          extended by org.jhotdraw.samples.pert.PertFigure
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Figure, FigureChangeListener, Storable

public class PertFigure
extends CompositeFigure

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jhotdraw.standard.CompositeFigure
_nHighestZ, _nLowestZ, fFigures
 
Constructor Summary
PertFigure()
           
 
Method Summary
 void addPostTask(PertFigure figure)
           
 void addPreTask(PertFigure figure)
           
 void basicDisplayBox(java.awt.Point origin, java.awt.Point corner)
          Sets the display box of a figure.
protected  void basicMoveBy(int x, int y)
          Moves all the given figures by x and y.
 java.awt.Insets connectionInsets()
          Returns the connection inset.
 java.awt.Rectangle displayBox()
          Gets the display box of a figure.
 void draw(java.awt.Graphics g)
          Draws all the contained figures
 int duration()
           
 int end()
           
 void figureChanged(FigureChangeEvent e)
          Sent when a figure changed
 void figureRemoved(FigureChangeEvent e)
          Sent when a figure was removed
 HandleEnumeration handles()
          Returns the handles of a Figure that can be used to manipulate some of its attributes.
 boolean hasCycle(Figure start)
           
 void notifyPostTasks()
           
 void read(StorableInput dr)
          Reads the contained figures from StorableInput.
 java.util.List readTasks(StorableInput dr)
           
 void removePostTask(PertFigure figure)
           
 void removePreTask(PertFigure figure)
           
 void setEnd(int value)
           
 int start()
           
 void update(FigureChangeEvent e)
           
 void updateDurations()
           
 void write(StorableOutput dw)
          Writes the contained figures to the StorableOutput.
 void writeTasks(StorableOutput dw, java.util.List l)
           
 
Methods inherited from class org.jhotdraw.standard.CompositeFigure
add, addAll, addAll, bringToFront, containsFigure, draw, figureAt, figureCount, figureInvalidated, figureRequestRemove, figureRequestUpdate, figures, figures, figuresReverse, findFigure, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, getFigureFromLayer, getLayer, includes, init, orphan, orphanAll, orphanAll, release, remove, removeAll, removeAll, removeAll, replace, sendToBack, sendToLayer
 
Methods inherited from class org.jhotdraw.standard.AbstractFigure
addDependendFigure, addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, getAttribute, getAttribute, getDecoratedFigure, getDependendFigures, getTextHolder, getZValue, invalidate, invalidateRectangle, isEmpty, listener, moveBy, removeDependendFigure, removeFigureChangeListener, removeFromContainer, setAttribute, setAttribute, setZValue, size, visit, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PertFigure

public PertFigure()
Method Detail

start

public int start()

end

public int end()

duration

public int duration()

setEnd

public void setEnd(int value)

addPreTask

public void addPreTask(PertFigure figure)

addPostTask

public void addPostTask(PertFigure figure)

removePreTask

public void removePreTask(PertFigure figure)

removePostTask

public void removePostTask(PertFigure figure)

basicMoveBy

protected void basicMoveBy(int x,
                           int y)
Description copied from class: CompositeFigure
Moves all the given figures by x and y. Doesn't announce any changes. Subclassers override basicMoveBy. Clients usually call moveBy.

Overrides:
basicMoveBy in class CompositeFigure
See Also:
AbstractFigure.moveBy(int, int)

displayBox

public java.awt.Rectangle displayBox()
Description copied from class: AbstractFigure
Gets the display box of a figure.

Specified by:
displayBox in interface Figure
Specified by:
displayBox in class AbstractFigure
See Also:
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)

basicDisplayBox

public void basicDisplayBox(java.awt.Point origin,
                            java.awt.Point corner)
Description copied from class: AbstractFigure
Sets the display box of a figure. This is the method that subclassers override. Clients usually call displayBox.

Specified by:
basicDisplayBox in interface Figure
Specified by:
basicDisplayBox in class AbstractFigure
Parameters:
origin - the new origin
corner - the new corner
See Also:
AbstractFigure.displayBox(java.awt.Point, java.awt.Point)

draw

public void draw(java.awt.Graphics g)
Description copied from class: CompositeFigure
Draws all the contained figures

Specified by:
draw in interface Figure
Overrides:
draw in class CompositeFigure
Parameters:
g - the Graphics to draw into
See Also:
Figure.draw(java.awt.Graphics)

handles

public HandleEnumeration handles()
Description copied from class: AbstractFigure
Returns the handles of a Figure that can be used to manipulate some of its attributes.

Specified by:
handles in interface Figure
Specified by:
handles in class AbstractFigure
Returns:
a type-safe iterator of handles
See Also:
Handle

update

public void update(FigureChangeEvent e)

figureChanged

public void figureChanged(FigureChangeEvent e)
Description copied from interface: FigureChangeListener
Sent when a figure changed

Specified by:
figureChanged in interface FigureChangeListener
Overrides:
figureChanged in class CompositeFigure

figureRemoved

public void figureRemoved(FigureChangeEvent e)
Description copied from interface: FigureChangeListener
Sent when a figure was removed

Specified by:
figureRemoved in interface FigureChangeListener
Overrides:
figureRemoved in class CompositeFigure

notifyPostTasks

public void notifyPostTasks()

updateDurations

public void updateDurations()

hasCycle

public boolean hasCycle(Figure start)

write

public void write(StorableOutput dw)
Description copied from class: CompositeFigure
Writes the contained figures to the StorableOutput.

Specified by:
write in interface Storable
Overrides:
write in class CompositeFigure

writeTasks

public void writeTasks(StorableOutput dw,
                       java.util.List l)

read

public void read(StorableInput dr)
          throws java.io.IOException
Description copied from class: CompositeFigure
Reads the contained figures from StorableInput.

Specified by:
read in interface Storable
Overrides:
read in class CompositeFigure
Throws:
java.io.IOException

connectionInsets

public java.awt.Insets connectionInsets()
Description copied from class: AbstractFigure
Returns the connection inset. The connection inset defines the area where the display box of a figure can't be connected. By default the entire display box can be connected.

Specified by:
connectionInsets in interface Figure
Overrides:
connectionInsets in class AbstractFigure

readTasks

public java.util.List readTasks(StorableInput dr)
                         throws java.io.IOException
Throws:
java.io.IOException

JHotDraw 6.0b1