|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.support.mode.ModeManager<Location,M>
bibliothek.gui.dock.facile.mode.LocationModeManager<CLocationMode>
bibliothek.gui.dock.common.mode.CLocationModeManager
public class CLocationModeManager
LocationModeManager providing additional methods for working with
CLocations, CommonDockables and other items specific to the
common project.
| Field Summary | |
|---|---|
static String |
ICON_MANAGER_KEY_EXTERNALIZE
the key used for the IconManager to read the Icon for the "externalize"-action |
static String |
ICON_MANAGER_KEY_MAXIMIZE
the key used for the IconManager to read the Icon for the "maximize"-action |
static String |
ICON_MANAGER_KEY_MINIMIZE
the key used for the IconManager to read the Icon for the "minimize"-action |
static String |
ICON_MANAGER_KEY_NORMALIZE
the key used for the IconManager to read the Icon for the "normalize"-action |
static String |
ICON_MANAGER_KEY_UNEXTERNALIZE
the key used for the IconManager to read the Icon for the "unexternalize"-action |
static String |
ICON_MANAGER_KEY_UNMAXIMIZE_EXTERNALIZED
the key used for the IconManager to read the Icon for the "unmaximize externalized"-action |
| Fields inherited from class bibliothek.gui.dock.facile.mode.LocationModeManager |
|---|
DOUBLE_CLICK_STRATEGY, MODE_ENABLEMENT |
| Constructor Summary | |
|---|---|
CLocationModeManager(CControlAccess control)
Creates a new manager. |
|
| Method Summary | ||
|---|---|---|
ExtendedMode |
childsExtendedMode(DockStation parent)
Guesses the result of LocationModeManager.getCurrentMode(Dockable) once a Dockable is
dropped onto DockStation. |
|
protected boolean |
createEntryDuringRead(String key)
Tells whether an entry for a missing Dockable should be created. |
|
|
createModeSettings(ModeSettingsConverter<Location,B> converter)
Creates the empty set of settings for this ModeManager. |
|
boolean |
ensureBasicModes()
Ensures that all dockables are in a basic mode. This method returns immediately if in layouting mode |
|
void |
ensureValidLocation(CDockable dockable)
This method compares the current mode of dockable with its
availability set. |
|
void |
ensureValidLocation(Dockable dockable)
Empty method evaluating the correct location of a Dockable. |
|
protected CStation<?> |
getAreaOf(Dockable dockable)
Searches dockable and its parent for the first CStation
that is a working area. |
|
CLocation |
getDropLocation(CStation<?> station)
Tries to find the "optimal spot" where to put a new child onto station. |
|
CExternalizedMode |
getExternalizedMode()
Direct access to the mode handling "externalized" Dockables. |
|
CLocation |
getLocation(Dockable dockable)
Gets an element describing the location of dockable as
good as possible. |
|
CLocation |
getLocation(Dockable dockable,
ExtendedMode mode)
Assuming that dockable is currently not in mode mode,
then this method searches for the previously stored location of dockable. |
|
CMaximizedMode |
getMaximizedMode()
Direct access to the mode handling "maximized" Dockables. |
|
CMinimizedMode |
getMinimizedMode()
Direct access to the mode handling "minimized" Dockables. |
|
CNormalMode |
getNormalMode()
Direct access to the mode handling "normal" Dockables. |
|
void |
readSettings(ModeSettings<Location,?> settings)
Reads the contents of settings and stores it. |
|
Runnable |
readSettings(ModeSettings<Location,?> settings,
UndoableModeSettings pending)
Reads the contents of settings, creates new entries if either
ModeManager.createEntryDuringRead(String) or if pending allows the setting
to be undone if not needed. |
|
void |
remove(Dockable dockable)
Removes the properties that belong to dockable. |
|
void |
resetWorkingAreaChildren()
Updates the location of all dockables that should be on a working-area and that are currently in a mode that does not support working-areas. |
|
void |
setLocation(Dockable dockable,
CLocation location)
Tries to set the location of dockable. |
|
void |
setLocation(Dockable dockable,
ExtendedMode mode,
CLocation location)
Sets the default location of dockable when going into
mode. |
|
| Methods inherited from class bibliothek.gui.dock.facile.mode.LocationModeManager |
|---|
addListener, apply, apply, applyDuringRead, delayedRefresh, destroy, ensureNotHidden, getCurrentAction, getCurrentMode, getDoubleClickStrategy, getGroupBehavior, getMode, getRepresentations, getSharedActions, isLayouting, isModeAvailable, isModeHidden, removeListener, runLayoutTransaction, setDoubleClickStrategy, setGroupBehavior, setLocationAside, setMode, updateEnablement |
| Methods inherited from class bibliothek.gui.dock.support.mode.ModeManager |
|---|
add, addAffected, addEmpty, addModeManagerListener, addToModeHistory, apply, apply, apply, apply, apply, createSettings, fireAdded, fireAdded, fireModeChanged, fireRemoved, fireRemoved, getController, getDefaultMode, getDoubleClickTarget, getFactories, getHistory, getHistoryRewriter, getKey, getMode, getModeHistory, getPreviousMode, getProperties, getPropertyHistory, isEmpty, isOnContinuous, isOnTransaction, isRegistered, listDockables, listeners, modes, put, putFactory, putMode, rebuild, rebuildAll, reduceToEmpty, refresh, refresh, removeEmpty, removeMode, removeModeManagerListener, runTransaction, runTransaction, runTransaction, runTransaction, setHistoryRewriter, setProperties, store, store, toString, writeSettings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ICON_MANAGER_KEY_MINIMIZE
IconManager to read the Icon for the "minimize"-action
public static final String ICON_MANAGER_KEY_MAXIMIZE
IconManager to read the Icon for the "maximize"-action
public static final String ICON_MANAGER_KEY_NORMALIZE
IconManager to read the Icon for the "normalize"-action
public static final String ICON_MANAGER_KEY_EXTERNALIZE
IconManager to read the Icon for the "externalize"-action
public static final String ICON_MANAGER_KEY_UNEXTERNALIZE
IconManager to read the Icon for the "unexternalize"-action
public static final String ICON_MANAGER_KEY_UNMAXIMIZE_EXTERNALIZED
IconManager to read the Icon for the "unmaximize externalized"-action
| Constructor Detail |
|---|
public CLocationModeManager(CControlAccess control)
control - the control in whose realm this manager works| Method Detail |
|---|
public CNormalMode getNormalMode()
Dockables.
public CMaximizedMode getMaximizedMode()
Dockables.
public CMinimizedMode getMinimizedMode()
Dockables.
public CExternalizedMode getExternalizedMode()
Dockables.
protected boolean createEntryDuringRead(String key)
ModeManagerDockable should be created.
This will result in a call to ModeManager.addEmpty(String) during
ModeManager.readSettings(ModeSettings).
The default implementation returns always false.
createEntryDuringRead in class ModeManager<Location,CLocationMode>key - the key for which to create a new entry
true if an entry should be createdpublic void remove(Dockable dockable)
ModeManagerdockable.
remove in class ModeManager<Location,CLocationMode>dockable - the element to removepublic <B> ModeSettings<Location,B> createModeSettings(ModeSettingsConverter<Location,B> converter)
ModeManagerModeManager. Subclasses
may override this method to use another set of settings. This method does
not need to call ModeSettings.addFactory(ModeSettingFactory).
createModeSettings in class ModeManager<Location,CLocationMode>B - the intermediate formatconverter - converstion tool from this managers meta-data format to the
intermediate format.
public void readSettings(ModeSettings<Location,?> settings)
ModeManagersettings and stores it.
readSettings in class ModeManager<Location,CLocationMode>settings - the settings to read
public Runnable readSettings(ModeSettings<Location,?> settings,
UndoableModeSettings pending)
ModeManagersettings, creates new entries if either
ModeManager.createEntryDuringRead(String) or if pending allows the setting
to be undone if not needed.
readSettings in class ModeManager<Location,CLocationMode>settings - the settings to readpending - undoable settings, can be null
pending
did advise so, null if pending was null
public void setLocation(Dockable dockable,
CLocation location)
dockable. Does nothing if
location is invalid or requires information that is
not available. If dockable is a CommonDockable and
the mode respects working-areas,
then the working-area is set or removed depending on the value of CStation.isWorkingArea().
dockable - the element to movelocation - the new location of dockable
public void setLocation(Dockable dockable,
ExtendedMode mode,
CLocation location)
dockable when going into
mode. The properties set here will be overridden
as soon as the user drags dockable to another location (within
the same mode) or dockable is removed permanently.dockable is already in
mode. There is also no effect if dockable
has not been registered at the CLocationModeManager.location
and mode belong to each other.
dockable - the element whose location will be setmode - the mode for which the location is to be set or nulllocation - the new location
IllegalArgumentException - if either argument is null or
if CLocation.findRoot() or CLocation.findProperty() returns
nullpublic CLocation getLocation(Dockable dockable)
dockable as
good as possible.
dockable - the element whose location should be searched
null if no location was found
public CLocation getLocation(Dockable dockable,
ExtendedMode mode)
dockable is currently not in mode mode,
then this method searches for the previously stored location of dockable.
Note that this method can't tell where dockable would be
shown if it never was in that mode and the client never specified the
location.
dockable - the dockable whose location is searchedmode - the mode which might be taken by dockable
null
IllegalArgumentException - if any argument is nullpublic CLocation getDropLocation(CStation<?> station)
station. In this
case the optimal spot is CLocation.aside() the latest focused child of station.
station - the station where a CDockable is about to be dropped onto
public void ensureValidLocation(Dockable dockable)
LocationModeManagerDockable. To be
overridden by subclasses to handle elements which have additional restrictions.
ensureValidLocation in class LocationModeManager<CLocationMode>dockable - the element to checkpublic void ensureValidLocation(CDockable dockable)
dockable with its
availability set. If the current mode is not available, then dockable
is put into another mode (usually the normal mode).layouting mode
dockable - the element whose mode is to be checkedpublic boolean ensureBasicModes()
layouting mode
true if at least one element was affected by changes,
false if nothing happened.public void resetWorkingAreaChildren()
public ExtendedMode childsExtendedMode(DockStation parent)
LocationModeManager.getCurrentMode(Dockable) once a Dockable is
dropped onto DockStation. If more than one mode is using
parent, then the guess might not always be correct.
parent - some station
null if no guess can be madeprotected CStation<?> getAreaOf(Dockable dockable)
dockable and its parent for the first CStation
that is a working area.
dockable - the element whose working area is searched
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||