bibliothek.gui.dock.common
Class CWorkingArea

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

public class CWorkingArea
extends CGridArea

A working area is an element which is always visible and contains some CDockables which can't be dragged out of it. Also no CDockable can be dropped in a CWorkingArea.
There can be more than one CWorkingArea, and the working areas can be nested.

Author:
Benjamin Sigg

Field Summary
 
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_NORMALIZE, ACTION_KEY_UNEXTERNALIZE, ACTION_KEY_UNMAXIMIZE_EXTERNALIZED
 
Constructor Summary
CWorkingArea(CControl control, String uniqueId)
          Creates a new area.
 
Method Summary
<F extends MultipleCDockable>
F
add(F dockable)
          Ensures that this is the parent of dockable and adds dockable to the CControl which is associated with this CWorkingArea.
<F extends SingleCDockable>
F
add(F dockable)
          Ensures that this is the parent of dockable and adds dockable to the CControl which is associated with this CWorkingArea.
 void deploy(CGrid grid)
          Exchanges all the CDockables on this area with the elements of grid.
 CLocation getStationLocation()
          Gets a location which represents directly CStation.getStation().
 boolean isSuppressTitle()
          Deprecated. use AbstractCDockable.isTitleShown() instead
 boolean isWorkingArea()
          Tells whether this station is a special working area or not.
 void setSuppressTitle(boolean suppressTitle)
          Deprecated. use AbstractCDockable.setTitleShown(boolean) instead
 
Methods inherited from class bibliothek.gui.dock.common.CGridArea
asDockable, createCommonDockable, getComponent, getStation, getTitleIcon, getTitleText, getUniqueId, init, install, isCloseable, isExternalizable, isMaximizable, isMaximizingArea, isMinimizable, isStackable, setMaximizingArea, setTitleIcon, setTitleText, suppressTitle, uninstall
 
Methods inherited from class bibliothek.gui.dock.common.intern.AbstractDockableCStation
init, setControl
 
Methods inherited from class bibliothek.gui.dock.common.intern.AbstractCDockable
addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, control, getAction, getAndClearResizeRequest, getBaseLocation, getClose, getColors, getControl, getDefaultLocation, getExtendedMode, getFonts, getMinimizedSize, getWorkingArea, init, intern, isMinimizedHold, isResizeLocked, isResizeLockedHorizontally, isResizeLockedVertically, isSingleTabShown, isTitleShown, isVisible, propertyListeners, putAction, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setDefaultLocation, setExtendedMode, setLocation, setMinimizedHold, setMinimizedSize, setResizeLocked, setResizeLockedHorizontally, setResizeLockedVertically, setResizeRequest, setResizeRequest, setSingleTabShown, setTitleShown, setVisible, setWorkingArea, stateListeners, toFront
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.common.intern.CDockable
addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, getAction, getAndClearResizeRequest, getBaseLocation, getColors, getControl, getExtendedMode, getFonts, getMinimizedSize, getWorkingArea, intern, isMinimizedHold, isResizeLockedHorizontally, isResizeLockedVertically, isSingleTabShown, isTitleShown, isVisible, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setControl, setExtendedMode, setLocation, setMinimizedHold, setMinimizedSize, setVisible, setWorkingArea
 

Constructor Detail

CWorkingArea

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

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

isWorkingArea

public boolean isWorkingArea()
Description copied from interface: CStation
Tells whether this station is a special working area or not. It is not possible drag a child from a working area if it is registered there, or to drop a child onto a working area if it is not registered there.

Specified by:
isWorkingArea in interface CStation<SplitDockStation>
Overrides:
isWorkingArea in class CGridArea
Returns:
true if this is a working area, false otherwise

getStationLocation

public CLocation getStationLocation()
Description copied from interface: CStation
Gets a location which represents directly CStation.getStation().

Specified by:
getStationLocation in interface CStation<SplitDockStation>
Overrides:
getStationLocation in class CGridArea
Returns:
the location that will always represent the station

deploy

public void deploy(CGrid grid)
Exchanges all the CDockables on this area with the elements of grid. This method also calls CDockable.setWorkingArea(CStation) for each dockable in grid.

Overrides:
deploy in class CGridArea
Parameters:
grid - a grid containing some new Dockables

add

public <F extends SingleCDockable> F add(F dockable)
Ensures that this is the parent of dockable and adds dockable to the CControl which is associated with this CWorkingArea. If there is no CControl, then the dockable is added nowhere.

Type Parameters:
F - the type of element to add
Parameters:
dockable - the new element
Returns:
dockable

add

public <F extends MultipleCDockable> F add(F dockable)
Ensures that this is the parent of dockable and adds dockable to the CControl which is associated with this CWorkingArea. If there is no CControl, then the dockable is added nowhere.

Type Parameters:
F - the type of element to add
Parameters:
dockable - the new element
Returns:
dockable

setSuppressTitle

@Deprecated
public void setSuppressTitle(boolean suppressTitle)
Deprecated. use AbstractCDockable.setTitleShown(boolean) instead

Sets whether this working-area should suppress its title or not.

Parameters:
suppressTitle - true if this area should try not to have a title.

isSuppressTitle

@Deprecated
public boolean isSuppressTitle()
Deprecated. use AbstractCDockable.isTitleShown() instead

Tells whether this working-area suppresses its title.

Returns:
true if this area normally has no title