Class CActionSource

java.lang.Object
bibliothek.gui.dock.action.AbstractDockActionSource
bibliothek.gui.dock.common.intern.action.CActionSource
All Implemented Interfaces:
DockActionSource, Iterable<DockAction>

public class CActionSource extends AbstractDockActionSource
This DockActionSource handles CActions.
Author:
Benjamin Sigg
  • Constructor Details

    • CActionSource

      public CActionSource(LocationHint hint)
      Creates a new source.
      Parameters:
      hint - the location of this source
  • Method Details

    • add

      public void add(CAction action)
      Adds an action to this source.
      Parameters:
      action - the new action, not null
    • insert

      public void insert(int index, CAction action)
      Inserts an action at index of this source.
      Parameters:
      index - an index between 0 and getDockActionCount() (incl.)
      action - the new action, not null
    • set

      public CAction set(int index, CAction action)
      Replaces the action at index with index.
      Parameters:
      index - the index of the new action
      action - the new action, not null
      Returns:
      the old action, may be null
    • remove

      public CAction remove(int index)
      Removes the action at index.
      Parameters:
      index - the index of the action to remove
      Returns:
      the removed action
    • remove

      public boolean remove(CAction action)
      Removes action from this source.
      Parameters:
      action - the action to remove
      Returns:
      true if the action was removed
    • getAction

      public CAction getAction(int index)
      Gets the index'th action of this source.
      Parameters:
      index - the index of some action
      Returns:
      the action, not null
    • getDockAction

      public DockAction getDockAction(int index)
    • getDockActionCount

      public int getDockActionCount()
    • getLocationHint

      public LocationHint getLocationHint()
    • iterator

      public Iterator<DockAction> iterator()