wt.clients.beans.lifecycle
Class LifeCyclePanelWTUnit

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by wt.clients.beans.lifecycle.LifeCyclePanelWTUnit
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class LifeCyclePanelWTUnit
extends Panel

Class LifeCyclePanelWTUnit is a Panel which supplies the functionality to assign a Life Cycle template to LifeCycleManaged objects. LifeCyclePanelWTUnit provides create, update and view modes.

The create and update modes are comprised of an optional Life Cycle label, choicebox, and browse button for finding and selecting a Life Cycle template.

The view mode displays the values for the Life Cycle template and Life Cycle state associated with a LifeCycleManaged object. This mode displays a Life Cycle label, current Life Cycle template, life cycle state label, and current Life Cycle state of a LifeCycleManaged object. The following code demonstrates creating a LifeCyclePanelWTUnit in view mode:


     LifeCycleManaged lcm_object;

            Frame f = new Frame("LifeCyclePanelWTUnit Test");

            LifeCyclePanelWTUnit lcp = new LifeCyclePanelWTUnit();
            f.setSize (300,100);
            f.setLayout (new BorderLayout());

     f.add(lcp);
     lcp.setMode(VIEW_MODE);
     lcp.setObject(lcm_object);

     f.show();
 
The following code demonstrates assigning the Life Cycle template provided by the user into the LifeCycleManaged object.

     lcp.assign(lcm_object);

 


Supported API: true

Extendable: true

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int CREATE_MODE
          Create Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object, a Life Cycle label is displayed to the left of the choice box.
static int NO_LABEL_CREATE_MODE
          No Label Create Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object.
static int NO_LABEL_UPDATE_MODE
          No Label Update Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object.
static int NO_LABEL_VIEW_MODE
          No Label View Mode displays the name of the Life Cycle template and Life Cycle state associated with a LifeCycleManaged object.
static int UPDATE_MODE
          Update Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object.
static int VIEW_MODE
          View Mode displays the name of the Life Cycle template and Life Cycle state associated with a LifeCycleManaged object.
 
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
LifeCyclePanelWTUnit()
          Creates a LifeCyclePanelWTUnit.
 
Method Summary
 void addHelpListener(PropertyChangeListener pcl)
          Method addHelpListener adds the given listener to be notified of PropertyChangeEvents in the help system.
 void assign()
          Save the currently selected life cycle template in the LifeCycleManaged object previously set by setObject.
 void assign(wt.lifecycle.LifeCycleManaged an_object)
          Save the currently selected Life Cycle choice in the specified LifeCycleManaged object.
 int getMode()
          Return the current mode.
 wt.lifecycle.LifeCycleTemplateReference getSelectedLifeCycleTemplate()
          Return the currently selected life cycle template reference.
 void removeHelpListener(PropertyChangeListener pcl)
          Method removeHelpListener removes a listener which was being notified of PropertyChangeEvents in the help system.
 void setClass(Class a_class)
          Set the class used to obtain the list of life cycle choices.
 void setClassName(String a_class_name)
          Set the class name used to obtain the list of life cycle choices.
 void setMode(int mode)
          Set the mode to either create or view.
 void setObject(wt.lifecycle.LifeCycleManaged an_object)
          Set the LifeCycleManged object.
 
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, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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

CREATE_MODE

public static final int CREATE_MODE
Create Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object, a Life Cycle label is displayed to the left of the choice box.

Supported API: true

See Also:
setMode(int), getMode(), Constant Field Values

VIEW_MODE

public static final int VIEW_MODE
View Mode displays the name of the Life Cycle template and Life Cycle state associated with a LifeCycleManaged object.

Supported API: true

See Also:
setMode(int), getMode(), Constant Field Values

NO_LABEL_CREATE_MODE

public static final int NO_LABEL_CREATE_MODE
No Label Create Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object. When using this mode the Life Cycle label is omitted from the display.

Supported API: true

See Also:
setMode(int), getMode(), Constant Field Values

NO_LABEL_VIEW_MODE

public static final int NO_LABEL_VIEW_MODE
No Label View Mode displays the name of the Life Cycle template and Life Cycle state associated with a LifeCycleManaged object. When using this mode the Life Cycle label is omitted from the display.

Supported API: true

See Also:
setMode(int), getMode(), Constant Field Values

UPDATE_MODE

public static final int UPDATE_MODE
Update Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object.

Supported API: true

See Also:
setMode(int), Constant Field Values

NO_LABEL_UPDATE_MODE

public static final int NO_LABEL_UPDATE_MODE
No Label Update Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object. When using this mode the Life Cycle label is omitted from the display.

Supported API: true

See Also:
setMode(int), Constant Field Values
Constructor Detail

LifeCyclePanelWTUnit

public LifeCyclePanelWTUnit()
Creates a LifeCyclePanelWTUnit. The default mode is CREATE_MODE.

Supported API: true

Method Detail

setClassName

public void setClassName(String a_class_name)
Set the class name used to obtain the list of life cycle choices. The class name must be a fully qualified class name for example wt.doc.WTDocument.

Supported API: true

Parameters:
a_class_name - a fully qualified class name.
See Also:
setClass(java.lang.Class)

setClass

public void setClass(Class a_class)
Set the class used to obtain the list of life cycle choices.

Supported API: true

Parameters:
a_class - the class of the object
See Also:
setClassName(java.lang.String)

getMode

public int getMode()
Return the current mode.

Supported API: true

Returns:
the current mode
See Also:
CREATE_MODE, VIEW_MODE, NO_LABEL_VIEW_MODE, NO_LABEL_CREATE_MODE, UPDATE_MODE, NO_LABEL_UPDATE_MODE

setMode

public void setMode(int mode)
Set the mode to either create or view.

Supported API: true

Parameters:
mode - either create or view
See Also:
CREATE_MODE, VIEW_MODE, NO_LABEL_VIEW_MODE, NO_LABEL_CREATE_MODE, UPDATE_MODE, NO_LABEL_UPDATE_MODE

getSelectedLifeCycleTemplate

public wt.lifecycle.LifeCycleTemplateReference getSelectedLifeCycleTemplate()
Return the currently selected life cycle template reference.

Supported API: true

Returns:
the LifeCycleTemplateReference object.

setObject

public void setObject(wt.lifecycle.LifeCycleManaged an_object)
Set the LifeCycleManged object. The object is used to initialize the Life Cycle choice list in create mode. In view mode the object is used to obtain the current values of the Life Cycle template name and Life Cycle state for display.

Supported API: true

Parameters:
an_object - the LifeCycleManged object.

assign

public void assign(wt.lifecycle.LifeCycleManaged an_object)
Save the currently selected Life Cycle choice in the specified LifeCycleManaged object.

Supported API: true

Parameters:
an_object - the object to update with the currently selected Life Cycle value.

assign

public void assign()
Save the currently selected life cycle template in the LifeCycleManaged object previously set by setObject.

Supported API: true

See Also:
setObject(wt.lifecycle.LifeCycleManaged)

addHelpListener

public void addHelpListener(PropertyChangeListener pcl)
Method addHelpListener adds the given listener to be notified of PropertyChangeEvents in the help system. Tool description PropertyChangeEvents are generated when the user mouses over the buttons and list of ContentItems in this panel. The given listener will be notified of those events.

Supported API: true

Parameters:
pcl - The PropertyChangeListener to be notified of PropertyChangeEvents generated by the help system.
See Also:
removeHelpListener(java.beans.PropertyChangeListener), HelpSystem, HelpContext, PropertyChangeListener

removeHelpListener

public void removeHelpListener(PropertyChangeListener pcl)
Method removeHelpListener removes a listener which was being notified of PropertyChangeEvents in the help system. If the given listener is not currently a listener, no changes are made.

Supported API: true

Parameters:
pcl - the PropertyChangeListener to be removed as a listener of events generated by the help system of this panel.
See Also:
addHelpListener(java.beans.PropertyChangeListener), PropertyChangeListener