Class SubstanceRootPaneUI

All Implemented Interfaces:
PropertyChangeListener, EventListener

public class SubstanceRootPaneUI extends BasicRootPaneUI
UI for root panes in Substance look and feel.
  • Field Details

    • root

      protected JRootPane root
      JRootPane providing the look and feel for.
    • substanceWindowListener

      protected WindowListener substanceWindowListener
      Window listener that stops all Substance thread when the last frame is disposed.
    • substanceCurrentWindow

      protected Window substanceCurrentWindow
      The current window.
    • substanceHierarchyListener

      protected HierarchyListener substanceHierarchyListener
      Hierarchy listener to keep track of the associated top-level window.
    • substanceWindowComponentListener

      protected ComponentListener substanceWindowComponentListener
      Component listener to keep track of the primary graphics configuration (for recomputing the maximized bounds) - fix for defect 213.
    • currentRootPaneGC

      protected GraphicsConfiguration currentRootPaneGC
      The graphics configuration that contains the top-left corner of the window (fix for defect 213).
    • substancePropertyChangeListener

      protected PropertyChangeListener substancePropertyChangeListener
    • WINDOW_ROUNDER

      public static ComponentListener WINDOW_ROUNDER
  • Constructor Details

    • SubstanceRootPaneUI

      public SubstanceRootPaneUI()
  • Method Details

    • createUI

      public static ComponentUI createUI(JComponent comp)
      Creates a UI for a JRootPane.
      Parameters:
      comp - 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 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 BasicRootPaneUI
      Parameters:
      c - the JRootPane to install state onto
    • uninstallUI

      public void uninstallUI(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 BasicRootPaneUI
      Parameters:
      c - the JRootPane to uninstall state from
    • installBorder

      public void installBorder(JRootPane root)
      Installs the appropriate Border onto the JRootPane.
      Parameters:
      root - Root pane.
    • installDefaults

      protected void installDefaults(JRootPane c)
      Overrides:
      installDefaults in class BasicRootPaneUI
    • update

      public void update(Graphics g, JComponent c)
      Overrides:
      update in class ComponentUI
    • installListeners

      protected void installListeners(JRootPane root)
      Overrides:
      installListeners in class BasicRootPaneUI
    • uninstallListeners

      protected void uninstallListeners(JRootPane root)
      Overrides:
      uninstallListeners in class BasicRootPaneUI
    • createTitlePane

      protected JComponent createTitlePane(JRootPane root)
      Returns the JComponent to render the window decoration style.
      Parameters:
      root - Root pane.
      Returns:
      The title pane component.
    • createLayoutManager

      protected LayoutManager createLayoutManager()
      Returns a LayoutManager that will be set on the JRootPane.
      Returns:
      Layout manager.
    • setMaximized

      public void setMaximized()
      Sets maximized bounds according to the display screen insets.
    • getTitlePane

      public JComponent getTitlePane()
      Returns the JComponent rendering 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:
      • setTitlePane(javax.swing.JRootPane, javax.swing.JComponent)
    • getRootPane

      protected JRootPane getRootPane()
      Returns the JRootPane we're providing the look and feel for.
      Returns:
      The associated root pane.
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class BasicRootPaneUI
    • hasCustomSkinOnAtLeastOneRootPane

      public static boolean hasCustomSkinOnAtLeastOneRootPane()