org.globus.cog.gridface.impl.desktop
Class AbstractDesktopContainer

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended byjavax.swing.JFrame
                      extended byorg.globus.cog.gridface.impl.desktop.AbstractDesktopContainer
All Implemented Interfaces:
AccessClose, AccessDesktop, Accessible, AccessPreferences, AccessSaveChanges, AccessToolBar, EventListener, ImageObserver, MenuContainer, NodeChangeListener, RootPaneContainer, Serializable, WindowConstants
Direct Known Subclasses:
GridDesktopContainer

public abstract class AbstractDesktopContainer
extends JFrame
implements AccessDesktop, AccessToolBar, AccessSaveChanges, AccessClose, AccessPreferences, NodeChangeListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected static ArgumentParser argParser
          Argument parser for desktop
protected  CoGTop currentDesktop
          Current visible desktop
protected  DesktopToolBarImpl desktopToolBar
          Desktop Toolbar
protected static int inset
          Default offset location for this frame on screen
protected  String prefFile
          Preferences file name path
protected static boolean saveChanges
          Flag to ask questions before exiting frame
protected  JScrollPane scroll
          Scroll Pane to hold desktop
static String sTITLEDELIMETER
           
static String sTITLESUFFIX
           
 
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 org.globus.cog.gridface.impl.desktop.interfaces.AccessPreferences
NO_TOSTRING, SUFFIX_TAG
 
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
AbstractDesktopContainer(File xmlFile)
           
AbstractDesktopContainer(String title)
           
 
Method Summary
 void childAdded(NodeChangeEvent nceEvt)
           
 void childRemoved(NodeChangeEvent nceEvt)
           
protected  void clearPrefFileName()
           
 boolean close()
           
protected static void configureArgumentParser(ArgumentParser ap)
           
protected abstract  AbstractDesktop configureDesktop()
           
protected abstract  void configureDesktopIcons(AbstractDesktop desktop)
           
protected  void configureFrame()
           
protected  void configureFrame(String title)
           
protected  void configureFrame(String title, Rectangle frameSize)
           
protected  void configureScroll(JScrollPane configScrlPane)
          Setup scrollable container for our desktop
protected abstract  void configureStatusPanel(JPanel statusPanel)
           
protected abstract  void configureToolBar(DesktopToolBarImpl desktopToolBar)
           
 boolean fromXML(File xmlFile)
           
protected  Dimension getDefaultDesktopSize()
           
protected  Rectangle getDefaultFrameSize()
           
protected  Rectangle getDefaultMaxFrameSize()
           
 CoGTop getDesktop()
           
 String getFrameTitle()
           
protected  String getPrefFile()
           
protected  String getPrefFileName()
           
 DesktopToolBarImpl getToolBar()
           
 boolean isSaveChanges()
           
 void loadPreferences(Preferences fPref)
           
 void savePreferences(Preferences desktopPref)
           
 void setDesktop(CoGTop setdesktop)
           
 void setFrameTitle(String title)
           
protected  void setPrefFile(String fileName)
           
 void setSaveChanges(boolean saveChange)
           
 void setToolBar(DesktopToolBarImpl toolbar)
           
 boolean toXML(File xmlFile)
           
 
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, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, 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, show, 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

sTITLEDELIMETER

public static final String sTITLEDELIMETER
See Also:
Constant Field Values

sTITLESUFFIX

public static final String sTITLESUFFIX
See Also:
Constant Field Values

saveChanges

protected static boolean saveChanges
Flag to ask questions before exiting frame


scroll

protected JScrollPane scroll
Scroll Pane to hold desktop


currentDesktop

protected CoGTop currentDesktop
Current visible desktop


desktopToolBar

protected DesktopToolBarImpl desktopToolBar
Desktop Toolbar


inset

protected static int inset
Default offset location for this frame on screen


prefFile

protected String prefFile
Preferences file name path


argParser

protected static ArgumentParser argParser
Argument parser for desktop

Constructor Detail

AbstractDesktopContainer

public AbstractDesktopContainer(String title)

AbstractDesktopContainer

public AbstractDesktopContainer(File xmlFile)
Method Detail

configureDesktop

protected abstract AbstractDesktop configureDesktop()

configureDesktopIcons

protected abstract void configureDesktopIcons(AbstractDesktop desktop)

configureToolBar

protected abstract void configureToolBar(DesktopToolBarImpl desktopToolBar)

configureStatusPanel

protected abstract void configureStatusPanel(JPanel statusPanel)

configureArgumentParser

protected static void configureArgumentParser(ArgumentParser ap)

isSaveChanges

public boolean isSaveChanges()
Specified by:
isSaveChanges in interface AccessSaveChanges

setSaveChanges

public void setSaveChanges(boolean saveChange)
Specified by:
setSaveChanges in interface AccessSaveChanges

getDefaultFrameSize

protected final Rectangle getDefaultFrameSize()

getDefaultDesktopSize

protected final Dimension getDefaultDesktopSize()

getDefaultMaxFrameSize

protected final Rectangle getDefaultMaxFrameSize()

configureFrame

protected final void configureFrame()

configureFrame

protected final void configureFrame(String title)

configureFrame

protected final void configureFrame(String title,
                                    Rectangle frameSize)

setFrameTitle

public final void setFrameTitle(String title)

getFrameTitle

public final String getFrameTitle()

getDesktop

public final CoGTop getDesktop()
Specified by:
getDesktop in interface AccessDesktop

setDesktop

public final void setDesktop(CoGTop setdesktop)
Specified by:
setDesktop in interface AccessDesktop

getToolBar

public final DesktopToolBarImpl getToolBar()
Specified by:
getToolBar in interface AccessToolBar

setToolBar

public final void setToolBar(DesktopToolBarImpl toolbar)
Specified by:
setToolBar in interface AccessToolBar

savePreferences

public void savePreferences(Preferences desktopPref)
Specified by:
savePreferences in interface AccessPreferences

loadPreferences

public void loadPreferences(Preferences fPref)
                     throws Exception
Specified by:
loadPreferences in interface AccessPreferences
Throws:
Exception

fromXML

public final boolean fromXML(File xmlFile)

toXML

public final boolean toXML(File xmlFile)

setPrefFile

protected final void setPrefFile(String fileName)

getPrefFile

protected final String getPrefFile()

getPrefFileName

protected final String getPrefFileName()

clearPrefFileName

protected final void clearPrefFileName()

childAdded

public final void childAdded(NodeChangeEvent nceEvt)
Specified by:
childAdded in interface NodeChangeListener

childRemoved

public final void childRemoved(NodeChangeEvent nceEvt)
Specified by:
childRemoved in interface NodeChangeListener

configureScroll

protected final void configureScroll(JScrollPane configScrlPane)
Setup scrollable container for our desktop


close

public boolean close()
Specified by:
close in interface AccessClose