bibliothek.gui.dock.common.behavior
Class ExternalizingCGridArea

java.lang.Object
  extended by bibliothek.gui.dock.common.intern.AbstractCDockable
      extended by bibliothek.gui.dock.common.intern.AbstractDockableCStation<CSplitDockStation>
          extended by bibliothek.gui.dock.common.CGridArea
              extended by bibliothek.gui.dock.common.behavior.ExternalizingCGridArea
All Implemented Interfaces:
CStation<CSplitDockStation>, CDockable, SingleCDockable

@Todo(priority=MAJOR,
      target=VERSION_1_1_2,
      compatibility=COMPATIBLE,
      description="The \'unmaximize\' button appears at the wrong location. And during drag and drop layout information is lost due to the listener that inserts the station after the dockable was inserted. Also perspectives will not yet work.")
public class ExternalizingCGridArea
extends CGridArea

This CStation is intended to be set between a ScreenDockStation and a Dockable. It can clean up itself when it is no longer required.
This station will allow its children to be "maximized" on itself. Additionally the station can be "maximized" itself, but it cannot be "normalized" or "minimized" (it always remains floating on the screen).

Author:
Benjamin Sigg

Field Summary
static Path TYPE_ID
          The type of this area, returned by getTypeId()
static String UNIQUE_ID_PREFIX
          Every unique identifier of a ExternalizingCGridArea starts with this string
 
Fields inherited from class bibliothek.gui.dock.common.intern.AbstractCDockable
listenerCollection
 
Fields inherited from interface bibliothek.gui.dock.common.intern.CDockable
ACTION_KEY_CLOSE, ACTION_KEY_EXTERNALIZE, ACTION_KEY_MAXIMIZE, ACTION_KEY_MINIMIZE, ACTION_KEY_MINIMIZE_HOLD, ACTION_KEY_NORMALIZE, ACTION_KEY_UNEXTERNALIZE, ACTION_KEY_UNMAXIMIZE_EXTERNALIZED
 
Constructor Summary
ExternalizingCGridArea(CControl control)
          Creates a new area.
ExternalizingCGridArea(CControl control, String uniqueId)
          Creates a new area.
 
Method Summary
protected  ExternalizedCSplitDockStationHandler createSplitDockStationHandle(CControl control)
          Creates the handle that will represent this as CNormalModeArea and CMaximizedModeArea.
protected  ExternalizedCSplitDockStationHandler getModeManagerHandle()
          Access to the object that represents this as CNormalModeArea and as CMaximizedModeArea.
 Path getTypeId()
          Gets a unique path denoting the type of this station.
protected  void install(CControlAccess access)
          Called when this station is added to a CControl.
 boolean isAutoRemove()
          Tells whether this station can automatically remove itself from its parent and the CControl.
 boolean isExternalizable()
          Tells whether this CDockable can be externalized by the user.
 boolean isMaximizable()
          Tells whether this CDockable can be maximized by the user.
 boolean isMinimizable()
          Tells whether this CDockable can be minimized by the user.
 boolean isNormalizeable()
          Always true, clients should not override this method unless they know exactly what they are doing.
protected  boolean isNormalizingArea()
          Tells whether all children of this area are considered to be normalized.
 void setAutoRemove(boolean autoRemove)
          Sets whether this station can automatically delete itself from the application if the number of children drops to 0.
The default value of this property is true.
protected  void tryAutoRemove()
          Queues up a call to autoRemove()
protected  void uninstall(CControlAccess access)
          Called when this station is removed from a CControl.
 
Methods inherited from class bibliothek.gui.dock.common.CGridArea
asDockable, createCommonDockable, createPerspective, deploy, getComponent, getStation, getStationLocation, getTitleIcon, getTitleText, getUniqueId, init, isCloseable, isMaximizingArea, isStackable, isWorkingArea, setMaximizingArea, setTitleIcon, setTitleText, suppressTitle
 
Methods inherited from class bibliothek.gui.dock.common.intern.AbstractDockableCStation
asStation, getDropLocation, init, setControlAccess, toString
 
Methods inherited from class bibliothek.gui.dock.common.intern.AbstractCDockable
addCDockableLocationListener, addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, control, getAction, getAndClearResizeRequest, getAutoBaseLocation, getBaseLocation, getClose, getColors, getControl, getControlAccess, getDefaultLocation, getDockableUniqueId, getExtendedMode, getFocusComponent, getFonts, getGrouping, getMinimizedSize, getParentStation, getWorkingArea, hasParent, init, intern, isDockableVisible, isEnabled, isResizeLocked, isResizeLockedHorizontally, isResizeLockedVertically, isShowing, isSingleTabShown, isSticky, isStickySwitchable, isTitleShown, isVisible, propertyListeners, putAction, removeCDockableLocationListener, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setDefaultLocation, setEnabled, setExtendedMode, setFocusComponent, setGrouping, setLocation, setLocationsAside, setLocationsAside, setLocationsAsideFocused, setMinimizedSize, setResizeLocked, setResizeLockedHorizontally, setResizeLockedVertically, setResizeRequest, setResizeRequest, setSingleTabShown, setSticky, setStickySwitchable, setTitleShown, setVisible, setWorkingArea, stateListeners, toFront
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.common.intern.CDockable
addCDockableLocationListener, addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, asStation, getAction, getAndClearResizeRequest, getAutoBaseLocation, getBaseLocation, getColors, getControl, getControlAccess, getExtendedMode, getFocusComponent, getFonts, getGrouping, getMinimizedSize, getParentStation, getWorkingArea, hasParent, intern, isDockableVisible, isEnabled, isResizeLockedHorizontally, isResizeLockedVertically, isShowing, isSingleTabShown, isSticky, isStickySwitchable, isTitleShown, isVisible, removeCDockableLocationListener, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setControlAccess, setExtendedMode, setLocation, setLocationsAside, setLocationsAside, setLocationsAsideFocused, setMinimizedSize, setSticky, setStickySwitchable, setVisible, setWorkingArea
 

Field Detail

TYPE_ID

public static final Path TYPE_ID
The type of this area, returned by getTypeId()


UNIQUE_ID_PREFIX

public static final String UNIQUE_ID_PREFIX
Every unique identifier of a ExternalizingCGridArea starts with this string

See Also:
Constant Field Values
Constructor Detail

ExternalizingCGridArea

public ExternalizingCGridArea(CControl control)
Creates a new area.

Parameters:
control - the owner of this area

ExternalizingCGridArea

public ExternalizingCGridArea(CControl control,
                              String uniqueId)
Creates a new area.

Parameters:
control - the owner of this area
uniqueId - the unique identifier of this station
Method Detail

createSplitDockStationHandle

protected ExternalizedCSplitDockStationHandler createSplitDockStationHandle(CControl control)
Description copied from class: CGridArea
Creates the handle that will represent this as CNormalModeArea and CMaximizedModeArea.

Overrides:
createSplitDockStationHandle in class CGridArea
Parameters:
control - the control in whose realm this area is used
Returns:
the new handle, not null

getModeManagerHandle

protected ExternalizedCSplitDockStationHandler getModeManagerHandle()
Description copied from class: CGridArea
Access to the object that represents this as CNormalModeArea and as CMaximizedModeArea.

Overrides:
getModeManagerHandle in class CGridArea
Returns:
a representation of this as area

install

protected void install(CControlAccess access)
Description copied from class: AbstractDockableCStation
Called when this station is added to a CControl.

Overrides:
install in class CGridArea
Parameters:
access - access to the internals of the new owner

uninstall

protected void uninstall(CControlAccess access)
Description copied from class: AbstractDockableCStation
Called when this station is removed from a CControl.

Overrides:
uninstall in class CGridArea
Parameters:
access - access to the internals of the old owner

isMaximizable

public boolean isMaximizable()
Description copied from interface: CDockable
Tells whether this CDockable can be maximized by the user.

Specified by:
isMaximizable in interface CDockable
Overrides:
isMaximizable in class CGridArea
Returns:
true if this element can be maximized

isExternalizable

public boolean isExternalizable()
Description copied from interface: CDockable
Tells whether this CDockable can be externalized by the user.

Specified by:
isExternalizable in interface CDockable
Overrides:
isExternalizable in class CGridArea
Returns:
true if this element can be externalized

isMinimizable

public boolean isMinimizable()
Description copied from interface: CDockable
Tells whether this CDockable can be minimized by the user.

Specified by:
isMinimizable in interface CDockable
Overrides:
isMinimizable in class CGridArea
Returns:
true if this element can be minimized

isNormalizeable

public boolean isNormalizeable()
Description copied from class: AbstractCDockable
Always true, clients should not override this method unless they know exactly what they are doing.

Specified by:
isNormalizeable in interface CDockable
Overrides:
isNormalizeable in class AbstractCDockable
Returns:
true, unless a subclass requires very special behavior.

isNormalizingArea

protected boolean isNormalizingArea()
Description copied from class: CGridArea
Tells whether all children of this area are considered to be normalized. Clients should not override this method.
Note that if this method returns false, then the default CSplitDockStationHandle returned by CGridArea.getModeManagerHandle() will fail, clients must provide a custom implementation of CSplitDockStationHandle if they override this method.

Overrides:
isNormalizingArea in class CGridArea
Returns:
whether the children are normalized per default

getTypeId

public Path getTypeId()
Description copied from interface: CStation
Gets a unique path denoting the type of this station. This path will be given to MissingPerspectiveStrategy.createStation(String, Path) when loading a layout as a CPerspective.

Specified by:
getTypeId in interface CStation<CSplitDockStation>
Overrides:
getTypeId in class CGridArea
Returns:
the type of this station. Paths starting with "dock." are reserved for the framework. A value of null will just be ignored.

setAutoRemove

public void setAutoRemove(boolean autoRemove)
Sets whether this station can automatically delete itself from the application if the number of children drops to 0.
The default value of this property is true.

Parameters:
autoRemove - whether automatic cleanup is enabled

isAutoRemove

public boolean isAutoRemove()
Tells whether this station can automatically remove itself from its parent and the CControl.

Returns:
whether automatic cleanup is enabled
See Also:
setAutoRemove(boolean)

tryAutoRemove

protected void tryAutoRemove()
Queues up a call to autoRemove()