Class FlatTitlePane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class FlatTitlePane extends JComponent
Provides the Flat LaF title bar.
Author:
Karl Tauber
See Also:
  • Field Details

    • titleFont

      protected final Font titleFont
      Since:
      2.5
    • activeBackground

      protected final Color activeBackground
    • inactiveBackground

      protected final Color inactiveBackground
    • activeForeground

      protected final Color activeForeground
    • inactiveForeground

      protected final Color inactiveForeground
    • embeddedForeground

      protected final Color embeddedForeground
    • borderColor

      protected final Color borderColor
    • showIcon

      protected final boolean showIcon
      Since:
      2
    • showIconInDialogs

      protected final boolean showIconInDialogs
      Since:
      2.5
    • noIconLeftGap

      protected final int noIconLeftGap
      Since:
      2
    • iconSize

      protected final Dimension iconSize
    • iconMargins

      protected final Insets iconMargins
      Since:
      3.6
    • titleMargins

      protected final Insets titleMargins
      Since:
      3.6
    • titleMinimumWidth

      protected final int titleMinimumWidth
      Since:
      2.4
    • buttonMinimumWidth

      protected final int buttonMinimumWidth
      Since:
      2.4
    • buttonMaximizedHeight

      protected final int buttonMaximizedHeight
    • buttonsGap

      protected final int buttonsGap
      Since:
      3.6
    • buttonsMargins

      protected final Insets buttonsMargins
      Since:
      3.6
    • buttonsFillVertically

      protected final boolean buttonsFillVertically
      Since:
      3.6
    • centerTitle

      protected final boolean centerTitle
    • centerTitleIfMenuBarEmbedded

      protected final boolean centerTitleIfMenuBarEmbedded
    • showIconBesideTitle

      protected final boolean showIconBesideTitle
      Since:
      2.4
    • rootPane

      protected final JRootPane rootPane
    • windowStyle

      protected final String windowStyle
    • leftPanel

      protected JPanel leftPanel
    • iconLabel

      protected JLabel iconLabel
    • titleLabel

      protected JLabel titleLabel
    • buttonPanel

      protected JPanel buttonPanel
    • iconifyButton

      protected JButton iconifyButton
    • maximizeButton

      protected JButton maximizeButton
    • restoreButton

      protected JButton restoreButton
    • closeButton

      protected JButton closeButton
    • window

      protected Window window
  • Constructor Details

    • FlatTitlePane

      public FlatTitlePane(JRootPane rootPane)
  • Method Details

    • createTitlePaneBorder

      protected FlatTitlePane.FlatTitlePaneBorder createTitlePaneBorder()
    • createHandler

      protected FlatTitlePane.Handler createHandler()
    • addSubComponents

      protected void addSubComponents()
    • createButtons

      protected void createButtons()
    • createButton

      protected JButton createButton(String iconKey, String accessibleName, ActionListener action)
    • activeChanged

      protected void activeChanged(boolean active)
    • frameStateChanged

      protected void frameStateChanged()
    • updateVisibility

      protected void updateVisibility()
      Since:
      3
    • updateIcon

      protected void updateIcon()
    • addNotify

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

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

      protected String getWindowTitle()
    • installWindowListeners

      protected void installWindowListeners()
    • uninstallWindowListeners

      protected void uninstallWindowListeners()
    • isFullWindowContent

      protected boolean isFullWindowContent()
      Since:
      3.4
    • hasVisibleEmbeddedMenuBar

      protected boolean hasVisibleEmbeddedMenuBar(JMenuBar menuBar)
      Returns whether this title pane currently has a visible and embedded menubar.
    • isMenuBarEmbedded

      protected boolean isMenuBarEmbedded()
      Returns whether the menubar should be embedded into the title pane.
    • getMenuBarBounds

      protected Rectangle getMenuBarBounds()
    • findHorizontalGlue

      protected Component findHorizontalGlue(JMenuBar menuBar)
    • titleBarColorsChanged

      protected void titleBarColorsChanged()
    • paint

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

      protected void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • getBackground

      public Color getBackground()
      Overrides:
      getBackground in class Component
    • iconify

      protected void iconify()
      Iconifies the window.
    • isWindowMaximized

      protected boolean isWindowMaximized()
      Since:
      2.4
    • maximize

      protected void maximize()
      Maximizes the window.
    • updateMaximizedBounds

      protected void updateMaximizedBounds()
    • restore

      protected void restore()
      Restores the window size.
    • close

      protected void close()
      Closes the window.
    • hasNativeCustomDecoration

      protected boolean hasNativeCustomDecoration()
      Returns whether windows uses native window border and has custom decorations enabled.
    • updateNativeTitleBarHeightAndHitTestSpotsLater

      protected void updateNativeTitleBarHeightAndHitTestSpotsLater()
    • updateNativeTitleBarHeightAndHitTestSpots

      protected void updateNativeTitleBarHeightAndHitTestSpots()