- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.RootPaneUI
-
- javax.swing.plaf.basic.BasicRootPaneUI
-
- javax.swing.plaf.metal.MetalRootPaneUI
-
- All Implemented Interfaces:
- PropertyChangeListener, EventListener
public class MetalRootPaneUI extends BasicRootPaneUI
Provides the metal look and feel implementation ofRootPaneUI
.MetalRootPaneUI
provides support for thewindowDecorationStyle
property ofJRootPane
.MetalRootPaneUI
does this by way of installing a customLayoutManager
, a privateComponent
to render the appropriate widgets, and a privateBorder
. TheLayoutManager
is always installed, regardless of the value of thewindowDecorationStyle
property, but theBorder
andComponent
are only installed/added if thewindowDecorationStyle
is other thanJRootPane.NONE
.Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the
java.beans
package. Please seeXMLEncoder
.- Since:
- 1.4
-
-
Constructor Summary
Constructors Constructor and Description MetalRootPaneUI()
-
Method Summary
Methods Modifier and Type Method and Description static ComponentUI
createUI(JComponent c)
Creates a UI for aJRootPane
.void
installUI(JComponent c)
Invokes supers implementation ofinstallUI
to install the necessary state onto the passed inJRootPane
to render the metal look and feel implementation ofRootPaneUI
.void
propertyChange(PropertyChangeEvent e)
Invoked when a property changes.void
uninstallUI(JComponent c)
Invokes supers implementation to uninstall any of its state.-
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, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
-
-
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
Creates a UI for aJRootPane
.- Parameters:
c
- the JRootPane the RootPaneUI will be created for- Returns:
- the RootPaneUI implementation for the passed in JRootPane
-
installUI
public void installUI(JComponent c)
Invokes supers implementation ofinstallUI
to install the necessary state onto the passed inJRootPane
to render the metal look and feel implementation ofRootPaneUI
. If thewindowDecorationStyle
property of theJRootPane
is other thanJRootPane.NONE
, this will add a customComponent
to render the widgets toJRootPane
, as well as installing a customBorder
andLayoutManager
on theJRootPane
.- Overrides:
installUI
in classBasicRootPaneUI
- Parameters:
c
- the JRootPane to install state onto- See Also:
ComponentUI.uninstallUI(javax.swing.JComponent)
,JComponent.setUI(javax.swing.plaf.ComponentUI)
,JComponent.updateUI()
-
uninstallUI
public void uninstallUI(JComponent c)
Invokes supers implementation to uninstall any of its state. This will also reset theLayoutManager
of theJRootPane
. If aComponent
has been added to theJRootPane
to render the window decoration style, this method will remove it. Similarly, this will revert the Border and LayoutManager of theJRootPane
to what it was beforeinstallUI
was invoked.- Overrides:
uninstallUI
in classBasicRootPaneUI
- Parameters:
c
- the JRootPane to uninstall state from- See Also:
ComponentUI.installUI(javax.swing.JComponent)
,JComponent.updateUI()
-
propertyChange
public void propertyChange(PropertyChangeEvent e)
Invoked when a property changes.MetalRootPaneUI
is primarily interested in events originating from theJRootPane
it has been installed on identifying the propertywindowDecorationStyle
. If thewindowDecorationStyle
has changed to a value other thanJRootPane.NONE
, this will add aComponent
to theJRootPane
to render the window decorations, as well as installing aBorder
on theJRootPane
. On the other hand, if thewindowDecorationStyle
has changed toJRootPane.NONE
, this will remove theComponent
that has been added to theJRootPane
as well resetting the Border to what it was beforeinstallUI
was invoked.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classBasicRootPaneUI
- Parameters:
e
- A PropertyChangeEvent object describing the event source and the property that has changed.
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
06/11/2024 00:41:38 Cette version de la page est en cache (à la date du 06/11/2024 00:41:38) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/swing/plaf/metal/MetalRootPaneUI.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.