bibliothek.gui.dock.station.toolbar.menu
Class CustomizationButton.Button

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.menu.CustomizationButton.Button
All Implemented Interfaces:
ToolbarGroupHeader, CustomizationMenuCallback
Enclosing class:
CustomizationButton

protected class CustomizationButton.Button
extends Object
implements ToolbarGroupHeader, CustomizationMenuCallback

A toggle button that will open the CustomizationMenu.

Author:
Benjamin Sigg

Constructor Summary
CustomizationButton.Button(ToolbarGroupDockStation station)
          Creates a new button
 
Method Summary
 void append(bibliothek.gui.Dockable dockable)
          Adds dockable to the station or one of its sub stations.
 void closed()
          To be called if the menu was closed.
 void destroy()
          Called if this header is no longer required
 Rectangle getButton()
          Gets the boundaries of the button that opened this menu.
 Component getComponent()
          The actual component represented by this object.
 bibliothek.gui.DockStation getOwner()
          Gets the owner of the menu.
 Component getParent()
          Gets the parent Component of the menu, this Component can be used for example as parent of a JDialog.
 boolean isAutoCloseAllowed()
          Tells the menu whether it is currently allowed to close itself automatically.
 void setOrientation(Orientation orientation)
          Called before the component is shown, and every time when the orientation of the ToolbarGroupDockStation changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomizationButton.Button

public CustomizationButton.Button(ToolbarGroupDockStation station)
Creates a new button

Parameters:
station - the station on which this button will be shown
Method Detail

destroy

public void destroy()
Description copied from interface: ToolbarGroupHeader
Called if this header is no longer required

Specified by:
destroy in interface ToolbarGroupHeader

getComponent

public Component getComponent()
Description copied from interface: ToolbarGroupHeader
The actual component represented by this object. The result of this method must never change.

Specified by:
getComponent in interface ToolbarGroupHeader
Returns:
the component, must not be null and must not change

setOrientation

public void setOrientation(Orientation orientation)
Description copied from interface: ToolbarGroupHeader
Called before the component is shown, and every time when the orientation of the ToolbarGroupDockStation changes.

Specified by:
setOrientation in interface ToolbarGroupHeader
Parameters:
orientation - the orientation of the station, which is orthogonal to how the component is shown, not null

getButton

public Rectangle getButton()
Description copied from interface: CustomizationMenuCallback
Gets the boundaries of the button that opened this menu. The button should remain visible.

Specified by:
getButton in interface CustomizationMenuCallback
Returns:
the location of the button, may be null

getParent

public Component getParent()
Description copied from interface: CustomizationMenuCallback
Gets the parent Component of the menu, this Component can be used for example as parent of a JDialog.

Specified by:
getParent in interface CustomizationMenuCallback
Returns:
the parent Component, not null

getOwner

public bibliothek.gui.DockStation getOwner()
Description copied from interface: CustomizationMenuCallback
Gets the owner of the menu.

Specified by:
getOwner in interface CustomizationMenuCallback
Returns:
the owner, not null

append

public void append(bibliothek.gui.Dockable dockable)
Description copied from interface: CustomizationMenuCallback
Adds dockable to the station or one of its sub stations.

Specified by:
append in interface CustomizationMenuCallback
Parameters:
dockable - the item to add

isAutoCloseAllowed

public boolean isAutoCloseAllowed()
Description copied from interface: CustomizationMenuCallback
Tells the menu whether it is currently allowed to close itself automatically.

Specified by:
isAutoCloseAllowed in interface CustomizationMenuCallback
Returns:
whether the menu is allowed to close itself

closed

public void closed()
Description copied from interface: CustomizationMenuCallback
To be called if the menu was closed.

Specified by:
closed in interface CustomizationMenuCallback