bibliothek.gui.dock.station.flap
Class FlapDockDirection

java.lang.Object
  extended by bibliothek.gui.dock.action.actions.AbstractStandardDockAction
      extended by bibliothek.gui.dock.action.actions.SimpleDockAction
          extended by bibliothek.gui.dock.action.actions.SimpleMenuAction
              extended by bibliothek.gui.dock.station.flap.FlapDockDirection
All Implemented Interfaces:
DockAction, ListeningDockAction, MenuDockAction, StandardDockAction

public class FlapDockDirection
extends SimpleMenuAction
implements ListeningDockAction

This DockAction is used as an action of a FlapDockStation. The action itself changes the direction in which a FlapDockStation opens. This is done by calling the setAutoDirection and the FlapDockStation.setDirection(Direction)-methods.

Author:
Benjamin Sigg

Nested Class Summary
private  class FlapDockDirection.DirectedArrow
          A button pointing in a direction.
private  class FlapDockDirection.Listener
          A listener that can exchange the icons of this action
 
Field Summary
private  FlapDockDirection.DirectedArrow center
           
private  DockController controller
           
private  FlapDockDirection.DirectedArrow east
           
private  FlapDockDirection.Listener listener
           
private  FlapDockDirection.DirectedArrow north
           
private  FlapDockDirection.DirectedArrow south
           
private  FlapDockDirection.DirectedArrow west
           
 
Fields inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction
listeners
 
Constructor Summary
FlapDockDirection(DockController controller)
          Creates the icon of the action, and sets the text and tooltip of the action.
 
Method Summary
private  void fire()
          Fires an event on all radio buttons.
private  FlapDockStation getStation(Dockable dockable)
          Gets the first FlapDockStation in the path from dockable to the root of the tree.
 void setController(DockController controller)
          Called when a new controller has been set.
 
Methods inherited from class bibliothek.gui.dock.action.actions.SimpleMenuAction
createView, getMenu, getMenu, setMenu
 
Methods inherited from class bibliothek.gui.dock.action.actions.SimpleDockAction
getDisabledIcon, getDisabledIcon, getIcon, getIcon, getText, getText, getTooltipText, getTooltipText, isEnabled, isEnabled, setDisabledIcon, setEnabled, setIcon, setText, setTooltipText
 
Methods inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction
addDockActionListener, bind, binded, fireActionDisabledIconChanged, fireActionEnabledChanged, fireActionIconChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBindeds, isBinded, removeDockActionListener, unbind, unbinded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.action.DockAction
bind, createView, unbind
 
Methods inherited from interface bibliothek.gui.dock.action.StandardDockAction
addDockActionListener, getDisabledIcon, getIcon, getText, getTooltipText, isEnabled, removeDockActionListener
 

Field Detail

north

private FlapDockDirection.DirectedArrow north

south

private FlapDockDirection.DirectedArrow south

east

private FlapDockDirection.DirectedArrow east

west

private FlapDockDirection.DirectedArrow west

center

private FlapDockDirection.DirectedArrow center

controller

private DockController controller

listener

private FlapDockDirection.Listener listener
Constructor Detail

FlapDockDirection

public FlapDockDirection(DockController controller)
Creates the icon of the action, and sets the text and tooltip of the action.

Parameters:
controller - The controller for which this action will be used. The controller is needed to retrieve the icons for this action.
Method Detail

setController

public void setController(DockController controller)
Description copied from interface: ListeningDockAction
Called when a new controller has been set.

Specified by:
setController in interface ListeningDockAction
Parameters:
controller - the new controller

fire

private void fire()
Fires an event on all radio buttons.


getStation

private FlapDockStation getStation(Dockable dockable)
Gets the first FlapDockStation in the path from dockable to the root of the tree.

Parameters:
dockable - the first element to test.
Returns:
the lowest FlapDockStation