Quaqua 5.4.1 2009-07-14

ch.randelshofer.quaqua
Class Quaqua14RootPaneUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.RootPaneUI
          extended by javax.swing.plaf.basic.BasicRootPaneUI
              extended by ch.randelshofer.quaqua.Quaqua14RootPaneUI
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class Quaqua14RootPaneUI
extends javax.swing.plaf.basic.BasicRootPaneUI

Quaqua14RootPaneUI.

Version:
2.0.9 2009-03-16 Handle ConcurrentModificationException in allRootPanes WeakHashMap.
2.0.1 2008-07-07 Don't process mouse dragged events when the root pane is not showing on screen.
2.0 2008-05-10 Added support for client property "Window.documentModified".
1.1.4 2008-03-30 Fixed memory leak in allRootPanes has map, by putting a null value into the weak hash map, instead of the RootPane object.
1.1.3 2007-09-29 Fixed NPE in Window snapping behavior code.
1.1.2 2007-08-02 Only snap to the edges of a window, if the is not far away. Don't snap, if the user holds down the alt key.
1.1 2007-07-26 Look and Feel decorated windows snap to other windows. Windows on secondary screens couldn't always be dragged back to primary screen.
1.0.6 2007-07-05 Resize icon wasn't painted for dialog windows.
1.0.5 2007-04-29 Repaint the root paint 100 milliseconds after it has been resized. This is a workaround for the repaint happening twice after a window has been resized.
1.0.4 2005-08-03 Removed error output on System.err, when no native support for windows modified property is available.
1.0.3 2005-06-29 Fixed NPE in method propertyChanged. Method propertyChange must call super in order to make default button work.
1.0.2 2005-06-19 Ancestor window was not properly determined when running under Java 1.5.
1.0.1 2005-04-07 Fixed NPE in method ancestorRemoved.
1.0 06 February 2005 Created.
Author:
Werner Randelshofer

Constructor Summary
Quaqua14RootPaneUI()
          Creates a new instance.
 
Method Summary
protected  javax.swing.event.AncestorListener createAncestorListener()
           
protected  java.awt.event.ComponentListener createComponentListener()
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
protected  void installDefaults(javax.swing.JRootPane c)
           
protected  void installListeners(javax.swing.JRootPane root)
           
 void installUI(javax.swing.JComponent c)
          Invokes supers implementation of installUI to install the necessary state onto the passed in JRootPane to render the metal look and feel implementation of RootPaneUI.
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
 void propertyChange(java.beans.PropertyChangeEvent e)
          Invoked when a property changes on the root pane.
protected  void uninstallListeners(javax.swing.JRootPane root)
           
 void uninstallUI(javax.swing.JComponent c)
          Invokes supers implementation to uninstall any of its state.
 void update(java.awt.Graphics gr, javax.swing.JComponent c)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicRootPaneUI
installComponents, installKeyboardActions, uninstallComponents, uninstallDefaults, uninstallKeyboardActions
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Quaqua14RootPaneUI

public Quaqua14RootPaneUI()
Creates a new instance.

Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installUI

public void installUI(javax.swing.JComponent c)
Invokes supers implementation of installUI to install the necessary state onto the passed in JRootPane to render the metal look and feel implementation of RootPaneUI. If the windowDecorationStyle property of the JRootPane is other than JRootPane.NONE, this will add a custom Component to render the widgets to JRootPane, as well as installing a custom Border and LayoutManager on the JRootPane.

Overrides:
installUI in class javax.swing.plaf.basic.BasicRootPaneUI
Parameters:
c - the JRootPane to install state onto

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Overrides:
paint in class javax.swing.plaf.ComponentUI

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Invokes supers implementation to uninstall any of its state. This will also reset the LayoutManager of the JRootPane. If a Component has been added to the JRootPane to render the window decoration style, this method will remove it. Similarly, this will revert the Border and LayoutManager of the JRootPane to what it was before installUI was invoked.

Overrides:
uninstallUI in class javax.swing.plaf.basic.BasicRootPaneUI
Parameters:
c - the JRootPane to uninstall state from

installDefaults

protected void installDefaults(javax.swing.JRootPane c)
Overrides:
installDefaults in class javax.swing.plaf.basic.BasicRootPaneUI

update

public void update(java.awt.Graphics gr,
                   javax.swing.JComponent c)
Overrides:
update in class javax.swing.plaf.ComponentUI

installListeners

protected void installListeners(javax.swing.JRootPane root)
Overrides:
installListeners in class javax.swing.plaf.basic.BasicRootPaneUI

uninstallListeners

protected void uninstallListeners(javax.swing.JRootPane root)
Overrides:
uninstallListeners in class javax.swing.plaf.basic.BasicRootPaneUI

createComponentListener

protected java.awt.event.ComponentListener createComponentListener()

createAncestorListener

protected javax.swing.event.AncestorListener createAncestorListener()

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Invoked when a property changes on the root pane. If the event indicates the defaultButton has changed, this will reinstall the keyboard actions.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class javax.swing.plaf.basic.BasicRootPaneUI

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.