|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
wt.clients.beans.lifecycle.LifeCyclePanelWTUnit
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);
Nested Class Summary | |
(package private) class |
LifeCyclePanelWTUnit.SymAction
This class listens for ActionEvents of the
screen Components and calls
the appropriate method for the action. |
(package private) class |
LifeCyclePanelWTUnit.WorkThread
The work thread for this Applet. |
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 | |
private Class |
aClass
|
private LifeCycleManaged |
anObject
|
(package private) Button |
browseButton
|
private boolean |
cardLayoutInitialized
|
private String |
CREATE_CARD
|
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. |
(package private) Choice |
createChoice
|
(package private) Label |
createLabel
|
(package private) Panel |
createPanel
|
private static String |
HELP_RESOURCE
|
private static String |
HELP_TARGET
Defined constant String which defines the name of the browser
window to launch online help in. |
private NFHelpContext |
helpContext
|
private NFHelpSystem |
helpSystem
|
(package private) static int |
INIT_CHOICE_LIST
|
private boolean |
initReady
|
private LayoutManager |
layout
|
private static String |
LIFE_CYCLE_TEMPLATE
|
private Hashtable |
lifecycles
|
private ResourceBundle |
messagesResource
|
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. |
private boolean |
notifyDone
|
(package private) static int |
PROCESS_BROWSE
|
private static String |
RESOURCE
|
private static String |
SYSTEM_DOMAIN
|
private ThreadGroup |
theThreadGroup
|
static int |
UPDATE_MODE
Update Mode allows the user to assign a Life Cycle template to a LifeCycleManaged object. |
private boolean |
verbose
|
private String |
VIEW_CARD
|
static int |
VIEW_MODE
View Mode displays the name of the Life Cycle template and Life Cycle state associated with a LifeCycleManaged object. |
(package private) Label |
viewLabel
|
(package private) Label |
viewLifeCycleValue
|
private int |
viewMode
|
(package private) Panel |
viewPanel
|
(package private) Label |
viewStateLabel
|
(package private) Label |
viewStateValue
|
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 | |
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 |
addNotify()
Notifies this component that it has been added to a container and if a peer is required, it should be created. |
private void |
addTemplate(LifeCycleTemplateMasterReference template_reference)
Add a template to the choice list. |
void |
assign()
Save the currently selected life cycle template in the LifeCycleManaged |
void |
assign(LifeCycleManaged an_object)
Save the currently selected Life Cycle choice in the specified LifeCycleManaged |
(package private) void |
browseButton_ActionPerformed(ActionEvent event)
This method is called when the browse button has been pressed. |
private NFHelpContext |
getHelpContext()
Returns the help context. |
private NFHelpSystem |
getHelpSystem()
Get the help system. |
LayoutManager |
getLayout()
Gets the layout manager for this container. |
private ResourceBundle |
getMessagesResource()
getMessagesResource gets the ResourceBundle
used for providing localized error-messages and feedback. |
int |
getMode()
Return the current mode. |
Dimension |
getPreferredSize()
Gets the preferred size of this component. |
LifeCycleTemplateReference |
getSelectedLifeCycleTemplate()
Return the currently selected life cycle template reference. |
private LifeCycleTemplateReference |
getTemplate(LifeCycleManaged an_object)
Get the life cycle reference associated with the specified object. |
private void |
initChoiceList()
Spin off a thread to initialize the choice list. |
private void |
initValues()
If an object has been set, set the text for life cycle value and state. |
private void |
localize()
Localizes the text in this container. |
static void |
main(String[] args)
A main test driver. |
private void |
processBrowse()
Bring up a dialog window for selecting a lifecycle when the browse button is pressed. |
private void |
processInitChoiceList()
Initialize the drop down list with available life cycle choices. |
void |
removeHelpListener(PropertyChangeListener pcl)
Method removeHelpListener removes a listener which was being
notified of PropertyChangeEvents in the help system. |
void |
removeNotify()
Notifies this component that it has been removed from its container and if a peers exists, it destroys it. |
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 |
setEnabled(boolean b)
Enables components used by this Panel . |
void |
setLayout(LayoutManager mgr)
Sets the layout manager for this container. |
void |
setMode(int mode)
Set the mode to either create or view. |
void |
setObject(LifeCycleManaged an_object)
Set the LifeCycleManged object. |
Methods inherited from class java.awt.Panel |
getAccessibleContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CREATE_MODE
LifeCycleManaged
object, a Life Cycle label is displayed
to the left of the choice box.
setMode(int)
,
getMode()
,
Constant Field Valuespublic static final int VIEW_MODE
setMode(int)
,
getMode()
,
Constant Field Valuespublic static final int NO_LABEL_CREATE_MODE
LifeCycleManaged
object. When using this mode the Life Cycle
label is omitted from the display.
setMode(int)
,
getMode()
,
Constant Field Valuespublic static final int NO_LABEL_VIEW_MODE
setMode(int)
,
getMode()
,
Constant Field Valuespublic static final int UPDATE_MODE
LifeCycleManaged
object.
setMode(int)
,
Constant Field Valuespublic static final int NO_LABEL_UPDATE_MODE
LifeCycleManaged
object. When using this mode the
Life Cycle label is omitted from the display.
setMode(int)
,
Constant Field Valuesstatic final int PROCESS_BROWSE
static final int INIT_CHOICE_LIST
private boolean notifyDone
private boolean initReady
private String VIEW_CARD
private String CREATE_CARD
private int viewMode
private boolean cardLayoutInitialized
private static final String RESOURCE
private static final String HELP_RESOURCE
private static final String LIFE_CYCLE_TEMPLATE
private NFHelpSystem helpSystem
private NFHelpContext helpContext
private boolean verbose
private Hashtable lifecycles
private LayoutManager layout
private Class aClass
private LifeCycleManaged anObject
private ThreadGroup theThreadGroup
private ResourceBundle messagesResource
private static final String HELP_TARGET
String
which defines the name of the browser
window to launch online help in.
private static String SYSTEM_DOMAIN
Panel createPanel
Label createLabel
Choice createChoice
Button browseButton
Panel viewPanel
Label viewLabel
Label viewLifeCycleValue
Label viewStateLabel
Label viewStateValue
Constructor Detail |
public LifeCyclePanelWTUnit()
LifeCyclePanelWTUnit
. The default mode is
CREATE_MODE
.
Method Detail |
public void removeNotify()
public void addNotify()
public Dimension getPreferredSize()
public void setLayout(LayoutManager mgr)
public LayoutManager getLayout()
private void localize()
private ResourceBundle getMessagesResource()
getMessagesResource
gets the ResourceBundle
used for providing localized error-messages and feedback.
ResourceBundle
public void setEnabled(boolean b)
Panel
.
private NFHelpContext getHelpContext()
private void initChoiceList()
private void initValues()
private void addTemplate(LifeCycleTemplateMasterReference template_reference)
private void processInitChoiceList()
public void setClassName(String a_class_name)
wt.doc.WTDocument
.
a_class_name
- a fully qualified class name.setClass(java.lang.Class)
public void setClass(Class a_class)
a_class
- the class of the objectsetClassName(java.lang.String)
public int getMode()
CREATE_MODE
,
VIEW_MODE
,
NO_LABEL_VIEW_MODE
,
NO_LABEL_CREATE_MODE
,
UPDATE_MODE
,
NO_LABEL_UPDATE_MODE
public void setMode(int mode)
mode
- either create or viewCREATE_MODE
,
VIEW_MODE
,
NO_LABEL_VIEW_MODE
,
NO_LABEL_CREATE_MODE
,
UPDATE_MODE
,
NO_LABEL_UPDATE_MODE
public LifeCycleTemplateReference getSelectedLifeCycleTemplate()
LifeCycleTemplateReference
object.private LifeCycleTemplateReference getTemplate(LifeCycleManaged an_object)
an_object
- the object whose life cycle will be returned
LifeCycleTemplateReference
associated with the
specified object.public void setObject(LifeCycleManaged an_object)
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.
an_object
- the LifeCycleManged
object.public void assign(LifeCycleManaged an_object)
LifeCycleManaged object.
Supported API: true
- Parameters:
an_object
- the object to update with the currently selected
Life Cycle value.
public void assign()
LifeCycleManaged object previously set by setObject.
Supported API: true
- See Also:
setObject(wt.lifecycle.LifeCycleManaged)
private NFHelpSystem getHelpSystem()
public void addHelpListener(PropertyChangeListener pcl)
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.
pcl
- The PropertyChangeListener
to be notified of
PropertyChangeEvents
generated by the help system.removeHelpListener(java.beans.PropertyChangeListener)
,
HelpSystem
,
HelpContext
,
PropertyChangeListener
public void removeHelpListener(PropertyChangeListener pcl)
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.
pcl
- the PropertyChangeListener
to be removed as a
listener of events generated by the help system of this panel.addHelpListener(java.beans.PropertyChangeListener)
,
PropertyChangeListener
private void processBrowse()
void browseButton_ActionPerformed(ActionEvent event)
public static void main(String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |