bibliothek.gui.dock.station.toolbar.title
Interface ColumnDockActionSource

All Known Implementing Classes:
AbstractToolbarGroupActions, ExpandToolbarGroupActions

public interface ColumnDockActionSource

A ColumnDockActionSource is a list of DockActionSources, all with some offset. The list and the offsets may change at any time.

Author:
Benjamin Sigg

Method Summary
 void addListener(ColumnDockActionSourceListener listener)
          Adds the observer listener to this source.
 Orientation getOrientation()
          Gets the orientation of this source.
 bibliothek.gui.dock.action.DockActionSource getSource(int index)
          Gets the index'th source of this ColumnDockActionSource.
 int getSourceCount()
          Gets the total number of DockActionSources that are currently available.
 int getSourceLength(int index)
          Gets the available length in pixel for the index'th source.
 int getSourceOffset(int index)
          Gets the offset of the index'th source in pixel.
 void removeListener(ColumnDockActionSourceListener listener)
          Removes the observer listener from this source.
 

Method Detail

addListener

void addListener(ColumnDockActionSourceListener listener)
Adds the observer listener to this source.

Parameters:
listener - the new observer

removeListener

void removeListener(ColumnDockActionSourceListener listener)
Removes the observer listener from this source.

Parameters:
listener - the observer to remove

getSourceCount

int getSourceCount()
Gets the total number of DockActionSources that are currently available.

Returns:
the total number of sources

getSource

bibliothek.gui.dock.action.DockActionSource getSource(int index)
Gets the index'th source of this ColumnDockActionSource.

Parameters:
index - the index of the source
Returns:
the DockActionSource, must not be null but may be empty

getOrientation

Orientation getOrientation()
Gets the orientation of this source. The orientation tells in which direction getSourceOffset(int) points: either along the x, or along the y axis.

Returns:
the orientation, must not be null

getSourceOffset

int getSourceOffset(int index)
Gets the offset of the index'th source in pixel. The offset is relative to the Dockable to which this ColumnDockActionSource belongs.

Parameters:
index - the index of the source
Returns:
the offset of the source in pixels

getSourceLength

int getSourceLength(int index)
Gets the available length in pixel for the index'th source.

Parameters:
index - the index of the source
Returns:
the maximum amount of space in pixel