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

public Class BasicRootPaneUI

extends RootPaneUI
implements PropertyChangeListener
Class Inheritance
All Implemented Interfaces
java.beans.PropertyChangeListener, java.util.EventListener
Known Direct Subclasses
javax.swing.plaf.metal.MetalRootPaneUI, javax.swing.plaf.synth.SynthRootPaneUI
Imports
java.awt.event.ActionEvent, java.awt.KeyboardFocusManager, .Component, .Point, .Rectangle, java.beans.PropertyChangeEvent, .PropertyChangeListener, javax.swing.*, javax.swing.plaf.*, sun.swing.DefaultLookup, .UIAction

Basic implementation of RootPaneUI, there is one shared between all JRootPane instances.
Author
Scott Violet
Since
1.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
private static class

Field Summary

Modifier and TypeField and Description
private static RootPaneUI

Constructor Summary

AccessConstructor and Description
public
BasicRootPaneUI()

Constructs a BasicRootPaneUI.

Method Summary

Modifier and TypeMethod and Description
pack-priv ComponentInputMap
createInputMap(int condition, JComponent c)

public static ComponentUI

Returns:

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

Hides javax.swing.plaf.ComponentUI.createUI.

Returns a new instance of BasicRootPaneUI.

pack-priv InputMap
getInputMap(int condition, JComponent c)

protected void
installComponents(JRootPane
an instance of JRootPane
root
)

Installs components.

protected void
installDefaults(JRootPane
an instance of JRootPane
c
)

Installs default properties.

protected void
installKeyboardActions(JRootPane
an instance of JRootPane
root
)

Registers keyboard actions.

protected void
installListeners(JRootPane
an instance of JRootPane
root
)

Registers listeners.

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
propertyChange(PropertyChangeEvent e)

Implements java.beans.PropertyChangeListener.propertyChange.

Invoked when a property changes on the root pane.

protected void
uninstallComponents(JRootPane
an instance of JRootPane
root
)

Unregisters components.

protected void
uninstallDefaults(JRootPane
an instance of JRootPane
root
)

Uninstalls default properties.

protected void
uninstallKeyboardActions(JRootPane
an instance of JRootPane
root
)

Unregisters keyboard actions.

protected void
uninstallListeners(JRootPane
an instance of JRootPane
root
)

Unregisters listeners.

public void
uninstallUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.uninstallUI.

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

pack-priv void
updateDefaultButtonBindings(JRootPane root)

Invoked when the default button property has changed.

Field Detail

rootPaneUIback to summary
private static RootPaneUI rootPaneUI

Constructor Detail

BasicRootPaneUIback to summary
public BasicRootPaneUI()

Constructs a BasicRootPaneUI.

Method Detail

createInputMapback to summary
pack-priv ComponentInputMap createInputMap(int condition, JComponent c)
createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.ComponentUI.createUI.

Returns a new instance of BasicRootPaneUI.

Parameters
c:JComponent

a component

Returns:ComponentUI

a new instance of BasicRootPaneUI

getInputMapback to summary
pack-priv InputMap getInputMap(int condition, JComponent c)
installComponentsback to summary
protected void installComponents(JRootPane root)

Installs components.

Parameters
root:JRootPane

an instance of JRootPane

installDefaultsback to summary
protected void installDefaults(JRootPane c)

Installs default properties.

Parameters
c:JRootPane

an instance of JRootPane

installKeyboardActionsback to summary
protected void installKeyboardActions(JRootPane root)

Registers keyboard actions.

Parameters
root:JRootPane

an instance of JRootPane

installListenersback to summary
protected void installListeners(JRootPane root)

Registers listeners.

Parameters
root:JRootPane

an instance of JRootPane

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)
propertyChangeback to summary
public void propertyChange(PropertyChangeEvent e)

Implements java.beans.PropertyChangeListener.propertyChange.

Invoked when a property changes on the root pane. If the event indicates the defaultButton has changed, this will reinstall the keyboard actions.

uninstallComponentsback to summary
protected void uninstallComponents(JRootPane root)

Unregisters components.

Parameters
root:JRootPane

an instance of JRootPane

uninstallDefaultsback to summary
protected void uninstallDefaults(JRootPane root)

Uninstalls default properties.

Parameters
root:JRootPane

an instance of JRootPane

uninstallKeyboardActionsback to summary
protected void uninstallKeyboardActions(JRootPane root)

Unregisters keyboard actions.

Parameters
root:JRootPane

an instance of JRootPane

uninstallListenersback to summary
protected void uninstallListeners(JRootPane root)

Unregisters listeners.

Parameters
root:JRootPane

an instance of JRootPane

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.
updateDefaultButtonBindingsback to summary
pack-priv void updateDefaultButtonBindings(JRootPane root)

Invoked when the default button property has changed. This reloads the bindings from the defaults table with name RootPane.defaultButtonWindowKeyBindings.

javax.swing.plaf.basic back to summary

pack-priv Class BasicRootPaneUI.Actions

extends UIAction
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
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 evt)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

Inherited from sun.swing.UIAction:
addPropertyChangeListenergetNamegetValueisEnabledputValueremovePropertyChangeListenersetEnabled

Field Detail

POST_POPUPback to summary
public static final String POST_POPUP
PRESSback to summary
public static final String PRESS
RELEASEback to summary
public static final String RELEASE

Constructor Detail

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 evt)

Implements java.awt.event.ActionListener.actionPerformed.

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

Invoked when an action occurs.

javax.swing.plaf.basic back to summary

private Class BasicRootPaneUI.RootPaneInputMap

extends ComponentInputMapUIResource
Class Inheritance
Annotations
@SuppressWarnings:serial

Constructor Summary

AccessConstructor and Description
public

Constructor Detail

RootPaneInputMapback to summary
public RootPaneInputMap(JComponent c)