|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.toolbar.group.AbstractToolbarGroupActions<P,C>
P - the type of object that represents a DockableC - the type of this sublcasspublic abstract class AbstractToolbarGroupActions<P,C extends AbstractToolbarGroupActions.Column>
A class that can create one DockActionSource for each ToolbarColumn a ToolbarGroupDockStation
has. This class is built such that sublcasses can easily access or modify the DockActionSources.
| Nested Class Summary | |
|---|---|
protected class |
AbstractToolbarGroupActions.Column
Represents one column of the ToolbarGroupDockStation. |
| Constructor Summary | |
|---|---|
AbstractToolbarGroupActions(ToolbarGroupDockStation station)
Creates a new object |
|
| Method Summary | |
|---|---|
void |
addListener(ColumnDockActionSourceListener listener)
Adds the observer listener to this source. |
protected abstract C |
createColumn(ToolbarColumn<P> column)
Creates a new, empty AbstractToolbarGroupActions.Column which will be filled with content later. |
protected abstract Rectangle |
getBoundaries(P item)
Gets the bounds of the Component item. |
protected C |
getColumn(bibliothek.gui.Dockable dockable)
Searches the column which contains dockable. |
C |
getColumn(int index)
Gets the index'th column. |
int |
getColumnCount()
Gets the current number of columns. |
protected List<C> |
getColumns()
Gets all the column that are currently known to this object. |
ToolbarColumnModel<P> |
getModel()
Gets the model which is currently observed by this object |
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. |
protected abstract void |
installListener(P item,
ComponentListener listener)
Installs the ComponentListener listener such that changes on item that lead to
columns shifting position or size are recognized. |
protected ColumnDockActionSourceListener[] |
listeners()
Gets all the listeners that are currently registered. |
void |
removeListener(ColumnDockActionSourceListener listener)
Removes the observer listener from this source. |
void |
setModel(ToolbarColumnModel<P> model)
Sets the model which should be observed by this AbstractToolbarGroupActions, all existing columns
will be removed by this method. |
protected abstract void |
uninstallListener(P item,
ComponentListener listener)
Removes the listener listener from item. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractToolbarGroupActions(ToolbarGroupDockStation station)
station - the station which uses this set of actions| Method Detail |
|---|
public void addListener(ColumnDockActionSourceListener listener)
ColumnDockActionSourcelistener to this source.
addListener in interface ColumnDockActionSourcelistener - the new observerpublic void removeListener(ColumnDockActionSourceListener listener)
ColumnDockActionSourcelistener from this source.
removeListener in interface ColumnDockActionSourcelistener - the observer to removeprotected ColumnDockActionSourceListener[] listeners()
public void setModel(ToolbarColumnModel<P> model)
AbstractToolbarGroupActions, all existing columns
will be removed by this method.
model - the new model or nullpublic ToolbarColumnModel<P> getModel()
nullprotected List<C> getColumns()
public int getColumnCount()
public int getSourceCount()
ColumnDockActionSourceDockActionSources that are currently available.
getSourceCount in interface ColumnDockActionSourcepublic bibliothek.gui.dock.action.DockActionSource getSource(int index)
ColumnDockActionSourceindex'th source of this ColumnDockActionSource.
getSource in interface ColumnDockActionSourceindex - the index of the source
DockActionSource, must not be null but may be emptypublic Orientation getOrientation()
ColumnDockActionSourceColumnDockActionSource.getSourceOffset(int) points: either along the x, or along the y axis.
getOrientation in interface ColumnDockActionSourcenullpublic C getColumn(int index)
index'th column.
index - the location of the column
nullprotected C getColumn(bibliothek.gui.Dockable dockable)
dockable.
dockable - the element to search
dockable or null if not foundpublic int getSourceOffset(int index)
ColumnDockActionSourceindex'th source in pixel. The offset is relative to
the Dockable to which this ColumnDockActionSource belongs.
getSourceOffset in interface ColumnDockActionSourceindex - the index of the source
public int getSourceLength(int index)
ColumnDockActionSourceindex'th source.
getSourceLength in interface ColumnDockActionSourceindex - the index of the source
protected abstract C createColumn(ToolbarColumn<P> column)
AbstractToolbarGroupActions.Column which will be filled with content later.
column - the column that is represented by the new object
nullprotected abstract Rectangle getBoundaries(P item)
Component item.
item - the item whose boundaries are required
protected abstract void installListener(P item,
ComponentListener listener)
ComponentListener listener such that changes on item that lead to
columns shifting position or size are recognized.
item - the item which gets a new listenerlistener - the new listener
protected abstract void uninstallListener(P item,
ComponentListener listener)
listener from item.
item - the item where the listener is to be removedlistener - the listener to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||