public class FlapDockPerspective extends Object implements PerspectiveDockable, PerspectiveStation
FlapDockStation in a Perspective.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 and Description |
|---|
FlapDockPerspective() |
| Modifier and Type | Method and Description |
|---|---|
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) |
public void read(PlaceholderMap map, Map<Integer,PerspectiveDockable> children)
map.map - the placeholderschildren - the possible children of this perspectivepublic void setPlaceholders(PlaceholderMap placeholders)
PerspectiveStationsetPlaceholders in interface PerspectiveStationplaceholders - a map that was earlier created by PerspectiveStation.getPlaceholders()public PlaceholderMap getPlaceholders()
PerspectiveStationgetPlaceholders 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 openpublic 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 placeholderpublic 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 elementpublic 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 dockablepublic 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 parentpublic 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 removepublic 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 int indexOf(PerspectiveDockable dockable)
dockable.dockable - some dockable to searchpublic 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 openIllegalArgumentException - 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 requestedtrue if dockable should remain openIllegalArgumentException - if dockable is not known to this
stationpublic void setSize(PerspectiveDockable dockable, int size)
dockable.dockable - some child of this stationsize - the preferred size, at least 0IllegalArgumentException - 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 stationIllegalArgumentException - if dockable is not known to this stationpublic 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 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 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 PerspectiveStationCopyright © 2017 Docking Frames. All rights reserved.