wt.clients.replication.unit
Class UnitHelperPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bywt.clients.replication.unit.UnitHelperPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
UnitPartPanel, UnitTaskPanel

public class UnitHelperPanel
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 UnitHelperPanel.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  WTContext context
           
private  HelpContext helpContext
           
private  HelpSystem helpSystem
           
protected static ResourceBundle resource
           
protected static String RESOURCE
           
static int SAVE
           
static int SET_UNIT_ITEM
           
protected  ThreadGroup threadGroup
           
private  UnitItem unit
           
 
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
UnitHelperPanel()
          Construct a UnitHelperPanel object.
 
Method Summary
 void addNotify()
          Override default behavior to initialize the help system when this method is invoked.
 Applet getApplet()
          Gets the applet for this panel.
 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
protected  ResourceBundle getLabelsRB()
          Gets the resource bundle for labels
protected  String getLocalizedMessage(String key, Object[] params)
          Convenience method to get a formatted localized message.
protected  String getLocalizedValue(String key)
          Convenience method to get a localized message.
 Frame getParentFrame()
          Get the parent frame of the panel
protected  ThreadGroup getThreadGroup()
          Get the thread group.
 UnitItem getUnitItem()
          Get the contained UnitItem
 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 setContext(WTContext context)
          Set the WTContent
 void setHelpContext(HelpContext helpContext)
          Set the help context
 void setHelpSystem(HelpSystem helpSystem)
          Set the help system
 void setUnitItem()
          This method is invoked by the workthread to initialize the panel.
 void setUnitItem(UnitItem unit)
          Set the contained UnitItem
 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
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_UNIT_ITEM

public static final int SET_UNIT_ITEM
See Also:
Constant Field Values

SAVE

public static final int SAVE
See Also:
Constant Field Values

unit

private UnitItem unit

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

UnitHelperPanel

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

Method Detail

setUnitItem

public void setUnitItem(UnitItem unit)
Set the contained UnitItem

Parameters:
unit - the UnitItem to contain

getUnitItem

public UnitItem getUnitItem()
Get the contained UnitItem

Returns:
the contained UnitItem

setUpdateMode

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

Parameters:
update_mode - if true, allow updates

setUnitItem

public void setUnitItem()
                 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()
                    throws PropertyVetoException
Initialize the help system

Throws:
PropertyVetoException

getHelpBundleName

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

Returns:
the name of the Help Resource Bundle

addNotify

public void addNotify()
Override default behavior to initialize the help system when this method is invoked.


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)
Convenience method to get a formatted localized message.

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)
Convenience method to get a localized message.

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.