com.jidesoft.plaf.basic
Class BasicDockableFrameTitlePane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
com.jidesoft.plaf.basic.BasicDockableFrameTitlePane
- All Implemented Interfaces:
- MouseListener, ImageObserver, MenuContainer, Serializable, EventListener
- Direct Known Subclasses:
- AquaDockableFrameTitlePane, EclipseDockableFrameTitlePane, XertoDockableFrameUI.XertoDockableFrameTitlePane
public class BasicDockableFrameTitlePane
- extends JComponent
- implements MouseListener
Basic L&f implementation of title bar for DockableFrame
- See Also:
- Serialized Form
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, transferFocusBackward, 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, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
_autohideButton
protected AbstractButton _autohideButton
_closeButton
protected AbstractButton _closeButton
_hideAutohideButton
protected AbstractButton _hideAutohideButton
_floatButton
protected AbstractButton _floatButton
_maximizeButton
protected AbstractButton _maximizeButton
_additionalButtons
protected final LinkedHashMap<Action,AbstractButton> _additionalButtons
_title
protected JComponent _title
_gripper
protected Gripper _gripper
_popupMenu
protected JPopupMenu _popupMenu
_frame
protected DockableFrame _frame
_backgroundColor
protected Color _backgroundColor
_selectedTitleColor
protected Color _selectedTitleColor
_selectedTextColor
protected Color _selectedTextColor
_selectedTitleBorderColor
protected Color _selectedTitleBorderColor
_notSelectedTitleColor
protected Color _notSelectedTitleColor
_notSelectedTextColor
protected Color _notSelectedTextColor
_notSelectedTitleBorderColor
protected Color _notSelectedTitleBorderColor
_propertyChangeListener
protected PropertyChangeListener _propertyChangeListener
_closeText
protected String _closeText
_hideAutohideText
protected String _hideAutohideText
_dockableText
protected String _dockableText
_autohideText
protected String _autohideText
_floatingText
protected String _floatingText
_maximizeText
protected String _maximizeText
_closeButtonToolTip
protected String _closeButtonToolTip
_hideAutohideButtonToolTip
protected String _hideAutohideButtonToolTip
_autohideButtonToolTip
protected String _autohideButtonToolTip
_floatButtonToolTip
protected String _floatButtonToolTip
_maximizeButtonToolTip
protected String _maximizeButtonToolTip
_closeIcon
protected Icon _closeIcon
_closeActiveIcon
protected Icon _closeActiveIcon
_closeRolloverIcon
protected Icon _closeRolloverIcon
_closeRolloverActiveIcon
protected Icon _closeRolloverActiveIcon
_hideAutohideIcon
protected Icon _hideAutohideIcon
_hideAutohideActiveIcon
protected Icon _hideAutohideActiveIcon
_hideAutohideRolloverIcon
protected Icon _hideAutohideRolloverIcon
_hideAutohideRolloverActiveIcon
protected Icon _hideAutohideRolloverActiveIcon
_autohideIcon
protected Icon _autohideIcon
_autohideActiveIcon
protected Icon _autohideActiveIcon
_autohideRolloverIcon
protected Icon _autohideRolloverIcon
_autohideRolloverActiveIcon
protected Icon _autohideRolloverActiveIcon
_stopAutohideIcon
protected Icon _stopAutohideIcon
_stopAutohideActiveIcon
protected Icon _stopAutohideActiveIcon
_stopAutohideRolloverIcon
protected Icon _stopAutohideRolloverIcon
_stopAutohideRolloverActiveIcon
protected Icon _stopAutohideRolloverActiveIcon
_floatIcon
protected Icon _floatIcon
_floatActiveIcon
protected Icon _floatActiveIcon
_floatRolloverIcon
protected Icon _floatRolloverIcon
_floatRolloverActiveIcon
protected Icon _floatRolloverActiveIcon
_unfloatIcon
protected Icon _unfloatIcon
_unfloatActiveIcon
protected Icon _unfloatActiveIcon
_unfloatRolloverIcon
protected Icon _unfloatRolloverIcon
_unfloatRolloverActiveIcon
protected Icon _unfloatRolloverActiveIcon
_maximizeIcon
protected Icon _maximizeIcon
_maximizeActiveIcon
protected Icon _maximizeActiveIcon
_maximizeRolloverIcon
protected Icon _maximizeRolloverIcon
_maximizeRolloverActiveIcon
protected Icon _maximizeRolloverActiveIcon
_restoreIcon
protected Icon _restoreIcon
_restoreActiveIcon
protected Icon _restoreActiveIcon
_restoreRolloverIcon
protected Icon _restoreRolloverIcon
_restoreRolloverActiveIcon
protected Icon _restoreRolloverActiveIcon
_gripperWidth
protected int _gripperWidth
_titleButtonUI
protected String _titleButtonUI
_titleBarComponentCanBeOneSameLine
protected boolean _titleBarComponentCanBeOneSameLine
_alwaysShowAllButtons
protected boolean _alwaysShowAllButtons
_showIcon
protected boolean _showIcon
_use3DButtons
protected boolean _use3DButtons
_contentFilledButtons
protected boolean _contentFilledButtons
_buttonsAlignment
protected int _buttonsAlignment
_titleAlignment
protected int _titleAlignment
_buttonGap
protected int _buttonGap
_titleInsets
protected Insets _titleInsets
_gripperPainter
protected Painter _gripperPainter
BasicDockableFrameTitlePane
public BasicDockableFrameTitlePane(DockableFrame f)
installTitlePane
protected void installTitlePane()
uninstallTitlePane
protected void uninstallTitlePane()
getMaximumButtonSize
protected Dimension getMaximumButtonSize()
- Gets maximum button but no less than 8x8.
- Returns:
- the maximum button size of all title bar buttons.
addSubComponents
protected void addSubComponents()
updateAdditionalButtons
protected void updateAdditionalButtons()
createActions
protected void createActions()
installListeners
protected void installListeners()
uninstallListeners
protected void uninstallListeners()
installDefaults
protected void installDefaults()
dockableFrameHasFocus
protected boolean dockableFrameHasFocus()
uninstallDefaults
protected void uninstallDefaults()
createComponents
protected void createComponents()
createDefaultTitleLabel
protected JComponent createDefaultTitleLabel()
- Creates the default title label for the DockableFrameTitlePane.
- Returns:
- the default title label for the DockableFrameTitlePane.
setupButton
protected void setupButton(AbstractButton button,
Action action)
updateButtonFromAction
protected void updateButtonFromAction(Action action,
AbstractButton button)
updateButtonVisibilities
protected void updateButtonVisibilities()
- Updates all title bar button visibilities based on the action.
createTitleBarButton
protected AbstractButton createTitleBarButton()
changeButtonType
protected void changeButtonType(AbstractButton button,
int type)
setButtonIcons
protected void setButtonIcons()
addPopupMenuItems
protected void addPopupMenuItems(JPopupMenu popup)
createPopupMenu
protected JPopupMenu createPopupMenu()
paintComponent
public void paintComponent(Graphics g)
- Overrides:
paintComponent
in class JComponent
paintGripper
protected void paintGripper(Graphics g)
paintTitleBackground
protected void paintTitleBackground(Graphics g)
- Invoked from paintComponent. Paints the background of the title pane. All text and icons will then be rendered on top of this background.
- Parameters:
g
- the graphics to use to render the background- Since:
- 1.4
getTitle
protected String getTitle(String text,
FontMetrics fm,
int availTextWidth)
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
createLayout
protected LayoutManager createLayout()
popupMenu
public void popupMenu(MouseEvent e)
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interface MouseListener
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interface MouseListener
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interface MouseListener
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered
in interface MouseListener
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited
in interface MouseListener
getLeftmostButtonX
protected int getLeftmostButtonX(int width,
Container c)
isCloseButtonVisible
protected boolean isCloseButtonVisible()
isHideAutohideButtonVisible
protected boolean isHideAutohideButtonVisible()
isAutohideButtonVisible
protected boolean isAutohideButtonVisible()
isFloatingButtonVisible
protected boolean isFloatingButtonVisible()
isMaximizeButtonVisible
protected boolean isMaximizeButtonVisible()
getTitleBarHeight
protected int getTitleBarHeight()
calculateButtonWidth
protected int calculateButtonWidth()
isSameLine
protected boolean isSameLine(Container c)
enableButton
protected void enableButton(AbstractButton button,
boolean enabled)
getPainter
public ThemePainter getPainter()
getExtraHeight
protected int getExtraHeight()