javax.swing.plaf.metal
Class MetalRootPaneUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.RootPaneUI
          extended by javax.swing.plaf.basic.BasicRootPaneUI
              extended by javax.swing.plaf.metal.MetalRootPaneUI
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class MetalRootPaneUI
extends BasicRootPaneUI

A UI delegate for the JRootPane component. This implementation supports the JRootPane windowDecorationStyle property.

Since:
1.4

Constructor Summary
MetalRootPaneUI()
          Constructs a shared instance of MetalRootPaneUI.
 
Method Summary
static ComponentUI createUI(JComponent component)
          Returns a shared instance of MetalRootPaneUI.
 void installUI(JComponent c)
          Installs this UI to the root pane.
 void propertyChange(PropertyChangeEvent ev)
          Receives notification if any of the JRootPane's property changes.
 void uninstallUI(JComponent c)
          Uninstalls the UI from the root pane.
 
Methods inherited from class javax.swing.plaf.basic.BasicRootPaneUI
installComponents, installDefaults, installKeyboardActions, installListeners, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetalRootPaneUI

public MetalRootPaneUI()
Constructs a shared instance of MetalRootPaneUI.

Method Detail

createUI

public static ComponentUI createUI(JComponent component)
Returns a shared instance of MetalRootPaneUI.

Parameters:
component - the component for which we return an UI instance
Returns:
A shared instance of MetalRootPaneUI.

installUI

public void installUI(JComponent c)
Installs this UI to the root pane. If the windowDecorationsStyle property is set on the root pane, the Metal window decorations are installed on the root pane.

Overrides:
installUI in class BasicRootPaneUI
Parameters:
c -
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallUI

public void uninstallUI(JComponent c)
Uninstalls the UI from the root pane. This performs the superclass behaviour and uninstalls the window decorations that have possibly been installed by installUI(javax.swing.JComponent).

Overrides:
uninstallUI in class BasicRootPaneUI
Parameters:
c - the root pane
See Also:
ComponentUI.installUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

propertyChange

public void propertyChange(PropertyChangeEvent ev)
Receives notification if any of the JRootPane's property changes. In particular this catches changes to the windowDecorationStyle property and installs the window decorations accordingly.

Specified by:
propertyChange in interface PropertyChangeListener
Overrides:
propertyChange in class BasicRootPaneUI
Parameters:
ev - the property change event