APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf.basic

public Class BasicDesktopPaneUI

extends DesktopPaneUI
Class Inheritance
Known Direct Subclasses
javax.swing.plaf.synth.SynthDesktopPaneUI, com.sun.java.swing.plaf.motif.MotifDesktopPaneUI
Imports
javax.swing.*, javax.swing.plaf.*, java.beans.*, java.awt.event.ActionEvent, java.awt.Component, .Container, .Dimension, .Insets, .FocusTraversalPolicy, .Graphics, .KeyboardFocusManager, .Point, sun.swing.DefaultLookup, .UIAction

Basic L&F for a desktop.
Author
Steve Wilson

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
BasicDesktopPaneUI.BasicDesktopManager

The default DesktopManager installed by the UI.

protected class
BasicDesktopPaneUI.CloseAction

Handles closing an internal frame.

private class
protected class
BasicDesktopPaneUI.MaximizeAction

Handles maximizing an internal frame.

protected class
BasicDesktopPaneUI.MinimizeAction

Handles minimizing an internal frame.

protected class
BasicDesktopPaneUI.OpenAction

Handles restoring a minimized or maximized internal frame.

Field Summary

Modifier and TypeField and Description
protected KeyStroke
closeKey

Deprecated As of 1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected JDesktopPane
desktop

The instance of JDesktopPane.

protected DesktopManager
desktopManager

The instance of DesktopManager.

private BasicDesktopPaneUI.Handler
protected KeyStroke
maximizeKey

Deprecated As of 1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected KeyStroke
minimizeKey

Deprecated As of 1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
private PropertyChangeListener
private static final BasicDesktopPaneUI.Actions

Constructor Summary

AccessConstructor and Description
public
BasicDesktopPaneUI()

Constructs a new instance of BasicDesktopPaneUI.

Method Summary

Modifier and TypeMethod and Description
pack-priv InputMap
createInputMap(int condition)

protected PropertyChangeListener

Returns:

The PropertyChangeListener that will be added to track changes in the desktop pane.
createPropertyChangeListener
()

Returns the PropertyChangeListener to install on the JDesktopPane.

public static ComponentUI

Returns:

a new instance of BasicDesktopPaneUI
createUI
(JComponent
a component
c
)

Hides javax.swing.plaf.ComponentUI.createUI.

Constructs a new instance of BasicDesktopPaneUI.

private BasicDesktopPaneUI.Handler
pack-priv InputMap
getInputMap(int condition)

public Dimension
getMaximumSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getMaximumSize.

Returns the specified component's maximum size appropriate for the look and feel.

public Dimension
getMinimumSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getMinimumSize.

Returns the specified component's minimum size appropriate for the look and feel.

public Dimension
getPreferredSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getPreferredSize.

Returns the specified component's preferred size appropriate for the look and feel.

protected void
installDefaults()

Installs default properties.

protected void
installDesktopManager()

Installs desktop manager.

protected void
installKeyboardActions()

Installs keyboard actions.

protected void
installListeners()

Installs the PropertyChangeListener returned from createPropertyChangeListener on the JDesktopPane.

public void
installUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.installUI.

Configures the specified component appropriately for the look and feel.

pack-priv static void
public void
paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately for the look and feel.

protected void
registerKeyboardActions()

Registers keyboard actions.

protected void
uninstallDefaults()

Uninstalls default properties.

protected void
uninstallDesktopManager()

Uninstalls desktop manager.

protected void
uninstallKeyboardActions()

Unregisters keyboard actions.

protected void
uninstallListeners()

Uninstalls the PropertyChangeListener returned from createPropertyChangeListener from the JDesktopPane.

public void
uninstallUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.uninstallUI.

Reverses configuration which was done on the specified component during installUI.

protected void
unregisterKeyboardActions()

Unregisters keyboard actions.

Field Detail

closeKeyback to summary
protected KeyStroke closeKey

Deprecated

As of 1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

Annotations
@Deprecated
desktopback to summary
protected JDesktopPane desktop

The instance of JDesktopPane.

desktopManagerback to summary
protected DesktopManager desktopManager

The instance of DesktopManager.

handlerback to summary
private BasicDesktopPaneUI.Handler handler
maximizeKeyback to summary
protected KeyStroke maximizeKey

Deprecated

As of 1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

Annotations
@Deprecated
minimizeKeyback to summary
protected KeyStroke minimizeKey

Deprecated

As of 1.3.

As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

Annotations
@Deprecated
pclback to summary
private PropertyChangeListener pcl
SHARED_ACTIONback to summary
private static final BasicDesktopPaneUI.Actions SHARED_ACTION

Constructor Detail

BasicDesktopPaneUIback to summary
public BasicDesktopPaneUI()

Constructs a new instance of BasicDesktopPaneUI.

Method Detail

createInputMapback to summary
pack-priv InputMap createInputMap(int condition)
createPropertyChangeListenerback to summary
protected PropertyChangeListener createPropertyChangeListener()

Returns the PropertyChangeListener to install on the JDesktopPane.

Returns:PropertyChangeListener

The PropertyChangeListener that will be added to track changes in the desktop pane.

Since
1.5
createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.ComponentUI.createUI.

Constructs a new instance of BasicDesktopPaneUI.

Parameters
c:JComponent

a component

Returns:ComponentUI

a new instance of BasicDesktopPaneUI

getHandlerback to summary
private BasicDesktopPaneUI.Handler getHandler()
getInputMapback to summary
pack-priv InputMap getInputMap(int condition)
getMaximumSizeback to summary
public Dimension getMaximumSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getMaximumSize.

Doc from javax.swing.plaf.ComponentUI.getMaximumSize.

Returns the specified component's maximum size appropriate for the look and feel. If null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Annotations
@Override
getMinimumSizeback to summary
public Dimension getMinimumSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getMinimumSize.

Doc from javax.swing.plaf.ComponentUI.getMinimumSize.

Returns the specified component's minimum size appropriate for the look and feel. If null is returned, the minimum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Annotations
@Override
getPreferredSizeback to summary
public Dimension getPreferredSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getPreferredSize.

Doc from javax.swing.plaf.ComponentUI.getPreferredSize.

Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

Annotations
@Override
installDefaultsback to summary
protected void installDefaults()

Installs default properties.

installDesktopManagerback to summary
protected void installDesktopManager()

Installs desktop manager.

installKeyboardActionsback to summary
protected void installKeyboardActions()

Installs keyboard actions.

installListenersback to summary
protected void installListeners()

Installs the PropertyChangeListener returned from createPropertyChangeListener on the JDesktopPane.

Since
1.5
See Also
createPropertyChangeListener
installUIback to summary
public void installUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.installUI.

Doc from javax.swing.plaf.ComponentUI.installUI.

Configures the specified component appropriately for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:

  1. Install default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.
loadActionMapback to summary
pack-priv static void loadActionMap(LazyActionMap map)
paintback to summary
public void paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.paint.

Doc from javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

registerKeyboardActionsback to summary
protected void registerKeyboardActions()

Registers keyboard actions.

uninstallDefaultsback to summary
protected void uninstallDefaults()

Uninstalls default properties.

uninstallDesktopManagerback to summary
protected void uninstallDesktopManager()

Uninstalls desktop manager.

uninstallKeyboardActionsback to summary
protected void uninstallKeyboardActions()

Unregisters keyboard actions.

uninstallListenersback to summary
protected void uninstallListeners()

Uninstalls the PropertyChangeListener returned from createPropertyChangeListener from the JDesktopPane.

Since
1.5
See Also
createPropertyChangeListener
uninstallUIback to summary
public void uninstallUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.uninstallUI.

Doc from javax.swing.plaf.ComponentUI.uninstallUI.

Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:

  1. Remove any UI-set borders from the component.
  2. Remove any UI-set layout managers on the component.
  3. Remove any UI-added sub-components from the component.
  4. Remove any UI-added event/property listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Nullify any allocated instance data objects to allow for GC.
unregisterKeyboardActionsback to summary
protected void unregisterKeyboardActions()

Unregisters keyboard actions.

javax.swing.plaf.basic back to summary

private Class BasicDesktopPaneUI.Actions

extends UIAction
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static String
private static String
private static String
private static Component
private static String
private static String
private static String
private static String
private static final int
private static boolean
private static String
private static String
private static String
private static String
private static String
private static boolean
private static String
private static String
private static String
private static String
private static String
private static String
private static JInternalFrame
private static String

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(Object sender)

Overrides sun.swing.UIAction.accept.

Overrides default javax.swing.Action.accept.

Subclasses that need to conditionalize the enabled state should override this.

public void
actionPerformed(ActionEvent e)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

private void
Inherited from sun.swing.UIAction:
addPropertyChangeListenergetNamegetValueisEnabledputValueremovePropertyChangeListenersetEnabled

Field Detail

CLOSEback to summary
private static String CLOSE
DOWNback to summary
private static String DOWN
ESCAPEback to summary
private static String ESCAPE
focusOwnerback to summary
private static Component focusOwner
LEFTback to summary
private static String LEFT
MAXIMIZEback to summary
private static String MAXIMIZE
MINIMIZEback to summary
private static String MINIMIZE
MOVEback to summary
private static String MOVE
MOVE_RESIZE_INCREMENTback to summary
private static final int MOVE_RESIZE_INCREMENT
movingback to summary
private static boolean moving
NAVIGATE_NEXTback to summary
private static String NAVIGATE_NEXT
NAVIGATE_PREVIOUSback to summary
private static String NAVIGATE_PREVIOUS
NEXT_FRAMEback to summary
private static String NEXT_FRAME
PREVIOUS_FRAMEback to summary
private static String PREVIOUS_FRAME
RESIZEback to summary
private static String RESIZE
resizingback to summary
private static boolean resizing
RESTOREback to summary
private static String RESTORE
RIGHTback to summary
private static String RIGHT
SHRINK_DOWNback to summary
private static String SHRINK_DOWN
SHRINK_LEFTback to summary
private static String SHRINK_LEFT
SHRINK_RIGHTback to summary
private static String SHRINK_RIGHT
SHRINK_UPback to summary
private static String SHRINK_UP
sourceFrameback to summary
private static JInternalFrame sourceFrame
UPback to summary
private static String UP

Constructor Detail

Actionsback to summary
pack-priv Actions()
Actionsback to summary
pack-priv Actions(String name)

Method Detail

acceptback to summary
public boolean accept(Object sender)

Overrides sun.swing.UIAction.accept.

Overrides default javax.swing.Action.accept.

Doc from sun.swing.UIAction.accept.

Subclasses that need to conditionalize the enabled state should override this. Be aware that sender may be null.

Annotations
@Override
actionPerformedback to summary
public void actionPerformed(ActionEvent e)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

setStateback to summary
private void setState(JDesktopPane dp, String state)
javax.swing.plaf.basic back to summary

private Class BasicDesktopPaneUI.BasicDesktopManager

extends DefaultDesktopManager
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Annotations
@SuppressWarnings:serial

The default DesktopManager installed by the UI.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from javax.swing.DefaultDesktopManager:
activateFramebeginDraggingFramebeginResizingFramecloseFramedeactivateFramedeiconifyFramedragFrameendDraggingFrameendResizingFramegetBoundsForIconOfgetPreviousBoundsiconifyFramemaximizeFrameminimizeFrameopenFrameremoveIconForresizeFramesetBoundsForFramesetPreviousBoundssetWasIconwasIcon

Constructor Detail

BasicDesktopManagerback to summary
private BasicDesktopManager()
javax.swing.plaf.basic back to summary

protected Class BasicDesktopPaneUI.CloseAction

extends AbstractAction
Class Inheritance
Annotations
@SuppressWarnings:serial

Handles closing an internal frame.

Field Summary

Inherited from javax.swing.AbstractAction:
changeSupportenabled

Constructor Summary

AccessConstructor and Description
protected
CloseAction()

Constructs a CloseAction.

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

public boolean
isEnabled()

Overrides javax.swing.AbstractAction.isEnabled.

Implements javax.swing.Action.isEnabled.

Returns true if the action is enabled.

Inherited from javax.swing.AbstractAction:
addPropertyChangeListenerclonefirePropertyChangegetKeysgetPropertyChangeListenersgetValueputValueremovePropertyChangeListenersetEnabled

Constructor Detail

CloseActionback to summary
protected CloseAction()

Constructs a CloseAction.

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

isEnabledback to summary
public boolean isEnabled()

Overrides javax.swing.AbstractAction.isEnabled.

Implements javax.swing.Action.isEnabled.

Doc from javax.swing.AbstractAction.isEnabled.

Returns true if the action is enabled.

javax.swing.plaf.basic back to summary

private Class BasicDesktopPaneUI.Handler

extends Object
implements PropertyChangeListener
Class Inheritance
All Implemented Interfaces
java.beans.PropertyChangeListener, java.util.EventListener

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
propertyChange(PropertyChangeEvent evt)

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Handlerback to summary
private Handler()

Method Detail

propertyChangeback to summary
public void propertyChange(PropertyChangeEvent evt)

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

javax.swing.plaf.basic back to summary

protected Class BasicDesktopPaneUI.MaximizeAction

extends AbstractAction
Class Inheritance
Annotations
@SuppressWarnings:serial

Handles maximizing an internal frame.

Field Summary

Inherited from javax.swing.AbstractAction:
changeSupportenabled

Constructor Summary

AccessConstructor and Description
protected
MaximizeAction()

Constructs a MaximizeAction.

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

public boolean
isEnabled()

Overrides javax.swing.AbstractAction.isEnabled.

Implements javax.swing.Action.isEnabled.

Returns true if the action is enabled.

Inherited from javax.swing.AbstractAction:
addPropertyChangeListenerclonefirePropertyChangegetKeysgetPropertyChangeListenersgetValueputValueremovePropertyChangeListenersetEnabled

Constructor Detail

MaximizeActionback to summary
protected MaximizeAction()

Constructs a MaximizeAction.

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

isEnabledback to summary
public boolean isEnabled()

Overrides javax.swing.AbstractAction.isEnabled.

Implements javax.swing.Action.isEnabled.

Doc from javax.swing.AbstractAction.isEnabled.

Returns true if the action is enabled.

javax.swing.plaf.basic back to summary

protected Class BasicDesktopPaneUI.MinimizeAction

extends AbstractAction
Class Inheritance
Annotations
@SuppressWarnings:serial

Handles minimizing an internal frame.

Field Summary

Inherited from javax.swing.AbstractAction:
changeSupportenabled

Constructor Summary

AccessConstructor and Description
protected
MinimizeAction()

Constructs a MinimizeAction.

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

public boolean
isEnabled()

Overrides javax.swing.AbstractAction.isEnabled.

Implements javax.swing.Action.isEnabled.

Returns true if the action is enabled.

Inherited from javax.swing.AbstractAction:
addPropertyChangeListenerclonefirePropertyChangegetKeysgetPropertyChangeListenersgetValueputValueremovePropertyChangeListenersetEnabled

Constructor Detail

MinimizeActionback to summary
protected MinimizeAction()

Constructs a MinimizeAction.

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

isEnabledback to summary
public boolean isEnabled()

Overrides javax.swing.AbstractAction.isEnabled.

Implements javax.swing.Action.isEnabled.

Doc from javax.swing.AbstractAction.isEnabled.

Returns true if the action is enabled.

javax.swing.plaf.basic back to summary

protected Class BasicDesktopPaneUI.OpenAction

extends AbstractAction
Class Inheritance
Annotations
@SuppressWarnings:serial

Handles restoring a minimized or maximized internal frame.
Since
1.3

Field Summary

Inherited from javax.swing.AbstractAction:
changeSupportenabled

Constructor Summary

AccessConstructor and Description
protected
OpenAction()

Constructs an OpenAction.

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

public boolean
isEnabled()

Overrides javax.swing.AbstractAction.isEnabled.

Implements javax.swing.Action.isEnabled.

Returns true if the action is enabled.

Inherited from javax.swing.AbstractAction:
addPropertyChangeListenerclonefirePropertyChangegetKeysgetPropertyChangeListenersgetValueputValueremovePropertyChangeListenersetEnabled

Constructor Detail

OpenActionback to summary
protected OpenAction()

Constructs an OpenAction.

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

isEnabledback to summary
public boolean isEnabled()

Overrides javax.swing.AbstractAction.isEnabled.

Implements javax.swing.Action.isEnabled.

Doc from javax.swing.AbstractAction.isEnabled.

Returns true if the action is enabled.