JIDE 3.5.15

com.jidesoft.plaf.basic
Class BasicCollapsiblePaneTitlePane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.jidesoft.plaf.basic.BasicCollapsiblePaneTitlePane
All Implemented Interfaces:
FocusListener, ImageObserver, MenuContainer, Serializable, EventListener
Direct Known Subclasses:
LonghornCollapsiblePaneTitlePane, Office2003CollapsiblePaneTitlePane

public class BasicCollapsiblePaneTitlePane
extends JComponent
implements FocusListener

Basic L&f implementation of title bar for CollapsiblePaneTitlePane

See Also:
Serialized Form

Nested Class Summary
protected  class BasicCollapsiblePaneTitlePane.BasicCollapseButton
           
 class BasicCollapsiblePaneTitlePane.CollapsibleLayout
          This inner class is marked "public" due to a compiler bug.
 class BasicCollapsiblePaneTitlePane.PropertyChangeHandler
          This inner class is marked "public" due to a compiler bug.
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  BasicCollapsiblePaneTitlePane.BasicCollapseButton _collapseButton
           
protected  Icon _collapsedIcon
          It's the icon to be painted while the CollapsiblePane is collapsed while the style is #TREE_STYLE or #PLAIN_STYLE.
protected  String _collapseText
           
protected  String _collapseToolTip
           
protected  ImageIcon _downIcon
          It's the icon to be painted while the CollapsiblePane is not emphasized and is collapsed while the style is #DROPDOWN_STYLE or #SEPARATOR_STYLE.
protected  ImageIcon _downRolloverIcon
          It's the icon to be painted while the mouse is rollover the CollapsiblePane and the CollapsiblePane is collapsed.
protected  ImageIcon _emphasizedDownIcon
          It's the icon to be painted while the CollapsiblePane is emphasized and is collapsed while the style is #DROPDOWN_STYLE or #SEPARATOR_STYLE.
protected  ImageIcon _emphasizedUpIcon
          It's the icon to be painted while the CollapsiblePane is emphasized and is expanded while the style is #DROPDOWN_STYLE or #SEPARATOR_STYLE.
protected  Icon _expandedIcon
          It's the icon to be painted while the CollapsiblePane is expanded while the style is #TREE_STYLE or #PLAIN_STYLE.
protected  CollapsiblePane _pane
           
protected  JPopupMenu _popupMenu
           
protected  PropertyChangeListener _propertyChangeListener
           
protected  Component _titleComponent
           
protected  JLabel _titleIconLabel
           
protected  JComponent _titleLabel
           
protected  ImageIcon _upIcon
          It's the icon to be painted while the CollapsiblePane is not emphasized and is expanded while the style is #DROPDOWN_STYLE or #SEPARATOR_STYLE.
protected  ImageIcon _upRolloverIcon
          It's the icon to be painted while the mouse is rollover the CollapsiblePane and the CollapsiblePane is expanded.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
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
BasicCollapsiblePaneTitlePane(CollapsiblePane f)
           
 
Method Summary
protected  void addPopupMenuItems(JPopupMenu popup)
           
protected  void addSubComponents()
           
protected  void createActions()
           
protected  BasicCollapsiblePaneTitlePane.BasicCollapseButton createCollapseButton()
           
protected  JLabel createDefaultTitleLabel()
           
protected  com.jidesoft.plaf.basic.BasicCollapsiblePaneTitlePane.DropListener createDropListener()
           
protected  LayoutManager createLayout()
           
protected  JPopupMenu createPopupMenu()
           
protected  PropertyChangeListener createPropertyChangeListener()
           
protected  void createSubComponents()
           
 void focusGained(FocusEvent e)
          Invoked when a component gains the keyboard focus.
 void focusLost(FocusEvent e)
          Invoked when a component loses the keyboard focus.
protected  Dimension getActualTitlePaneDimension()
           
protected  int getButtonSize()
           
protected  Color getCollapsiblePaneForeground()
           
 ThemePainter getPainter()
           
protected  String getTitle(String text, FontMetrics fm, int availTextWidth)
           
protected  void installDefaults()
           
protected  void installListeners()
           
protected  void installTitlePane()
           
 boolean isRollover()
           
 void paintComponent(Graphics g)
           
protected  void paintFocusIndicator(Graphics g, int x, int y, int w, int h)
           
protected  void paintTitleBackground(Graphics g)
          Invoked from paintComponent.
 void popupMenu(MouseEvent e)
           
protected  void setBounds(Container container, Component component, int x, int y, int width, int height)
          Sets the bounds while considering the leftToRight or rightToLeft if the sliding direction is north or south.
 void setRollover(boolean rollover)
           
protected  void setupCollapseButton(BasicCollapsiblePaneTitlePane.BasicCollapseButton button)
           
protected  void uninstallDefaults()
           
protected  void uninstallListeners()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_collapseButton

protected BasicCollapsiblePaneTitlePane.BasicCollapseButton _collapseButton

_titleLabel

protected JComponent _titleLabel

_titleIconLabel

protected JLabel _titleIconLabel

_titleComponent

protected Component _titleComponent

_popupMenu

protected JPopupMenu _popupMenu

_pane

protected CollapsiblePane _pane

_propertyChangeListener

protected PropertyChangeListener _propertyChangeListener

_collapseText

protected String _collapseText

_collapseToolTip

protected String _collapseToolTip

_upIcon

protected ImageIcon _upIcon
It's the icon to be painted while the CollapsiblePane is not emphasized and is expanded while the style is #DROPDOWN_STYLE or #SEPARATOR_STYLE.


_downIcon

protected ImageIcon _downIcon
It's the icon to be painted while the CollapsiblePane is not emphasized and is collapsed while the style is #DROPDOWN_STYLE or #SEPARATOR_STYLE.


_emphasizedUpIcon

protected ImageIcon _emphasizedUpIcon
It's the icon to be painted while the CollapsiblePane is emphasized and is expanded while the style is #DROPDOWN_STYLE or #SEPARATOR_STYLE.


_emphasizedDownIcon

protected ImageIcon _emphasizedDownIcon
It's the icon to be painted while the CollapsiblePane is emphasized and is collapsed while the style is #DROPDOWN_STYLE or #SEPARATOR_STYLE.


_upRolloverIcon

protected ImageIcon _upRolloverIcon
It's the icon to be painted while the mouse is rollover the CollapsiblePane and the CollapsiblePane is expanded.


_downRolloverIcon

protected ImageIcon _downRolloverIcon
It's the icon to be painted while the mouse is rollover the CollapsiblePane and the CollapsiblePane is collapsed.


_collapsedIcon

protected Icon _collapsedIcon
It's the icon to be painted while the CollapsiblePane is collapsed while the style is #TREE_STYLE or #PLAIN_STYLE.


_expandedIcon

protected Icon _expandedIcon
It's the icon to be painted while the CollapsiblePane is expanded while the style is #TREE_STYLE or #PLAIN_STYLE.

Constructor Detail

BasicCollapsiblePaneTitlePane

public BasicCollapsiblePaneTitlePane(CollapsiblePane f)
Method Detail

installTitlePane

protected void installTitlePane()

addSubComponents

protected void addSubComponents()

createActions

protected void createActions()

installListeners

protected void installListeners()

createDropListener

protected com.jidesoft.plaf.basic.BasicCollapsiblePaneTitlePane.DropListener createDropListener()

uninstallListeners

protected void uninstallListeners()

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

createSubComponents

protected void createSubComponents()

createDefaultTitleLabel

protected JLabel createDefaultTitleLabel()

createCollapseButton

protected BasicCollapsiblePaneTitlePane.BasicCollapseButton createCollapseButton()

setupCollapseButton

protected void setupCollapseButton(BasicCollapsiblePaneTitlePane.BasicCollapseButton button)

addPopupMenuItems

protected void addPopupMenuItems(JPopupMenu popup)

createPopupMenu

protected JPopupMenu createPopupMenu()

paintComponent

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

paintTitleBackground

protected void paintTitleBackground(Graphics g)
Invoked from paintComponent. Paints the background of the titlepane. 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

paintFocusIndicator

protected void paintFocusIndicator(Graphics g,
                                   int x,
                                   int y,
                                   int w,
                                   int h)

getActualTitlePaneDimension

protected Dimension getActualTitlePaneDimension()

getTitle

protected String getTitle(String text,
                          FontMetrics fm,
                          int availTextWidth)

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

createLayout

protected LayoutManager createLayout()

setBounds

protected void setBounds(Container container,
                         Component component,
                         int x,
                         int y,
                         int width,
                         int height)
Sets the bounds while considering the leftToRight or rightToLeft if the sliding direction is north or south.

Parameters:
container - the title pane
component - the child component on the title pane
x - x
y - y
width - width
height - height

popupMenu

public void popupMenu(MouseEvent e)

focusGained

public void focusGained(FocusEvent e)
Invoked when a component gains the keyboard focus.

Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Invoked when a component loses the keyboard focus.

Specified by:
focusLost in interface FocusListener

isRollover

public boolean isRollover()

setRollover

public void setRollover(boolean rollover)

getCollapsiblePaneForeground

protected Color getCollapsiblePaneForeground()

getPainter

public ThemePainter getPainter()

getButtonSize

protected int getButtonSize()

JIDE 3.5.15