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

Type Parameters:
P - the kind of object used to describe a Dockable

@FrameworkOnly
public interface ToolbarColumn<P>

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

Author:
Benjamin Sigg

Method Summary
 void addListener(ToolbarColumnListener<P> listener)
          Adds the new observer listener to this column.
 int getColumnIndex()
          Gets the location of this column in its parent ToolbarColumnModel.
 bibliothek.gui.Dockable 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<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

bibliothek.gui.Dockable 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<P> listener)
Adds the new observer listener to this column.

Parameters:
listener - the new observer

removeListener

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

Parameters:
listener - the listener to remove