javax.swing
Class JDesktopPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLayeredPane
                          |
                          +--javax.swing.JDesktopPane
All Implemented Interfaces:
Accessible, java.awt.image.ImageObserver, MenuContainer, Serializable

public class JDesktopPane
extends JLayeredPane
implements Accessible

Unsafe:

See Also:
Serialized Form

Field Summary
(package private)  DesktopManager desktopManager
           
private  int dragMode
           
static int LIVE_DRAG_MODE
          Suppressed: Indicates that the entire contents of the item being dragged should appear inside the desktop pane.
static int OUTLINE_DRAG_MODE
          Suppressed: Indicates that an outline only of the item being dragged should appear inside the desktop pane.
private  JInternalFrame selectedFrame
           
private static String uiClassID
           
 
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
_bounds, accessibleContext, listenerList, paintingChild, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
JDesktopPane()
          Suppressed: Creates a new JDesktopPane.
 
Method Summary
 AccessibleContext getAccessibleContext()
          Suppressed: Gets the AccessibleContext associated with this JDesktopPane.
 JInternalFrame[] getAllFrames()
          Suppressed: Returns all JInternalFrames currently displayed in the desktop.
 JInternalFrame[] getAllFramesInLayer(int layer)
          Suppressed: Returns all JInternalFrames currently displayed in the specified layer of the desktop.
 DesktopManager getDesktopManager()
          Suppressed: Returns the DesktopManger that handles desktop-specific UI actions.
 int getDragMode()
          Suppressed: Gets the current "dragging style" used by the desktop pane.
 JInternalFrame getSelectedFrame()
          Suppressed: Returns the currently active JInternalFrame in this JDesktopPane, or null if no JInternalFrame is currently active.
 javax.swing.plaf.DesktopPaneUI getUI()
          Suppressed: Returns the L&F object that renders this component.
 String getUIClassID()
          Suppressed: Returns the name of the L&F class that renders this component.
 boolean isOpaque()
          Suppressed: Returns true to indicate that this component paints every pixel in its range.
protected  String paramString()
          Returns a string representation of this JDesktopPane.
 void setDesktopManager(DesktopManager d)
          Suppressed: Sets the DesktopManger that will handle desktop-specific UI actions.
 void setDragMode(int dragMode)
          Suppressed: Sets the "dragging style" used by the desktop pane.
 void setSelectedFrame(JInternalFrame f)
          Suppressed: Sets the currently active JInternalFrame in this JDesktopPane.
 void setUI(javax.swing.plaf.DesktopPaneUI ui)
          Suppressed: Sets the L&F object that renders this component.
 void updateUI()
          Suppressed: Notification from the UIManager that the L&F has changed.
private  void writeObject(ObjectOutputStream s)
          See readObject() and writeObject() in JComponent for more information about serialization in Swing.
 
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
_paintImmediately, addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, alwaysOnTop, checkIfChildObscuredBySibling, componentInputMapChanged, computeVisibleRect, computeVisibleRect, compWriteObjectNotify, contains, createToolTip, disable, enable, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getCreatedDoubleBuffer, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getManagingFocusBackwardTraversalKeys, getManagingFocusForwardTraversalKeys, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getWriteObjCounter, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseMotionEvent, putClientProperty, rectangleIsObscured, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setCreatedDoubleBuffer, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, setWriteObjCounter, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, get, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, iterate, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, size, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, toString, transferFocus, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

uiClassID

private static final String uiClassID
See Also:
getUIClassID(), JComponent.readObject(java.io.ObjectInputStream)

desktopManager

transient DesktopManager desktopManager

selectedFrame

private transient JInternalFrame selectedFrame

LIVE_DRAG_MODE

public static int LIVE_DRAG_MODE
Suppressed: Indicates that the entire contents of the item being dragged should appear inside the desktop pane.

See Also:
OUTLINE_DRAG_MODE, setDragMode(int)

OUTLINE_DRAG_MODE

public static int OUTLINE_DRAG_MODE
Suppressed: Indicates that an outline only of the item being dragged should appear inside the desktop pane.

See Also:
LIVE_DRAG_MODE, setDragMode(int)

dragMode

private int dragMode
Constructor Detail

JDesktopPane

public JDesktopPane()
Suppressed: Creates a new JDesktopPane.

Method Detail

getUI

public javax.swing.plaf.DesktopPaneUI getUI()
Suppressed: Returns the L&F object that renders this component.

Returns:
the DesktopPaneUI object that renders this component

setUI

public void setUI(javax.swing.plaf.DesktopPaneUI ui)
Suppressed: Sets the L&F object that renders this component.

Parameters:
ui - the DesktopPaneUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

setDragMode

public void setDragMode(int dragMode)
Suppressed: Sets the "dragging style" used by the desktop pane. You may want to change to one mode or another for performance or aesthetic reasons.

Parameters:
dragMode - the style of drag to use for items in the Desktop
See Also:
LIVE_DRAG_MODE, OUTLINE_DRAG_MODE

getDragMode

public int getDragMode()
Suppressed: Gets the current "dragging style" used by the desktop pane.

Returns:
either Live_DRAG_MODE or OUTLINE_DRAG_MODE
See Also:
setDragMode(int)

getDesktopManager

public DesktopManager getDesktopManager()
Suppressed: Returns the DesktopManger that handles desktop-specific UI actions.


setDesktopManager

public void setDesktopManager(DesktopManager d)
Suppressed: Sets the DesktopManger that will handle desktop-specific UI actions.

Parameters:
d - the DesktopManager to use

updateUI

public void updateUI()
Suppressed: Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.

Overrides:
updateUI in class JComponent
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Suppressed: Returns the name of the L&F class that renders this component.

Overrides:
getUIClassID in class JComponent
Returns:
the string "DesktopPaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getAllFrames

public JInternalFrame[] getAllFrames()
Suppressed: Returns all JInternalFrames currently displayed in the desktop. Returns iconified frames as well as expanded frames.

Returns:
an array of JInternalFrame objects

getSelectedFrame

public JInternalFrame getSelectedFrame()
Suppressed: Returns the currently active JInternalFrame in this JDesktopPane, or null if no JInternalFrame is currently active.

Returns:
the currently active JInternalFrame or null
Since:
1.3

setSelectedFrame

public void setSelectedFrame(JInternalFrame f)
Suppressed: Sets the currently active JInternalFrame in this JDesktopPane.

Parameters:
f - the internal frame that's currently selected
Since:
1.3

getAllFramesInLayer

public JInternalFrame[] getAllFramesInLayer(int layer)
Suppressed: Returns all JInternalFrames currently displayed in the specified layer of the desktop. Returns iconified frames as well expanded frames.

Parameters:
layer - an int specifying the desktop layer
Returns:
an array of JInternalFrame objects
See Also:
JLayeredPane

isOpaque

public boolean isOpaque()
Suppressed: Returns true to indicate that this component paints every pixel in its range. (In other words, it does not have a transparent background or foreground.)

Overrides:
isOpaque in class JComponent
Returns:
true
See Also:
JComponent.isOpaque()

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
See readObject() and writeObject() in JComponent for more information about serialization in Swing.

Parameters:
s - the ObjectOutputStream in which to write
IOException

paramString

protected String paramString()
Returns a string representation of this JDesktopPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
paramString in class JLayeredPane
Returns:
a string representation of this JDesktopPane

getAccessibleContext

public AccessibleContext getAccessibleContext()
Suppressed: Gets the AccessibleContext associated with this JDesktopPane. For desktop panes, the AccessibleContext takes the form of an AccessibleJDesktopPane. A new AccessibleJDesktopPane instance is created if necessary.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JLayeredPane
Returns:
an AccessibleJDesktopPane that serves as the AccessibleContext of this JDesktopPane


comments?