@FrameworkOnly public class DelayedWorkingAreaSetter extends DockRegisterAdapter
DelayedWorkingAreaSetter
is a listener that is added to a CControl
and
waits until a CStation
with a specific identifier is registered. It then calls
CDockable.setWorkingArea(CStation)
with this station. This listener automatically
removes itself once its mission is over.Constructor and Description |
---|
DelayedWorkingAreaSetter(java.lang.String area,
CDockable dockable,
CControl control)
Creates a new setter.
|
Modifier and Type | Method and Description |
---|---|
void |
dockStationRegistering(DockController controller,
DockStation station)
Invoked right before the
station is registered in
the controller . |
void |
install() |
void |
registerUnstalled(DockController controller)
Called if the
DockRegister from controller is no
longer stalled , this method is called
before the pending events are fired. |
void |
uninstall()
Removes all listeners this
DelayedWorkingAreaSetter has added anywhere. |
dockableCycledRegister, dockableRegistered, dockableRegistering, dockableUnregistered, dockStationRegistered, dockStationUnregistered, registerStalled
public void install()
public void uninstall()
DelayedWorkingAreaSetter
has added anywhere.public void dockStationRegistering(DockController controller, DockStation station)
DockRegisterListener
station
is registered in
the controller
.dockStationRegistering
in interface DockRegisterListener
dockStationRegistering
in class DockRegisterAdapter
controller
- the controller who does not yet know station
.station
- the station who does not yet know controller
.public void registerUnstalled(DockController controller)
DockRegisterListener
DockRegister
from controller
is no
longer stalled
, this method is called
before the pending events are fired.registerUnstalled
in interface DockRegisterListener
registerUnstalled
in class DockRegisterAdapter
controller
- the controller whose register is no longer stalled