bibliothek.gui.dock.facile.mode
Interface MaximizedModeArea

All Superinterfaces:
ModeArea
All Known Subinterfaces:
CMaximizedModeArea
All Known Implementing Classes:
CScreenDockStationHandle.Maximal, CSplitDockStationHandle.Maximal

public interface MaximizedModeArea
extends ModeArea

The parent of a set of Dockables that are maximized. The MaximizedMode, which is feed with these areas, assumes that a MaximizedModeArea is also some other kind of area (e.g. a NormalModeArea).

Author:
Benjamin Sigg

Method Summary
 Dockable[] getMaximized()
          Gets the currently maximized elements.
 LocationMode getUnmaximizedMode()
          Tells which mode would be the preferred mode for unmaximization.
 boolean isRepresenting(DockStation station)
          Tells whether this area is representing station.
 java.lang.Runnable onApply(LocationModeEvent event)
          This method is called before the method apply is executed of a LocationMode that is not the owner of this area.
 java.lang.Runnable onApply(LocationModeEvent event, Dockable replacement)
          This method is called before the method apply is executed of a LocationMode that is not the owner of this area.
 void prepareApply(Dockable dockable, Location history, AffectedSet set)
          This method is called by MaximizedMode just before the mode is applied to dockable.
 void setMaximized(Dockable dockable, boolean maximized, Location location, AffectedSet set)
          Tells this parent to change the maximization state of dockable.
 
Methods inherited from interface bibliothek.gui.dock.facile.mode.ModeArea
addModeAreaListener, autoDefaultArea, getStation, getUniqueId, isChild, removeModeAreaListener, setController, setMode
 

Method Detail

onApply

java.lang.Runnable onApply(LocationModeEvent event)
This method is called before the method apply is executed of a LocationMode that is not the owner of this area. The element event.getDockable() may or may not be a child of this station. This method is called before onApply(LocationModeEvent, Dockable) is called.

Parameters:
event - detailed informaion about the event
Returns:
a piece of code executed once apply has finished its job

onApply

java.lang.Runnable onApply(LocationModeEvent event,
                           Dockable replacement)
This method is called before the method apply is executed of a LocationMode that is not the owner of this area. The element event.getDockable() is a direct or indirect child of this area and maximized. The MaximizedMode suggests to use replacement as 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 to null and later re-maximize. The result of this method is a Runnable which will be executed once the apply method is finished.
This method is called after onApply(LocationModeEvent) is called.

Parameters:
event - detailed information about the event
replacement - the suggested new maximized element
Returns:
a piece of code executed once apply has finished its job

prepareApply

void prepareApply(Dockable dockable,
                  Location history,
                  AffectedSet set)
This method is called by MaximizedMode just before the mode is applied to dockable.

Parameters:
dockable - the new child of this area
history - future location of dockable
set - this method has to store all Dockables which might have changed their mode in the set.

setMaximized

void setMaximized(Dockable dockable,
                  boolean maximized,
                  Location location,
                  AffectedSet set)
Tells this parent to change the maximization state of dockable. This area may unmaximize other Dockables if necessary.

Parameters:
dockable - the maximized element, null to indicate that no element should be maximized.
maximized - the new state of dockable
location - the expected location of dockable after this method completed, may be null
set - this method has to store all Dockables which might have changed their mode in the set.

getMaximized

Dockable[] getMaximized()
Gets the currently maximized elements.

Returns:
the currently maximized dockables, can be null or empty

isRepresenting

boolean isRepresenting(DockStation station)
Tells whether this area is representing station. It is legitimate for an area to represent more than one or no station at all.

Parameters:
station - some station
Returns:
true if this represents station

getUnmaximizedMode

LocationMode getUnmaximizedMode()
Tells which mode would be the preferred mode for unmaximization.

Returns:
the preferred unmaximized mode, can be null