|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.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
CLocation
s, CommonDockable
s 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. |
|
protected
|
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. |
|
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. |
|
CExternalizedMode |
getExternalizedMode()
Direct access to the mode handling "externalized" Dockable s. |
|
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" Dockable s. |
|
CMinimizedMode |
getMinimizedMode()
Direct access to the mode handling "minimized" Dockable s. |
|
CNormalMode |
getNormalMode()
Direct access to the mode handling "normal" Dockable s. |
|
void |
readSettings(ModeSettings<Location,?> settings)
|
|
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, applyDuringRead, destroy, ensureNotHidden, getCurrentMode, getDoubleClickStrategy, getMode, getRepresentations, isLayouting, isModeAvailable, removeListener, runLayoutTransaction, setDoubleClickStrategy, setMode, updateEnablement |
Methods inherited from class bibliothek.gui.dock.support.mode.ModeManager |
---|
add, addAffected, addEmpty, addModeManagerListener, apply, apply, apply, apply, apply, apply, createSettings, fireAdded, fireAdded, fireModeChanged, fireRemoved, fireRemoved, getController, getDefaultMode, getDoubleClickTarget, 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, 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 worksMethod Detail |
---|
public CNormalMode getNormalMode()
Dockable
s.
public CMaximizedMode getMaximizedMode()
Dockable
s.
public CMinimizedMode getMinimizedMode()
Dockable
s.
public CExternalizedMode getExternalizedMode()
Dockable
s.
protected boolean createEntryDuringRead(String key)
ModeManager
Dockable
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)
ModeManager
dockable
.
remove
in class ModeManager<Location,CLocationMode>
dockable
- the element to removeprotected <B> ModeSettings<Location,B> createModeSettings(ModeSettingsConverter<Location,B> converter)
ModeManager
ModeManager
. 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)
readSettings
in class ModeManager<Location,CLocationMode>
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 null
location
- the new location
IllegalArgumentException
- if either argument is null
or
if CLocation.findRoot()
or CLocation.findProperty()
returns
null
public CLocation getLocation(Dockable dockable)
dockable
as
good as possible.
dockable
- the element whose location should be searched
null
if no location was foundpublic 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 null
public void ensureValidLocation(Dockable dockable)
LocationModeManager
Dockable
. 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 |