|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.support.action.ModeTransitionManager<StateManager.Location>
bibliothek.gui.dock.facile.action.StateManager
bibliothek.gui.dock.common.intern.CStateManager
public class CStateManager
A manager that can change the extended-state of CDockable
s
Nested Class Summary |
---|
Nested classes/interfaces inherited from class bibliothek.gui.dock.facile.action.StateManager |
---|
StateManager.Location, StateManager.LocationConverter, StateManager.StateManagerSetting<B> |
Field Summary |
---|
Fields inherited from class bibliothek.gui.dock.facile.action.StateManager |
---|
EXTERNALIZED, ICON_MANAGER_KEY_EXTERNALIZE, ICON_MANAGER_KEY_MAXIMIZE, ICON_MANAGER_KEY_MINIMIZE, ICON_MANAGER_KEY_NORMALIZE, MAXIMIZED, MINIMIZED, NORMALIZED |
Constructor Summary | |
---|---|
CStateManager(CControlAccess control)
Creates a new manager |
Method Summary | |
---|---|
protected String[] |
availableModes(String current,
Dockable dockable)
Makes a list of all modes dockable can be going into. |
CDockable.ExtendedMode |
childsExtendedMode(DockStation station)
Finds out which mode a child of station would have. |
void |
ensureValidLocation(CDockable dockable)
Ensures that dockable is in a valid location (a mode that
is enabled by dockable and in the correct CWorkingArea ),
perhaps changes the current location to ensure that. |
protected CWorkingArea |
getAreaOf(Dockable dockable)
Searches dockable and its parent for the first CWorkingArea . |
protected CContentArea |
getCenterOf(Dockable dockable)
Searches the CContentArea on which dockable is shown. |
protected DockStation |
getDefaultNormal(Dockable dockable)
Gets the DockStation which should be used as default normal
parent for dockable . |
CLocation |
getLocation(Dockable dockable)
Gets an element describing the location of dockable as
good as possible. |
CMaximizeBehavior |
getMaximizeBehavior()
Gets the currently used maximize-behavior. |
protected Dockable |
getMaximizingElement(Dockable dockable)
Gets the element which must be maximized when the user requests that dockable is maximized. |
protected Dockable |
getMaximizingElement(Dockable old,
Dockable dockable)
Gets the element which would be maximized if old is currently
maximized, and dockable is or will not be maximized. |
CDockable.ExtendedMode |
getMode(Dockable dockable)
Gets the mode dockable is currently into. |
void |
normalizeAllWorkingAreaChildren()
Ensures that all CDockable s which have a CWorkingArea as
parent, are normalized. |
protected boolean |
process(Dockable dockable,
KeyEvent event)
Invoked whenever a key is pressed, released or typed. |
void |
rebuild(Dockable dockable)
Called when the list of actions for dockable has to be
rebuild. |
void |
setLocation(CommonDockable dockable,
CLocation location)
Tries to set the location of dockable . |
void |
setMaximizeBehavior(CMaximizeBehavior maximizeBehavior)
Sets a new CMaximizeBehavior . |
void |
setMode(Dockable dockable,
CDockable.ExtendedMode mode)
Changes the mode of dockable . |
protected void |
transition(String oldMode,
String newMode,
Dockable dockable)
Called when a Dockable has to change from one mode to another mode.Subclasses might use ModeTransitionManager.getProperties(String, Dockable) and
ModeTransitionManager.setProperties(String, Dockable, Object) to get or store
properties associated with the mode. |
Methods inherited from class bibliothek.gui.dock.facile.action.StateManager |
---|
add, add, add, childsMode, createSetting, currentLocation, currentMode, currentModeSharp, getDefaultMode, getRootName, getSetting, getStation, init, isOnTransition, putMode, remove, setSetting, store, store, transitionDuringRead |
Methods inherited from class bibliothek.gui.dock.support.action.ModeTransitionManager |
---|
add, getDockables, getIngoingAction, getName, getOutgoingAction, getProperties, getSource, goIn, goOut, history, previousMode, put, putIngoingAction, putMode, putOutgoingAction, react, read, rebuildAll, remove, setMode, setProperties, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CStateManager(CControlAccess control)
control
- internal access to the CControl
that uses this managerMethod Detail |
---|
protected Dockable getMaximizingElement(Dockable dockable)
StateManager
dockable
is maximized.
getMaximizingElement
in class StateManager
dockable
- some element, not null
dockable
itself, not null
protected Dockable getMaximizingElement(Dockable old, Dockable dockable)
StateManager
old
is currently
maximized, and dockable
is or will not be maximized.
getMaximizingElement
in class StateManager
old
- some elementdockable
- some element, might be old
dockable
is
no longer maximized, can be null
public void setMaximizeBehavior(CMaximizeBehavior maximizeBehavior)
CMaximizeBehavior
. The behavior decides what happens
when the user maximizes or un-maximizes a CDockable
.
maximizeBehavior
- the new behavior
NullPointerException
- if maximizeBehavior
is null
public CMaximizeBehavior getMaximizeBehavior()
setMaximizeBehavior(CMaximizeBehavior)
public void setMode(Dockable dockable, CDockable.ExtendedMode mode)
dockable
.
dockable
- an element whose mode will be changedmode
- the new modepublic CDockable.ExtendedMode getMode(Dockable dockable)
dockable
is currently into.
dockable
- the questioned element
dockable
public CDockable.ExtendedMode childsExtendedMode(DockStation station)
station
would have.
station
- the station
null
if the station is unknownpublic void setLocation(CommonDockable dockable, CLocation location)
dockable
.
dockable
- the element to movelocation
- the new location of dockable
public CLocation getLocation(Dockable dockable)
dockable
as
good as possible.
dockable
- the element whose location should be searched
null
if no location was foundprotected CWorkingArea getAreaOf(Dockable dockable)
dockable
and its parent for the first CWorkingArea
.
dockable
- the element whose working area is searched
null
protected CContentArea getCenterOf(Dockable dockable)
CContentArea
on which dockable
is shown.
dockable
- the element whose center is searched
null
protected String[] availableModes(String current, Dockable dockable)
ModeTransitionManager
dockable
can be going into.
availableModes
in class StateManager
current
- the mode dockable
is currently indockable
- the element whose available modes are searched
public void ensureValidLocation(CDockable dockable)
dockable
is in a valid location (a mode that
is enabled by dockable
and in the correct CWorkingArea
),
perhaps changes the current location to ensure that.
dockable
- the element which might not be in a valid locationpublic void normalizeAllWorkingAreaChildren()
CDockable
s which have a CWorkingArea
as
parent, are normalized.
protected void transition(String oldMode, String newMode, Dockable dockable)
ModeTransitionManager
Dockable
has to change from one mode to another mode.ModeTransitionManager.getProperties(String, Dockable)
and
ModeTransitionManager.setProperties(String, Dockable, Object)
to get or store
properties associated with the mode.
transition
in class StateManager
oldMode
- the mode dockable
is currently innewMode
- the mode dockable
is going to bedockable
- the element that changes its modeprotected DockStation getDefaultNormal(Dockable dockable)
StateManager
DockStation
which should be used as default normal
parent for dockable
.
getDefaultNormal
in class StateManager
dockable
- some Dockable
dockable
public void rebuild(Dockable dockable)
ModeTransitionManager
dockable
has to be
rebuild.
rebuild
in class ModeTransitionManager<StateManager.Location>
dockable
- the element whose actions are searchedprotected boolean process(Dockable dockable, KeyEvent event)
dockable
- the element to which the event belongsevent
- the event
true
if the event has been processed, false
if the event was not used up.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |