|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.flap.FlapDockPerspective
public class FlapDockPerspective
A representation of a FlapDockStation in a Perspective.
Note: while this perspective allows to set the hold and size
property of a dockable, the final decision of how these properties look like are made
by the FlapLayoutManager that is installed on the FlapDockStation which shows
the real Dockables.
| Constructor Summary | |
|---|---|
FlapDockPerspective()
|
|
| Method Summary | |
|---|---|
void |
add(PerspectiveDockable dockable)
Adds dockable at the end of the list of children. |
void |
add(PerspectiveDockable dockable,
boolean hold,
int size)
Adds dockable at the end of the list of children. |
void |
addPlaceholder(Path placeholder)
Adds placeholder at the end of the list of items. |
void |
addPlaceholder(PerspectiveDockable dockable)
Adds a placeholder for dockable and all its children to 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 |
int |
getDefaultSize()
Gets the default size of the window of newly added Dockables. |
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. |
int |
getSize(PerspectiveDockable dockable)
Gets the preferred size of the window that shows dockable. |
int |
indexOf(PerspectiveDockable dockable)
Gets the current index of dockable. |
void |
insert(int index,
PerspectiveDockable dockable)
Adds a Dockable to this station. |
void |
insert(int index,
PerspectiveDockable dockable,
boolean hold,
int size)
Adds dockable to this station. |
void |
insertPlaceholder(int index,
Path placeholder)
Adds placeholder at location index in the list of items. |
void |
insertPlaceholder(int index,
PerspectiveDockable dockable)
Adds a placeholder for dockable and all its children at
location index to the list of dockables. |
boolean |
isDefaultHold()
Tells whether newly added Dockables normally remain open even if they loose the
focus. |
boolean |
isHold(PerspectiveDockable dockable)
Tells whether dockable should stay open even if it lost focus. |
void |
read(PlaceholderMap map,
Map<Integer,PerspectiveDockable> children)
Updates the content of this perspective by reading the contents of map. |
PerspectiveDockable |
remove(int index)
Removes the index'th element of this perspective. |
boolean |
remove(PerspectiveDockable dockable)
Removes a child of this station, can leave behind a placeholder. |
void |
replace(PerspectiveDockable oldDockable,
PerspectiveDockable newDockable)
Replaces oldDockable by newDockable. |
void |
setDefaultHold(boolean defaultHold)
Sets whether newly added Dockables remain open even if they lost the focus. |
void |
setDefaultSize(int defaultSize)
Sets the default size of the window of newly added Dockables. |
void |
setHold(PerspectiveDockable dockable,
boolean hold)
Sets whether dockable should stay open even if it lost focus. |
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 |
setSize(PerspectiveDockable dockable,
int size)
Sets the preferred size of the window that shows dockable. |
PlaceholderMap |
toMap(Map<PerspectiveDockable,Integer> children)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FlapDockPerspective()
| Method Detail |
|---|
public void read(PlaceholderMap map,
Map<Integer,PerspectiveDockable> children)
map.
map - the placeholderschildren - the possible children of this perspectivepublic 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)
public int getDefaultSize()
Dockables.
public void setDefaultSize(int defaultSize)
Dockables. Changing
this property has no effect on Dockables that were already added to this
station.
defaultSize - the default size, at least 0public boolean isDefaultHold()
Dockables normally remain open even if they loose the
focus.
true if the elements remain openpublic void setDefaultHold(boolean defaultHold)
Dockables remain open even if they lost the focus.
defaultHold - true if the elements should remain open
public void insertPlaceholder(int index,
PerspectiveDockable dockable)
dockable and all its children at
location index to the list of dockables.
index - the location of dockabledockable - the element which is stored as placeholder
public void insertPlaceholder(int index,
Path placeholder)
placeholder at location index in the list of items.
index - the location of placeholderplaceholder - the placeholder to add, not nullpublic void addPlaceholder(PerspectiveDockable dockable)
dockable and all its children to the end
of the list of dockables.
dockable - the element which is stored as placeholderpublic void addPlaceholder(Path placeholder)
placeholder at the end of the list of items.
placeholder - the placeholder to add, not nullpublic void add(PerspectiveDockable dockable)
dockable at the end of the list of children.
dockable - the new element
public void add(PerspectiveDockable dockable,
boolean hold,
int size)
dockable at the end of the list of children.
dockable - the new elementhold - whether dockable should remain open even if the focus is lostsize - the preferred size of dockable
public void insert(int index,
PerspectiveDockable dockable)
Dockable to this station.
index - the location of the new childdockable - the new child, not null, must not have a parent
public void insert(int index,
PerspectiveDockable dockable,
boolean hold,
int size)
dockable to this station.
index - the location of dockabledockable - the new elementhold - whether dockable should remain open even if the focus is lostsize - the preferred size of dockablepublic PerspectiveDockable remove(int index)
index'th element of this perspective.
index - the location of the element to remove
public 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 int indexOf(PerspectiveDockable dockable)
dockable.
dockable - some dockable to search
public void setHold(PerspectiveDockable dockable,
boolean hold)
dockable should stay open even if it lost focus.
dockable - the element whose state changeshold - whether to keep dockable open
IllegalArgumentException - if dockable is not known to this
stationpublic boolean isHold(PerspectiveDockable dockable)
dockable should stay open even if it lost focus.
dockable - the element whose state is requested
true if dockable should remain open
IllegalArgumentException - if dockable is not known to this
station
public void setSize(PerspectiveDockable dockable,
int size)
dockable.
dockable - some child of this stationsize - the preferred size, at least 0
IllegalArgumentException - if either dockable is not a child
of this station or if size is less than 0public int getSize(PerspectiveDockable dockable)
dockable.
dockable - some child of this station
IllegalArgumentException - if dockable is not known to this station
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 | |||||||||