|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.stack.StackDockPerspective
public class StackDockPerspective
A representation of a StackDockStation in a Perspective.
| Constructor Summary | |
|---|---|
StackDockPerspective()
Creates a new empty StackDockPerspective. |
|
StackDockPerspective(PerspectiveDockable[] children,
PerspectiveDockable selection)
Creates a new perspective. |
|
| Method Summary | |
|---|---|
void |
add(PerspectiveDockable dockable)
Adds dockable at the end of the list of dockables. |
void |
addPlaceholder(PerspectiveDockable dockable)
Adds a placeholder for dockable at the end of the list of dockables. |
PerspectiveDockable |
asDockable()
Returns the representation of this as PerspectiveDockable. |
PerspectiveStation |
asStation()
Returns the representation of this as PerspectiveStation |
PerspectiveDockable |
getDockable(int index)
Gets the index'th child of this station. |
int |
getDockableCount()
Gets the number of children this station has. |
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. |
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. |
PerspectiveDockable |
getSelection()
Gets the currently selected element. |
int |
indexOf(PerspectiveDockable dockable)
Gets the location of dockable. |
void |
insert(int index,
PerspectiveDockable dockable)
Inserts dockable at location index. |
void |
insertPlaceholder(int index,
PerspectiveDockable dockable)
Adds a placeholder for dockable at location index. |
void |
read(PlaceholderMap placeholders,
Map<Integer,PerspectiveDockable> children,
int selected)
Reads the contents of map and replaces any content of this perspective. |
PerspectiveDockable |
remove(int index)
Removes the index'th child of this station. |
boolean |
remove(PerspectiveDockable dockable)
Removes dockable from this station. |
void |
replace(PerspectiveDockable oldDockable,
PerspectiveDockable newDockable)
Replaces oldDockable by newDockable. |
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 |
void |
setSelection(PerspectiveDockable dockable)
Changes the selected element of this station. |
PlaceholderMap |
toMap(Map<PerspectiveDockable,Integer> children)
Converts this perspective into a PlaceholderMap. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StackDockPerspective()
StackDockPerspective.
public StackDockPerspective(PerspectiveDockable[] children,
PerspectiveDockable selection)
children - the children of the new stationselection - the current selection, may be null| Method Detail |
|---|
public void read(PlaceholderMap placeholders,
Map<Integer,PerspectiveDockable> children,
int selected)
map and replaces any content of this perspective.
placeholders - the map to convertchildren - the children of this stationselected - the selected child or -1public 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 PerspectiveStationpublic PlaceholderMap toMap(Map<PerspectiveDockable,Integer> children)
PlaceholderMap.
children - identifiers for the children of this station
public void addPlaceholder(PerspectiveDockable dockable)
dockable at the end of the list of dockables.
dockable - the element for which a placeholder should be added
public void insertPlaceholder(int index,
PerspectiveDockable dockable)
dockable at location index.
index - the location where the placeholder goesdockable - the element for which a placeholder should be leftpublic void add(PerspectiveDockable dockable)
dockable at the end of the list of dockables.
dockable - the element to add
public void insert(int index,
PerspectiveDockable dockable)
dockable at location index.
index - the locationdockable - the new elementpublic int indexOf(PerspectiveDockable dockable)
dockable.
dockable - the dockable whose location is searched
public boolean remove(PerspectiveDockable dockable)
dockable from this station.
remove in interface PerspectiveStationdockable - the element to remove
true if dockable was removed, false
otherwisepublic PerspectiveDockable remove(int index)
index'th child of this station. If the child is the
selected element, then the selected
element is set to null.
index - the location of the child
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 void setSelection(PerspectiveDockable dockable)
dockable - the selected element, can be nullpublic PerspectiveDockable getSelection()
null
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 void setParent(PerspectiveStation parent)
PerspectiveDockableDockStation of this Dockable.
setParent in interface PerspectiveDockableparent - the new parent, can be nullpublic PerspectiveStation getParent()
PerspectiveDockableDockStation of this Dockable.
getParent in interface PerspectiveDockablenullpublic Path getPlaceholder()
PerspectiveDockableDockable.
getPlaceholder in interface PerspectiveDockablenullpublic 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 PerspectiveStation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||