Fields Summary |
---|
private static final Actions | SHARED_ACTION |
private static Dimension | minSize |
private static Dimension | maxSize |
private Handler | handler |
private PropertyChangeListener | pcl |
protected JDesktopPane | desktop |
protected DesktopManager | desktopManager |
protected KeyStroke | minimizeKeyAs 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. |
protected KeyStroke | maximizeKeyAs 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. |
protected KeyStroke | closeKeyAs 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. |
protected KeyStroke | navigateKeyAs 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. |
protected KeyStroke | navigateKey2As 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. |
Methods Summary |
---|
javax.swing.InputMap | createInputMap(int condition)
if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW) {
Object[] bindings = (Object[])DefaultLookup.get(desktop,
this, "Desktop.windowBindings");
if (bindings != null) {
return LookAndFeel.makeComponentInputMap(desktop, bindings);
}
}
return null;
|
protected java.beans.PropertyChangeListener | createPropertyChangeListener()Returns the PropertyChangeListener to install on
the JDesktopPane .
return getHandler();
|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent c)
return new BasicDesktopPaneUI();
|
private javax.swing.plaf.basic.BasicDesktopPaneUI$Handler | getHandler()
if (handler == null) {
handler = new Handler();
}
return handler;
|
javax.swing.InputMap | getInputMap(int condition)
if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW) {
return createInputMap(condition);
}
else if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {
return (InputMap)DefaultLookup.get(desktop, this,
"Desktop.ancestorInputMap");
}
return null;
|
public java.awt.Dimension | getMaximumSize(javax.swing.JComponent c)
return maxSize;
|
public java.awt.Dimension | getMinimumSize(javax.swing.JComponent c)
return minSize;
|
public java.awt.Dimension | getPreferredSize(javax.swing.JComponent c)return null;
|
protected void | installDefaults()
if (desktop.getBackground() == null ||
desktop.getBackground() instanceof UIResource) {
desktop.setBackground(UIManager.getColor("Desktop.background"));
}
LookAndFeel.installProperty(desktop, "opaque", Boolean.TRUE);
|
protected void | installDesktopManager()
desktopManager = desktop.getDesktopManager();
if(desktopManager == null) {
desktopManager = new BasicDesktopManager();
desktop.setDesktopManager(desktopManager);
}
|
protected void | installKeyboardActions()
InputMap inputMap = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
if (inputMap != null) {
SwingUtilities.replaceUIInputMap(desktop,
JComponent.WHEN_IN_FOCUSED_WINDOW, inputMap);
}
inputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
if (inputMap != null) {
SwingUtilities.replaceUIInputMap(desktop,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
inputMap);
}
LazyActionMap.installLazyActionMap(desktop, BasicDesktopPaneUI.class,
"DesktopPane.actionMap");
registerKeyboardActions();
|
protected void | installListeners()Installs the PropertyChangeListener returned from
createPropertyChangeListener on the
JDesktopPane .
pcl = createPropertyChangeListener();
desktop.addPropertyChangeListener(pcl);
|
public void | installUI(javax.swing.JComponent c)
desktop = (JDesktopPane)c;
installDefaults();
installDesktopManager();
installListeners();
installKeyboardActions();
|
static void | loadActionMap(javax.swing.plaf.basic.LazyActionMap map)
map.put(new Actions(Actions.RESTORE));
map.put(new Actions(Actions.CLOSE));
map.put(new Actions(Actions.MOVE));
map.put(new Actions(Actions.RESIZE));
map.put(new Actions(Actions.LEFT));
map.put(new Actions(Actions.SHRINK_LEFT));
map.put(new Actions(Actions.RIGHT));
map.put(new Actions(Actions.SHRINK_RIGHT));
map.put(new Actions(Actions.UP));
map.put(new Actions(Actions.SHRINK_UP));
map.put(new Actions(Actions.DOWN));
map.put(new Actions(Actions.SHRINK_DOWN));
map.put(new Actions(Actions.ESCAPE));
map.put(new Actions(Actions.MINIMIZE));
map.put(new Actions(Actions.MAXIMIZE));
map.put(new Actions(Actions.NEXT_FRAME));
map.put(new Actions(Actions.PREVIOUS_FRAME));
map.put(new Actions(Actions.NAVIGATE_NEXT));
map.put(new Actions(Actions.NAVIGATE_PREVIOUS));
|
public void | paint(java.awt.Graphics g, javax.swing.JComponent c)
|
protected void | registerKeyboardActions()
|
protected void | uninstallDefaults()
|
protected void | uninstallDesktopManager()
if(desktop.getDesktopManager() instanceof UIResource) {
desktop.setDesktopManager(null);
}
desktopManager = null;
|
protected void | uninstallKeyboardActions()
unregisterKeyboardActions();
SwingUtilities.replaceUIInputMap(desktop, JComponent.
WHEN_IN_FOCUSED_WINDOW, null);
SwingUtilities.replaceUIInputMap(desktop, JComponent.
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
SwingUtilities.replaceUIActionMap(desktop, null);
|
protected void | uninstallListeners()Uninstalls the PropertyChangeListener returned from
createPropertyChangeListener from the
JDesktopPane .
desktop.removePropertyChangeListener(pcl);
pcl = null;
|
public void | uninstallUI(javax.swing.JComponent c)
uninstallKeyboardActions();
uninstallListeners();
uninstallDesktopManager();
uninstallDefaults();
desktop = null;
handler = null;
|
protected void | unregisterKeyboardActions()
|