|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.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 SplitDockPerspective.EntryListener.added(SplitDockPerspective.Entry, SplitDockPerspective.Entry) on all listeners that are currently
known to this perspective |
protected void |
fireRemoved(SplitDockPerspective.Entry parent,
SplitDockPerspective.Entry child)
Calls SplitDockPerspective.EntryListener.removed(SplitDockPerspective.Entry, SplitDockPerspective.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. |
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 nullpublic 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)
SplitDockPerspective.EntryListener.removed(SplitDockPerspective.Entry, SplitDockPerspective.Entry) on all listeners that are currently
known to this perspective
parent - the parent from which child was removedchild - the child which was removed
protected void fireAdded(SplitDockPerspective.Entry parent,
SplitDockPerspective.Entry child)
SplitDockPerspective.EntryListener.added(SplitDockPerspective.Entry, SplitDockPerspective.Entry) on all listeners that are currently
known to this perspective
parent - the parent of the new elementchild - the child that was added
public 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 nullpublic 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()
nullpublic void setFullscreen(PerspectiveDockable fullscreen)
fullscreen - the element in fullscreenpublic SplitDockPerspective.Root getRoot()
nullpublic PerspectiveStation getParent()
PerspectiveDockableDockStation of this Dockable.
getParent in interface PerspectiveDockablenullpublic Path getPlaceholder()
PerspectiveDockableDockable.
getPlaceholder in interface PerspectiveDockablenullpublic void setParent(PerspectiveStation parent)
PerspectiveDockableDockStation of this Dockable.
setParent in interface PerspectiveDockableparent - the new parent, can be nullpublic PerspectiveDockable asDockable()
PerspectiveElementthis as PerspectiveDockable.
asDockable in interface PerspectiveElementasDockable in interface PlaceholderListItem<PerspectiveDockable>this, a representation of this or nullpublic PerspectiveStation asStation()
PerspectiveElementthis as PerspectiveStation
asStation in interface PerspectiveElementthis, a representation of this or nullpublic String getFactoryID()
PerspectiveElementDockFactory that will be able to
understand the layout information this element generates.
getFactoryID in interface PerspectiveElementpublic PerspectiveDockable getDockable(int index)
PerspectiveStation
getDockable in interface PerspectiveStationindex - the index of a child
nullpublic int getDockableCount()
PerspectiveStation
getDockableCount in interface PerspectiveStationpublic void setPlaceholders(PlaceholderMap placeholders)
PerspectiveStation
setPlaceholders in interface PerspectiveStationplaceholders - a map that was earlier created by PerspectiveStation.getPlaceholders()public PlaceholderMap getPlaceholders()
PerspectiveStation
getPlaceholders in interface PerspectiveStation
public DockableProperty getDockableProperty(PerspectiveDockable child,
PerspectiveDockable target)
PerspectiveStation
getDockableProperty in interface PerspectiveStationchild - 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 PerspectiveStationdockable - the element to remove
true if dockable was removed, false otherwise
public void replace(PerspectiveDockable oldDockable,
PerspectiveDockable newDockable)
PerspectiveStationoldDockable by newDockable. This method should behave the same way
is if oldDockable was removed and newDockable added at the same location.
replace in interface PerspectiveStationoldDockable - some child of this stationnewDockable - the replacement for oldDockablepublic SplitDockPerspective.Leaf getLeaf(PerspectiveDockable child)
child.
child - some child of this station
child or null if not found
public 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 | |||||||||