bibliothek.gui.dock.station.toolbar.group
Class AbstractToolbarGroupActions.Column

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.group.AbstractToolbarGroupActions.Column
Direct Known Subclasses:
ExpandToolbarGroupActions.ExpandColumn
Enclosing class:
AbstractToolbarGroupActions<P,C extends AbstractToolbarGroupActions.Column>

protected abstract class AbstractToolbarGroupActions.Column
extends Object

Represents one column of the ToolbarGroupDockStation.

Author:
Benjamin Sigg

Constructor Summary
AbstractToolbarGroupActions.Column(ToolbarColumn<P> column)
          Creates a new column.
 
Method Summary
protected abstract  bibliothek.gui.dock.action.DockActionSource createSource()
          Creates a DockActionSource that will be stored in this AbstractToolbarGroupActions.Column.
 ToolbarColumn<P> getColumn()
          Gets the column which is represented by this object
 Rectangle getColumnBoundaries()
          Gets the current boundaries of this column.
 List<bibliothek.gui.Dockable> getDockables()
          Gets all the items of this column.
 List<P> getItems()
          Gets all the items of this column.
 bibliothek.gui.dock.action.DockActionSource getSource()
          Gets the DockActionSource which is associated with this column.
protected  void init(ToolbarColumn<P> column)
          Initializes all fields of this object
protected abstract  void inserted(int index, P item)
          Called after an item was added to this column
protected abstract  void removed()
          Called if this column is no longer used, all resources should be released
protected abstract  void removed(int index, P item)
          Called after an item was removed from this column
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractToolbarGroupActions.Column

public AbstractToolbarGroupActions.Column(ToolbarColumn<P> column)
Creates a new column.

Parameters:
column - the column that is represented by this object. Subclasses can set this argument to null, but have to call init(ToolbarColumn) later.
Method Detail

init

protected void init(ToolbarColumn<P> column)
Initializes all fields of this object

Parameters:
column - the column that is represented by this object, not null

getSource

public bibliothek.gui.dock.action.DockActionSource getSource()
Gets the DockActionSource which is associated with this column.

Returns:
the source, can be null

getItems

public List<P> getItems()
Gets all the items of this column.

Returns:
all the items, the list is not modifiable

getDockables

public List<bibliothek.gui.Dockable> getDockables()
Gets all the items of this column.

Returns:
all the items, the list is not modifiable

getColumn

public ToolbarColumn<P> getColumn()
Gets the column which is represented by this object

Returns:
the underlying data structure

getColumnBoundaries

public Rectangle getColumnBoundaries()
Gets the current boundaries of this column.

Returns:
the boundaries in respect to the ToolbarGroupDockStation, null if there are no items in this column

createSource

protected abstract bibliothek.gui.dock.action.DockActionSource createSource()
Creates a DockActionSource that will be stored in this AbstractToolbarGroupActions.Column. This method is called lazily, the first time when getSource() is executed.

Returns:
the new source or null

inserted

protected abstract void inserted(int index,
                                 P item)
Called after an item was added to this column

Parameters:
index - the index of the new item
item - the item that was added

removed

protected abstract void removed(int index,
                                P item)
Called after an item was removed from this column

Parameters:
index - the index of the removed item
item - the item that was removed

removed

protected abstract void removed()
Called if this column is no longer used, all resources should be released