bibliothek.gui.dock.action.actions
Class SimpleDropDownAction

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.AbstractSimpleDropDownAction
              extended by bibliothek.gui.dock.action.actions.SimpleDropDownAction
All Implemented Interfaces:
DockAction, DropDownAction, StandardDockAction

public class SimpleDropDownAction
extends AbstractSimpleDropDownAction
implements DropDownAction

A dropdown action that has the same properties for all Dockables.

Author:
Benjamin Sigg

Constructor Summary
SimpleDropDownAction()
           
 
Method Summary
 void add(DockAction action)
          Adds an action to the menu.
protected  DockActionSource getSubActions()
          Gets the DockActionSource which contains all the actions of this dropdown menu.
 DefaultDockActionSource getSubActions(Dockable dockable)
          Gets the actions that should be shown for this action.
 void insert(int index, DockAction... action)
          Inserts a list of actions into the menu.
 void insert(int index, DockAction action)
          Inserts an action into the menu.
 void remove(DockAction action)
          Removes action from the menu.
 void remove(int index)
          Removes an action from the menu.
 int size()
          Gets the number of actions shown in the menu.
 
Methods inherited from class bibliothek.gui.dock.action.actions.AbstractSimpleDropDownAction
addDropDownActionListener, createView, fireSelectionChanged, getFilter, getListeners, getSelection, getSelection, removeDropDownActionListener, setFilter, setSelection, setSelection, trigger
 
Methods inherited from class bibliothek.gui.dock.action.actions.SimpleDockAction
bound, getAccelerator, getDisabledIcon, getDisabledIcon, getDockableRepresentation, getDockableRepresentation, getIcon, getIcon, getText, getText, getTooltip, getTooltipText, getTooltipText, isEnabled, isEnabled, setAccelerator, setDisabledIcon, setDockableRepresentation, setEnabled, setIcon, setText, setTooltip, trigger, unbound
 
Methods inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction
addDockActionListener, bind, fireActionDisabledIconChanged, fireActionEnabledChanged, fireActionIconChanged, fireActionRepresentativeChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbind
 
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.DropDownAction
addDropDownActionListener, getFilter, getSelection, removeDropDownActionListener, setSelection
 
Methods inherited from interface bibliothek.gui.dock.action.StandardDockAction
addDockActionListener, getDisabledIcon, getDockableRepresentation, getIcon, getText, getTooltipText, isEnabled, removeDockActionListener
 
Methods inherited from interface bibliothek.gui.dock.action.DockAction
bind, createView, trigger, unbind
 

Constructor Detail

SimpleDropDownAction

public SimpleDropDownAction()
Method Detail

add

public void add(DockAction action)
Adds an action to the menu.

Parameters:
action - the action to add

insert

public void insert(int index,
                   DockAction action)
Inserts an action into the menu.

Parameters:
index - the location of the action
action - the new action

insert

public void insert(int index,
                   DockAction... action)
Inserts a list of actions into the menu.

Parameters:
index - the location of the first action
action - the actions to add

remove

public void remove(int index)
Removes an action from the menu.

Parameters:
index - the location of the action

size

public int size()
Gets the number of actions shown in the menu.

Returns:
the number of actions

remove

public void remove(DockAction action)
Removes action from the menu.

Parameters:
action - the action to remove

getSubActions

protected DockActionSource getSubActions()
Description copied from class: AbstractSimpleDropDownAction
Gets the DockActionSource which contains all the actions of this dropdown menu.

Specified by:
getSubActions in class AbstractSimpleDropDownAction
Returns:
all the actions, not null

getSubActions

public DefaultDockActionSource getSubActions(Dockable dockable)
Description copied from interface: DropDownAction
Gets the actions that should be shown for this action.

Specified by:
getSubActions in interface DropDownAction
Overrides:
getSubActions in class AbstractSimpleDropDownAction
Parameters:
dockable - the Dockable for which the actions are requested
Returns:
the children