public class SplitDockPerspective extends Object implements PerspectiveDockable, PerspectiveStation
SplitDockStation in a Perspective.| Modifier and Type | Class and Description |
|---|---|
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 and Description |
|---|
SplitDockPerspective()
Creates a new perspective
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public void addListener(SplitDockPerspective.EntryListener listener)
listener - the new listener, not nullpublic void removeListener(SplitDockPerspective.EntryListener listener)
listener from this perspectivelistener - 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 perspectiveparent - the parent from which child was removedchild - the child which was removedprotected void fireAdded(SplitDockPerspective.Entry parent, SplitDockPerspective.Entry child)
SplitDockPerspective.EntryListener.added(SplitDockPerspective.Entry, SplitDockPerspective.Entry) on all listeners that are currently
known to this perspectiveparent - the parent of the new elementchild - the child that was addedpublic void read(PerspectiveSplitDockTree tree, PerspectiveDockable fullscreen)
tree and replaces any content of this perspectivetree - 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 nullpublic 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 PerspectiveStationasStation 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)
PerspectiveStationgetDockable in interface PerspectiveStationindex - the index of a childnullpublic int getDockableCount()
PerspectiveStationgetDockableCount in interface PerspectiveStationpublic void setPlaceholders(PlaceholderMap placeholders)
PerspectiveStationsetPlaceholders in interface PerspectiveStationplaceholders - a map that was earlier created by PerspectiveStation.getPlaceholders()public PlaceholderMap getPlaceholders()
PerspectiveStationgetPlaceholders in interface PerspectiveStationpublic DockableProperty getDockableProperty(PerspectiveDockable child, PerspectiveDockable target)
PerspectiveStationgetDockableProperty in interface PerspectiveStationchild - a child of this station, this child's 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 searchednull if child was not foundpublic boolean remove(PerspectiveDockable dockable)
PerspectiveStationremove in interface PerspectiveStationdockable - the element to removetrue if dockable was removed, false otherwisepublic 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 stationchild 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 insertCopyright © 2017 Docking Frames. All rights reserved.