com.ibm.dse.desktop
Class WorkingArea

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLayeredPane
                          |
                          +--javax.swing.JDesktopPane
                                |
                                +--com.ibm.dse.desktop.WorkingArea

public class WorkingArea
extends javax.swing.JDesktopPane
implements java.awt.event.ItemListener, java.awt.event.MouseMotionListener, java.awt.event.MouseListener

The WorkingArea class provides a generic pane where you can add the operation panels dynamically when different operations are launched.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JDesktopPane
javax.swing.JDesktopPane.AccessibleJDesktopPane
 
Inner classes inherited from class javax.swing.JLayeredPane
javax.swing.JLayeredPane.AccessibleJLayeredPane
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
protected  int CASCADE
          identifier of the cascadng position
static int NOKEY
           
static int NOMASK
           
protected  int OVERLAPPING
          identifier of the overlapping position
protected  int SOURCE
          identifier of the overlapping position
protected  int TILE
          identifier of the tiling position
 
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
 
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
WorkingArea()
          This constructor creates a WorkingArea object.
 
Method Summary
 int calculateSize()
          This method returns the number of frames that are visible
 void clearAllFrames()
          Clears all the frames created for the operation panels.
 javax.swing.Icon getDefaultIcon()
          Gets the default icon used in the frames that are added to the WorkingArea.
 SpInternalFrame getFrameAtLevel(int i)
          Gets the frame created for an operation panel with the cascade level i.
 SpInternalFrame getFrameAtLevel(int i, int widthNA, int heightNA, int x, int y)
          Gets the frame created for an operation panel with the cascade level i.
 java.util.Vector getFrames()
          This method return the frames vector of the WorkingArea
 javax.swing.Icon getIcon()
          Gets the background image of the WorkingArea.
protected  javax.swing.JPopupMenu getJPopupMenu()
          Return the JPopupMenu1 property value.
 javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem1()
          Return the JRadioButtonMenuItem1 property value.
 javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem2()
          Return the JRadioButtonMenuItem2 property value.
 javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem3()
          Return the JRadioButtonMenuItem1 property value.
 javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem4()
          Return the JRadioButtonMenuItem1 property value.
 javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem5()
          Return the JRadioButtonMenuItem1 property value.
 boolean getShowPopup()
          return the boolean that says if the popup is shown or not.
 java.awt.Dimension getSizeForLevel(int i)
          Gets a dimension for a given level of the WorkingArea.
 int getVisual()
          return the type of visualization of the views.
 java.lang.String getWarningMessageWhenAViewCanNotBeClosed()
          returns the message shown when a view can not be closed
 int getXCascade()
          This method returns the x cascade position of the view return int.
 int getYCascade()
          This method returns the y cascade position of the view return int.
 void hideAllFrames()
          Sets all the frames to not visible.
 void itemChanged(java.lang.Object e)
          This method setted the way the popup is shown
 void itemStateChanged(java.awt.event.ItemEvent e)
          Method to handle events for the ItemListener interface.
static void main(java.lang.String[] args)
          Provides the main entrypoint.
protected  void menuButton_KeyPressed(java.awt.event.KeyEvent keyEvent)
          Invoked when a key is pressed on the MenuButton (or MenuItem).
 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 MouseListener 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.
protected  void navigatePopupMenu(int direction)
          Navigates in the popup menu according to the direction parameter value.
 void removeFrame(SpInternalFrame i)
          This method removes a frame at level i
 void removeFrames()
           
 void reWrite()
          This method rewrites the popupmenu of the Desktop
 void setComponentOrientation(java.awt.ComponentOrientation o)
          This method changes the orientation of the components inside the WorkingArea
 void setDefaultIcon(javax.swing.Icon anIcon)
          Sets the default icon used in the frame that are added to the WorkingArea.
 void setDefaultIcon(java.lang.Object o)
          Sets the default icon used in the frame that are added to the WorkingArea.
 void setFrames(java.util.Vector v)
          This method sets the vector to the vector passed as parameter
 void setHeight(java.lang.Object o)
          Sets the height of the WorkingArea.
 void setIcon(javax.swing.Icon anIcon)
          Sets the background image of the WorkingArea.
 void setIconName(java.lang.Object o)
          Sets the background image of the WorkingArea.
 void setId(java.lang.Object o)
          Sets the ID (name) for this WorkingArea.
 void setName(java.lang.Object o)
          Sets the name of the WorkingArea.
 void setShowPopup(java.lang.Object o)
          Sets the showpopup boolean of the WorkingArea.
 void setVisual(int i)
          Sets the visual kind of showing the view to the WorkingArea.
 void setVisualMode()
          Sets the visual mode of showing the view to the WorkingArea.
 void setVisualMode(int position)
          Sets the visual mode of showing the view to the WorkingArea.
 void setWarningMessageWhenAViewCanNotBeClosed(java.lang.Object o)
          This method sets the message shown when a vew can not be closed.
 void setWidth(java.lang.Object o)
          Sets the width of the WorkingArea.
 void setXCascade(java.lang.Object o)
          This method sets the x cascade of the WorkingArea.
 void setYCascade(java.lang.Object o)
          This method sets the y cascade of the WorkingArea.
protected  void showMenu(javax.swing.JPopupMenu popup, int x, int y)
          Shows the MenuButton's pop-up menu in a visible area.
protected  void showMenu(javax.swing.JPopupMenu popup, java.awt.event.MouseEvent e)
          Shows the MenuButton's pop-up menu in a visible area.
 java.lang.String toString()
          This method returns a string representation of the WorkingArea.
 
Methods inherited from class javax.swing.JDesktopPane
getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getUI, getUIClassID, isOpaque, paramString, setDesktopManager, setUI, updateUI
 
Methods inherited from class javax.swing.JLayeredPane
addImpl, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, remove, setLayer, setLayer, setPosition
 
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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, 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, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OVERLAPPING

protected int OVERLAPPING
identifier of the overlapping position

TILE

protected int TILE
identifier of the tiling position

CASCADE

protected int CASCADE
identifier of the cascadng position

SOURCE

protected int SOURCE
identifier of the overlapping position

NOKEY

public static final int NOKEY

NOMASK

public static final int NOMASK
Constructor Detail

WorkingArea

public WorkingArea()
This constructor creates a WorkingArea object.
Method Detail

calculateSize

public int calculateSize()
This method returns the number of frames that are visible
Returns:
int

clearAllFrames

public void clearAllFrames()
Clears all the frames created for the operation panels.

getDefaultIcon

public javax.swing.Icon getDefaultIcon()
Gets the default icon used in the frames that are added to the WorkingArea.
Returns:
com.sun.java.swing.Icon

getFrameAtLevel

public SpInternalFrame getFrameAtLevel(int i)
Gets the frame created for an operation panel with the cascade level i.
Parameters:
i - int
Returns:
JInternalFrame

getFrameAtLevel

public SpInternalFrame getFrameAtLevel(int i,
                                       int widthNA,
                                       int heightNA,
                                       int x,
                                       int y)
Gets the frame created for an operation panel with the cascade level i.
Parameters:
i - int
widthNa - int
heightNA - int
x - int
y - int
Returns:
JInternalFrame

getFrames

public java.util.Vector getFrames()
This method return the frames vector of the WorkingArea

getIcon

public javax.swing.Icon getIcon()
Gets the background image of the WorkingArea.
Returns:
com.sun.java.swing.Icon

getJPopupMenu

protected javax.swing.JPopupMenu getJPopupMenu()
Return the JPopupMenu1 property value.
Returns:
com.sun.java.swing.JPopupMenu

getJRadioButtonMenuItem1

public javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem1()
Return the JRadioButtonMenuItem1 property value.
Returns:
com.sun.java.swing.JRadioButtonMenuItem

getJRadioButtonMenuItem2

public javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem2()
Return the JRadioButtonMenuItem2 property value.
Returns:
com.sun.java.swing.JRadioButtonMenuItem

getJRadioButtonMenuItem3

public javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem3()
Return the JRadioButtonMenuItem1 property value.
Returns:
com.sun.java.swing.JRadioButtonMenuItem

getJRadioButtonMenuItem4

public javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem4()
Return the JRadioButtonMenuItem1 property value.
Returns:
com.sun.java.swing.JRadioButtonMenuItem

getJRadioButtonMenuItem5

public javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem5()
Return the JRadioButtonMenuItem1 property value.
Returns:
com.sun.java.swing.JRadioButtonMenuItem

getShowPopup

public boolean getShowPopup()
return the boolean that says if the popup is shown or not.
Returns:
boolean

getSizeForLevel

public java.awt.Dimension getSizeForLevel(int i)
Gets a dimension for a given level of the WorkingArea.
Parameters:
i - int
Returns:
Dimension

getVisual

public int getVisual()
return the type of visualization of the views. return int;

getWarningMessageWhenAViewCanNotBeClosed

public java.lang.String getWarningMessageWhenAViewCanNotBeClosed()
returns the message shown when a view can not be closed
Returns:
String

getXCascade

public int getXCascade()
This method returns the x cascade position of the view return int.

getYCascade

public int getYCascade()
This method returns the y cascade position of the view return int.

hideAllFrames

public void hideAllFrames()
Sets all the frames to not visible.

itemChanged

public void itemChanged(java.lang.Object e)
This method setted the way the popup is shown

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Method to handle events for the ItemListener interface.
Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - java.awt.event.ItemEvent

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[]

menuButton_KeyPressed

protected void menuButton_KeyPressed(java.awt.event.KeyEvent keyEvent)
Invoked when a key is pressed on the MenuButton (or MenuItem).


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 MouseListener 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

navigatePopupMenu

protected void navigatePopupMenu(int direction)
Navigates in the popup menu according to the direction parameter value.

Parameters:
direction - int

removeFrame

public void removeFrame(SpInternalFrame i)
This method removes a frame at level i

removeFrames

public void removeFrames()

reWrite

public void reWrite()
This method rewrites the popupmenu of the Desktop

setComponentOrientation

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

setDefaultIcon

public void setDefaultIcon(java.lang.Object o)
Sets the default icon used in the frame that are added to the WorkingArea.
Parameters:
o - java.lang.Object

setDefaultIcon

public void setDefaultIcon(javax.swing.Icon anIcon)
Sets the default icon used in the frame that are added to the WorkingArea.
Parameters:
o - java.lang.Object

setFrames

public void setFrames(java.util.Vector v)
This method sets the vector to the vector passed as parameter

setHeight

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

setIcon

public void setIcon(javax.swing.Icon anIcon)
Sets the background image of the WorkingArea.
Parameters:
anIcon - Icon

setIconName

public void setIconName(java.lang.Object o)
Sets the background image of the WorkingArea.
Parameters:
newValue - java.lang.String

setId

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

setName

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

setShowPopup

public void setShowPopup(java.lang.Object o)
Sets the showpopup boolean of the WorkingArea.
Parameters:
o - java.lang.Object

setVisual

public void setVisual(int i)
Sets the visual kind of showing the view to the WorkingArea.
Parameters:
int - i

setVisualMode

public void setVisualMode()
Sets the visual mode of showing the view to the WorkingArea.

setVisualMode

public void setVisualMode(int position)
Sets the visual mode of showing the view to the WorkingArea.

setWarningMessageWhenAViewCanNotBeClosed

public void setWarningMessageWhenAViewCanNotBeClosed(java.lang.Object o)
This method sets the message shown when a vew can not be closed.

setWidth

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

setXCascade

public void setXCascade(java.lang.Object o)
This method sets the x cascade of the WorkingArea.

setYCascade

public void setYCascade(java.lang.Object o)
This method sets the y cascade of the WorkingArea.

showMenu

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


showMenu

protected void showMenu(javax.swing.JPopupMenu popup,
                        java.awt.event.MouseEvent e)
Shows the MenuButton's pop-up menu in a visible area.


toString

public java.lang.String toString()
This method returns a string representation of the WorkingArea.

Overrides:
toString in class java.awt.Component
Returns:
java.lang.String