bibliothek.gui.dock.facile.mode
Interface MaximizedModeArea

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

public interface MaximizedModeArea
extends ModeArea

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

Author:
Benjamin Sigg

Method Summary
 void connect(MaximizedMode<? extends MaximizedModeArea> mode)
          Informs this area that it is now managed by mode.
 Dockable getMaximized()
          Gets the currently maximized element.
 boolean isRepresenting(DockStation station)
          Tells whether this area is representing station.
 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.
 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, AffectedSet affected)
          This method is called by MaximizedMode just before the mode is applied to dockable.
 void setMaximized(Dockable dockable, AffectedSet set)
          Tells this parent to show dockable maximized, only one dockable may be maximized at any time.
 
Methods inherited from interface bibliothek.gui.dock.facile.mode.ModeArea
addModeAreaListener, getStation, getUniqueId, isChild, removeModeAreaListener, respectWorkingAreas, setController
 

Method Detail

connect

void connect(MaximizedMode<? extends MaximizedModeArea> mode)
Informs this area that it is now managed by mode.

Parameters:
mode - the new mode, can be null to inform this area that it is no longer managed
Throws:
IllegalStateException - if already connected

onApply

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

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,
                  AffectedSet affected)
This method is called by MaximizedMode just before the mode is applied to dockable.

Parameters:
dockable - the element which gets maximized
affected - collects dockables which might change their mode

setMaximized

void setMaximized(Dockable dockable,
                  AffectedSet set)
Tells this parent to show dockable maximized, only one dockable may be maximized at any time.

Parameters:
dockable - the maximized element, null to indicate that no element should be maximized.
set - this method has to store all Dockables which might have changed their mode in the set.

getMaximized

Dockable getMaximized()
Gets the currently maximized element.

Returns:
the currently maximized dockable, can be null

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