|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.split.SplitDockPerspective
public class SplitDockPerspective
Represents a SplitDockStation
in a Perspective
.
Nested Class Summary | |
---|---|
static class |
SplitDockPerspective.Entry
An entry in a tree, either a node or a leaf. |
static interface |
SplitDockPerspective.EntryListener
A listener that can be added to a SplitDockPerspective and that will receive events
whenever the tree of the perspective changes. |
static class |
SplitDockPerspective.Leaf
A leaf in a tree, describes one Dockable . |
static class |
SplitDockPerspective.Node
A node in a tree. |
class |
SplitDockPerspective.Root
A root in a tree. |
Constructor Summary | |
---|---|
SplitDockPerspective()
Creates a new perspective |
Method Summary | |
---|---|
void |
addListener(SplitDockPerspective.EntryListener listener)
Adds a listener to this perspective. |
void |
addPlaceholder(SplitDockPerspective.Entry destination,
Path placeholder)
Adds a placeholder to destination and makes sure at the same time that
placeholder is not used by any other node. |
PerspectiveDockable |
asDockable()
Returns the representation of this as PerspectiveDockable . |
PerspectiveStation |
asStation()
Returns the representation of this as PerspectiveStation |
protected PerspectiveDockable |
combine(PerspectiveDockable[] dockables,
PerspectiveDockable selection)
Combines several dockables to one dockable. |
protected void |
fireAdded(SplitDockPerspective.Entry parent,
SplitDockPerspective.Entry child)
Calls EntryListener#added(Entry, Entry) on all listeners that are currently
known to this perspective |
protected void |
fireRemoved(SplitDockPerspective.Entry parent,
SplitDockPerspective.Entry child)
Calls EntryListener#removed(Entry, Entry) on all listeners that are currently
known to this perspective |
PerspectiveDockable |
getDockable(int index)
Gets the index'th child of this station. |
int |
getDockableCount()
Gets the number of children this station has. |
SplitDockPathProperty |
getDockablePathProperty(PerspectiveDockable child)
Creates the location information for child that directly describes the path through the
tree to the element. |
DockableProperty |
getDockableProperty(PerspectiveDockable child,
PerspectiveDockable target)
Gets precise information about the location of a child of this station. |
java.lang.String |
getFactoryID()
Gets the identifier of the DockFactory that will be able to
understand the layout information this element generates. |
PerspectiveDockable |
getFullscreen()
Gets the element which is in fullscreen-mode |
SplitDockPerspective.Leaf |
getLeaf(PerspectiveDockable child)
Searches and returns the leaf that shows child . |
PerspectiveStation |
getParent()
Gets the parent DockStation of this Dockable . |
Path |
getPlaceholder()
Gets the placeholder which is associated with this Dockable . |
PlaceholderMap |
getPlaceholders()
Converts the contents of this station into a map of placeholders. |
SplitDockPerspective.Root |
getRoot()
Gets the root of the tree that is the layout of this station. |
boolean |
hasFullscreenAction()
Tells whether the SplitDockStation will attempt to create a fullscreen-action. |
protected SplitDockPerspective.EntryListener[] |
listeners()
Gets an array containing all the listeners of this perspective |
void |
read(PerspectiveSplitDockTree tree,
PerspectiveDockable fullscreen)
Reads the contents of tree and replaces any content of this perspective |
boolean |
remove(PerspectiveDockable dockable)
Removes a child of this station, can leave behind a placeholder. |
void |
removeListener(SplitDockPerspective.EntryListener listener)
Removes listener from this perspective |
void |
replace(PerspectiveDockable oldDockable,
PerspectiveDockable newDockable)
Replaces oldDockable by newDockable . |
void |
setFullscreen(PerspectiveDockable fullscreen)
Sets the element which is in fullscreen-mode, must be a child of this perspective |
void |
setHasFullscreenAction(boolean hasFullscreenAction)
Sets whether the SplitDockStation should create a fullscreen-action. |
void |
setParent(PerspectiveStation parent)
Sets the parent DockStation of this Dockable . |
void |
setPlaceholders(PlaceholderMap placeholders)
Informs this station of the content that it should show |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SplitDockPerspective()
Method Detail |
---|
public void addListener(SplitDockPerspective.EntryListener listener)
listener
- the new listener, not null
public void removeListener(SplitDockPerspective.EntryListener listener)
listener
from this perspective
listener
- the listener to removeprotected SplitDockPerspective.EntryListener[] listeners()
protected void fireRemoved(SplitDockPerspective.Entry parent, SplitDockPerspective.Entry child)
EntryListener#removed(Entry, Entry)
on all listeners that are currently
known to this perspective
parent
- the parent from which child
was removedchild
- the child which was removedprotected void fireAdded(SplitDockPerspective.Entry parent, SplitDockPerspective.Entry child)
EntryListener#added(Entry, Entry)
on all listeners that are currently
known to this perspective
parent
- the parent of the new elementchild
- the child that was addedpublic void read(PerspectiveSplitDockTree tree, PerspectiveDockable fullscreen)
tree
and replaces any content of this perspective
tree
- the tree that represents this perspectivefullscreen
- the one child that is currently in fullscreen-mode, can be null
public void setHasFullscreenAction(boolean hasFullscreenAction)
SplitDockStation
should create a fullscreen-action.
hasFullscreenAction
- whether to show a fullscreen actionpublic boolean hasFullscreenAction()
SplitDockStation
will attempt to create a fullscreen-action.
protected PerspectiveDockable combine(PerspectiveDockable[] dockables, PerspectiveDockable selection)
dockables
to one dockable.
dockables
- the element to combineselection
- the selected element, can be null
public PerspectiveDockable getFullscreen()
null
public void setFullscreen(PerspectiveDockable fullscreen)
fullscreen
- the element in fullscreenpublic SplitDockPerspective.Root getRoot()
null
public PerspectiveStation getParent()
PerspectiveDockable
DockStation
of this Dockable
.
getParent
in interface PerspectiveDockable
null
public Path getPlaceholder()
PerspectiveDockable
Dockable
.
getPlaceholder
in interface PerspectiveDockable
null
public void setParent(PerspectiveStation parent)
PerspectiveDockable
DockStation
of this Dockable
.
setParent
in interface PerspectiveDockable
parent
- the new parent, can be null
public PerspectiveDockable asDockable()
PerspectiveElement
this
as PerspectiveDockable
.
asDockable
in interface PerspectiveElement
asDockable
in interface PlaceholderListItem<PerspectiveDockable>
this
, a representation of this
or null
public PerspectiveStation asStation()
PerspectiveElement
this
as PerspectiveStation
asStation
in interface PerspectiveElement
this
, a representation of this
or null
public java.lang.String getFactoryID()
PerspectiveElement
DockFactory
that will be able to
understand the layout information this element generates.
getFactoryID
in interface PerspectiveElement
public PerspectiveDockable getDockable(int index)
PerspectiveStation
getDockable
in interface PerspectiveStation
index
- the index of a child
null
public int getDockableCount()
PerspectiveStation
getDockableCount
in interface PerspectiveStation
@Todo(compatibility=COMPATIBLE, priority=ENHANCEMENT, target=VERSION_1_1_1, description="implementation pending") public void setPlaceholders(PlaceholderMap placeholders)
PerspectiveStation
setPlaceholders
in interface PerspectiveStation
placeholders
- a map that was earlier created by PerspectiveStation.getPlaceholders()
@Todo(compatibility=COMPATIBLE, priority=ENHANCEMENT, target=VERSION_1_1_1, description="implementation pending") public PlaceholderMap getPlaceholders()
PerspectiveStation
getPlaceholders
in interface PerspectiveStation
public DockableProperty getDockableProperty(PerspectiveDockable child, PerspectiveDockable target)
PerspectiveStation
getDockableProperty
in interface PerspectiveStation
child
- a child of this station, this childs location is askedtarget
- an optional hint telling for which dockable the location information
will be used, can be null
. This hint can be used to find a placeholder
that should be part of the result.
public SplitDockPathProperty getDockablePathProperty(PerspectiveDockable child)
child
that directly describes the path through the
tree to the element.
child
- the element whose location is searched
null
if child
was not foundpublic boolean remove(PerspectiveDockable dockable)
PerspectiveStation
remove
in interface PerspectiveStation
dockable
- the element to remove
true
if dockable
was removed, false
otherwisepublic void replace(PerspectiveDockable oldDockable, PerspectiveDockable newDockable)
PerspectiveStation
oldDockable
by newDockable
. This method should behave the same way
is if oldDockable
was removed and newDockable
added at the same location.
replace
in interface PerspectiveStation
oldDockable
- some child of this stationnewDockable
- the replacement for oldDockable
public SplitDockPerspective.Leaf getLeaf(PerspectiveDockable child)
child
.
child
- some child of this station
child
or null
if not foundpublic void addPlaceholder(SplitDockPerspective.Entry destination, Path placeholder)
destination
and makes sure at the same time that
placeholder
is not used by any other node.
destination
- a child of this perspectiveplaceholder
- the placeholder to insert
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |