bibliothek.gui.dock.station.toolbar.layout
Class PerspectivePlaceholderToolbarGrid

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.layout.PlaceholderToolbarGrid<D,S,P>
      extended by bibliothek.gui.dock.station.toolbar.layout.ModeledPlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
          extended by bibliothek.gui.dock.station.toolbar.layout.PerspectivePlaceholderToolbarGrid

public class PerspectivePlaceholderToolbarGrid
extends ModeledPlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>

An implementation of PlaceholderToolbarGrid that uses PerspectiveDockables and PerspectiveStations, thus is ideal to be used in the perspective API.

Author:
Benjamin Sigg

Constructor Summary
PerspectivePlaceholderToolbarGrid()
          Creates a new, empty grid.
 
Method Summary
protected  bibliothek.gui.dock.station.support.PlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> createColumn()
          Creates one column.
protected  GridPlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> createGrid()
          Creates a new GridPlaceholderList.
protected  void fill(bibliothek.gui.dock.perspective.PerspectiveDockable dockable, bibliothek.gui.dock.station.support.ConvertedPlaceholderListItem item)
          Called by PlaceholderToolbarGrid.toMap(Map), this method should read persistent data from dockable and write that data into item.
protected  Set<bibliothek.util.Path> getPlaceholders(bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
          Gets all placeholders that are associated with dockable.
protected  void onInserted()
          Called if all columns were inserted at the same time.
protected  void onInserted(bibliothek.gui.dock.station.support.PlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> column, int index)
          Called if a new column column was added to this grid.
protected  void onInserted(bibliothek.gui.dock.station.support.PlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> column, int columnIndex, bibliothek.gui.dock.perspective.PerspectiveDockable 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<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> column, int index)
          Called if the column column was removed from this grid.
protected  void onRemoved(bibliothek.gui.dock.station.support.PlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> column, int columnIndex, bibliothek.gui.dock.perspective.PerspectiveDockable item, int itemIndex)
          Called if item was removed to the column column.
 void replace(bibliothek.gui.dock.perspective.PerspectiveDockable oldDockable, bibliothek.gui.dock.perspective.PerspectiveDockable newDockable)
          Replaces oldDockable with newDockable.
 
Methods inherited from class bibliothek.gui.dock.station.toolbar.layout.ModeledPlaceholderToolbarGrid
getModel
 
Methods inherited from class bibliothek.gui.dock.station.toolbar.layout.PlaceholderToolbarGrid
allColumns, bind, clear, columns, fromMap, fromMap, get, get, get, getColumn, getColumn, getColumn, getColumnContent, getColumnCount, getLine, getLine, getLine, getLine, getLineCount, 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

PerspectivePlaceholderToolbarGrid

public PerspectivePlaceholderToolbarGrid()
Creates a new, empty grid.

Method Detail

createColumn

protected bibliothek.gui.dock.station.support.PlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> createColumn()
Description copied from class: PlaceholderToolbarGrid
Creates one column.

Specified by:
createColumn in class PlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
Returns:
a new, empty list

createGrid

protected GridPlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> createGrid()
Description copied from class: PlaceholderToolbarGrid
Creates a new GridPlaceholderList.

Specified by:
createGrid in class PlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
Returns:
the new, empty grid

getPlaceholders

protected Set<bibliothek.util.Path> getPlaceholders(bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
Description copied from class: PlaceholderToolbarGrid
Gets all placeholders that are associated with dockable.

Specified by:
getPlaceholders in class PlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
Parameters:
dockable - some element used by this grid
Returns:
the placeholders

replace

public void replace(bibliothek.gui.dock.perspective.PerspectiveDockable oldDockable,
                    bibliothek.gui.dock.perspective.PerspectiveDockable newDockable)
Replaces oldDockable with newDockable.

Parameters:
oldDockable - a child of this grid
newDockable - the replacement of oldDockable

onInserted

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

Overrides:
onInserted in class ModeledPlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
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<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> column,
                         int columnIndex,
                         bibliothek.gui.dock.perspective.PerspectiveDockable item,
                         int itemIndex)
Description copied from class: PlaceholderToolbarGrid
Called if item was removed to the column column.

Overrides:
onRemoved in class ModeledPlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
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<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> 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.

Overrides:
onInserted in class ModeledPlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
Parameters:
column - the new column
index - the index of the new column

onRemoved

protected void onRemoved(bibliothek.gui.dock.station.support.PlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable> 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.

Overrides:
onRemoved in class ModeledPlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
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.

Overrides:
onInserted in class ModeledPlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>

onRemoved

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

Overrides:
onRemoved in class ModeledPlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>

fill

protected void fill(bibliothek.gui.dock.perspective.PerspectiveDockable dockable,
                    bibliothek.gui.dock.station.support.ConvertedPlaceholderListItem item)
Description copied from class: PlaceholderToolbarGrid
Called by PlaceholderToolbarGrid.toMap(Map), this method should read persistent data from dockable and write that data into item.

Specified by:
fill in class PlaceholderToolbarGrid<bibliothek.gui.dock.perspective.PerspectiveDockable,bibliothek.gui.dock.perspective.PerspectiveStation,bibliothek.gui.dock.perspective.PerspectiveDockable>
Parameters:
dockable - the dockable to read
item - the item to write into