wt.clients.prodmgmt
Class HelperPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bywt.clients.prodmgmt.HelperPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
BuildRulePanel, ConfigSpecPanel, ConfigurationTaskPanel, ContentsPanel, InstanceTaskPanel, PartTaskPanel, ReferencesPanel, UsedByPanel, UsesPanel

public class HelperPanel
extends Panel

HelperPanel is a utility Panel used by many UI classes in the wt.clients.prodmgt package. It contains commonly used methods and attributes.

Supported API: true

Extendable: true

See Also:
Serialized Form

Nested Class Summary
 class HelperPanel.WorkThread
          The work thread for this 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
private  Applet applet
           
private  ConfigurationItem configuration
           
private  WTContext context
           
private  HelpContext helpContext
           
private  HelpSystem helpSystem
           
private  InstanceItem instance
           
private  PartItem part
           
protected static ResourceBundle resource
           
protected static String RESOURCE
           
static int SAVE
           
static int SET_CONFIGURATION_ITEM
           
static int SET_INSTANCE_ITEM
           
static int SET_PART_ITEM
           
protected  ThreadGroup threadGroup
           
 
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
HelperPanel()
          Construct a HelperPanel object.
 
Method Summary
 Applet getApplet()
          Gets the applet for this panel.
 ConfigurationItem getConfigurationItem()
          Get the contained ConfigurationItem
 WTContext getContext()
          Get the WTContext to use in threads
protected  String getHelpBundleName()
          Get the name of the Help Resource Bundle
 HelpContext getHelpContext()
          Get the Help Context
 HelpSystem getHelpSystem()
          Get the help system
 InstanceItem getInstanceItem()
          Get the contained InstanceItem
protected  ResourceBundle getLabelsRB()
          Gets the resource bundle for labels
protected  String getLocalizedMessage(String key, Object[] params)
          Deprecated.  
protected  String getLocalizedValue(String key)
          Deprecated.  
 Frame getParentFrame()
          Get the parent frame of the panel
 PartItem getPartItem()
          Get the contained PartItem
protected  ThreadGroup getThreadGroup()
          Get the thread group.
 void initializeHelp()
          Initialize the help system
protected  void initResources()
          Initialize used resource bundles.
protected  void localize()
           
protected  void saveInThread()
          Override as needed in descendants.
 void setApplet(Applet applet)
          Sets the applet for this frame.
 void setConfigurationItem()
          This method is invoked by the workthread to initialize the panel.
 void setConfigurationItem(ConfigurationItem configuration)
          Set the contained ConfigurationItem
 void setContext(WTContext context)
          Set the WTContent
 void setHelpContext(HelpContext helpContext)
          Set the help context
 void setHelpSystem(HelpSystem helpSystem)
          Set the help system
 void setInstanceItem()
          This method is invoked by the workthread to initialize the panel.
 void setInstanceItem(InstanceItem instance)
          Set the contained InstanceItem
 void setPartItem()
          This method is invoked by the workthread to initialize the panel.
 void setPartItem(PartItem part)
          Set the contained PartItem
 void setUpdateMode(boolean update_mode)
          Set the Update mode for the panel.
protected  void showMessageDialog(String message, boolean modal)
          Convenience method to show a Message Dialog.
 
Methods inherited from class java.awt.Panel
addNotify, 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, getMinimumSize, getPreferredSize, 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, setLayout, 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

SET_PART_ITEM

public static final int SET_PART_ITEM
See Also:
Constant Field Values

SAVE

public static final int SAVE
See Also:
Constant Field Values

SET_CONFIGURATION_ITEM

public static final int SET_CONFIGURATION_ITEM
See Also:
Constant Field Values

SET_INSTANCE_ITEM

public static final int SET_INSTANCE_ITEM
See Also:
Constant Field Values

part

private PartItem part

configuration

private ConfigurationItem configuration

instance

private InstanceItem instance

applet

private Applet applet

helpSystem

private HelpSystem helpSystem

helpContext

private HelpContext helpContext

context

private WTContext context

RESOURCE

protected static String RESOURCE

resource

protected static ResourceBundle resource

threadGroup

protected ThreadGroup threadGroup
Constructor Detail

HelperPanel

public HelperPanel()
Construct a HelperPanel object. Saves the current thread group for later use. Initializes resource bundles.

Method Detail

setPartItem

public void setPartItem(PartItem part)
Set the contained PartItem

Parameters:
part - the PartItem to contain

setConfigurationItem

public void setConfigurationItem(ConfigurationItem configuration)
Set the contained ConfigurationItem

Parameters:
configuration - the ConfigurationItem to contain

setInstanceItem

public void setInstanceItem(InstanceItem instance)
Set the contained InstanceItem

Parameters:
instance - the InstanceItem to contain

getPartItem

public PartItem getPartItem()
Get the contained PartItem

Returns:
the contained PartItem

getConfigurationItem

public ConfigurationItem getConfigurationItem()
Get the contained ConfigurationItem

Returns:
the contained ConfigurationItem

getInstanceItem

public InstanceItem getInstanceItem()
Get the contained InstanceItem

Returns:
the contained InstanceItem

setUpdateMode

public void setUpdateMode(boolean update_mode)
Set the Update mode for the panel.

Parameters:
update_mode - if true, allow updates

setPartItem

public void setPartItem()
                 throws WTPropertyVetoException
This method is invoked by the workthread to initialize the panel.

Throws:
WTPropertyVetoException

setConfigurationItem

public void setConfigurationItem()
                          throws WTPropertyVetoException
This method is invoked by the workthread to initialize the panel.

Throws:
WTPropertyVetoException

setInstanceItem

public void setInstanceItem()
                     throws WTPropertyVetoException
This method is invoked by the workthread to initialize the panel.

Throws:
WTPropertyVetoException

saveInThread

protected void saveInThread()
                     throws WTException
Override as needed in descendants.

Throws:
WTException

setApplet

public void setApplet(Applet applet)
Sets the applet for this frame.

Parameters:
applet - the applet.

getApplet

public Applet getApplet()
Gets the applet for this panel.


getParentFrame

public Frame getParentFrame()
Get the parent frame of the panel

Returns:
the parent frame of the panel

initializeHelp

public void initializeHelp()
Initialize the help system


getHelpBundleName

protected String getHelpBundleName()
Get the name of the Help Resource Bundle

Returns:
the name of the Help Resource Bundle

getHelpSystem

public HelpSystem getHelpSystem()
Get the help system

Returns:
the help system

setHelpSystem

public void setHelpSystem(HelpSystem helpSystem)
Set the help system

Parameters:
helpSystem - the helpsystem to use in this component

setContext

public void setContext(WTContext context)
Set the WTContent


getContext

public WTContext getContext()
Get the WTContext to use in threads


setHelpContext

public void setHelpContext(HelpContext helpContext)
Set the help context

Parameters:
helpContext - the help context to use

getHelpContext

public HelpContext getHelpContext()
Get the Help Context

Returns:
the help context

initResources

protected void initResources()
Initialize used resource bundles.


localize

protected void localize()

getLabelsRB

protected ResourceBundle getLabelsRB()
Gets the resource bundle for labels

Returns:
the resource bundle to use for labels.

getLocalizedMessage

protected String getLocalizedMessage(String key,
                                     Object[] params)
Deprecated.  

Convenience method to get a formatted localized message. Replaced with: WTMessage.getLocalizedMessage()

Parameters:
key - the key for the resource bundle entry
params - an array of objects to substitute into the message
Returns:
the formatted localized message. If the key is invalid, it will simply return the key.

getLocalizedValue

protected String getLocalizedValue(String key)
Deprecated.  

Convenience method to get a localized message. Replaced with: WTMessage.getLocalizedMessage()

Parameters:
key - the key for the resource bundle entry
Returns:
the localized message. If the key is invalid, it will simply return the key.

showMessageDialog

protected void showMessageDialog(String message,
                                 boolean modal)
Convenience method to show a Message Dialog.

Parameters:
message - the message to display in the dialog
modal - if true, display the dialog as modal

getThreadGroup

protected ThreadGroup getThreadGroup()
Get the thread group.

Returns:
the thread group.