Class FlatTitlePane

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

    public class FlatTitlePane
    extends javax.swing.JComponent
    Provides the Flat LaF title bar.
    See Also:
    Serialized Form
    UiDefault:
    TitlePane.background Color, TitlePane.inactiveBackground Color, TitlePane.foreground Color, TitlePane.inactiveForeground Color, TitlePane.embeddedForeground Color, TitlePane.iconSize Dimension, TitlePane.iconMargins Insets, TitlePane.titleMargins Insets, TitlePane.menuBarMargins Insets, TitlePane.menuBarEmbedded boolean, TitlePane.buttonMaximizedHeight int, TitlePane.closeIcon Icon, TitlePane.iconifyIcon Icon, TitlePane.maximizeIcon Icon, TitlePane.restoreIcon Icon
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  FlatTitlePane.FlatTitlePaneBorder  
      protected class  FlatTitlePane.Handler  
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.awt.Color activeBackground  
      protected java.awt.Color activeForeground  
      protected int buttonMaximizedHeight  
      protected javax.swing.JPanel buttonPanel  
      protected javax.swing.JButton closeButton  
      protected java.awt.Color embeddedForeground  
      protected javax.swing.JButton iconifyButton  
      protected javax.swing.JLabel iconLabel  
      protected java.awt.Dimension iconSize  
      protected java.awt.Color inactiveBackground  
      protected java.awt.Color inactiveForeground  
      protected javax.swing.JPanel leftPanel  
      protected javax.swing.JButton maximizeButton  
      protected java.awt.Insets menuBarMargins  
      protected javax.swing.JComponent menuBarPlaceholder  
      protected javax.swing.JButton restoreButton  
      protected javax.swing.JRootPane rootPane  
      protected javax.swing.JLabel titleLabel  
      protected java.awt.Window window  
      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor Description
      FlatTitlePane​(javax.swing.JRootPane rootPane)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void activeChanged​(boolean active)  
      protected void addJBRHitTestSpot​(javax.swing.JComponent c, boolean subtractMenuBarMargins, java.util.List<java.awt.Rectangle> hitTestSpots)  
      void addNotify()  
      protected void addSubComponents()  
      protected void close()
      Closes the window.
      protected javax.swing.JButton createButton​(java.lang.String iconKey, java.lang.String accessibleName, java.awt.event.ActionListener action)  
      protected void createButtons()  
      protected FlatTitlePane.Handler createHandler()  
      protected FlatTitlePane.FlatTitlePaneBorder createTitlePaneBorder()  
      protected void frameStateChanged()  
      protected java.awt.Rectangle getMenuBarBounds()  
      protected java.awt.Insets getMenuBarMargins()  
      protected java.lang.String getWindowTitle()  
      protected boolean hasJBRCustomDecoration()  
      protected void iconify()
      Iconifies the window.
      protected void installWindowListeners()  
      protected boolean isMenuBarEmbedded()  
      protected void maximize()
      Maximizes the window.
      protected void menuBarChanged()  
      protected void menuBarLayouted()  
      protected void paintComponent​(java.awt.Graphics g)  
      void removeNotify()  
      protected void repaintWindowBorder()  
      protected void restore()
      Restores the window size.
      protected void uninstallWindowListeners()  
      protected void updateIcon()  
      protected void updateJBRHitTestSpotsAndTitleBarHeight()  
      protected void updateJBRHitTestSpotsAndTitleBarHeightLater()  
      protected void updateMaximizedBounds()  
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • activeBackground

        protected final java.awt.Color activeBackground
      • inactiveBackground

        protected final java.awt.Color inactiveBackground
      • activeForeground

        protected final java.awt.Color activeForeground
      • inactiveForeground

        protected final java.awt.Color inactiveForeground
      • embeddedForeground

        protected final java.awt.Color embeddedForeground
      • menuBarMargins

        protected final java.awt.Insets menuBarMargins
      • iconSize

        protected final java.awt.Dimension iconSize
      • buttonMaximizedHeight

        protected final int buttonMaximizedHeight
      • rootPane

        protected final javax.swing.JRootPane rootPane
      • leftPanel

        protected javax.swing.JPanel leftPanel
      • iconLabel

        protected javax.swing.JLabel iconLabel
      • menuBarPlaceholder

        protected javax.swing.JComponent menuBarPlaceholder
      • titleLabel

        protected javax.swing.JLabel titleLabel
      • buttonPanel

        protected javax.swing.JPanel buttonPanel
      • iconifyButton

        protected javax.swing.JButton iconifyButton
      • maximizeButton

        protected javax.swing.JButton maximizeButton
      • restoreButton

        protected javax.swing.JButton restoreButton
      • closeButton

        protected javax.swing.JButton closeButton
      • window

        protected java.awt.Window window
    • Constructor Detail

      • FlatTitlePane

        public FlatTitlePane​(javax.swing.JRootPane rootPane)
    • Method Detail

      • addSubComponents

        protected void addSubComponents()
      • createButtons

        protected void createButtons()
      • createButton

        protected javax.swing.JButton createButton​(java.lang.String iconKey,
                                                   java.lang.String accessibleName,
                                                   java.awt.event.ActionListener action)
      • activeChanged

        protected void activeChanged​(boolean active)
      • frameStateChanged

        protected void frameStateChanged()
      • updateIcon

        protected void updateIcon()
      • addNotify

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

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

        protected java.lang.String getWindowTitle()
      • installWindowListeners

        protected void installWindowListeners()
      • uninstallWindowListeners

        protected void uninstallWindowListeners()
      • isMenuBarEmbedded

        protected boolean isMenuBarEmbedded()
      • getMenuBarBounds

        protected java.awt.Rectangle getMenuBarBounds()
      • getMenuBarMargins

        protected java.awt.Insets getMenuBarMargins()
      • menuBarChanged

        protected void menuBarChanged()
      • menuBarLayouted

        protected void menuBarLayouted()
      • paintComponent

        protected void paintComponent​(java.awt.Graphics g)
        Overrides:
        paintComponent in class javax.swing.JComponent
      • repaintWindowBorder

        protected void repaintWindowBorder()
      • iconify

        protected void iconify()
        Iconifies the window.
      • 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.
      • hasJBRCustomDecoration

        protected boolean hasJBRCustomDecoration()
      • updateJBRHitTestSpotsAndTitleBarHeightLater

        protected void updateJBRHitTestSpotsAndTitleBarHeightLater()
      • updateJBRHitTestSpotsAndTitleBarHeight

        protected void updateJBRHitTestSpotsAndTitleBarHeight()
      • addJBRHitTestSpot

        protected void addJBRHitTestSpot​(javax.swing.JComponent c,
                                         boolean subtractMenuBarMargins,
                                         java.util.List<java.awt.Rectangle> hitTestSpots)