|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
H
- class storing history informationpublic interface Mode<H>
A mode describes a state in which a Dockable
can be. A Dockable
can be in exactly one Mode
at a time. Notice that the mode may
change through events that are not registered or influenced by this
mode.
Method Summary | |
---|---|
boolean |
apply(Dockable dockable,
H history,
AffectedSet set)
Applies this mode to dockable . |
H |
current(Dockable dockable)
Provides history information about the current state of dockable
in respect to this mode. |
DockActionSource |
getActionsFor(Dockable dockable,
Mode<H> mode)
Gets a DockActionSource which should be shown on dockable
which is currently in mode . |
ModeSettingFactory<H> |
getSettingFactory()
Gets a factory for creating new ModeSetting s. |
Path |
getUniqueIdentifier()
Gets a unique identifier, only this Mode must have this
identifier. |
boolean |
isCurrentMode(Dockable dockable)
Tells whether dockable fulfills the requirements of
this mode, meaning whether dockable has this mode. |
boolean |
isDefaultMode(Dockable dockable)
Checks whether this mode is a default mode of dockable . |
void |
readSetting(ModeSetting<H> setting)
Sets the properties of this mode. |
void |
writeSetting(ModeSetting<H> setting)
Gets the current properties of this mode in an independent way. |
Method Detail |
---|
DockActionSource getActionsFor(Dockable dockable, Mode<H> mode)
DockActionSource
which should be shown on dockable
which is currently in mode
. This method will be called
every time when dockable
changes its mode.
dockable
- some element, not null
mode
- the mode of dockable
, not null
dockable
, can be null
Path getUniqueIdentifier()
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.boolean apply(Dockable dockable, H history, AffectedSet set)
dockable
. This method may fail for example because a DockAcceptance
does prevent dockable
from being moved.
dockable
- the element whose mode becomes this
history
- history information that was returned by this mode
on its last call to current(Dockable)
. May be null
if this mode was never applied or returns null
on current(Dockable)
.set
- this method has to store all Dockable
s which might have changed their
mode in the set.
true
if dockable
was succesfully moved on its parent or to a new parent,
or false
if dockable
did not change its locationH current(Dockable dockable)
dockable
in respect to this mode.
dockable
- the element
apply(Dockable, Object, AffectedSet)
boolean isDefaultMode(Dockable dockable)
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
boolean isCurrentMode(Dockable dockable)
dockable
fulfills the requirements of
this mode, meaning whether dockable
has this mode. There
should be only at most one mode which returns true
for this
question. Please note, the mode selected in the ModeManager
may
be out of date, and should not be considered when checking the
current mode.
dockable
- some dockable, not null
dockable
is in this
modevoid writeSetting(ModeSetting<H> setting)
setting
- a ModeSetting
with the same id as this Mode
. This setting
was created by a ModeSettingFactory
with the same id as this Mode
.void readSetting(ModeSetting<H> setting)
ModeSetting
that has been created by the current
ModeSettingFactory
setting
- the new set of properties, not null
ModeSettingFactory<H> getSettingFactory()
ModeSetting
s.
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |