Class CSplitDockStationHandle.Maximal
java.lang.Object
bibliothek.gui.dock.common.mode.station.CSplitDockStationHandle.Maximal
- All Implemented Interfaces:
CMaximizedModeArea,CModeArea,MaximizedModeArea,ModeArea
- Enclosing class:
CSplitDockStationHandle
Represents a
SplitDockStation as a CMaximizedModeArea.- 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.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.Dockable[]Gets the currently maximized elements.Gets the station which is represented by this area.Gets a unique identifier for this area.Tells which mode would be the preferred mode for unmaximization.booleanTells whetherdockableis a direct child of this station.booleanTells whether this area can be used as root in aLocation.booleanisRepresenting(DockStation station) Tells whether this area is representingstation.onApply(LocationModeEvent event) This method is called before the methodapplyis executed of aLocationModethat is not the owner of this area.onApply(LocationModeEvent event, Dockable replacement) This method is called before the methodapplyis executed of aLocationModethat is not the owner of this area.voidprepareApply(Dockable dockable, Location history, AffectedSet set) This method is called byMaximizedModejust before the mode is applied todockable.voidprepareApply(Dockable dockable, AffectedSet affected) 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.voidsetMaximized(Dockable dockable, boolean maximized, Location location, AffectedSet set) Tells this parent to change the maximization state ofdockable.voidsetMode(LocationMode mode) Informs this area about the mode that uses it.
-
Constructor Details
-
Maximal
protected Maximal()
-
-
Method Details
-
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
-
setMode
Description copied from interface:ModeAreaInforms this area about the mode that uses it. -
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
-
getLocation
Description copied from interface:MaximizedModeAreaGets the location ofdockablewhich is a child of this station.- Specified by:
getLocationin interfaceMaximizedModeArea- Parameters:
child- the child- Returns:
- the location, may be
null
-
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
-
getUnmaximizedMode
Description copied from interface:MaximizedModeAreaTells which mode would be the preferred mode for unmaximization.- Specified by:
getUnmaximizedModein interfaceMaximizedModeArea- Returns:
- the preferred unmaximized mode, can be
null
-
prepareApply
-
prepareApply
Description copied from interface:MaximizedModeAreaThis method is called byMaximizedModejust before the mode is applied todockable.- Specified by:
prepareApplyin interfaceMaximizedModeArea- Parameters:
dockable- the new child of this areahistory- future location ofdockableset- this method has to store allDockables which might have changed their mode in the set.
-
onApply
Description copied from interface:MaximizedModeAreaThis method is called before the methodapplyis executed of aLocationModethat is not the owner of this area. The elementevent.getDockable()may or may not be a child of this station. This method is called beforeMaximizedModeArea.onApply(LocationModeEvent, Dockable)is called.- Specified by:
onApplyin interfaceMaximizedModeArea- Parameters:
event- detailed information about the event- Returns:
- a piece of code executed once
applyhas finished its job
-
onApply
Description copied from interface:MaximizedModeAreaThis method is called before the methodapplyis executed of aLocationModethat is not the owner of this area. The elementevent.getDockable()is a direct or indirect child of this area and maximized. TheMaximizedModesuggests to usereplacementas direct child once the old element has been removed. This method must decide how this area reacts on the pending change, e.g. set its maximized dockable tonulland later re-maximize. The result of this method is aRunnablewhich will be executed once theapplymethod is finished.
This method is called afterMaximizedModeArea.onApply(LocationModeEvent)is called.- Specified by:
onApplyin interfaceMaximizedModeArea- Parameters:
event- detailed information about the eventreplacement- the suggested new maximized element- Returns:
- a piece of code executed once
applyhas finished its job
-
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
-
getMaximized
Description copied from interface:MaximizedModeAreaGets the currently maximized elements.- Specified by:
getMaximizedin interfaceMaximizedModeArea- Returns:
- the currently maximized dockables, can be
nullor empty
-
setMaximized
Description copied from interface:MaximizedModeAreaTells this parent to change the maximization state ofdockable. This area may unmaximize otherDockables if necessary.- Specified by:
setMaximizedin interfaceMaximizedModeArea- Parameters:
dockable- the maximized element,nullto indicate that no element should be maximized.maximized- the new state ofdockablelocation- the expected location ofdockableafter this method completed, may benullset- this method has to store allDockables which might have changed their mode in the set.
-
isRepresenting
Description copied from interface:MaximizedModeAreaTells whether this area is representingstation. It is legitimate for an area to represent more than one or no station at all.- Specified by:
isRepresentingin interfaceMaximizedModeArea- Parameters:
station- some station- Returns:
trueif this representsstation
-
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
-