com.ibm.dse.desktop
Class TaskArea

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.ibm.dse.gui.SpPanel
                                |
                                +--com.ibm.dse.gui.EmbeddedPanel
                                      |
                                      +--com.ibm.dse.desktop.TaskArea

public class TaskArea
extends EmbeddedPanel
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

The TaskArea class provides a reserved area for keeping the list of tasks that are launched during the application process. It takes into account the maximum number of tasks that the customer wants the system to support at a given time.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
protected  TaskButton activeTask
          identifier of the activeTask
protected  java.util.Vector DSEtasks
          vector of framework tasks
protected  int numberOfButtonTasks
          identifier of the number of button tasks
protected  java.util.Vector threads
          vector of no framework tasks
 
Fields inherited from class com.ibm.dse.gui.SpPanel
NULL_VALUE, refreshing
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
TaskArea()
          This constructor creates a TaskArea object.
TaskArea(boolean isDoubleBuffered)
          This constructor creates a TaskArea object.
TaskArea(java.awt.LayoutManager layout)
          This constructor creates a TaskArea object.
TaskArea(java.awt.LayoutManager layout, boolean isDoubleBuffered)
          This constructor creates a TaskArea object.
 
Method Summary
 void activate(DSETaskButton t)
          Activates a task, which happens when it is clicked or when it becomes the active task because another is closed.
 void activate(ExternalTaskButton t)
          Activates a task, which happens when it is clicked or when it becomes the active task because another is closed.
 void activate(TaskButton t)
           
 void activateCurrentTask()
          Activates the current task, which is the one selected.
 void activateNextTask(TaskButton t)
          This method activates the next task when the current task is minimized.
 void closeAll()
          This method closes all Tasks
 java.lang.String getBaseHotKey()
          Gets the base hotKey of the TaskArea.
 TaskButton getCurrentTask()
          Gets the current task, which is the selected one.
 java.lang.String getErrorMessageWhenClassNotExist()
          return an String of the error message when class doesn't exist
 int getHSpace()
          This method returns the hSpace between tasks.
 int getMaxNumberOfTasks()
          This method returns the max number of tasks.
 int getNumberOfButtonTasks()
          This method returns the number of button tasks.
 java.lang.String getSubstituteHotKey()
          This method returns the substitute hot key of the hot key.
 int getTaskHeight()
          This method returns the height of the Task
 java.util.Vector getTasks()
          Returns the tasks attribute of the TaskArea.
 int getTaskWidth()
          This method returns the width of the Task
 int getVSpace()
          This method returns the VSpace of the task.
 java.lang.String getWarningMessageWhenMaxNumberOfTasksReached()
          Gets the warning message that is showed to user when the maximum number of tasks is reached.
 void interruptThreads()
          This method interrupts the threads that have been launchedI
 boolean isThereRoomForAnotherTask()
          Indicates whether the maximum number of tasks that are allowed is reached or not.
 void key(java.awt.event.KeyEvent event)
          This method rewrites the key method of the embedded panel.
 void mouseClicked(java.awt.event.MouseEvent e)
          Method to handle events for the MouseListener interface.
 void mouseDragged(java.awt.event.MouseEvent event)
          Method to handle events for the MouseMotionListener interface.
 void mouseEntered(java.awt.event.MouseEvent e)
          Method to handle events for the MouseListener interface.
 void mouseExited(java.awt.event.MouseEvent e)
          Method to handle events for the MouseListener interface.
 void mouseMoved(java.awt.event.MouseEvent event)
          Method to handle events for the MouseMotionListener interface.
 void mousePressed(java.awt.event.MouseEvent e)
          Method to handle events for the MouseListener interface.
 void mouseReleased(java.awt.event.MouseEvent e)
          Method to handle events for the MouseListener interface.
 void openTask(java.lang.String op, java.lang.String sp, java.lang.Boolean execOp, java.lang.String type, java.lang.String shortDescription, java.lang.String longDescription, java.lang.String taskName)
          Opens a new task.
 void openTask(java.lang.String op, java.lang.String sp, java.lang.Boolean execOp, java.lang.String type, java.lang.String shortDescription, java.lang.String longDescription, java.lang.String taskName, java.lang.String parameters, java.lang.String error, int width, int height, int x, int y)
          Opens a new task.
 void relocateTasks()
          Relocates the list of the opened task buttons.
 void removeTask(TaskButton t)
          Removes the task t.
 void reshapeTasks()
          This method reshapes the location and size of all the tasks.
 void setBaseHotKey(java.lang.Object o)
          Sets the base hotkey (keyboard shortcut) of the TaskArea.
 void setComponentOrientation(java.awt.ComponentOrientation o)
          This method changes the orientation of the components inside the TaskArea
protected  void setCurrentTask(TaskButton aTask)
          Sets the currentTask of the TaskArea with aTask.
 void setErrorMessageWhenClassNotExist(java.lang.Object o)
          Returns the value of the errorMessageWhenClassNotExist property.
 void setHeight(java.lang.Object o)
          Sets the height of the TaskArea.
 void setHSpace(java.lang.Object o)
          Sets the horizontal space between the opened Tasks for the TaskArea.
 void setId(java.lang.Object o)
          Sets the ID (name) for this TaskArea.
 void setMaxNumberOfTasks(java.lang.Object o)
          Sets the maximum number of tasks of the TaskArea.
 void setName(java.lang.Object o)
          Sets the name of the TaskArea.
 void setNumberOfButtonTasks(int i)
          This method sets the number of Button Tasks
 void setSubstituteHotKey(java.lang.Object o)
          Sets the base hotkey (keyboard shortcut) of the TaskArea.
 void setTaskHeight(java.lang.Object o)
          Sets the height of the opened task buttons in the TaskArea.
 void setTaskWidth(java.lang.Object o)
          Sets the width of the opened task buttons in the TaskArea.
 void setVSpace(java.lang.Object o)
          Sets the vertical space between the Task buttons and the TaskArea's border.
 void setWarningMessageWhenMaxNumberOfTasksReached(java.lang.Object o)
          Sets the warning message that is showed to user when the maximum number of tasks is reached.
 void setWidth(java.lang.Object o)
          Sets the width of the TaskArea.
protected  void showMenu(javax.swing.JPopupMenu popup, int x, int y)
          Shows the MenuButton's pop-up menu in a visible area.
 
Methods inherited from class com.ibm.dse.gui.EmbeddedPanel
getEmbeddedPanel, getEmbeddedPanelParent, getNesting, getNesting, register, registerOutsider, setNesting
 
Methods inherited from class com.ibm.dse.gui.SpPanel
actionPerformed, add, add, add, add, add, changeComponentOrientation, clear, clearDataDirection, clearDataExchangersScrolls, enableListScrolls, get_ClearButton, get_OkButton, get_RepeatButton, getActivatedOkKey, getClearOutputData, getComponents, getEditable, getEnableStateElements, getErrorBean, getErrorLabel, getHelpID, getHelpID, getOutsiders, getSpPanel, getSpPanelParent, handleDSECoordinationEvent, handleErrorMessage, init, keyPressed, keyReleased, keyTyped, manageHelp, repeat, repeatDataExchangersScrolls, saveEnabledStateComponents, set_ClearButton, set_RepeatButton, setActivatedOkKey, setClearOutputData, setEditable, setEnabled, setEnableStateElements, setErrorBean, setErrorLabel, setHelpID, setVisible
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DSEtasks

protected java.util.Vector DSEtasks
vector of framework tasks

threads

protected java.util.Vector threads
vector of no framework tasks

activeTask

protected TaskButton activeTask
identifier of the activeTask

numberOfButtonTasks

protected int numberOfButtonTasks
identifier of the number of button tasks
Constructor Detail

TaskArea

public TaskArea()
This constructor creates a TaskArea object.

TaskArea

public TaskArea(java.awt.LayoutManager layout)
This constructor creates a TaskArea object.
Parameters:
layout - java.awt.LayoutManager

TaskArea

public TaskArea(java.awt.LayoutManager layout,
                boolean isDoubleBuffered)
This constructor creates a TaskArea object.
Parameters:
layout - java.awt.LayoutManager
isDoubleBuffered - boolean

TaskArea

public TaskArea(boolean isDoubleBuffered)
This constructor creates a TaskArea object.
Parameters:
isDoubleBuffered - boolean
Method Detail

activate

public void activate(DSETaskButton t)
Activates a task, which happens when it is clicked or when it becomes the active task because another is closed.
Parameters:
t - com.ibm.dse.desktop.Task

activate

public void activate(ExternalTaskButton t)
Activates a task, which happens when it is clicked or when it becomes the active task because another is closed.
Parameters:
t - com.ibm.dse.desktop.Task

activate

public void activate(TaskButton t)

activateCurrentTask

public void activateCurrentTask()
Activates the current task, which is the one selected.

activateNextTask

public void activateNextTask(TaskButton t)
This method activates the next task when the current task is minimized.
Parameters:
TaskButton - t

closeAll

public void closeAll()
This method closes all Tasks

getBaseHotKey

public java.lang.String getBaseHotKey()
Gets the base hotKey of the TaskArea.
Returns:
java.lang.String

getCurrentTask

public TaskButton getCurrentTask()
Gets the current task, which is the selected one.
Returns:
Task

getErrorMessageWhenClassNotExist

public java.lang.String getErrorMessageWhenClassNotExist()
return an String of the error message when class doesn't exist

getHSpace

public int getHSpace()
This method returns the hSpace between tasks.

getMaxNumberOfTasks

public int getMaxNumberOfTasks()
This method returns the max number of tasks.

getNumberOfButtonTasks

public int getNumberOfButtonTasks()
This method returns the number of button tasks.

getSubstituteHotKey

public java.lang.String getSubstituteHotKey()
This method returns the substitute hot key of the hot key.

getTaskHeight

public int getTaskHeight()
This method returns the height of the Task
Returns:
int

getTasks

public java.util.Vector getTasks()
Returns the tasks attribute of the TaskArea. The task attibute is a Vector containing all the tasks existing in the TaskArea.
Returns:
java.util.Vector

getTaskWidth

public int getTaskWidth()
This method returns the width of the Task
Returns:
int.

getVSpace

public int getVSpace()
This method returns the VSpace of the task.
Returns:
int.

getWarningMessageWhenMaxNumberOfTasksReached

public java.lang.String getWarningMessageWhenMaxNumberOfTasksReached()
Gets the warning message that is showed to user when the maximum number of tasks is reached.
Returns:
java.lang.String

interruptThreads

public void interruptThreads()
This method interrupts the threads that have been launchedI

isThereRoomForAnotherTask

public boolean isThereRoomForAnotherTask()
Indicates whether the maximum number of tasks that are allowed is reached or not.
Returns:
boolean

key

public void key(java.awt.event.KeyEvent event)
This method rewrites the key method of the embedded panel.
Overrides:
key in class SpPanel
Tags copied from class: SpPanel
Parameters:
keyEvent - java.awt.event.KeyEvent

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Method to handle events for the MouseListener interface.
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent event)
Method to handle events for the MouseMotionListener interface.
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
event - java.awt.event.MouseEvent

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Method to handle events for the MouseListener interface.
Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Method to handle events for the MouseListener interface.
Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
Method to handle events for the MouseMotionListener interface.
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
event - java.awt.event.MouseEvent

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Method to handle events for the MouseListener interface.
Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Method to handle events for the MouseListener interface.
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

openTask

public void openTask(java.lang.String op,
                     java.lang.String sp,
                     java.lang.Boolean execOp,
                     java.lang.String type,
                     java.lang.String shortDescription,
                     java.lang.String longDescription,
                     java.lang.String taskName)
Opens a new task.
Parameters:
op - java.lang.String
sp - java.lang.String
execOp - boolean
shortDescription - java.lang.String
longDescription - java.lang.String
taskName - java.lang.String

openTask

public void openTask(java.lang.String op,
                     java.lang.String sp,
                     java.lang.Boolean execOp,
                     java.lang.String type,
                     java.lang.String shortDescription,
                     java.lang.String longDescription,
                     java.lang.String taskName,
                     java.lang.String parameters,
                     java.lang.String error,
                     int width,
                     int height,
                     int x,
                     int y)
Opens a new task.
Parameters:
op - java.lang.String
sp - java.lang.String
execOp - boolean
shortDescription - java.lang.String
longDescription - java.lang.String
taskName - java.lang.String

relocateTasks

public void relocateTasks()
Relocates the list of the opened task buttons.

removeTask

public void removeTask(TaskButton t)
Removes the task t.
Parameters:
t - Task

reshapeTasks

public void reshapeTasks()
This method reshapes the location and size of all the tasks.

setBaseHotKey

public void setBaseHotKey(java.lang.Object o)
Sets the base hotkey (keyboard shortcut) of the TaskArea.
Parameters:
o - java.lang.Object

setComponentOrientation

public void setComponentOrientation(java.awt.ComponentOrientation o)
This method changes the orientation of the components inside the TaskArea
Overrides:
setComponentOrientation in class java.awt.Component
Parameters:
o - ComponentOrientation

setCurrentTask

protected void setCurrentTask(TaskButton aTask)
Sets the currentTask of the TaskArea with aTask.
Parameters:
aTask - com.ibm.dse.desktop.Task

setErrorMessageWhenClassNotExist

public void setErrorMessageWhenClassNotExist(java.lang.Object o)
Returns the value of the errorMessageWhenClassNotExist property.
Parameters:
String - -

setHeight

public void setHeight(java.lang.Object o)
Sets the height of the TaskArea.
Parameters:
o - java.lang.Object

setHSpace

public void setHSpace(java.lang.Object o)
Sets the horizontal space between the opened Tasks for the TaskArea.
Parameters:
o - java.lang.Object

setId

public void setId(java.lang.Object o)
Sets the ID (name) for this TaskArea.
Parameters:
o - java.lang.Object

setMaxNumberOfTasks

public void setMaxNumberOfTasks(java.lang.Object o)
Sets the maximum number of tasks of the TaskArea.
Parameters:
o - java.lang.Object

setName

public void setName(java.lang.Object o)
Sets the name of the TaskArea.
Parameters:
o - java.lang.Object

setNumberOfButtonTasks

public void setNumberOfButtonTasks(int i)
This method sets the number of Button Tasks

setSubstituteHotKey

public void setSubstituteHotKey(java.lang.Object o)
Sets the base hotkey (keyboard shortcut) of the TaskArea.
Parameters:
o - java.lang.Object

setTaskHeight

public void setTaskHeight(java.lang.Object o)
Sets the height of the opened task buttons in the TaskArea.
Parameters:
o - java.lang.Object

setTaskWidth

public void setTaskWidth(java.lang.Object o)
Sets the width of the opened task buttons in the TaskArea.
Parameters:
o - java.lang.Object

setVSpace

public void setVSpace(java.lang.Object o)
Sets the vertical space between the Task buttons and the TaskArea's border.
Parameters:
o - java.lang.Object

setWarningMessageWhenMaxNumberOfTasksReached

public void setWarningMessageWhenMaxNumberOfTasksReached(java.lang.Object o)
Sets the warning message that is showed to user when the maximum number of tasks is reached.
Parameters:
o - java.lang.Object

setWidth

public void setWidth(java.lang.Object o)
Sets the width of the TaskArea.
Parameters:
o - java.lang.Object

showMenu

protected void showMenu(javax.swing.JPopupMenu popup,
                        int x,
                        int y)
Shows the MenuButton's pop-up menu in a visible area.