wt.clients.lifecycle.administrator
Class Phase

java.lang.Object
  extended byjava.awt.Component
      extended bywt.clients.lifecycle.administrator.Phase
All Implemented Interfaces:
Cloneable, ImageObserver, MenuContainer, Serializable

public class Phase
extends Component
implements Cloneable

A component which represents a phase in a life cycle.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  Polygon arrowPolygon
           
(package private)  boolean current
           
private static int GATE_HEIGHT
           
private static int GATE_WIDTH
           
(package private)  Image offscreen
           
private static int PHASE_HEIGHT
           
(package private)  CPhaseTemplate phaseEntry
           
private  int phaseWidth
           
(package private)  boolean promotable
           
(package private)  boolean selected
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected Phase(CPhaseTemplate phase_entry)
          Constructs a new phase component given a CPhaseTemplate.
 
Method Summary
 Object clone()
          Returns a clone of this phase component.
protected  boolean containsGlobal(int x, int y)
          Returns true if this phase contains the global point x, y.
protected  Polygon getArrowPolygon()
          Returns a Polygon in the shape of an arrow.
protected  CPhaseTemplate getCPhaseTemplate()
          Returns the CPhaseTemplate object for this phase component.
protected  String getState()
          Returns the state of this phase.
protected  boolean isCurrent()
          Returns true if the phase is the current phase, else false.
private  boolean isFinalPhase()
          Returns true if this is the final phase in the lifecycle, else false.
protected  boolean isSelected()
          Returns true if the phase is selected, else false.
 void paint(Graphics g)
          Paints the phase onto the specified graphics.
protected  void setCPhaseTemplate(CPhaseTemplate phase_entry)
          Sets the CPhaseTemplate object for this phase component.
protected  void setCurrent(boolean current)
          Sets the current state of the phase.
protected  void setSelected(boolean selected)
          Sets the selected state of a phase.
protected  void setState(String state)
          Sets the state name of the phase.
 String toString()
          Returns the string representation of this phase, it's state.
 void update(Graphics g)
          Updates the specified graphics.
protected  void updateSize()
          Changes the size of a phase depending on whether or not it has a Gate.
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

phaseEntry

CPhaseTemplate phaseEntry

selected

boolean selected

current

boolean current

promotable

boolean promotable

arrowPolygon

Polygon arrowPolygon

phaseWidth

private int phaseWidth

PHASE_HEIGHT

private static final int PHASE_HEIGHT
See Also:
Constant Field Values

GATE_HEIGHT

private static final int GATE_HEIGHT
See Also:
Constant Field Values

GATE_WIDTH

private static final int GATE_WIDTH
See Also:
Constant Field Values

offscreen

Image offscreen
Constructor Detail

Phase

protected Phase(CPhaseTemplate phase_entry)
Constructs a new phase component given a CPhaseTemplate.

Parameters:
phase_entry - the client phase template
Method Detail

setCPhaseTemplate

protected void setCPhaseTemplate(CPhaseTemplate phase_entry)
Sets the CPhaseTemplate object for this phase component.

Parameters:
phase_entry - the client phase template

getCPhaseTemplate

protected CPhaseTemplate getCPhaseTemplate()
Returns the CPhaseTemplate object for this phase component.


update

public void update(Graphics g)
Updates the specified graphics.

Parameters:
g - the graphics to update

clone

public Object clone()
Returns a clone of this phase component.


paint

public void paint(Graphics g)
Paints the phase onto the specified graphics.

Parameters:
g - the graphics to paint the phase upon

getArrowPolygon

protected Polygon getArrowPolygon()
Returns a Polygon in the shape of an arrow.


updateSize

protected void updateSize()
Changes the size of a phase depending on whether or not it has a Gate.


setSelected

protected void setSelected(boolean selected)
Sets the selected state of a phase.

Parameters:
selected - true if selected, else false

isSelected

protected boolean isSelected()
Returns true if the phase is selected, else false.


setCurrent

protected void setCurrent(boolean current)
Sets the current state of the phase.

Parameters:
current - true if the phase is the current phase, else false.

isCurrent

protected boolean isCurrent()
Returns true if the phase is the current phase, else false.


setState

protected void setState(String state)
                 throws WTPropertyVetoException,
                        WTException
Sets the state name of the phase.

Parameters:
state - the name of the state for this phase
Throws:
WTPropertyVetoException - if the state is invalid
WTException - if the state cannot be set

getState

protected String getState()
Returns the state of this phase.


isFinalPhase

private boolean isFinalPhase()
Returns true if this is the final phase in the lifecycle, else false.


toString

public String toString()
Returns the string representation of this phase, it's state.


containsGlobal

protected boolean containsGlobal(int x,
                                 int y)
Returns true if this phase contains the global point x, y.