com.tivoli.twg.console
Class TWGTaskFrame

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended byjavax.swing.JFrame
                      extended bycom.tivoli.uif.controls.UFFrame
                          extended bycom.tivoli.twg.console.TWGTaskFrame
All Implemented Interfaces:
javax.accessibility.Accessible, com.tivoli.uif.core.BeanContextChild, com.tivoli.uif.core.ChildStateListener, java.awt.event.ComponentListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, TWGTaskFrameImplementor, com.tivoli.uif.core.UFEventListener, com.tivoli.twg.guilibs.WindowAttributeListener, javax.swing.WindowConstants, java.awt.event.WindowListener

public abstract class TWGTaskFrame
extends com.tivoli.uif.controls.UFFrame
implements com.tivoli.uif.core.BeanContextChild, com.tivoli.twg.guilibs.WindowAttributeListener, TWGTaskFrameImplementor, java.awt.event.ComponentListener

This is the base class for all Director Top-level task frames. This abstract class provides the base implementation for several of the the necessary interfaces for activating and deactivating a task frame. In Director, executing tasks can have several pieces, including a server side piece, a client side piece and a console piece. Task frames are used to implement the console side piece. The property file for a task includes a tag that indicates the task is interactive. The "GUI" tag will include the name of the class to load for the console piece. The TWGTaskFrame provides a base implementation of this interface to make it easier to interact with the engine.

When a task is launched that contains an interactive portion, Director will load the class specified by the "GUI" attribute of the task's property file on a separate thread. This class is loaded as a bean, which means that it runs the class' default constructor (meaning you must have a default constructor defined in the derived class). When a TWGTaskFrame derived class is created, it will set default color information up for the frame and will automatically add a status panel at the bottom of the frame if requested.

After the constructor has completed, Director will then call the setTaskActivator method, passing in the TWGTaskActivator that corresponds to this task. This method internally calls the pInit method to allow the derived class to initialize itself after the task frame has been initialized. A derived class overrides this method and returns true if initialization is successful.

Finally, Director will call the consoleStart method to build the rest of the GUI, position the frame and show it. This method internally calls the buildView method, which derived classes override and provide their client GUI code. The top-level container for the client area is returned from this method and is added to the frame. A help context is also automatically created if a help topics mapping attribute was specified in the tasks property file. The setInitialFocusedComponent method may be used to have TWGTaskFrame set the initial focus on a particular component when the window is shown.

TWGTaskFrame will automatically cache away the size and position of the task frame so that the next time the frame is brought up it is restored to its previous location and dimension. This is either cached away as a serialized preference object, or it can be saved away using the TWGTaskFrameGUIAttributes class which reduces the size of the data cached.

When the task frame is closed (via the consoleCancel method), the verifyOnClose method is called to allow derived classes the opportunity to prompt the user to save data that may not yet be saved. If the close will proceed, then the pCleanUp method is called to allow derived classes to clean up anything they may have setup during initialization or execution of the task.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String ATTR_GROUP
           
 java.awt.Font boldFont
           
static int INITIAL_HEIGHT
           
static int INITIAL_WIDTH
           
protected  AnimationPanel ivAnimationPanel
           
protected  java.awt.Point ivLastLoc
           
protected  java.awt.Dimension ivLastSize
           
protected  TWGStatusField ivStatusMsg
           
protected  TWGStatusPanel ivStatusPanel
           
static java.lang.String LAST_LOC
           
static java.lang.String LAST_SIZE
           
static int MAIN_CONSOLE_SHUTDOWN
           
static java.lang.String PREF_GROUP
           
static int SERVER_REQUESTED_CLOSE
           
static int USER_REQUESTED_CLOSE
          Parameters passed on consoleCancel() requests.
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.tivoli.uif.core.BeanContextChild
COPYRIGHT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TWGTaskFrame()
          This is the default constructor for the task frame.
TWGTaskFrame(boolean createStatusPanel)
          Use this constructor to create a task frame that will automatically contain a status panel and a status indicator.
 
Method Summary
 void addCloseHandler(javax.swing.JComponent obj)
          Attach an ALT-F4 key handler to close the frame to the object
 java.awt.Container buildView()
          Create the client pane and return it.
 void childStateChanged(com.tivoli.uif.core.ChildStateEvent cse)
          Implements BeanContextChild Interface
 void componentHidden(java.awt.event.ComponentEvent e)
           
 void componentMoved(java.awt.event.ComponentEvent e)
          Implements Component Listener for caching movement of the window.
 void componentResized(java.awt.event.ComponentEvent e)
           
 void componentShown(java.awt.event.ComponentEvent e)
           
 void consoleCancel()
          Default method called internally whenever the user closes the task frame by pressing the close button or closing from a menu option.
 void consoleCancel(int cancelType)
          Called by the console when this instance of the task frame is being cancelled.
 void consoleStart()
          Start the console and display the frame (if okay to start).
 void doSetStatusText(java.lang.String text)
          Use this method to specify the text that should appear in the status field message area of the status panel.
 com.tivoli.uif.core.BeanContext getBeanContext()
          Returns the BeanContext in which the Bean is operating.
 java.awt.Dimension getFrameSize()
          Returns the default frame size that is used when the frame is initially created.
 TWGHelpContext getHelpContext()
          Returns the help instance created during initialization.
 com.tivoli.uif.core.UFPrefGroup getPreferenceGroup()
          Returns the name of the preference group for the task to allow derived classes to store their own preferences as well.
 java.lang.String getPreferenceKey()
          Sets up and returns the name of the unique key that preferences will be stored (and retrieved) by at the server level for this task frame.
 AnimationPanel getStatusIndicator()
          Use this method to get the status indicator the frame uses (if any).
 UFStatusPanel getStatusPanel()
          Deprecated. - This method will be removed in framework5. It has been replaced by getTaskStatusPanel().
 java.lang.String getStatusText()
          Use this method to retrieve the current text that appears in the status field message area of the status panel.
 TWGTaskActivator getTaskActivator()
          Retrieve the task activation object for this task frame.
 com.tivoli.twg.console.TWGTaskFrameGUIAttributes getTaskFrameGUIAttributes()
          Retrieve the current task frame gui attributes block for this task frame.
 ServiceNode getTaskFrameServiceNode()
          Get reference to the task frame's ServiceNode for sending commands.
 TWGStatusPanel getTaskStatusPanel()
          Use this method to return the instance of the status panel for the task frame.
 void launchTask(TWGSubtask subTask, LongValueSet moset, LongValueSet foset, java.lang.Object data)
          Launch the subtask passed, with the target parameters provided.
 com.tivoli.twg.console.TWGTaskFrameGUIAttributes loadTaskFrameGUIAttributes()
          Load the attributes cached away.
 void pCleanUp()
          Clean up routine to allow derived task frame classes to clean up after themselves.
 boolean pInit()
          Initialization routine for setting up non-gui items.
 void positionAndShow()
          Routine which sizes, locates, and shows the frame.
 void removeCloseHandler(javax.swing.JComponent obj)
          Detach the ALT-F4 key handler from the object
 void removeStatusField()
          Use this method to remove the default status field message area of the status panel.
 void replaceStatusPanel(TWGStatusPanel statusPanel)
          Use this method to set the status panel the task frame displays to the bottom of the content pane.
 void saveTaskFrameGUIAttributes(com.tivoli.twg.console.TWGTaskFrameGUIAttributes tfga)
          Cache away the task frame gui attributes.
 void serverTaskEnded(int endingType)
          Called by the console when the server task activation for this instance of the task frame has ended.
 void setInitialFocusedComponent(java.awt.Component comp)
          Set the component that will initially receive the focus.
 void setStatusIndicator(AnimationPanel animationPanel)
          Use this method to set the status indicator the frame uses.
 void setStatusPanel(boolean useStatusPanel)
          Use this method to add/remove the status panel on the bottom of the content pane.
 void setStatusText(java.lang.String text)
          Use this method to specify the text that should appear in the status field message area of the status panel.
 void setTaskActivator(TWGTaskActivator activator)
          Context parameters are passed to this tasks frame, based on how this frame was invoked.
 void setToTaskFrameGUIAttributes(boolean setForTFGA)
          Changes the task frame so that it uses the task frame gui attributes class for caching information away instead of the user preference groups that was used previously.
 void startStatusIndicator()
          Use this method to start animating the frames contained in the task frames TWGStatusIndicator class.
 void stopStatusIndicator()
          Use this method to stop animating the frames contained in the task frames TWGStatusIndicator class.
 void update()
          Routine which adds the client panel to the frame, adds any close handlers to it and shows the frame.
 boolean verifyOnClose(int cancelType)
          Routine to allow derived task frames to prompt the user if they should close or not.
 void windowAttributesChanged(com.tivoli.twg.guilibs.WindowAttributeEvent windowAttributeEvent)
          This function is called when the window attributes for the application have changed.
 void windowClosing(java.awt.event.WindowEvent evt)
          Implements WindowListener Interface support so we can catch dialog kills.
 
Methods inherited from class com.tivoli.uif.controls.UFFrame
center, center, dispose, dragBegin, dragCancel, dragEnd, dragOver, focusGained, focusLost, getParentWindow, getTopLevelParent, ignoreSetCursor, isBusy, locateDropTarget, locateOnScreen, makeManaged, makeUnmanaged, registerDropTarget, setBusy, setIconImage, show, unregisterDropTarget, updateComponentPaneUI, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, 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, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, 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, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

USER_REQUESTED_CLOSE

public static final int USER_REQUESTED_CLOSE
Parameters passed on consoleCancel() requests.

See Also:
Constant Field Values

SERVER_REQUESTED_CLOSE

public static final int SERVER_REQUESTED_CLOSE
See Also:
Constant Field Values

MAIN_CONSOLE_SHUTDOWN

public static final int MAIN_CONSOLE_SHUTDOWN
See Also:
Constant Field Values

PREF_GROUP

public static final java.lang.String PREF_GROUP
See Also:
Constant Field Values

ATTR_GROUP

public static final java.lang.String ATTR_GROUP
See Also:
Constant Field Values

LAST_LOC

public static final java.lang.String LAST_LOC
See Also:
Constant Field Values

LAST_SIZE

public static final java.lang.String LAST_SIZE
See Also:
Constant Field Values

INITIAL_WIDTH

public static final int INITIAL_WIDTH
See Also:
Constant Field Values

INITIAL_HEIGHT

public static final int INITIAL_HEIGHT
See Also:
Constant Field Values

boldFont

public java.awt.Font boldFont

ivLastSize

protected java.awt.Dimension ivLastSize

ivLastLoc

protected java.awt.Point ivLastLoc

ivStatusPanel

protected TWGStatusPanel ivStatusPanel

ivStatusMsg

protected TWGStatusField ivStatusMsg

ivAnimationPanel

protected AnimationPanel ivAnimationPanel
Constructor Detail

TWGTaskFrame

public TWGTaskFrame()
This is the default constructor for the task frame. Note that the default behavior is to not include a status panel at the bottom of the frame.


TWGTaskFrame

public TWGTaskFrame(boolean createStatusPanel)
Use this constructor to create a task frame that will automatically contain a status panel and a status indicator.

Parameters:
createStatusPanel - - If true, the task frame is automatically created with a status panel. The status panel will by default contain a status indicator as its left most child. Otherwise, the task frame will not have a status panel.
Method Detail

setStatusPanel

public void setStatusPanel(boolean useStatusPanel)
Use this method to add/remove the status panel on the bottom of the content pane.

Parameters:
useStatusPanel - - If true, a status panel will be added below the content pane. Otherwise any existing panel will be removed.

replaceStatusPanel

public void replaceStatusPanel(TWGStatusPanel statusPanel)
Use this method to set the status panel the task frame displays to the bottom of the content pane. Allows you to swap out the default status panel to a customized one that you provide.

Parameters:
statusPanel - - The new status panel to display below the content pane.

getStatusPanel

public UFStatusPanel getStatusPanel()
Deprecated. - This method will be removed in framework5. It has been replaced by getTaskStatusPanel().

Use this method to return the instance of the status panel for the task frame.

Returns:
Returns the current status panel in use at the bottom of the content pane for this frame. If no status panel was set, null is returned.

getTaskStatusPanel

public TWGStatusPanel getTaskStatusPanel()
Use this method to return the instance of the status panel for the task frame.

Returns:
Returns the current status panel in use at the bottom of the content pane for this frame. If no status panel was set, null is returned.

setStatusIndicator

public void setStatusIndicator(AnimationPanel animationPanel)
Use this method to set the status indicator the frame uses.

Parameters:
animationPanel - - The animation panel to be placed at the leftmost position of the status panel and will be accessed by the convenience methods provided. If null, then remove any existing animation panel.

getStatusIndicator

public AnimationPanel getStatusIndicator()
Use this method to get the status indicator the frame uses (if any).

Returns:
The animation panel that is currently being used in the status panel. If null is returned, then no panel is in use.

startStatusIndicator

public void startStatusIndicator()
Use this method to start animating the frames contained in the task frames TWGStatusIndicator class. This function does nothing if your task frame does not contain a status indicator.


stopStatusIndicator

public void stopStatusIndicator()
Use this method to stop animating the frames contained in the task frames TWGStatusIndicator class.


setStatusText

public void setStatusText(java.lang.String text)
Use this method to specify the text that should appear in the status field message area of the status panel.

Parameters:
text - The message string to display in the status field.

doSetStatusText

public void doSetStatusText(java.lang.String text)
Use this method to specify the text that should appear in the status field message area of the status panel.

Parameters:
text - The message string to display in the status field.

getStatusText

public java.lang.String getStatusText()
Use this method to retrieve the current text that appears in the status field message area of the status panel.

Returns:
The message string displayed in the status field.

removeStatusField

public void removeStatusField()
Use this method to remove the default status field message area of the status panel.


getTaskFrameServiceNode

public final ServiceNode getTaskFrameServiceNode()
                                          throws ServiceNodeException
Get reference to the task frame's ServiceNode for sending commands. The ServiceNode will be created the first time this method is called. All subsequent calls will use the same ServiceNode.

Returns:
reference to ServiceNode
Throws:
ServiceNodeException - if unable to open ServiceNode

pInit

public boolean pInit()
Initialization routine for setting up non-gui items. Derived classes override this method to perform their initialization. This method is called from setTaskActivator after the task activation instance has been initialized (meaning task object information can be retrieved from the task activation object). Return true to have the frame continue initialization and be displayed. Return false to stop the frame from coming up.


pCleanUp

public void pCleanUp()
Clean up routine to allow derived task frame classes to clean up after themselves. Derived classes override this method to perform their cleanup. This method is called when the task frame is definitely closing (meaning any user verification was already completed and the user indicated it was okay to close).


verifyOnClose

public boolean verifyOnClose(int cancelType)
Routine to allow derived task frames to prompt the user if they should close or not. Derived classes override this method to allow them to check internal conditions to determine if it is okay to close and if conditions are not right, to correct them or to prompt the user for direction. For example, if a user requests a task console to close and the user has not yet saved information that he was editing, this method could be used to prompt the user whether he wishes to save the data before closing, or to just close and lose the changes he made, or cancel and continue editing.

Returns:
Return true to close the frame, otherwise return false to stop the frame from closing.

setTaskActivator

public void setTaskActivator(TWGTaskActivator activator)
Context parameters are passed to this tasks frame, based on how this frame was invoked. These parameters can be queried from within the TWGTaskActivator object.

Specified by:
setTaskActivator in interface TWGTaskFrameImplementor
Parameters:
activator - The TWGTaskActivator object that corresponds to this task request.

getTaskActivator

public TWGTaskActivator getTaskActivator()
Retrieve the task activation object for this task frame.

Specified by:
getTaskActivator in interface TWGTaskFrameImplementor

serverTaskEnded

public void serverTaskEnded(int endingType)
Called by the console when the server task activation for this instance of the task frame has ended. All termination processing should be done here, and the main thread should be exited.

Specified by:
serverTaskEnded in interface TWGTaskFrameImplementor
Parameters:
endingType - This indicates why the server task ended (i.e. completed successfully, error occurred, etc.

consoleCancel

public void consoleCancel(int cancelType)
Called by the console when this instance of the task frame is being cancelled. All termination processing should be done here, and the main thread should be exited.

Specified by:
consoleCancel in interface TWGTaskFrameImplementor
Parameters:
cancelType - This indicates which type of cancellation is occurring.

consoleCancel

public void consoleCancel()
Default method called internally whenever the user closes the task frame by pressing the close button or closing from a menu option.


consoleStart

public void consoleStart()
Start the console and display the frame (if okay to start).

Specified by:
consoleStart in interface TWGTaskFrameImplementor

windowAttributesChanged

public void windowAttributesChanged(com.tivoli.twg.guilibs.WindowAttributeEvent windowAttributeEvent)
This function is called when the window attributes for the application have changed. The Task Frame should make changes to its appearance based on the new interface attributes.

Specified by:
windowAttributesChanged in interface com.tivoli.twg.guilibs.WindowAttributeListener
Parameters:
windowAttributeEvent - The attribute event sent that contains the latest attribute information to be processed. NOTE: Derived classes need to call this superclass version to get the status panel to update its colors correctly.

getFrameSize

public java.awt.Dimension getFrameSize()
Returns the default frame size that is used when the frame is initially created. Task frames should override this method to provide their own appropriate size.


buildView

public java.awt.Container buildView()
Create the client pane and return it.


setInitialFocusedComponent

public void setInitialFocusedComponent(java.awt.Component comp)
Set the component that will initially receive the focus.

Parameters:
comp - - the Component which should initially receive the focus.

windowClosing

public void windowClosing(java.awt.event.WindowEvent evt)
Implements WindowListener Interface support so we can catch dialog kills.

Specified by:
windowClosing in interface java.awt.event.WindowListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Implements Component Listener for caching movement of the window.

Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Specified by:
componentResized in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Specified by:
componentShown in interface java.awt.event.ComponentListener

launchTask

public void launchTask(TWGSubtask subTask,
                       LongValueSet moset,
                       LongValueSet foset,
                       java.lang.Object data)
Launch the subtask passed, with the target parameters provided.


update

public void update()
Routine which adds the client panel to the frame, adds any close handlers to it and shows the frame. It performs the update on the AWT event thread using Swing invokeLater


positionAndShow

public void positionAndShow()
Routine which sizes, locates, and shows the frame. If a size and position was cached away, then reuse them. Otherwise, use a default size for the frame and center it.


childStateChanged

public void childStateChanged(com.tivoli.uif.core.ChildStateEvent cse)
                       throws com.tivoli.uif.core.ChildVetoException
Implements BeanContextChild Interface

Specified by:
childStateChanged in interface com.tivoli.uif.core.ChildStateListener
Throws:
com.tivoli.uif.core.ChildVetoException

getBeanContext

public com.tivoli.uif.core.BeanContext getBeanContext()
Returns the BeanContext in which the Bean is operating.

Specified by:
getBeanContext in interface com.tivoli.uif.core.BeanContextChild

getHelpContext

public TWGHelpContext getHelpContext()
Returns the help instance created during initialization. Task frames can add help by calling either addHelp() to add an F1 key handler to a component (probably to the Container returned in buildView() ) or addHelpListener() to add a help action to a JButton or JMenuItem.

Returns:
The help context created for this task frame. This context is created during initialization if the task properties file contains a help topics mapping file entry. Otherwise, null is returned.

setToTaskFrameGUIAttributes

public void setToTaskFrameGUIAttributes(boolean setForTFGA)
Changes the task frame so that it uses the task frame gui attributes class for caching information away instead of the user preference groups that was used previously.


loadTaskFrameGUIAttributes

public com.tivoli.twg.console.TWGTaskFrameGUIAttributes loadTaskFrameGUIAttributes()
Load the attributes cached away. Prime with the defaults to use if none are loaded.

Returns:
the current task frame gui attributes block that was loaded (or created) for this task frame.

getTaskFrameGUIAttributes

public com.tivoli.twg.console.TWGTaskFrameGUIAttributes getTaskFrameGUIAttributes()
Retrieve the current task frame gui attributes block for this task frame.

Returns:
the current task frame gui attributes block for this task frame.

saveTaskFrameGUIAttributes

public void saveTaskFrameGUIAttributes(com.tivoli.twg.console.TWGTaskFrameGUIAttributes tfga)
Cache away the task frame gui attributes.


getPreferenceGroup

public com.tivoli.uif.core.UFPrefGroup getPreferenceGroup()
Returns the name of the preference group for the task to allow derived classes to store their own preferences as well.

Returns:
The preference group instance used by this task frame.

getPreferenceKey

public java.lang.String getPreferenceKey()
Sets up and returns the name of the unique key that preferences will be stored (and retrieved) by at the server level for this task frame.

Returns:
The text representing the key that preferences are stored and retrieved with. By default, the key built is the task name combined with the subtask name combined with the "Preferences" string.

addCloseHandler

public void addCloseHandler(javax.swing.JComponent obj)
Attach an ALT-F4 key handler to close the frame to the object


removeCloseHandler

public void removeCloseHandler(javax.swing.JComponent obj)
Detach the ALT-F4 key handler from the object