|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.facile.mode.AbstractLocationMode<M> bibliothek.gui.dock.facile.mode.MaximizedMode<M>
M
- the kind of areas this mode handlespublic class MaximizedMode<M extends MaximizedModeArea>
Dockable
s are maximized if they take up the whole space a frame
or a screen offers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class bibliothek.gui.dock.facile.mode.AbstractLocationMode |
---|
AbstractLocationMode.DockableHandle |
Field Summary | |
---|---|
static java.lang.String |
ICON_IDENTIFIER
the key used for the IconManager to read the Icon for the "maximize"-action |
static Path |
IDENTIFIER
unique identifier for this mode |
Constructor Summary | |
---|---|
protected |
MaximizedMode()
Empty default constructor. |
|
MaximizedMode(CControl control)
Creates a new mode |
|
MaximizedMode(DockController controller)
Creates a new mode. |
Method Summary | |
---|---|
protected void |
applyDone(LocationModeEvent event)
|
protected void |
applyStarting(LocationModeEvent event)
|
Location |
current(Dockable dockable)
Provides history information about the current state of dockable
in respect to this mode. |
void |
ensureNotHidden(Dockable dockable)
Ensures that no Dockable that has this mode hides dockable . |
ExtendedMode |
getExtendedMode()
Gets the unique identifier of this mode. |
MaximizedModeArea |
getMaximizeArea(Dockable dockable)
Searches the first MaximizedModeArea which is a parent
of dockable . |
MaximizedModeArea |
getMaximizeArea(DockStation station)
Searches the one MaximizedModeArea whose station is
station . |
Dockable |
getMaximizingElement(Dockable dockable)
Gets the element which must be maximized when the user requests that dockable is maximized. |
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. |
MaximizedModeArea |
getNextMaximizeArea(DockStation station)
Searches the MaximizedModeArea which either represents
station or its nearest parent. |
ModeSettingFactory<Location> |
getSettingFactory()
Gets a factory for creating new ModeSetting s. |
Path |
getUniqueIdentifier()
Gets a unique identifier, only this Mode must have this
identifier. |
LocationMode |
getUnmaximizedMode(Dockable dockable)
Assuming dockable is a maximized element, tells which
mode would be the preferred mode for unmaximization. |
boolean |
isCurrentMode(Dockable dockable)
If this method is not able to clearly find out whether dockable
has this mode, it returns false . |
boolean |
isDefaultMode(Dockable dockable)
Checks whether this mode is a default mode of dockable . |
void |
maximize(MaximizedModeArea area,
Dockable dockable,
AffectedSet set)
Ensures that dockable is maximized. |
void |
maximize(MaximizedModeArea area,
Dockable dockable,
Location history,
AffectedSet set)
Ensures that dockable is maximized. |
protected boolean |
process(Dockable dockable,
java.awt.event.KeyEvent event)
Invoked whenever a key is pressed, released or typed. |
void |
readSetting(ModeSetting<Location> setting)
Sets the properties of this mode. |
void |
runApply(Dockable dockable,
Location history,
AffectedSet set)
Called by AbstractLocationMode.apply(Dockable, Location, AffectedSet) after the LocationModeListener s
are informed. |
void |
setManager(LocationModeManager<?> manager)
Sets the manager which is using this mode. |
boolean |
switchMode(Dockable dockable)
Tries to switch the current mode of dockable to or from
the maximized mode. |
void |
unmaximize(Dockable dockable,
AffectedSet set)
Ensures that dockable is not maximized. |
void |
unmaximize(DockStation station,
AffectedSet affected)
Ensures that either the MaximizedModeArea station or its
nearest parent does not show a maximized element. |
void |
unmaximize(MaximizedModeArea area,
AffectedSet affected)
Ensures that area has no maximized child. |
void |
writeSetting(ModeSetting<Location> setting)
Gets the current properties of this mode in an independent way. |
Methods inherited from class bibliothek.gui.dock.facile.mode.AbstractLocationMode |
---|
add, addLocationModeListener, apply, createHandle, get, get, get, getActionsFor, getController, getDefaultArea, getManager, getRepresentation, isModeAvailable, isRepresenting, iterator, listeners, remove, removeLocationModeListener, setActionProvider, setController, setDefaultArea, setShouldAutoFocus, shouldAutoFocus |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Path IDENTIFIER
public static final java.lang.String ICON_IDENTIFIER
IconManager
to read the Icon
for the "maximize"-action
Constructor Detail |
---|
protected MaximizedMode()
AbstractLocationMode.setActionProvider(LocationModeActionProvider)
to complete
initialization of this mode.
public MaximizedMode(CControl control)
control
- the control in whose realm this mode will workpublic MaximizedMode(DockController controller)
controller
- the owner of this modeMethod Detail |
---|
public void setManager(LocationModeManager<?> manager)
LocationMode
setManager
in interface LocationMode
setManager
in class AbstractLocationMode<M extends MaximizedModeArea>
manager
- the manager or null
public Path getUniqueIdentifier()
Mode
Mode
must have this
identifier. Identifiers with the first segment being "dock" are
reserved for this framework, clients may choose any other identifiers.
null
, should contain at least
one segment.public ExtendedMode getExtendedMode()
LocationMode
public void runApply(Dockable dockable, Location history, AffectedSet set)
AbstractLocationMode
AbstractLocationMode.apply(Dockable, Location, AffectedSet)
after the LocationModeListener
s
are informed. Applies this mode to dockable
.
runApply
in class AbstractLocationMode<M extends MaximizedModeArea>
dockable
- the element whose mode becomes this
history
- history information that was returned by this mode when calling
Mode.current(Dockable)
the last time.set
- this method has to store all Dockable
s which might have changed their
mode in the set.public Location current(Dockable dockable)
Mode
dockable
in respect to this mode.
dockable
- the element
Mode.apply(Dockable, Object, AffectedSet)
public boolean isCurrentMode(Dockable dockable)
LocationMode
dockable
has this mode, it returns false
. The LocationModeManager
will ask again with the parent station of dockable
.
dockable
- some dockable, not null
dockable
is in this
modepublic boolean isDefaultMode(Dockable dockable)
Mode
dockable
. A
default mode is a mode that is choosen per default, if no other mode
is selected. There should be only one default-mode per Dockable
.
dockable
- some dockable, not null
public LocationMode getUnmaximizedMode(Dockable dockable)
dockable
is a maximized element, tells which
mode would be the preferred mode for unmaximization.
dockable
- some child
null
public void maximize(MaximizedModeArea area, Dockable dockable, AffectedSet set)
dockable
is maximized.
area
- the future parent of dockable
, can be null
dockable
- the element that should be made maximizedset
- a set of Dockable
s which will be filled by the
elements that change their mode because of this methodpublic void maximize(MaximizedModeArea area, Dockable dockable, Location history, AffectedSet set)
dockable
is maximized.
area
- the future parent of dockable
, can be null
dockable
- the element that should be made maximizedhistory
- the expected location of dockable
after this method has finished, can be null
.
No guarantees are given that the final location matches history
.set
- a set of Dockable
s which will be filled by the
elements that change their mode because of this methodpublic void unmaximize(Dockable dockable, AffectedSet set)
dockable
is not maximized. Does nothing if the parent
MaximizedModeArea
of dockable
has not maximized dockable
or if the LocationModeManager
does not know dockable
.
dockable
- the element that might be maximized currentlyset
- a set of Dockable
s which will be filled by the
elements that change their mode because of this methodpublic MaximizedModeArea getNextMaximizeArea(DockStation station)
MaximizedModeArea
which either represents
station
or its nearest parent.
station
- some station
null
public void unmaximize(DockStation station, AffectedSet affected)
MaximizedModeArea
station
or its
nearest parent does not show a maximized element.
station
- an area or a child of an areaaffected
- elements whose mode changes will be added to this setpublic void unmaximize(MaximizedModeArea area, AffectedSet affected)
area
has no maximized child.
area
- some areaaffected
- the element whose mode might changepublic void ensureNotHidden(Dockable dockable)
LocationMode
Dockable
that has this mode hides dockable
.
Note that dockable
may or may not be in this mode.
dockable
- the element which must not be hiddenpublic MaximizedModeArea getMaximizeArea(Dockable dockable)
MaximizedModeArea
which is a parent
of dockable
. This method will never return
dockable
itself.
dockable
- the element whose maximize area is searched
null
public MaximizedModeArea getMaximizeArea(DockStation station)
MaximizedModeArea
whose station is
station
.
station
- the station whose area is searched
null
if not foundpublic Dockable getMaximizingElement(Dockable dockable)
dockable
is maximized.
dockable
- some element, not null
dockable
itself, not null
public Dockable getMaximizingElement(Dockable old, Dockable dockable)
old
is currently
maximized, and dockable
is or will not be maximized.
old
- some elementdockable
- some element, might be old
dockable
is
no longer maximized, can be null
protected void applyStarting(LocationModeEvent event)
protected void applyDone(LocationModeEvent event)
public ModeSettingFactory<Location> getSettingFactory()
Mode
ModeSetting
s.
null
public void writeSetting(ModeSetting<Location> setting)
Mode
setting
- a ModeSetting
with the same id as this Mode
. This setting
was created by a ModeSettingFactory
with the same id as this Mode
.public void readSetting(ModeSetting<Location> setting)
Mode
ModeSetting
that has been created by the current
ModeSettingFactory
setting
- the new set of properties, not null
protected boolean process(Dockable dockable, java.awt.event.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.public boolean switchMode(Dockable dockable)
dockable
to or from
the maximized mode.
dockable
- the element whose mode is to be changed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |