IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.desktop
Class Desktop

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended byjavax.swing.JApplet
                      extended bycom.ibm.dse.desktop.Desktop
All Implemented Interfaces:
javax.accessibility.Accessible, DesktopComponent, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, java.awt.event.WindowListener

public class Desktop
extends javax.swing.JApplet
implements DesktopComponent, java.awt.event.WindowListener

The Desktop class provides the top-level object that builds the desktop layout based upon the definitions belonging to the rest of the elements in the desktop definition file. The Desktop class cannot be substituted by another class unless the whole set of classes directly related to it is copied to a different package. This process may be suggested in cases where additional functionality is required and changes to the base code might require an enormous effort.

When the desktop is created and filled with all the components defined in the desktop XML file, it keeps a list of task information objects. This list allows the application and other internal desktop components to ask for specific task information. When a component that implements the TaskLauncher interface is added to the desktop, a new TaskInfo object is created and added to the list of task information objects.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
 
Nested classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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.awt.event.ComponentListener aComponentListener
           
protected  BookmarkArea bookmarkArea
          The instance of BookmarkArea.
protected  boolean change_language
           
static java.lang.String COMPID
          The identifier of the Desktop trace.
protected  int count
           
protected  int desktopHeight
           
protected  int desktopWidth
           
protected  boolean developerTime
           
protected static java.lang.String FAST_PATH_FORMAT_NAME
          The name by default of the fast path format.
protected  boolean file_exists
           
protected  java.lang.String finalizerClass
          The name of the finalizer class.
protected  java.lang.String finalizerMethod
          The name of the finalizer method.
static java.awt.Frame frame
           
 javax.help.HelpBroker hb
          The instance of the HelpBroker.
protected  java.lang.String helpFileURL
          The URL of the help file.
 javax.help.HelpSet hs
          The instance of the HelpSet.
static boolean iniDesktopOK
           
protected  java.lang.String initializerClass
          The name of the initializer class.
protected  java.lang.String initializerMethod
          The name of the initializer method.
static java.lang.Class keyEventClass
          The class of the keyEventClass.
protected static java.util.Hashtable LayoutList
           
protected  java.lang.String lookandfeel
          The look and feel of the Desktop.
protected  MessageArea messageTextField
          The instance of the MessageArea.
static NewGridLayout newLayout1
           
protected  int nextX
          The x location of the next component.
protected  int nextY
          The y location of the next component.
protected  java.util.Hashtable nodeBeanTable
          The collection of components of the Desktop kept by node.
protected  java.awt.ComponentOrientation orientation
          The group of packages where Desktop components can be defined.
protected  java.lang.String packages
          The group of packages where Desktop components can be defined.
protected static boolean rebuild
           
protected  java.lang.String rebuilderClass
          The name of the rebuilder class.
protected  java.lang.String rebuilderMethod
          The name of the rebuilder method.
protected  java.lang.String resDesktop
           
protected  java.util.ResourceBundle resResourceBundle
           
protected  java.lang.String resSampleDesktop
           
protected  java.util.ResourceBundle resSampleResourceBundle
           
protected  TaskArea taskArea
          The instance of the TaskArea class.
protected  java.util.Hashtable taskCodes
          The collection of taskInfos kept by code.
protected  java.util.Hashtable taskInfos
          The collection of taskInfos kept by taskname.
protected static Desktop theDesktop
          The instance of the Desktop class.
protected  java.lang.String title
          The title of the Desktop.
protected  boolean usingLayouts
           
protected  WorkingArea workingArea
          The instance of the WorkingArea class.
protected static java.lang.String XML_FILE
          The name by default of the xml file.
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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
Desktop()
          This constructor creates a Desktop object.
Desktop(java.lang.String path)
          This constructor creates a Desktop object.
 
Method Summary
static int absoluteXcoor(java.awt.Container c)
          Gets the absolute X coordinate for the desktop.
static int absoluteYcoor(java.awt.Container c)
          Gets the absolute Y coordinate for the desktop.
 void add(java.lang.Object o)
          Adds a component to the desktop.
 void addTaskInfo(TaskLauncher aTaskLauncher)
          Creates and adds a TaskInfo corresponding to aTaskLauncher and adds this TaskInfo to the desktop's taskInfo list.
static void block(java.lang.Object o)
          Allows you to block the desktop and shows the waiting cursor.
 void centerView()
          Centers the view in the display when the desktop is launched as an application (main method is used).
 void changeComponentOrientation(java.awt.ComponentOrientation o)
          Sets the language-sensitive orientation that is to be used to order the elements within this component.
 int countNodes(org.w3c.dom.Node n)
          Returns the number of nodes built from the XML element definition.
 void createElement(org.w3c.dom.Node node)
          Creates an element instance defined in the XML file.
 boolean definesTask(TaskLauncher aTaskLauncher)
          Returns true if aTaskLauncher defines a Task.
 void exitApplication()
          Allows you to exit the desktop application.
 java.lang.String getAppletInfo()
          Gets the applet information.
 BookmarkArea getBookmarkArea()
          Gets the BookmarkArea.
 java.lang.String getBookmarkId()
          Returns the value of the BookmarkId property.
protected  java.awt.Rectangle getBoundsForWorkingArea(int x0, int y0, WorkingArea wa)
          Returns a new Rectangle with the size of WorkingArea.
 java.lang.Object getComponentByName(java.lang.String name)
          Gets a desktop component by its name.
 java.util.Vector getComponentsByClass(java.lang.Class c)
          Gets a desktop component by its class.
static Desktop getDesktop()
          Gets the desktop component.
 boolean getDeveloperTime()
          Returns the value of the developerTime property.
 java.lang.String getFileName()
          Returns the name of the Desktop file.
 java.awt.Container getFirstParent()
          Returns the last Parent of the desktop.
 java.awt.Container getFirstParent(java.awt.Container comp)
          Returns the last Parent of the comp container.
static java.awt.Frame getFrame()
          Gets the desktop frame.
static boolean getFrameworkInitialized()
          Returns a boolean that indicates whether the toolkit is initialized.
 java.lang.String getHelpFileURL()
          Gets the HelpSet file URL.
 javax.swing.ImageIcon getImageIcon(java.lang.Object o)
          Returns the image icon.
static javax.swing.JRootPane getJRootPane(javax.swing.JComponent c)
          Gets the fundamental component in the desktop container hierarchy.
static javax.swing.KeyStroke getKeyStroke(java.lang.String str)
          Gets a KeyStroke instance according to the externalizable string representation.
protected  java.awt.Point getLocationOfComponent(int x0, int y0, javax.swing.JComponent c)
          Returns the Point where the component is placed.
 java.lang.String getLookAndFeel()
          Returns the value of the lookandfeel property.
 java.util.Hashtable getNamedComponents()
          Gets the list of components, ordered by name.
protected static Desktop getNewDesktopInstance()
          Returns a new Desktop instance.
 java.awt.ComponentOrientation getOrientation()
          Returns the new orientation assigned to the Desktop.
 int getOriginalHeight()
          Returns the value of the originalHeight property.
 int getOriginalWidth()
          Returns the value of the originalWidth property, which is the initial width of the Desktop before any modification.
 ProgressIndicator getProgressBean()
          Returns the initialization progress indicator window.
static boolean getShowProgressBar()
          Gets the boolean value that indicates whether the desktop initialization progress bar must be shown.
 TaskArea getTaskArea()
          Gets the task area.
 TaskInfo getTaskInfo(java.lang.Object o)
          Returns the TaskInfo corresponding to the Object o.
 TaskInfo getTaskInfo(TaskLauncher aTaskLauncher)
          Returns the TaskInfo corresponding to the TaskLauncher aTaskLauncher.
 TaskInfo getTaskInfoByCode(java.lang.String code)
          Returns the first TaskInfo from the taskinfos list that contains the code: code.
 java.lang.String getTitle()
          Returns the title.
 WorkingArea getWorkingArea()
          Gets the working area.
 void iniApplication()
          Initializes the application.
 void iniHelp()
          Launches a thread that initializes the Java help system.
 void iniLookAndFeel()
          Initializes the desktop with the current platform look and feel.
 void init()
          Handles the Applet init method.
static void initDesktop()
           
static void initDesktop(java.awt.Frame frame)
          Provides the main entrypoint.
 void initialize()
          Processes the initialization.
 void initTable()
          Indicates which components are defined in this package.
 void iniXML()
          Parses and initializes the XML definition.
 boolean isMultiTasking()
          Indicates whether the application is multitasking.
 boolean isUsingLayouts()
          Returns whether the desktop is using Layouts.
static void main(java.lang.String[] args)
          Provides the main entrypoint.
 void manageNode(org.w3c.dom.Node node)
          Checks if a node is a text node or an element node.
 void openTask(java.lang.String op, java.lang.String sp, java.lang.String taskName, java.lang.String type)
          Opens a new task with the operation op in the operation panel sp.
 void openTask(TaskInfo aTaskInfo, java.lang.String parameters, java.lang.String errorMessage)
          Opens a new task described by aTaskInfo using the passed parameters to create the task's operation.
 void openTask(TaskLauncher aTaskLauncher)
          Opens a new task described by aTaskLauncher.
 void paint(java.awt.Graphics g)
          Transfers the focus to the first focusable component.
 boolean readXMLFromJAR()
          Returns the boolean value that indicates whether the XML file is read from a JAR.
 void reBuild()
          Removes all the components and parses and initializes them again using the desktop XML definitions file.
 void regenerate()
          Changes the language of all the labels of the Desktop by calling the setAttributes method.
 void removeAllComponents()
          Removes all the components in the desktop.
 void setAttributes(java.lang.Object o, org.w3c.dom.Node node)
          Uses the node description to set the attributes of the Object o.
 void setBookmarkArea(BookmarkArea BMA)
          Sets the BookmarkArea.
 void setBookmarkId(java.lang.Object o)
          Sets the value of the bookmarkId property.
 void setDesktopLocale(java.util.Locale locale)
          Sets the locale of the Desktop in runtime.
 void setDeveloperTime(java.lang.Object o)
          Sets the value of the developerTime property.
static void setFileName(java.lang.String s)
          Sets the name of the Desktop file.
 void setFinalizerClass(java.lang.Object o)
          Sets the name of the desktop finalizing class.
 void setFinalizerMethod(java.lang.Object o)
          Sets the name of the desktop finalizing method.
static void setFrameworkInitialized(boolean aBoolean)
          Sets the boolean value that indicates whether the toolkit is initialized.
 void setHeight(java.lang.Object o)
          Sets the text field height.
 void setHelpFileURL(java.lang.Object o)
          Sets the HelpSet file URL.
 void setInitializerClass(java.lang.Object o)
          Sets the name of the desktop initializing class.
 void setInitializerMethod(java.lang.Object o)
          Sets the name of the desktop initializing method.
 void setLookAndFeel(java.lang.Object laf)
          Sets the value of the lookandfeel property.
 void setMessageTextField(MessageArea t)
          Sets the message text field.
 void setMultiTasking(java.lang.Object o)
          Sets the property value that indicates whether the application is multitasking.
 void setOnInitialize(java.lang.Object o)
          Sets the specified Java script code that is executed when the component is initialized.
 void setOrientation(java.lang.Object o)
          Sets the value of the orientation property.
 void setOriginalHeight(int height)
          Sets the value of the originalHeight property.
 void setOriginalWidth(int width)
          Sets the value of the originalWidth property.
 void setPackages(java.lang.Object o)
          Concatenates the desktop package name with the specified class name.
 void setReadXMLFromJAR(boolean readFromJAR)
          Sets the boolean value that indicates whether the XML file is read from a JAR file.
 void setRebuilderClass(java.lang.Object o)
          Sets the name of the desktop rebuilding class.
 void setRebuilderMethod(java.lang.Object o)
          Sets the name of the desktop rebuilding method.
static void setShowProgressBar(boolean aBoolean)
          Sets the boolean value that indicates whether the desktop initialization progress bar must be shown.
 void setTaskArea(TaskArea aTaskArea)
          Sets the instance of TaskArea associated with the Desktop.
 void setTitle(java.lang.Object o)
          Sets the title.
 void setUsingLayouts(boolean newUseLayout)
          Sets whether the Desktop instance is using Layouts.
 void setWidth(java.lang.Object o)
          Sets the text field width.
 void showHelp(java.lang.String s)
          Shows the help section that corresponds to the specified ID.
 void showMessage(java.lang.String s)
          Shows the message s in the desktop text field.
 void showMessage(java.lang.String s, int i)
          Shows the message s in the desktop text field.
 void showProgressBar()
          Shows the progress bar.
static void showTraceMessage(int level, int type, java.lang.String message)
          Shows the passed message in the trace window or in the system console.
static void showTraceMessage(int level, int type, java.lang.String message, java.lang.Throwable exception)
          Shows the passed message in the trace window or in the system console.
static void unBlock(java.lang.Object o)
          Unblocks the desktop and shows the default cursor.
 void windowActivated(java.awt.event.WindowEvent e)
          Invoked when a window is activated.
 void windowClosed(java.awt.event.WindowEvent e)
          Invoked when a window has been closed.
 void windowClosing(java.awt.event.WindowEvent e)
          Invoked when a window is in the process of being closed.
 void windowDeactivated(java.awt.event.WindowEvent e)
          Invoked when a window is deactivated.
 void windowDeiconified(java.awt.event.WindowEvent e)
          Invoked when a window is de-iconified.
 void windowIconified(java.awt.event.WindowEvent e)
          Invoked when a window is iconified.
 void windowOpened(java.awt.event.WindowEvent e)
          Invoked when a window has been opened.
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, 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, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, 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, 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

packages

protected java.lang.String packages
The group of packages where Desktop components can be defined.


orientation

protected java.awt.ComponentOrientation orientation
The group of packages where Desktop components can be defined.


theDesktop

protected static Desktop theDesktop
The instance of the Desktop class.


nextX

protected int nextX
The x location of the next component.


nextY

protected int nextY
The y location of the next component.


XML_FILE

protected static java.lang.String XML_FILE
The name by default of the xml file.


FAST_PATH_FORMAT_NAME

protected static final java.lang.String FAST_PATH_FORMAT_NAME
The name by default of the fast path format.

See Also:
Constant Field Values

taskArea

protected TaskArea taskArea
The instance of the TaskArea class.


workingArea

protected WorkingArea workingArea
The instance of the WorkingArea class.


initializerClass

protected java.lang.String initializerClass
The name of the initializer class.


initializerMethod

protected java.lang.String initializerMethod
The name of the initializer method.


rebuilderClass

protected java.lang.String rebuilderClass
The name of the rebuilder class.


rebuilderMethod

protected java.lang.String rebuilderMethod
The name of the rebuilder method.


finalizerClass

protected java.lang.String finalizerClass
The name of the finalizer class.


finalizerMethod

protected java.lang.String finalizerMethod
The name of the finalizer method.


helpFileURL

protected java.lang.String helpFileURL
The URL of the help file.


lookandfeel

protected java.lang.String lookandfeel
The look and feel of the Desktop.


messageTextField

protected MessageArea messageTextField
The instance of the MessageArea.


taskInfos

protected java.util.Hashtable taskInfos
The collection of taskInfos kept by taskname.


taskCodes

protected java.util.Hashtable taskCodes
The collection of taskInfos kept by code.


title

protected java.lang.String title
The title of the Desktop.


nodeBeanTable

protected java.util.Hashtable nodeBeanTable
The collection of components of the Desktop kept by node.


iniDesktopOK

public static boolean iniDesktopOK

frame

public static java.awt.Frame frame

keyEventClass

public static transient java.lang.Class keyEventClass
The class of the keyEventClass.


hs

public javax.help.HelpSet hs
The instance of the HelpSet.


hb

public javax.help.HelpBroker hb
The instance of the HelpBroker.


LayoutList

protected static java.util.Hashtable LayoutList

bookmarkArea

protected BookmarkArea bookmarkArea
The instance of BookmarkArea.


newLayout1

public static NewGridLayout newLayout1

rebuild

protected static boolean rebuild

COMPID

public static final java.lang.String COMPID
The identifier of the Desktop trace.

See Also:
Constant Field Values

aComponentListener

public static java.awt.event.ComponentListener aComponentListener

file_exists

protected boolean file_exists

change_language

protected boolean change_language

count

protected int count

developerTime

protected boolean developerTime

desktopWidth

protected int desktopWidth

desktopHeight

protected int desktopHeight

resResourceBundle

protected java.util.ResourceBundle resResourceBundle

resSampleResourceBundle

protected java.util.ResourceBundle resSampleResourceBundle

resDesktop

protected java.lang.String resDesktop

resSampleDesktop

protected java.lang.String resSampleDesktop

usingLayouts

protected boolean usingLayouts
Constructor Detail

Desktop

public Desktop()
This constructor creates a Desktop object.


Desktop

public Desktop(java.lang.String path)
This constructor creates a Desktop object.

Parameters:
path - String
Method Detail

absoluteXcoor

public static int absoluteXcoor(java.awt.Container c)
Gets the absolute X coordinate for the desktop.

Parameters:
c - java.awt.Container
Returns:
int

absoluteYcoor

public static int absoluteYcoor(java.awt.Container c)
Gets the absolute Y coordinate for the desktop.

Parameters:
c - java.awt.Container
Returns:
int

add

public void add(java.lang.Object o)
Adds a component to the desktop.

Specified by:
add in interface DesktopComponent
Parameters:
o - java.lang.Object

addTaskInfo

public void addTaskInfo(TaskLauncher aTaskLauncher)
Creates and adds a TaskInfo corresponding to aTaskLauncher and adds this TaskInfo to the desktop's taskInfo list.

Parameters:
aTaskLauncher - TaskLauncher

block

public static void block(java.lang.Object o)
Allows you to block the desktop and shows the waiting cursor.

Parameters:
o - java.lang.Object

centerView

public void centerView()
Centers the view in the display when the desktop is launched as an application (main method is used).


changeComponentOrientation

public void changeComponentOrientation(java.awt.ComponentOrientation o)
Sets the language-sensitive orientation that is to be used to order the elements within this component.

Parameters:
o - ComponentOrientation

countNodes

public int countNodes(org.w3c.dom.Node n)
Returns the number of nodes built from the XML element definition.

Parameters:
n - org.w3c.dom.Node
Returns:
int

createElement

public void createElement(org.w3c.dom.Node node)
Creates an element instance defined in the XML file.

Parameters:
node - org.w3c.dom.Node

definesTask

public boolean definesTask(TaskLauncher aTaskLauncher)
Returns true if aTaskLauncher defines a Task. To define a Task, a TaskLauncher must define all of the task's attributes.

Parameters:
aTaskLauncher - com.ibm.dse.desktop.TaskLauncher
Returns:
boolean

exitApplication

public void exitApplication()
Allows you to exit the desktop application.


getAppletInfo

public java.lang.String getAppletInfo()
Gets the applet information.

Returns:
java.lang.String

getBookmarkArea

public BookmarkArea getBookmarkArea()
Gets the BookmarkArea.

Returns:
com.ibm.dse.desktop.BookmarkArea

getBookmarkId

public java.lang.String getBookmarkId()
Returns the value of the BookmarkId property.

Returns:
com.ibm.dse.desktop.BookmarkId - the current value of BookmarkId

getBoundsForWorkingArea

protected java.awt.Rectangle getBoundsForWorkingArea(int x0,
                                                     int y0,
                                                     WorkingArea wa)
Returns a new Rectangle with the size of WorkingArea.

Parameters:
x0 - int - X position of WorkingArea
y0 - int - Y position of WorkingArea
wa - com.ibm.dse.desktop.WorkingArea
Returns:
java.awt.Rectangle

getComponentByName

public java.lang.Object getComponentByName(java.lang.String name)
Gets a desktop component by its name.

Parameters:
name - java.lang.String
Returns:
java.lang.Object

getComponentsByClass

public java.util.Vector getComponentsByClass(java.lang.Class c)
Gets a desktop component by its class.

Returns:
java.util.Vector

getDesktop

public static Desktop getDesktop()
Gets the desktop component.

Returns:
com.ibm.dse.desktop.Desktop

getDeveloperTime

public boolean getDeveloperTime()
Returns the value of the developerTime property.

Returns:
boolean - the current value of developerTime

getFileName

public java.lang.String getFileName()
Returns the name of the Desktop file.

Returns:
String

getFirstParent

public java.awt.Container getFirstParent()
Returns the last Parent of the desktop.

Returns:
java.awt.Container

getFirstParent

public java.awt.Container getFirstParent(java.awt.Container comp)
Returns the last Parent of the comp container.

Returns:
java.awt.Container

getFrame

public static java.awt.Frame getFrame()
Gets the desktop frame. It should be used when the desktop is launched as an application (main method), not as an applet (frame = null).

Returns:
com.sun.java.swing.JFrame

getFrameworkInitialized

public static boolean getFrameworkInitialized()
Returns a boolean that indicates whether the toolkit is initialized.

Returns:
boolean - True if the toolkit is initialized

getHelpFileURL

public java.lang.String getHelpFileURL()
Gets the HelpSet file URL.

Returns:
java.lang.String

getImageIcon

public javax.swing.ImageIcon getImageIcon(java.lang.Object o)
Returns the image icon.

Parameters:
o - java.lang.Object
Returns:
com.sun.java.swing.ImageIcon

getJRootPane

public static javax.swing.JRootPane getJRootPane(javax.swing.JComponent c)
Gets the fundamental component in the desktop container hierarchy.

Parameters:
c - com.sun.java.swing.JComponent
Returns:
com.sun.java.swing.JRootPane

getKeyStroke

public static javax.swing.KeyStroke getKeyStroke(java.lang.String str)
Gets a KeyStroke instance according to the externalizable string representation.

Returns:
com.sun.java.swing.KeyStroke

getLocationOfComponent

protected java.awt.Point getLocationOfComponent(int x0,
                                                int y0,
                                                javax.swing.JComponent c)
Returns the Point where the component is placed.

Parameters:
x0 - int
y0 - int
c - javax.swing.JComponent
Returns:
java.awt.Point

getLookAndFeel

public java.lang.String getLookAndFeel()
Returns the value of the lookandfeel property.

Returns:
int - the current value of lookandfeel

getNamedComponents

public java.util.Hashtable getNamedComponents()
Gets the list of components, ordered by name.

Returns:
Hastable

getNewDesktopInstance

protected static Desktop getNewDesktopInstance()
Returns a new Desktop instance.

Returns:
com.ibm.dse.desktop.Desktop

getOrientation

public java.awt.ComponentOrientation getOrientation()
Returns the new orientation assigned to the Desktop.

Returns:
java.awt.ComponentOrientation orientation

getOriginalHeight

public int getOriginalHeight()
Returns the value of the originalHeight property.

The originalHeight is the initial height of the Desktop before any modification.

Returns:
int - the current value of originalHeight

getOriginalWidth

public int getOriginalWidth()
Returns the value of the originalWidth property, which is the initial width of the Desktop before any modification.

Returns:
int - the current value of originalWidth

getProgressBean

public ProgressIndicator getProgressBean()
Returns the initialization progress indicator window.

Returns:
com.ibm.dse.base.ProgressIndicator

getShowProgressBar

public static boolean getShowProgressBar()
Gets the boolean value that indicates whether the desktop initialization progress bar must be shown.

Returns:
boolean - True to show the progress bar

getTaskArea

public TaskArea getTaskArea()
Gets the task area.

Returns:
TaskArea

getTaskInfo

public TaskInfo getTaskInfo(TaskLauncher aTaskLauncher)
Returns the TaskInfo corresponding to the TaskLauncher aTaskLauncher.

Parameters:
aTaskLauncher - TaskLauncher
Returns:
com.ibm.dse.desktop.TaskInfo

getTaskInfo

public TaskInfo getTaskInfo(java.lang.Object o)
Returns the TaskInfo corresponding to the Object o.

Parameters:
o - java.lang.Object
Returns:
com.ibm.dse.desktop.TaskInfo

getTaskInfoByCode

public TaskInfo getTaskInfoByCode(java.lang.String code)
Returns the first TaskInfo from the taskinfos list that contains the code: code. If it does not find any TaskInfo corresponding to the code, this method returns null.

Parameters:
code - java.lang.String
Returns:
com.ibm.dse.desktop.TaskInfo

getTitle

public java.lang.String getTitle()
Returns the title.

Returns:
java.lang.String

getWorkingArea

public WorkingArea getWorkingArea()
Gets the working area.

Returns:
WorkingArea

iniApplication

public void iniApplication()
                    throws java.lang.Exception
Initializes the application.

Throws:
java.lang.Exception

iniHelp

public void iniHelp()
Launches a thread that initializes the Java help system.


iniLookAndFeel

public void iniLookAndFeel()
                    throws java.lang.Exception
Initializes the desktop with the current platform look and feel.

Throws:
java.lang.Exception

init

public void init()
Handles the Applet init method.


initialize

public void initialize()
                throws java.lang.Exception
Processes the initialization.

Throws:
java.lang.Exception

initTable

public void initTable()
Indicates which components are defined in this package.


iniXML

public void iniXML()
            throws java.lang.Exception
Parses and initializes the XML definition.

Throws:
java.lang.Exception

isMultiTasking

public boolean isMultiTasking()
Indicates whether the application is multitasking.

Returns:
boolean - True if the application is multitasking

isUsingLayouts

public boolean isUsingLayouts()
Returns whether the desktop is using Layouts.

Returns:
boolean - True if the desktop is using Layouts

main

public static void main(java.lang.String[] args)
Provides the main entrypoint. It starts the part when it is run as an application.

Parameters:
args - java.lang.String[]

manageNode

public void manageNode(org.w3c.dom.Node node)
Checks if a node is a text node or an element node. If a node is an element node, this method creates the corresponding element instance.

Parameters:
node - Nodeorg.w3c.dom.Node

openTask

public void openTask(TaskInfo aTaskInfo,
                     java.lang.String parameters,
                     java.lang.String errorMessage)
Opens a new task described by aTaskInfo using the passed parameters to create the task's operation. The errorMessage specifies the message to display if the creation of the task is interrupted.

Parameters:
aTaskInfo - com.ibm.dse.desktop.TaskInfo
parameters - java.lang.String
errorMessage - java.lang.String.

openTask

public void openTask(TaskLauncher aTaskLauncher)
Opens a new task described by aTaskLauncher. If aTaskLauncher doesn't specify all the attribues needed to open a new task, this method obtains this information from the taskInfos list.

Parameters:
aTaskLauncher - com.ibm.dse.desktop.TaskLauncher

openTask

public void openTask(java.lang.String op,
                     java.lang.String sp,
                     java.lang.String taskName,
                     java.lang.String type)
Opens a new task with the operation op in the operation panel sp. This method uses the parameter taskName to find a short and a long description for this task. If there is no TaskInfo corresponding to the taskName, the new task has the taskname as its description.

Parameters:
op - Operation
sp - SmartPanel
taskName - java.lang.String

paint

public void paint(java.awt.Graphics g)
Transfers the focus to the first focusable component.

Parameters:
g - java.awt.Graphics

readXMLFromJAR

public boolean readXMLFromJAR()
Returns the boolean value that indicates whether the XML file is read from a JAR.

Returns:
boolean - True if the XML came from a JAR file

reBuild

public void reBuild()
Removes all the components and parses and initializes them again using the desktop XML definitions file.


regenerate

public void regenerate()
Changes the language of all the labels of the Desktop by calling the setAttributes method.


removeAllComponents

public void removeAllComponents()
Removes all the components in the desktop. If there is an open task in the desktop, this method does not remove the TaskArea and the WorkingArea. This method is currently used to remove all the elements of the desktop before rebuilding it.


setAttributes

public void setAttributes(java.lang.Object o,
                          org.w3c.dom.Node node)
Uses the node description to set the attributes of the Object o. The object o must have setters for all the attributes described in the node. If not, the method creates a warning message.

Parameters:
o - java.lang.Object
node - org.w3c.dom.Node

setBookmarkArea

public void setBookmarkArea(BookmarkArea BMA)
Sets the BookmarkArea.


setBookmarkId

public void setBookmarkId(java.lang.Object o)
Sets the value of the bookmarkId property. The BookmarkId is the personal identifier for each Desktop user.


setDesktopLocale

public void setDesktopLocale(java.util.Locale locale)
Sets the locale of the Desktop in runtime.

Parameters:
locale - Locale

setDeveloperTime

public void setDeveloperTime(java.lang.Object o)
Sets the value of the developerTime property.


setFileName

public static void setFileName(java.lang.String s)
Sets the name of the Desktop file. This name is the name of the xml file, and the path will be the path defined in the dse.ini.


setFinalizerClass

public void setFinalizerClass(java.lang.Object o)
Sets the name of the desktop finalizing class.

Parameters:
o - java.lang.Object

setFinalizerMethod

public void setFinalizerMethod(java.lang.Object o)
Sets the name of the desktop finalizing method.

Parameters:
o - java.lang.Object

setFrameworkInitialized

public static void setFrameworkInitialized(boolean aBoolean)
Sets the boolean value that indicates whether the toolkit is initialized.

Parameters:
aBoolean - boolean

setHeight

public void setHeight(java.lang.Object o)
Sets the text field height.

Parameters:
o - java.lang.Object

setHelpFileURL

public void setHelpFileURL(java.lang.Object o)
Sets the HelpSet file URL.

Parameters:
o - java.lang.Object

setInitializerClass

public void setInitializerClass(java.lang.Object o)
Sets the name of the desktop initializing class.

Parameters:
o - java.lang.Object

setInitializerMethod

public void setInitializerMethod(java.lang.Object o)
Sets the name of the desktop initializing method.

Parameters:
o - java.lang.Object

setLookAndFeel

public void setLookAndFeel(java.lang.Object laf)
Sets the value of the lookandfeel property.

Parameters:
laf - Object - the new value of the property

setMessageTextField

public void setMessageTextField(MessageArea t)
Sets the message text field.

Parameters:
t - TextField

setMultiTasking

public void setMultiTasking(java.lang.Object o)
Sets the property value that indicates whether the application is multitasking.

Parameters:
o - java.lang.Object

setOnInitialize

public void setOnInitialize(java.lang.Object o)
Sets the specified Java script code that is executed when the component is initialized.

Parameters:
o - java.lang.Object

setOrientation

public void setOrientation(java.lang.Object o)
Sets the value of the orientation property. The orientation is the Component orientation of the Desktop.


setOriginalHeight

public void setOriginalHeight(int height)
Sets the value of the originalHeight property.


setOriginalWidth

public void setOriginalWidth(int width)
Sets the value of the originalWidth property.


setPackages

public void setPackages(java.lang.Object o)
Concatenates the desktop package name with the specified class name.

Parameters:
o - java.lang.Object

setReadXMLFromJAR

public void setReadXMLFromJAR(boolean readFromJAR)
Sets the boolean value that indicates whether the XML file is read from a JAR file.

Parameters:
readFromJAR - boolean

setRebuilderClass

public void setRebuilderClass(java.lang.Object o)
Sets the name of the desktop rebuilding class.

Parameters:
o - java.lang.Object

setRebuilderMethod

public void setRebuilderMethod(java.lang.Object o)
Sets the name of the desktop rebuilding method.

Parameters:
o - java.lang.Object

setShowProgressBar

public static void setShowProgressBar(boolean aBoolean)
Sets the boolean value that indicates whether the desktop initialization progress bar must be shown.

Parameters:
aBoolean - boolean

setTaskArea

public void setTaskArea(TaskArea aTaskArea)
Sets the instance of TaskArea associated with the Desktop.

Parameters:
aTaskArea - com.ibm.dse.desktop.TaskArea

setTitle

public void setTitle(java.lang.Object o)
Sets the title.

Parameters:
o - java.lang.Object

setUsingLayouts

public void setUsingLayouts(boolean newUseLayout)
Sets whether the Desktop instance is using Layouts.

Parameters:
newUseLayout - boolean

setWidth

public void setWidth(java.lang.Object o)
Sets the text field width.

Parameters:
o - java.lang.Object

showHelp

public void showHelp(java.lang.String s)
Shows the help section that corresponds to the specified ID.

Parameters:
s - java.lang.String

showMessage

public void showMessage(java.lang.String s)
Shows the message s in the desktop text field.

Parameters:
s - java.lang.String

showMessage

public void showMessage(java.lang.String s,
                        int i)
Shows the message s in the desktop text field.

Parameters:
s - java.lang.String
i - int

showProgressBar

public void showProgressBar()
Shows the progress bar. If the toolkit is initialized, it reads the DSE.INI file to determine whether to show the progress bar. If the toolkit is not initialized, it takes the class static attribute value that indicates whether to show the progress bar.


showTraceMessage

public static void showTraceMessage(int level,
                                    int type,
                                    java.lang.String message)
Shows the passed message in the trace window or in the system console.

Parameters:
level - int
message - java.lang.String

showTraceMessage

public static void showTraceMessage(int level,
                                    int type,
                                    java.lang.String message,
                                    java.lang.Throwable exception)
Shows the passed message in the trace window or in the system console.

Parameters:
level - int
message - java.lang.String
exception - java.lang.Throwable

unBlock

public static void unBlock(java.lang.Object o)
Unblocks the desktop and shows the default cursor.

Parameters:
o - java.lang.Object

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Invoked when a window is activated.

Specified by:
windowActivated in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Invoked when a window has been closed.

Specified by:
windowClosed in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Invoked when a window is in the process of being closed.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Invoked when a window is deactivated.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Invoked when a window is de-iconified.

Specified by:
windowDeiconified in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Invoked when a window is iconified.

Specified by:
windowIconified in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Invoked when a window has been opened.

Specified by:
windowOpened in interface java.awt.event.WindowListener
Parameters:
e - java.awt.event.WindowEvent

initDesktop

public static void initDesktop()

initDesktop

public static void initDesktop(java.awt.Frame frame)
Provides the main entrypoint. It starts the part when it is run as an application.


IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005