public abstract class OrientationObserver extends Object implements OrientingDockStationListener
OrientationObserver adds itself as OrientingDockStationListener to the first
OrientingDockStation that is found as parent of a specific Dockable.| Constructor and Description |
|---|
OrientationObserver(Dockable dockable)
Creates a new observer
|
| Modifier and Type | Method and Description |
|---|---|
void |
changed(OrientingDockStationEvent event)
Called if the
Orientation of one or many children of some
OrientingDockStation has changed. |
void |
destroy()
Destroys this observer, all resources are prepared for garbage collection.
|
Dockable |
getDockable()
Gets the
Dockable which is monitored by this OrientationObserver. |
Orientation |
getOrientation()
Gets the
Orientation that should currently be applied to the dockable, |
protected abstract void |
orientationChanged(Orientation current)
Called if the orientation of
the dockable changed. |
public OrientationObserver(Dockable dockable)
dockable - the element whose parent OrientingDockStation should be observedpublic void destroy()
public Dockable getDockable()
Dockable which is monitored by this OrientationObserver.nullprotected abstract void orientationChanged(Orientation current)
the dockable changed. This method may be called several
times with the same argument.current - the new orientation, can null if the dockable does not have
an OrientingDockStation as parentpublic Orientation getOrientation()
Orientation that should currently be applied to the dockable,null if the dockable does not have an OrientingDockStation
as parent.public void changed(OrientingDockStationEvent event)
OrientingDockStationListenerOrientation of one or many children of some
OrientingDockStation has changed.changed in interface OrientingDockStationListenerevent - detailed information about the eventCopyright © 2018. All rights reserved.