bibliothek.extension.gui.dock.theme.flat
Class FlatButtonTitle

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by bibliothek.gui.dock.title.AbstractDockTitle
                      extended by bibliothek.extension.gui.dock.theme.flat.FlatButtonTitle
All Implemented Interfaces:
DockTitle, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class FlatButtonTitle
extends AbstractDockTitle

This title is used by the FlatTheme to replace the default-DockTitle of the FlapDockStation. This title does not show any actions, and if there is an icon, the text of the title isn't shown either.

Author:
Benjamin Sigg
See Also:
Serialized Form

Nested Class Summary
private  class FlatButtonTitle.Listener
          A listener added to this title.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Nested classes/interfaces inherited from interface bibliothek.gui.dock.title.DockTitle
DockTitle.Orientation
 
Field Summary
private  boolean mouseover
          Current state of the mouse, is true when the mouse is over this title
private  java.lang.String noIconText
          Text to display if there is no icon for this title
private  boolean selected
          Selected state of this title.
 
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
FlatButtonTitle(Dockable dockable, DockTitleVersion origin)
          Constructs a new title
 
Method Summary
protected  void changeBorder(boolean selected, boolean mouseover)
          Exchanges the border of this title according to the state of selected and of mouseover.
 void changed(DockTitleEvent event)
          Called if a property (of this title, of the owner or anything else) has changed.
 java.awt.Dimension getPreferredSize()
           
protected  void setIcon(javax.swing.Icon icon)
          Sets the icon of this title.
protected  void setText(java.lang.String text)
          Sets the text of this title.
 
Methods inherited from class bibliothek.gui.dock.title.AbstractDockTitle
addMouseInputListener, bind, createItemFor, doLayout, getComponent, getDockable, getIcon, getIconBounds, getInnerInsets, getMinimumSize, getOrientation, getOrigin, getPopupLocation, getText, isActive, isBinded, paintBackground, paintComponent, removeMouseInputListener, setActive, setBackground, setForeground, setOrientation, unbind
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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

noIconText

private java.lang.String noIconText
Text to display if there is no icon for this title


mouseover

private boolean mouseover
Current state of the mouse, is true when the mouse is over this title


selected

private boolean selected
Selected state of this title. Another border will be painted if this title is selected.

Constructor Detail

FlatButtonTitle

public FlatButtonTitle(Dockable dockable,
                       DockTitleVersion origin)
Constructs a new title

Parameters:
dockable - the owner of the title
origin - the version which was used to create this title
Method Detail

changed

public void changed(DockTitleEvent event)
Description copied from interface: DockTitle
Called if a property (of this title, of the owner or anything else) has changed. The title might change some of its own properties.

Specified by:
changed in interface DockTitle
Overrides:
changed in class AbstractDockTitle
Parameters:
event - information about the current state

changeBorder

protected void changeBorder(boolean selected,
                            boolean mouseover)
Exchanges the border of this title according to the state of selected and of mouseover.

Parameters:
selected - true if this title is selected
mouseover - true if the mouse is currently over this title

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class AbstractDockTitle

setIcon

protected void setIcon(javax.swing.Icon icon)
Description copied from class: AbstractDockTitle
Sets the icon of this title. The icon is shown on the top or the left edge.

Overrides:
setIcon in class AbstractDockTitle
Parameters:
icon - the icon, can be null

setText

protected void setText(java.lang.String text)
Description copied from class: AbstractDockTitle
Sets the text of this title. The text either painted horizontally or vertically.

Overrides:
setText in class AbstractDockTitle
Parameters:
text - the text or null