|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.control.DockRegister
public class DockRegister
A set of all Dockables
and
DockStations
currently used in the
system.
Constructor Summary | |
---|---|
DockRegister(DockController controller)
Creates a new register. |
Method Summary | |
---|---|
void |
add(DockStation station)
Adds a station to this register. |
void |
addDockRegisterListener(DockRegisterListener listener)
Registers a listener which will receive notifications when a Dockable or a DockStation is added or removed from
this register. |
protected void |
fireDockableRegistered(Dockable dockable)
Informs all registerListeners that a Dockable has been registered. |
protected void |
fireDockableRegistering(Dockable dockable)
Informs all registerListeners that a Dockable will be registered. |
protected void |
fireDockableUnregistered(Dockable dockable)
Informs all registerListeners that a Dockable has been
unregistered. |
protected void |
fireDockStationRegistered(DockStation station)
Informs all registerListeners that station has been registered. |
protected void |
fireDockStationRegistering(DockStation station)
Informs all registerListeners that station will be registered. |
protected void |
fireDockStationUnregistered(DockStation station)
Informs all registerListeners that station has been unregistered. |
protected void |
fireStalledChange(Dockable dockable)
Informs all RegisterListeners that dockable cycled
the register. |
DockController |
getController()
Gets the controller for which this register stores Dockables and DockStations. |
Dockable |
getDockable(int index)
Gets the index'th Dockable that is registered at this DockRegister . |
int |
getDockableCount()
Gets the number of dockables registered at this DockRegister . |
DockStation |
getStation(int index)
Gets the station at the specified position. |
int |
getStationCount()
Gest the number of stations that are registered. |
boolean |
isStalled()
Whether the register is currently stalled and does not forward changes to the tree. |
void |
kill()
Removes all registerListeners and connections to the stations and dockables known to this register. |
Dockable[] |
listDockables()
Gets a list of all Dockables. |
protected DockRegisterListener[] |
listDockRegisterListeners()
Gets a list of all registerListeners which are registered. |
DockStation[] |
listDockStations()
Gets an array containing all known DockStations . |
DockStation[] |
listRoots()
Gets a list of stations which have no parent and are therefore the roots of the dock-trees. |
protected void |
register(Dockable dockable)
Registers dockable , the associated controller will know the titles
of dockable to allow drag and drop operations. |
protected void |
register(DockStation station,
boolean requiresListener)
Registers station , the associated controller will support
drag and drop for station . |
void |
remove(DockStation station)
Removes a station which was managed by this register. |
void |
removeDockRegisterListener(DockRegisterListener listener)
Removes a listener from this register. |
void |
setStalled(boolean stalled)
Sets whether the listener to all DockStation should forward changes
of the tree to the un-/register -methods or not. |
protected void |
unregister(Dockable dockable)
Unregisters dockable , the associated controller will no longer
support drag and drop for dockable . |
protected void |
unregister(DockStation station)
Unregisters station , the associated controller will no longer
support drag and drop operations for station . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DockRegister(DockController controller)
controller
- the controller for which the dockables and stations
are stored.Method Detail |
---|
public DockController getController()
public void addDockRegisterListener(DockRegisterListener listener)
Dockable
or a DockStation
is added or removed from
this register.
listener
- the new listenerpublic void removeDockRegisterListener(DockRegisterListener listener)
listener
- the listener to removeaddDockRegisterListener(DockRegisterListener)
public void kill()
public void add(DockStation station)
station
. If
the children of station
are stations itself, then
they will be added automatically
station
- the new stationpublic void remove(DockStation station)
station
- the station to removepublic int getStationCount()
add(DockStation)
public DockStation getStation(int index)
index
- the location
public DockStation[] listDockStations()
DockStations
.
public DockStation[] listRoots()
public int getDockableCount()
DockRegister
.
public Dockable getDockable(int index)
Dockable
that is registered at this DockRegister
.
index
- the location of the Dockable
public Dockable[] listDockables()
protected void register(Dockable dockable)
dockable
, the associated controller will know the titles
of dockable
to allow drag and drop operations.
dockable
- a new Dockableprotected void unregister(Dockable dockable)
dockable
, the associated controller will no longer
support drag and drop for dockable
.
dockable
- the element to removeprotected void register(DockStation station, boolean requiresListener)
station
, the associated controller will support
drag and drop for station
.
station
- the station to addrequiresListener
- if true
, then the DockStationListener
of this
DockRegister
will be added to station
, if false
the
listener will not be addedprotected void unregister(DockStation station)
station
, the associated controller will no longer
support drag and drop operations for station
.
station
- the station to removeprotected DockRegisterListener[] listDockRegisterListeners()
protected void fireDockableRegistering(Dockable dockable)
Dockable
will be registered.
dockable
- the Dockable which will be registeredprotected void fireDockableRegistered(Dockable dockable)
Dockable
has been registered.
dockable
- the registered Dockableprotected void fireDockableUnregistered(Dockable dockable)
Dockable
has been
unregistered.
dockable
- the unregistered Dockableprotected void fireDockStationRegistering(DockStation station)
station
will be registered.
station
- the new stationprotected void fireDockStationRegistered(DockStation station)
station
has been registered.
station
- the new stationprotected void fireDockStationUnregistered(DockStation station)
station
has been unregistered.
station
- the unregistered stationprotected void fireStalledChange(Dockable dockable)
dockable
cycled
the register.
dockable
- the cycling elementpublic void setStalled(boolean stalled)
DockStation
should forward changes
of the tree to the un-/register
-methods or not. If the
register was stalled and now the argument is false
, then
all pending events will be handled immediately.setStalled
was
called two times with true
, then the events will be fired only
after setStalled
was called twice with false
.
stalled
- true
if events should be stalled, false
if all pending events should be handled and new events should be handled
immediatelypublic boolean isStalled()
true
if stalled
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |