swingwtx.swing
Class JDesktopPane

java.lang.Object
  extended byswingwt.awt.Component
      extended byswingwt.awt.Container
          extended byswingwtx.swing.JComponent
              extended byswingwtx.swing.JPanel
                  extended byswingwtx.swing.JLayeredPane
                      extended byswingwtx.swing.JDesktopPane
All Implemented Interfaces:
ImageObserver, MenuContainer

public class JDesktopPane
extends JLayeredPane


Nested Class Summary
 
Nested classes inherited from class swingwtx.swing.JComponent
JComponent.InternalFrameSelectionListener
 
Field Summary
protected  java.util.Vector frames
          Cache of JInternalFrames in the JDesktopPane
protected  JClosableTabbedPane jtp
          If we are using tabbed emulation, a reference to the closable tabbed pane we are using to contain JInternalFrames
protected  Point nextLocation
           
protected  JInternalFrame pSelectedFrame
          Cache of the currently selected frame
protected  boolean useTabbedEmulation
          This value determines how the JDesktopPane is displayed.
 
Fields inherited from class swingwtx.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, layerComponents, layerTable, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER, self
 
Fields inherited from class swingwtx.swing.JPanel
opaque, ppeer
 
Fields inherited from class swingwtx.swing.JComponent
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap
 
Fields inherited from class swingwt.awt.Container
composite, comps, containerListeners, layout, queuedValidateRequest
 
Fields inherited from class swingwt.awt.Component
actionCommand, actionListeners, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListeners, componentName, consumeAvailableHeight, consumeAvailableWidth, focusable, focusListeners, graphicsConfig, inputMethodListeners, isUserSetFont, keyListeners, layoutModifier, LEFT_ALIGNMENT, LOCK, mouseListeners, mouseMotionListeners, mouseWheelListeners, parent, pBackground, pCursor, pDoubleBuffered, peer, pEnabled, pFont, pForeground, pLayoutData, pLocation, pMaxSize, pMinSize, pPrefSize, pSize, pToolTipText, pVisible, RIGHT_ALIGNMENT, swingWTDefaultActionEventAdapter, swingWTEventAdapter, TOP_ALIGNMENT
 
Fields inherited from interface swingwt.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JDesktopPane()
           
JDesktopPane(boolean useTabbedEmulation)
          SwingWT specific - allows you to choose whether to use "real" MDI or tabbed emulation of MDI
 
Method Summary
 Component add(Component c)
          Overridden add method to deal with JInternalFrames
 void add(Component c, java.lang.Object layoutModifier)
          Overridden add method to deal with JInternalFrames
 Component add(java.lang.String name, Component c)
          Overridden add method to deal with JInternalFrames
protected  JInternalFrame addInternalFrameToTabbedPane(JInternalFrame frame)
          TABBED EMULATION ONLY: Adds a JInternalFrame to the tabbed pane
 JInternalFrame[] getAllFrames()
           
 Point getNextFrameLocation()
          Returns the next location a frame should appear at.
 JInternalFrame getSelectedFrame()
           
protected  void refreshFrame(JInternalFrame frame)
          TABBED EMULATION ONLY: Updates a frame's components from it's cached properties.
protected  void removeFrame(JInternalFrame frame)
          Removes an internal frame
 void setSelectedFrame(JInternalFrame frame)
           
 void setSwingWTParent(Container parent)
          Callback for when this is added to a Container to create the peer and load cached values.
 void setUseTabbedEmulation(boolean b)
          Changes the JDesktopPane to use tabbed emulation if set to true.
protected  void updateFrameAt(int index, JInternalFrame frame)
          TABBED EMULATION ONLY: Copies an internal frame's properties onto it's component
 
Methods inherited from class swingwtx.swing.JLayeredPane
getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, lowestLayer, moveToBack, paramString, remove, reorderComponents, setLayer, setLayer, setPosition
 
Methods inherited from class swingwtx.swing.JPanel
calculatePreferredSize, getHeight, getSize, getWidth, setBorder
 
Methods inherited from class swingwtx.swing.JComponent
add, add, addPropertyChangeListener, addPropertyChangeListener, checkInternalFrameChild, dispose, getAccessibleContext, getActionMap, getAutoscrolls, getBorder, getClientProperty, getInputMap, getInsets, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVisibleRect, isDoubleBuffered, isOpaque, isOptimizedDrawingEnabled, isValidateRoot, paint, paintBackground, paintChildren, paintComponent, paintImmediately, paintImmediately, putClientProperty, remove, removePropertyChangeListener, removePropertyChangeListener, repaint, revalidate, scrollRectToVisible, setActionMap, setAutoscrolls, setDoubleBuffered, setInputMap, setMargin, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled
 
Methods inherited from class swingwt.awt.Container
addComponentToLayout, addContainerListener, debug_showContainmentTree, doAdd, doLayout, getComponent, getComponentCount, getComponentOrientation, getComponents, getComposite, getLayout, getMaximumSize, getMinimumSize, getParent, getPreferredSize, invalidate, minimumSize, preferredSize, processContainerEvent, processEvent, queuedValidate, removeAll, removeComponentFromCache, removeContainerListener, setLayout, setLayoutImpl, validate
 
Methods inherited from class swingwt.awt.Component
add, addActionListener, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, componentOnlyDispose, computePreferredSize, contains, contains, createImage, createListenerArrayFromVector, createVolatileImage, dispatchEvent, getActionCommand, getAlignmentX, getAlignmentY, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getListeners, getLocation, getLocationOnScreen, getName, getPeer, getPeerSize, getSize, getSWTPeer, getToolkit, getToolTipText, getTreeLock, getX, getY, grabFocus, hasFocus, hasSetFont, hide, imageUpdate, inside, isEnabled, isFocusable, isMinimumSizeSet, isShowing, isVisible, processActionEvent, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processTraverseEvent, registerActionEvents, registerComponentEvents, registerEvents, registerExtendedModifyEvents, registerFocusEvents, registerKeyEvents, registerModifyEvents, registerMouseEvents, registerPaintEvents, registerTraversalEvents, remove, removeActionListener, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, repaint, repaint, repaint, requestFocus, setActionCommand, setAlignmentX, setAlignmentY, setBackground, setBounds, setBounds, setCachedProperties, setComponentOrientation, setComponentRemoved, setCursor, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setFont, setForeground, setHeight, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setToolTipText, setVisible, setWidth, show, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frames

protected java.util.Vector frames
Cache of JInternalFrames in the JDesktopPane


useTabbedEmulation

protected boolean useTabbedEmulation
This value determines how the JDesktopPane is displayed. If this is set to true, a series of closable tabs are used to represent the JInternalFrames. Otherwise, "real" MDI emulation is used.


jtp

protected JClosableTabbedPane jtp
If we are using tabbed emulation, a reference to the closable tabbed pane we are using to contain JInternalFrames


pSelectedFrame

protected JInternalFrame pSelectedFrame
Cache of the currently selected frame


nextLocation

protected Point nextLocation
Constructor Detail

JDesktopPane

public JDesktopPane()

JDesktopPane

public JDesktopPane(boolean useTabbedEmulation)
SwingWT specific - allows you to choose whether to use "real" MDI or tabbed emulation of MDI

Method Detail

add

public Component add(Component c)
Overridden add method to deal with JInternalFrames

Overrides:
add in class JLayeredPane

add

public void add(Component c,
                java.lang.Object layoutModifier)
Overridden add method to deal with JInternalFrames

Overrides:
add in class JLayeredPane

add

public Component add(java.lang.String name,
                     Component c)
Overridden add method to deal with JInternalFrames

Overrides:
add in class JLayeredPane

addInternalFrameToTabbedPane

protected JInternalFrame addInternalFrameToTabbedPane(JInternalFrame frame)
TABBED EMULATION ONLY: Adds a JInternalFrame to the tabbed pane


setUseTabbedEmulation

public void setUseTabbedEmulation(boolean b)
Changes the JDesktopPane to use tabbed emulation if set to true. Tabbed emulation emulates an MDI interface by using closable tabs to represent the JInternalFrame objects inside.


getNextFrameLocation

public Point getNextFrameLocation()
Returns the next location a frame should appear at. This is just a quick hack and it steps down 24 pixels in a cascade for 5 windows, before going back to 0, 0


setSwingWTParent

public void setSwingWTParent(Container parent)
                      throws java.lang.Exception
Description copied from class: JPanel
Callback for when this is added to a Container to create the peer and load cached values.

Overrides:
setSwingWTParent in class JLayeredPane
Throws:
java.lang.Exception

refreshFrame

protected void refreshFrame(JInternalFrame frame)
TABBED EMULATION ONLY: Updates a frame's components from it's cached properties.


updateFrameAt

protected void updateFrameAt(int index,
                             JInternalFrame frame)
TABBED EMULATION ONLY: Copies an internal frame's properties onto it's component


removeFrame

protected void removeFrame(JInternalFrame frame)
Removes an internal frame


getAllFrames

public JInternalFrame[] getAllFrames()

getSelectedFrame

public JInternalFrame getSelectedFrame()

setSelectedFrame

public void setSelectedFrame(JInternalFrame frame)