|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.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(Path placeholder)
Adds placeholder 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. |
int |
getItemCount()
Gets the number of children, this includes dockables and placeholders . |
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(Path placeholder)
Gets the location where placeholder would be found if it were a
dockable . |
int |
indexOf(PerspectiveDockable dockable)
Gets the location of dockable . |
void |
insert(int index,
PerspectiveDockable dockable)
Inserts dockable at location index . |
void |
insertPlaceholder(int index,
Path placeholder,
PlaceholderList.Level level)
Adds placeholder 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 PerspectiveStation
placeholders
- a map that was earlier created by PerspectiveStation.getPlaceholders()
public PlaceholderMap getPlaceholders()
PerspectiveStation
getPlaceholders
in interface PerspectiveStation
public 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 addedpublic void addPlaceholder(Path placeholder)
placeholder
at the end of the list of dockables.
placeholder
- the new placeholderpublic 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 insertPlaceholder(int index, Path placeholder, PlaceholderList.Level level)
placeholder
at location index
.
index
- the location where the placeholder goesplaceholder
- the new placeholderlevel
- at which level index
should be evaluated, not null
public void add(PerspectiveDockable dockable)
dockable
at the end of the list of dockables.
dockable
- the element to addpublic 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 int indexOf(Path placeholder)
placeholder
would be found if it were a
dockable
.
placeholder
- the placeholder to search
placeholder
or -1
public boolean remove(PerspectiveDockable dockable)
dockable
from this station.
remove
in interface PerspectiveStation
dockable
- 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)
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 void setSelection(PerspectiveDockable dockable)
dockable
- the selected element, can be null
public PerspectiveDockable getSelection()
null
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 void setParent(PerspectiveStation parent)
PerspectiveDockable
DockStation
of this Dockable
.
setParent
in interface PerspectiveDockable
parent
- the new parent, can be 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 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 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
public int getItemCount()
dockables
and placeholders
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |