bibliothek.gui.dock.station.toolbar.group
Interface ToolbarColumn<D,P>

Type Parameters:
D - the dockable class itself
P - the kind of object used to describe a Dockable

@FrameworkOnly
public interface ToolbarColumn<D,P>

Represents one column of a ToolbarGroupDockStation. This interface is not intended for subclassing.

Author:
Benjamin Sigg

Method Summary
 void addListener(ToolbarColumnListener<D,P> listener)
          Adds the new observer listener to this column.
 int getColumnIndex()
          Gets the location of this column in its parent ToolbarColumnModel.
 D getDockable(int index)
          Gets the index'th Dockable of this column.
 int getDockableCount()
          Tells how many Dockables are shown in this column.
 P getItem(int index)
          Gets a wrapper item that represents the Dockable at index.
 int indexOf(bibliothek.gui.Dockable dockable)
          Gets the index of dockable.
 void removeListener(ToolbarColumnListener<D,P> listener)
          Removes the observer listener from this column.
 

Method Detail

getDockableCount

int getDockableCount()
Tells how many Dockables are shown in this column.

Returns:
the total number of Dockables, at least 0.

getDockable

D getDockable(int index)
Gets the index'th Dockable of this column.

Parameters:
index - the index of the Dockable
Returns:
the element at index, never null
Throws:
IllegalArgumentException - if index is out of bounds

indexOf

int indexOf(bibliothek.gui.Dockable dockable)
Gets the index of dockable.

Parameters:
dockable - the item to search
Returns:
its index of -1 if the item was not fount

getItem

P getItem(int index)
Gets a wrapper item that represents the Dockable at index.

Parameters:
index - the index of the item
Returns:
the element at index, never null

getColumnIndex

int getColumnIndex()
Gets the location of this column in its parent ToolbarColumnModel.

Returns:
the location of this column

addListener

void addListener(ToolbarColumnListener<D,P> listener)
Adds the new observer listener to this column.

Parameters:
listener - the new observer

removeListener

void removeListener(ToolbarColumnListener<D,P> listener)
Removes the observer listener from this column.

Parameters:
listener - the listener to remove