wt.clients.lifecycle.administrator
Class LifeCycleFlow

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bywt.clients.lifecycle.administrator.LifeCycleFlow
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable

public class LifeCycleFlow
extends Panel
implements ItemSelectable

A class to visually define a life cycle flow with phases and gates.

See Also:
Serialized Form

Nested Class Summary
(package private)  class LifeCycleFlow.FlowEditor
          The actual graphics panel.
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  String clickHereString
           
(package private)  CLifeCycleTemplate cLifeCycleTemplate
           
(package private)  LifeCycleFlow.FlowEditor flowEditor
           
(package private)  ItemListener itemListener
           
(package private)  ScrollPane scrollPane
           
(package private)  Phase selected
           
private  boolean viewMode
           
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
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
LifeCycleFlow()
          Creates a new life cycle flow.
 
Method Summary
 void addItemListener(ItemListener l)
          Adds the specified item listener to receive item events from this Life Cycle Flow.
 void addNotify()
          Notifies this component that it has been added to a container and if a peer is required, it should be created.
protected  void addPhase(Phase phase)
          Adds a phase to the end of the life cycle flow.
protected  void addPhaseNoSelect(Phase phase)
          Adds a phase to the end of the life cycle flow.
protected  LifeCycleDefinitionPanel getLifeCyclePanel()
          Returns the LifeCycleDefinitionPanel of this panel
 Dimension getMinimumSize()
          Returns the minimum size of this widget.
 Dimension getPreferredSize()
          Returns the preferred size of this widget.
protected  Phase getSelectedItem()
          Returns the selected phase in the life cycle flow.
 Object[] getSelectedObjects()
          Returns the selected items on the list in an array of Objects.
protected  void insertPhase(Phase phase)
          Inserts a phase before the selected phase of the life cycle flow.
protected  boolean isViewMode()
          Returns true if this panel is in view only mode.
static void main(String[] args)
          Test driver.
protected  void markCurrent(Phase phase)
          Marks a phase current in the life cycle flow.
protected  void processItemEvent(ItemEvent e)
          Processes item events occurring on this Life Cycle Flow by dispatching them to any registered ItemListener objects.
 void removeItemListener(ItemListener l)
          Removes the specified item listener so that it no longer receives item events from this Life Cycle Flow.
protected  void removePhase(Phase phase)
          Removes a phase from the life cycle flow.
protected  void setCLifeCycleTemplate(CLifeCycleTemplate clife_cycle_template)
          Sets the client life cycle template.
 void setLayout(LayoutManager l)
          Sets the layout of this widget.
protected  void setViewMode(boolean view_mode)
          Sets the mode of the life cycle flow panel.
 
Methods inherited from class java.awt.Panel
getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clickHereString

String clickHereString

cLifeCycleTemplate

CLifeCycleTemplate cLifeCycleTemplate

selected

Phase selected

itemListener

transient ItemListener itemListener

flowEditor

LifeCycleFlow.FlowEditor flowEditor

scrollPane

ScrollPane scrollPane

viewMode

private boolean viewMode
Constructor Detail

LifeCycleFlow

public LifeCycleFlow()
Creates a new life cycle flow.

Method Detail

main

public static void main(String[] args)
Test driver.


addNotify

public void addNotify()
Notifies this component that it has been added to a container and if a peer is required, it should be created. The panel is localized at this point.


getLifeCyclePanel

protected LifeCycleDefinitionPanel getLifeCyclePanel()
Returns the LifeCycleDefinitionPanel of this panel


setCLifeCycleTemplate

protected void setCLifeCycleTemplate(CLifeCycleTemplate clife_cycle_template)
Sets the client life cycle template.

Parameters:
clife_cycle_template - the template being shown by this widget

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of this widget.


getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size of this widget.


setLayout

public void setLayout(LayoutManager l)
Sets the layout of this widget. The layout cannot be set on the life cycle flow widget.


insertPhase

protected void insertPhase(Phase phase)
Inserts a phase before the selected phase of the life cycle flow.

Parameters:
phase - the phase to insert

addPhase

protected void addPhase(Phase phase)
Adds a phase to the end of the life cycle flow.

Parameters:
phase - the phase to add

addPhaseNoSelect

protected void addPhaseNoSelect(Phase phase)
Adds a phase to the end of the life cycle flow. Doesn't select the added phase.

Parameters:
phase - the phase to add

removePhase

protected void removePhase(Phase phase)
Removes a phase from the life cycle flow.

Parameters:
phase - the phase to remove

markCurrent

protected void markCurrent(Phase phase)
Marks a phase current in the life cycle flow.

Parameters:
phase - the phase to mark current

getSelectedItem

protected Phase getSelectedItem()
Returns the selected phase in the life cycle flow.


getSelectedObjects

public Object[] getSelectedObjects()
Returns the selected items on the list in an array of Objects.

Specified by:
getSelectedObjects in interface ItemSelectable
See Also:
ItemSelectable

addItemListener

public void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this Life Cycle Flow.

Specified by:
addItemListener in interface ItemSelectable
Parameters:
l - the item listener.
See Also:
ItemEvent, ItemListener, removeItemListener(java.awt.event.ItemListener)

removeItemListener

public void removeItemListener(ItemListener l)
Removes the specified item listener so that it no longer receives item events from this Life Cycle Flow.

Specified by:
removeItemListener in interface ItemSelectable
Parameters:
l - the item listener.
See Also:
ItemEvent, ItemListener, addItemListener(java.awt.event.ItemListener)

processItemEvent

protected void processItemEvent(ItemEvent e)
Processes item events occurring on this Life Cycle Flow by dispatching them to any registered ItemListener objects.

This method is not called unless item events are enabled for this component. Item events are enabled when one of the following occurs:

Parameters:
e - the item event.
See Also:
ItemEvent, ItemListener, List.addItemListener(java.awt.event.ItemListener), Component.enableEvents(long)

setViewMode

protected void setViewMode(boolean view_mode)
Sets the mode of the life cycle flow panel. View mode is a read-only mode.

Parameters:
view_mode - true if read-only, else false

isViewMode

protected boolean isViewMode()
Returns true if this panel is in view only mode.