|
||||||||||
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 Dockable
C
- 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 DockActionSource
s.
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<bibliothek.gui.Dockable,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<bibliothek.gui.Dockable,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 DockActionSource s 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<bibliothek.gui.Dockable,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 actionsMethod Detail |
---|
public void addListener(ColumnDockActionSourceListener listener)
ColumnDockActionSource
listener
to this source.
addListener
in interface ColumnDockActionSource
listener
- the new observerpublic void removeListener(ColumnDockActionSourceListener listener)
ColumnDockActionSource
listener
from this source.
removeListener
in interface ColumnDockActionSource
listener
- the observer to removeprotected ColumnDockActionSourceListener[] listeners()
public void setModel(ToolbarColumnModel<bibliothek.gui.Dockable,P> model)
AbstractToolbarGroupActions
, all existing columns
will be removed by this method.
model
- the new model or null
public ToolbarColumnModel<bibliothek.gui.Dockable,P> getModel()
null
protected List<C> getColumns()
public int getColumnCount()
public int getSourceCount()
ColumnDockActionSource
DockActionSource
s that are currently available.
getSourceCount
in interface ColumnDockActionSource
public bibliothek.gui.dock.action.DockActionSource getSource(int index)
ColumnDockActionSource
index
'th source of this ColumnDockActionSource
.
getSource
in interface ColumnDockActionSource
index
- the index of the source
DockActionSource
, must not be null
but may be emptypublic Orientation getOrientation()
ColumnDockActionSource
ColumnDockActionSource.getSourceOffset(int)
points: either along the x, or along the y axis.
getOrientation
in interface ColumnDockActionSource
null
public C getColumn(int index)
index
'th column.
index
- the location of the column
null
protected C getColumn(bibliothek.gui.Dockable dockable)
dockable
.
dockable
- the element to search
dockable
or null
if not foundpublic int getSourceOffset(int index)
ColumnDockActionSource
index
'th source in pixel. The offset is relative to
the Dockable
to which this ColumnDockActionSource
belongs.
getSourceOffset
in interface ColumnDockActionSource
index
- the index of the source
public int getSourceLength(int index)
ColumnDockActionSource
index
'th source.
getSourceLength
in interface ColumnDockActionSource
index
- the index of the source
protected abstract C createColumn(ToolbarColumn<bibliothek.gui.Dockable,P> column)
AbstractToolbarGroupActions.Column
which will be filled with content later.
column
- the column that is represented by the new object
null
protected 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 listenerprotected 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 |