Class SubstanceTitlePane

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.pushingpixels.substance.internal.utils.SubstanceTitlePane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class SubstanceTitlePane extends JComponent
Title pane for Substance look and feel.
See Also:
  • Field Details

  • Constructor Details

    • SubstanceTitlePane

      public SubstanceTitlePane(JRootPane root, SubstanceRootPaneUI ui)
      Creates a new title pane.
      Parameters:
      root - Root pane.
      ui - Root pane UI.
  • Method Details

    • uninstall

      public void uninstall()
      Uninstalls the necessary state.
    • getRootPane

      public JRootPane getRootPane()
      Returns the JRootPane this was created for.
      Overrides:
      getRootPane in class JComponent
    • getWindowDecorationStyle

      protected int getWindowDecorationStyle()
      Returns the decoration style of the JRootPane.
      Returns:
      Decoration style of the JRootPane.
    • addNotify

      public void addNotify()
      Overrides:
      addNotify in class JComponent
    • removeNotify

      public void removeNotify()
      Overrides:
      removeNotify in class JComponent
    • createMenuBar

      protected JMenuBar createMenuBar()
      Returns the JMenuBar displaying the appropriate system menu items.
      Returns:
      JMenuBar displaying the appropriate system menu items.
    • createLayout

      protected LayoutManager createLayout()
      Returns the LayoutManager that should be installed on the SubstanceTitlePane.
      Returns:
      Layout manager.
    • getThisDecorationType

      public DecorationAreaType getThisDecorationType()
    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • getTitleTextRectangle

      protected Rectangle getTitleTextRectangle(int preferredWidth)
      Computes the rectangle of the title text. This method looks at all the children components of the title pane, grouping them by leading and trailing (based on EXTRA_COMPONENT_KIND client property). The title text rectangle is the space between the leading group and the trailing group.
      Returns:
      Rectangle of the title text.
      Throws:
      IllegalStateException - If at least one child component of this title pane is not marked with the EXTRA_COMPONENT_KIND client property.
      See Also:
    • setHeapStatusLogfileName

      public static void setHeapStatusLogfileName(String heapStatusLogfileName)
      Sets location for heap status logfile.
      Parameters:
      heapStatusLogfileName - Logfile for the heap status panel.
    • syncCloseButtonTooltip

      protected void syncCloseButtonTooltip()
      Synchronizes the tooltip of the close button.
    • markExtraComponent

      protected void markExtraComponent(JComponent comp, SubstanceTitlePane.ExtraComponentKind kind)
      Marks the specified child component with the specified extra component kind.
      Parameters:
      comp - Child component.
      kind - Extra kind.
      See Also:
    • getCloseButton

      public AbstractButton getCloseButton()