bibliothek.gui.dock.station.toolbar.layout
Class ModeledPlaceholderToolbarGrid<D,S,P extends bibliothek.gui.dock.station.support.PlaceholderListItem<D>>

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.layout.PlaceholderToolbarGrid<D,S,P>
      extended by bibliothek.gui.dock.station.toolbar.layout.ModeledPlaceholderToolbarGrid<D,S,P>
Type Parameters:
D - the kind of object that should be treated as Dockable
S - the kind of object that should be treated as DockStation
P - the type of item which represents a Dockable
Direct Known Subclasses:
DockablePlaceholderToolbarGrid, PerspectivePlaceholderToolbarGrid

public abstract class ModeledPlaceholderToolbarGrid<D,S,P extends bibliothek.gui.dock.station.support.PlaceholderListItem<D>>
extends PlaceholderToolbarGrid<D,S,P>

A PlaceholderToolbarGrid which offers a ToolbarColumnModel to access the dockables.

Author:
Benjamin Sigg

Constructor Summary
ModeledPlaceholderToolbarGrid()
           
 
Method Summary
 ToolbarColumnModel<D,P> getModel()
          Gets access to a simplified view of this grid.
protected  void onInserted()
          Called if all columns were inserted at the same time.
protected  void onInserted(bibliothek.gui.dock.station.support.PlaceholderList<D,S,P> column, int index)
          Called if a new column column was added to this grid.
protected  void onInserted(bibliothek.gui.dock.station.support.PlaceholderList<D,S,P> column, int columnIndex, P item, int itemIndex)
          Called if item was added to the column column.
protected  void onRemoved()
          Called if all columns were removed from this grid
protected  void onRemoved(bibliothek.gui.dock.station.support.PlaceholderList<D,S,P> column, int index)
          Called if the column column was removed from this grid.
protected  void onRemoved(bibliothek.gui.dock.station.support.PlaceholderList<D,S,P> column, int columnIndex, P item, int itemIndex)
          Called if item was removed to the column column.
 
Methods inherited from class bibliothek.gui.dock.station.toolbar.layout.PlaceholderToolbarGrid
addPlaceholder, allColumns, bind, clear, columns, createColumn, createGrid, fill, fromMap, fromMap, get, get, get, getColumn, getColumn, getColumn, getColumnContent, getColumnCount, getLine, getLine, getLine, getLine, getLineCount, getPlaceholders, getStrategy, getTotalColumnCount, hasPlaceholder, init, insert, insert, insert, insertPlaceholder, items, move, put, remove, setStrategy, size, toMap, toMap, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModeledPlaceholderToolbarGrid

public ModeledPlaceholderToolbarGrid()
Method Detail

getModel

public ToolbarColumnModel<D,P> getModel()
Gets access to a simplified view of this grid.

Returns:
the simplified view, never null

onInserted

protected void onInserted(bibliothek.gui.dock.station.support.PlaceholderList<D,S,P> column,
                          int columnIndex,
                          P item,
                          int itemIndex)
Description copied from class: PlaceholderToolbarGrid
Called if item was added to the column column.

Specified by:
onInserted in class PlaceholderToolbarGrid<D,S,P extends bibliothek.gui.dock.station.support.PlaceholderListItem<D>>
Parameters:
column - a visible column
columnIndex - the index of the column
item - a new item of column
itemIndex - the index of the new item

onRemoved

protected void onRemoved(bibliothek.gui.dock.station.support.PlaceholderList<D,S,P> column,
                         int columnIndex,
                         P item,
                         int itemIndex)
Description copied from class: PlaceholderToolbarGrid
Called if item was removed to the column column.

Specified by:
onRemoved in class PlaceholderToolbarGrid<D,S,P extends bibliothek.gui.dock.station.support.PlaceholderListItem<D>>
Parameters:
column - a visible column
columnIndex - the index of the column
item - the removed item of column
itemIndex - the index the item had before removing

onInserted

protected void onInserted(bibliothek.gui.dock.station.support.PlaceholderList<D,S,P> column,
                          int index)
Description copied from class: PlaceholderToolbarGrid
Called if a new column column was added to this grid. The column may not contain any elements when this method is called.

Specified by:
onInserted in class PlaceholderToolbarGrid<D,S,P extends bibliothek.gui.dock.station.support.PlaceholderListItem<D>>
Parameters:
column - the new column
index - the index of the new column

onRemoved

protected void onRemoved(bibliothek.gui.dock.station.support.PlaceholderList<D,S,P> column,
                         int index)
Description copied from class: PlaceholderToolbarGrid
Called if the column column was removed from this grid. The column may still contain elements when it is removed.

Specified by:
onRemoved in class PlaceholderToolbarGrid<D,S,P extends bibliothek.gui.dock.station.support.PlaceholderListItem<D>>
Parameters:
column - the removed column
index - the index the column had before it was removed

onInserted

protected void onInserted()
Description copied from class: PlaceholderToolbarGrid
Called if all columns were inserted at the same time. This means that the grid previously was completely empty.

Specified by:
onInserted in class PlaceholderToolbarGrid<D,S,P extends bibliothek.gui.dock.station.support.PlaceholderListItem<D>>

onRemoved

protected void onRemoved()
Description copied from class: PlaceholderToolbarGrid
Called if all columns were removed from this grid

Specified by:
onRemoved in class PlaceholderToolbarGrid<D,S,P extends bibliothek.gui.dock.station.support.PlaceholderListItem<D>>