Class FlapDockStationHandle
java.lang.Object
bibliothek.gui.dock.facile.mode.station.FlapDockStationHandle
- All Implemented Interfaces:
MinimizedModeArea,ModeArea,StationModeArea
- Direct Known Subclasses:
CFlapDockStationHandle
A connection between a
FlapDockStation and the
MinimizedModeArea interface.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionFlapDockStationHandle(String id, FlapDockStation station) Creates a new handle. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddModeAreaListener(ModeAreaListener listener) Adds a listener to this area.booleanTells whether thisModeAreacan automatically become the default area of some mode.getLocation(Dockable child) Gets the location ofdockablewhich is a child of this station.Gets the station which is managed by this handle.Gets a unique identifier for this area.booleanTells whetherdockableis a direct child of this station.booleanTells whether this area can be used as root in aLocation.voidremoveModeAreaListener(ModeAreaListener listener) Removes a listener from this area.booleanvoidsetController(DockController controller) Connects this area with a controller.booleansetLocation(Dockable dockable, DockableProperty location, AffectedSet set) Sets the location ofdockabletolocationand tries to ensure thatdockableis a child of this station.
This method may completely fail to change the location ofdockable, for example because aDockAcceptancedoes not allow the dockable to be moved.voidsetMode(LocationMode mode) Informs this area about the mode that uses it.
-
Constructor Details
-
FlapDockStationHandle
Creates a new handle.- Parameters:
id- unique id of this handlestation- the station managed by this handle
-
-
Method Details
-
autoDefaultArea
public boolean autoDefaultArea()Description copied from interface:ModeAreaTells whether thisModeAreacan automatically become the default area of some mode.- Specified by:
autoDefaultAreain interfaceModeArea- Returns:
trueif this can be a default area,falseif not
-
isLocationRoot
public boolean isLocationRoot()Description copied from interface:ModeAreaTells whether this area can be used as root in aLocation. An area that is not a location root will (usually) not be used to set the location of a child.
Most implementations ofModeAreashould returntrue.- Specified by:
isLocationRootin interfaceModeArea- Returns:
- whether this
ModeAreaagrees on seeing itsModeArea.getUniqueId()in aLocation
-
addModeAreaListener
Description copied from interface:ModeAreaAdds a listener to this area.- Specified by:
addModeAreaListenerin interfaceModeArea- Parameters:
listener- the new listener
-
removeModeAreaListener
Description copied from interface:ModeAreaRemoves a listener from this area.- Specified by:
removeModeAreaListenerin interfaceModeArea- Parameters:
listener- the listener to remove
-
setController
Description copied from interface:ModeAreaConnects this area with a controller. It's up to the area to add or remove listeners if necessary.- Specified by:
setControllerin interfaceModeArea- Parameters:
controller- the controller ornull
-
setMode
Description copied from interface:ModeAreaInforms this area about the mode that uses it. -
getStation
Gets the station which is managed by this handle.- Specified by:
getStationin interfaceModeArea- Returns:
- the station
-
getLocation
Description copied from interface:StationModeAreaGets the location ofdockablewhich is a child of this station.- Specified by:
getLocationin interfaceStationModeArea- Parameters:
child- the child- Returns:
- the location, may be
null
-
getUniqueId
Description copied from interface:ModeAreaGets a unique identifier for this area.- Specified by:
getUniqueIdin interfaceModeArea- Returns:
- the unique identifier
- See Also:
-
isChild
Description copied from interface:ModeAreaTells whetherdockableis a direct child of this station. -
respectWorkingAreas
public boolean respectWorkingAreas() -
setLocation
Description copied from interface:StationModeAreaSets the location ofdockabletolocationand tries to ensure thatdockableis a child of this station.
This method may completely fail to change the location ofdockable, for example because aDockAcceptancedoes not allow the dockable to be moved. In such casesfalseis returned.- Specified by:
setLocationin interfaceStationModeArea- Parameters:
dockable- the new or old childlocation- the new location, may benullset- this method has to store allDockables which might have changed their mode in the set.- Returns:
trueifdockableis now a child of thisStationModeArea,falseif not
-