Class RadianceRootPaneUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.RootPaneUI
javax.swing.plaf.basic.BasicRootPaneUI
org.pushingpixels.radiance.theming.internal.ui.RadianceRootPaneUI
- All Implemented Interfaces:
PropertyChangeListener, EventListener
- Direct Known Subclasses:
RadianceRibbonRootPaneUI
UI for root panes in Radiance look and feel.
- Author:
- Kirill Grouchnikov, Larry Salibra (fix for defect 198)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA custom layout manager that is responsible for the layout of layeredPane, glassPane, menuBar and titlePane, if one has been installed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LayoutManagerReturns aLayoutManagerthat will be set on theJRootPane.protected RadianceTitlePanecreateTitlePane(JRootPane root) Returns theJComponentto render the window decoration style.static ComponentUIcreateUI(JComponent comp) Creates a UI for aJRootPane.voidprotected JRootPaneReturns theJRootPanewe're providing the look and feel for.Returns theJComponentrendering the title pane.static booleanvoidinstallBorder(JRootPane root) Installs the appropriateBorderonto theJRootPane.protected voidinstallComponents(JRootPane root) protected voidprotected voidinstallListeners(JRootPane root) voidInvokes supers implementation ofinstallUIto install the necessary state onto the passed inJRootPaneto render the metal look and feel implementation ofRootPaneUI.voidvoidsetPreferredTitlePaneHeight(int preferredTitlePaneHeight) protected voiduninstallComponents(JRootPane root) protected voiduninstallDefaults(JRootPane root) protected voiduninstallListeners(JRootPane root) voidInvokes super implementation to uninstall any of its state.voidupdate(Graphics g, JComponent c) Methods inherited from class BasicRootPaneUI
installKeyboardActions, uninstallKeyboardActionsMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint
-
Constructor Details
-
RadianceRootPaneUI
protected RadianceRootPaneUI()
-
-
Method Details
-
createUI
Creates a UI for aJRootPane.- Parameters:
comp- the JRootPane the RootPaneUI will be created for- Returns:
- the RootPaneUI implementation for the passed in JRootPane
-
installUI
Invokes supers implementation ofinstallUIto install the necessary state onto the passed inJRootPaneto render the metal look and feel implementation ofRootPaneUI. If thewindowDecorationStyleproperty of theJRootPaneis other thanJRootPane.NONE, this will add a customComponentto render the widgets toJRootPane, as well as installing a customBorderandLayoutManageron theJRootPane.- Overrides:
installUIin classBasicRootPaneUI- Parameters:
c- the JRootPane to install state onto
-
uninstallUI
Invokes super implementation to uninstall any of its state. This will also reset theLayoutManagerof theJRootPane. If aComponenthas been added to theJRootPaneto render the window decoration style, this method will remove it. Similarly, this will revert the Border and LayoutManager of theJRootPaneto what it was beforeinstallUIwas invoked.- Overrides:
uninstallUIin classBasicRootPaneUI- Parameters:
c- the JRootPane to uninstall state from
-
installBorder
Installs the appropriateBorderonto theJRootPane.- Parameters:
root- Root pane.
-
installDefaults
- Overrides:
installDefaultsin classBasicRootPaneUI
-
uninstallDefaults
- Overrides:
uninstallDefaultsin classBasicRootPaneUI
-
update
- Overrides:
updatein classComponentUI
-
installListeners
- Overrides:
installListenersin classBasicRootPaneUI
-
uninstallListeners
- Overrides:
uninstallListenersin classBasicRootPaneUI
-
installComponents
- Overrides:
installComponentsin classBasicRootPaneUI
-
uninstallComponents
- Overrides:
uninstallComponentsin classBasicRootPaneUI
-
createTitlePane
Returns theJComponentto render the window decoration style.- Parameters:
root- Root pane.- Returns:
- The title pane component.
-
createLayoutManager
Returns aLayoutManagerthat will be set on theJRootPane.- Returns:
- Layout manager.
-
getTitlePane
Returns theJComponentrendering the title pane. If this returns null, it implies there is no need to render window decorations. This method is for internal use only.- Returns:
- Title pane.
- See Also:
-
createTitlePaneControlButton
-
getTitlePaneControlInsets
-
extendContentIntoTitlePane
public void extendContentIntoTitlePane() -
setPreferredTitlePaneHeight
public void setPreferredTitlePaneHeight(int preferredTitlePaneHeight) -
getRootPane
Returns theJRootPanewe're providing the look and feel for.- Returns:
- The associated root pane.
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classBasicRootPaneUI
-
hasCustomSkinOnAtLeastOneRootPane
public static boolean hasCustomSkinOnAtLeastOneRootPane()
-