bibliothek.gui.dock.common.intern
Class CDockFrontend

java.lang.Object
  extended by bibliothek.gui.DockFrontend
      extended by bibliothek.gui.dock.common.intern.CDockFrontend

@FrameworkOnly
public class CDockFrontend
extends DockFrontend

A DockFrontend that uses CSetting instead of Setting.

Author:
Benjamin Sigg

Nested Class Summary
 
Nested classes/interfaces inherited from class bibliothek.gui.DockFrontend
DockFrontend.DockInfo, DockFrontend.Hider, DockFrontend.RootInfo
 
Field Summary
 
Fields inherited from class bibliothek.gui.DockFrontend
DOCKABLE_KEY_PREFIX, HIDE_ACCELERATOR, ROOT_KEY_PREFIX
 
Constructor Summary
CDockFrontend(CControlAccess control, DockController controller)
          Creates a new frontend.
 
Method Summary
 void addListener(CDockFrontendListener listener)
          Adds listener to this frontend, listener will be informed about changes of this frontend.
protected  Setting createSetting()
          Creates a bag that contains all information needed to describe the current set of properties.
protected  CDockFrontendListener[] frontendListeners()
          Gets all the listeners that are registered at this frontend.
 Setting getSetting(boolean entry)
          Creates a new Setting which describes the current set of properties of this frontend.
 boolean isRevertToBasicModes()
          Tells whether only basic modes are allowed after loading a layout.
 void remove(Dockable dockable)
          Removes a Dockable which was earlier added to this frontend.
 void removeListener(CDockFrontendListener listener)
          Removes listener from this frontend.
 void setRevertToBasicModes(boolean revertToBasicModes)
          If set, then loading a layout will trigger a call to CLocationModeManager.ensureBasicModes().
 void setSetting(Setting setting, boolean entry)
          Changes the content of all root-stations according to setting.
 
Methods inherited from class bibliothek.gui.DockFrontend
add, addDockable, addEmpty, addFrontendListener, addRepresentative, addRoot, addRoot, addVetoableListener, clean, clean, createHider, delete, fireAdded, fireAllHidden, fireAllShown, fireDeleted, fireHidden, fireHideable, fireLoaded, fireRead, fireRemoved, fireSaved, fireShown, getController, getCurrentSetting, getDefaultStation, getDockable, getDockables, getDockProperties, getFrontendEntry, getHider, getIgnoreForEntry, getIgnoreForFinal, getLastAppliedEntrySetting, getLastAppliedFullSetting, getLayoutChangeStrategy, getMissingDockable, getNamedDockables, getNameOf, getOwner, getPerspective, getPerspective, getRoot, getRoots, getSetting, getSettings, hasLocation, hide, hide, isDefaultEntryLayout, isDefaultHideable, isEmpty, isEntryLayout, isEntryLayout, isHidden, isHiddenRootStation, isHideable, isShowHideAction, isShown, kill, listDockables, listEmpty, listeners, listFrontendEntries, listShownDockables, load, read, read, readXML, readXML, registerAdjacentFactory, registerBackupFactory, registerFactory, registerFactory, registerFactory, removeEmpty, removeFrontendListener, removeRepresentative, removeRoot, removeVetoableListener, save, save, setCurrentSetting, setCurrentSettingName, setDefaultEntryLayout, setDefaultHideable, setDefaultStation, setEntryLayout, setEntryLayout, setHideable, setIgnoreForEntry, setIgnoreForFinal, setLayoutChangeStrategy, setMissingDockableStrategy, setOwner, setSetting, setShowHideAction, show, show, unregisterAdjacentFactory, unregisterBackupFactory, unregisterFactory, write, write, writeXML, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDockFrontend

public CDockFrontend(CControlAccess control,
                     DockController controller)
Creates a new frontend.

Parameters:
control - the owner of this object
controller - the controller to use
Method Detail

addListener

public void addListener(CDockFrontendListener listener)
Adds listener to this frontend, listener will be informed about changes of this frontend.

Parameters:
listener - the listener to add, not null

frontendListeners

protected CDockFrontendListener[] frontendListeners()
Gets all the listeners that are registered at this frontend.

Returns:
the listeners

removeListener

public void removeListener(CDockFrontendListener listener)
Removes listener from this frontend.

Parameters:
listener - the listener to remove

setRevertToBasicModes

public void setRevertToBasicModes(boolean revertToBasicModes)
If set, then loading a layout will trigger a call to CLocationModeManager.ensureBasicModes().

Parameters:
revertToBasicModes - whether to allow only basic modes after loading

isRevertToBasicModes

public boolean isRevertToBasicModes()
Tells whether only basic modes are allowed after loading a layout.

Returns:
true if non-basic modes are forbidden

remove

public void remove(Dockable dockable)
Description copied from class: DockFrontend
Removes a Dockable which was earlier added to this frontend.

Overrides:
remove in class DockFrontend
Parameters:
dockable - the element to remove

createSetting

protected Setting createSetting()
Description copied from class: DockFrontend
Creates a bag that contains all information needed to describe the current set of properties.

Overrides:
createSetting in class DockFrontend
Returns:
the new bag

getSetting

public Setting getSetting(boolean entry)
Description copied from class: DockFrontend
Creates a new Setting which describes the current set of properties of this frontend. The setting contains information about the location of each Dockable.

Overrides:
getSetting in class DockFrontend
Parameters:
entry - true if only the information for an ordinary entry should be stored, false if the setting should contain as much information as possible.
Returns:
the setting
See Also:
DockFrontend.createSetting()

setSetting

public void setSetting(Setting setting,
                       boolean entry)
Description copied from class: DockFrontend
Changes the content of all root-stations according to setting.
This method may add new empty infos if it finds information for a non existing, non empty Dockable but whose key passes the methods of MissingDockableStrategy.

Overrides:
setSetting in class DockFrontend
Parameters:
setting - a new set of properties
entry - true if only information for an ordinary entry should be extracted, false if as much information as possible should be extracted. The value of this argument should be the same as was used when DockFrontend.getSetting(boolean) was called.