Class CSplitDockStationHandle.Normal
java.lang.Object
bibliothek.gui.dock.common.mode.station.CSplitDockStationHandle.Normal
- All Implemented Interfaces:
CModeArea,CNormalModeArea,ModeArea,NormalModeArea,StationModeArea
- Enclosing class:
CSplitDockStationHandle
Represents the
SplitDockStation as CNormalModeArea.- Author:
- Benjamin Sigg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddModeAreaListener(ModeAreaListener listener) Adds a listener to this area.booleanTells whether thisModeAreacan automatically become the default area of some mode.Gets a location representing this area.getCLocation(Dockable dockable) Assumingdockableis a child of this area, returns the location ofdockable.getCLocation(Dockable dockable, Location location) Assumingdockablewould be at locationlocationif it would be a child of this station, returns theCLocationthat matcheslocation.getLocation(Dockable child) Gets the location ofdockablewhich is a child of this station.Gets the station which is represented by this area.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.booleanisNormalModeChild(Dockable dockable) Tells whetherdockableis a child of this station and in a form satisfying the normal-mode criteria.booleanTells whether this area represents aCStation.isWorkingArea()voidremoveModeAreaListener(ModeAreaListener listener) Removes a listener from this area.booleanTells whether children of this area have to respect the settings forCWorkingAreas.voidsetController(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
-
Normal
protected Normal()
-
-
Method Details
-
setMode
Description copied from interface:ModeAreaInforms this area about the mode that uses it. -
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
-
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
-
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
-
isNormalModeChild
Description copied from interface:NormalModeAreaTells whetherdockableis a child of this station and in a form satisfying the normal-mode criteria.- Specified by:
isNormalModeChildin interfaceNormalModeArea- Parameters:
dockable- some potential child- Returns:
trueifdockableis a child in normal mode.
-
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. -
getStation
Description copied from interface:ModeAreaGets the station which is represented by this area.- Specified by:
getStationin interfaceModeArea- Returns:
- the station, not
null
-
respectWorkingAreas
public boolean respectWorkingAreas()Description copied from interface:CModeAreaTells whether children of this area have to respect the settings forCWorkingAreas.- Specified by:
respectWorkingAreasin interfaceCModeArea- Returns:
- whether the settings are to be respected
-
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
-
getCLocation
Description copied from interface:CModeAreaAssumingdockableis a child of this area, returns the location ofdockable.- Specified by:
getCLocationin interfaceCModeArea- Parameters:
dockable- some child- Returns:
- the location,
nullif not found
-
getCLocation
Description copied from interface:CModeAreaAssumingdockablewould be at locationlocationif it would be a child of this station, returns theCLocationthat matcheslocation.- Specified by:
getCLocationin interfaceCModeArea- Parameters:
dockable- some element which may or may not be a child of this stationlocation- the locationdockablewould have if it would be a child of this station- Returns:
- the location,
nullif not found
-
getBaseLocation
Description copied from interface:CNormalModeAreaGets a location representing this area.- Specified by:
getBaseLocationin interfaceCNormalModeArea- Returns:
- some location, used for
Dockables which have no valid location
-
isWorkingArea
public boolean isWorkingArea()Description copied from interface:CNormalModeAreaTells whether this area represents aCStation.isWorkingArea()- Specified by:
isWorkingAreain interfaceCNormalModeArea- Returns:
trueif an area
-