|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DockableGrouping
A DockableGrouping
is an algorithm that rewrites the location of a Dockable
,
allowing clients to group several dockables together.
While the name of the interface implies that dockables should be grouped together, nothing
prevents a client from writing an implementation that does the opposite, e.g. tries to distribute
Dockable
s.
The two most common events that may be interesting for a DockableGrouping
, when a
the path of a dockable changes
, and
when a dockable gains focus
, are automatically forwarded to this interface.
Strategies that require more events, have to add the observers they need themselves to the right objects.
Method Summary | |
---|---|
void |
focusGained(Dockable dockable)
Called after dockable has gained the focus. |
ExtendedMode |
getInitialMode(Dockable dockable)
Tries to find out how to display dockable initially. |
Location |
getStoredLocation(Dockable dockable,
CLocationMode mode,
Location history)
Called right after an old location of dockable for mode was read. |
Location |
getValidatedLocation(Dockable dockable,
CLocationMode mode,
Location validatedHistory)
Called right before dockable is moved to a new location. |
void |
hierarchyChanged(Dockable dockable)
Always called after dockable has changed its location. |
Method Detail |
---|
ExtendedMode getInitialMode(Dockable dockable)
dockable
initially.
dockable
- an invisible dockable that is about to be made visible, and that does not have a location defined.
dockable
, or null
Location getStoredLocation(Dockable dockable, CLocationMode mode, Location history)
dockable
for mode
was read. The method
may change the location of dockable
by returning a new Location
object.getValidatedLocation(Dockable, CLocationMode, Location)
will be called
before dockable
actually is moved to a new location.
dockable
- the dockable whose location is about to be changedmode
- the target mode for dockable
history
- the old location of dockable
, may be null
history
, or a newly created location. Also null
is valid result.
This method is allowed to return an invalid location, invalid locations however will be replaced with valid location.Location getValidatedLocation(Dockable dockable, CLocationMode mode, Location validatedHistory)
dockable
is moved to a new location.
dockable
- the Dockable
whose location is about to be changedmode
- the target mode for dockable
validatedHistory
- a validated location. This may be the result of getStoredLocation(Dockable, CLocationMode, Location)
if that result already was a valid location, or it may be a new location, may be null
validatedHistory
, or a newly created location. Also null
is a valid result.
This method should return only valid locations, invalid locations will lead the framework to place the dockable at some
default locationvoid hierarchyChanged(Dockable dockable)
dockable
has changed its location. This method will be called for any Dockable
that
changed its location, even if getStoredLocation(Dockable, CLocationMode, Location)
or getValidatedLocation(Dockable, CLocationMode, Location)
was never called.DockHierarchyListener
would have been added to dockable
dockable
- a Dockable
that has a new placevoid focusGained(Dockable dockable)
dockable
has gained the focus.
dockable
- the element that just gained the focus
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |