bibliothek.gui.dock.station.flap
Class ButtonPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JLayeredPane
                  extended by bibliothek.gui.dock.station.OverpaintablePanel
                      extended by bibliothek.gui.dock.security.SecureContainer
                          extended by bibliothek.gui.dock.station.flap.ButtonPane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ButtonPane
extends SecureContainer

This panel is used by the FlapDockStation to display some button-titles.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JLayeredPane
JLayeredPane.AccessibleJLayeredPane
 
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.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
 
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
ButtonPane(FlapDockStation station)
          Constructs a new panel.
 
Method Summary
 Dimension getMinimumSize()
           
 int getNumberOfButtons()
          Gets the number of buttons that are actually shown.
 Dimension getPreferredSize()
           
 int indexAt(int x, int y)
          Searches an location where a Dockable could be inserted.
protected  void paintOverlay(Graphics g)
          Paints the overlay over all components.
 void resetTitles()
          Ensures that all titles of the title-map, which was given to the constructor, are shown on this panel.
 void setBackground(BackgroundAlgorithm background)
          Sets the background algorithm of this panel.
 void setDropInfo(FlapDropInfo dropInfo)
          Tells where a Dockable is to be put onto the station
 void setProperties(DockController controller)
          Called by the owning FlapDockStation if the DockController changes.
 void spanResized()
          Called if the Spans used by this ButtonPane changed their size.
 boolean titleContains(int x, int y)
          Tells whether the given point is inside a button.
 
Methods inherited from class bibliothek.gui.dock.security.SecureContainer
createGlassPane, getController, install, isUseGlassPane, setController, setUseGlassPane, uninstall
 
Methods inherited from class bibliothek.gui.dock.station.OverpaintablePanel
doLayout, getBasePane, getContentPane, getMaximumSize, isSolid, setBasePane, setContentPane, setSolid
 
Methods inherited from class javax.swing.JLayeredPane
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition
 
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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, 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, 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, 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, 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
 

Constructor Detail

ButtonPane

public ButtonPane(FlapDockStation station)
Constructs a new panel.

Parameters:
station - The owner
Method Detail

setBackground

public void setBackground(BackgroundAlgorithm background)
Sets the background algorithm of this panel.

Parameters:
background - the algorithm

setDropInfo

public void setDropInfo(FlapDropInfo dropInfo)
Tells where a Dockable is to be put onto the station

Parameters:
dropInfo - the target or null

titleContains

public boolean titleContains(int x,
                             int y)
Tells whether the given point is inside a button.

Parameters:
x - the x-coordinate
y - the y-coordinate
Returns:
true if the point is inside a child of this panel

setProperties

public void setProperties(DockController controller)
Called by the owning FlapDockStation if the DockController changes.

Parameters:
controller - the new controller, can be null

resetTitles

public void resetTitles()
Ensures that all titles of the title-map, which was given to the constructor, are shown on this panel. This method works asynchronous.


paintOverlay

protected void paintOverlay(Graphics g)
Description copied from class: OverpaintablePanel
Paints the overlay over all components.

Overrides:
paintOverlay in class OverpaintablePanel
Parameters:
g - the graphics to use

indexAt

public int indexAt(int x,
                   int y)
Searches an location where a Dockable could be inserted.

Parameters:
x - the x-coordinate of the mouse
y - the y-coordinate of the mouse
Returns:
a location

getMinimumSize

public Dimension getMinimumSize()
Overrides:
getMinimumSize in class OverpaintablePanel

getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class OverpaintablePanel

getNumberOfButtons

public int getNumberOfButtons()
Gets the number of buttons that are actually shown.

Returns:
the number of buttons

spanResized

public void spanResized()
Called if the Spans used by this ButtonPane changed their size.