public class ScreenDockPerspective extends Object implements PerspectiveStation
ScreenDockStation in a Perspective.| Modifier and Type | Class and Description |
|---|---|
static class |
ScreenDockPerspective.ScreenPerspectiveWindow
Represents a child of a
ScreenDockPerspective. |
| Constructor and Description |
|---|
ScreenDockPerspective() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(PerspectiveDockable dockable,
int x,
int y,
int width,
int height)
Adds
dockable at location x/y with size width/height to
this perspective. |
void |
add(PerspectiveDockable dockable,
int x,
int y,
int width,
int height,
boolean fullscreen)
Adds
dockable at location x/y with size width/height to
this perspective. |
void |
add(PerspectiveDockable dockable,
Rectangle bounds)
Adds
dockable with boundaries bounds to this perspective. |
void |
add(PerspectiveDockable dockable,
Rectangle bounds,
boolean fullscreen)
Adds
dockable width boundaries bounds to this perspective |
void |
addPlaceholder(Path placeholder,
int x,
int y,
int width,
int height)
Adds
placeholder to this station. |
void |
addPlaceholder(Path placeholder,
Rectangle bounds)
Adds
placeholder to this station. |
void |
addPlaceholder(PerspectiveDockable dockable,
int x,
int y,
int width,
int height)
Adds a placeholder for
dockable and all its children to this
station. |
void |
addPlaceholder(PerspectiveDockable dockable,
Rectangle bounds)
Adds a placeholder for
dockable and all its children to this
station. |
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. |
PlaceholderMap |
getPlaceholders()
Converts the contents of this station into a map of placeholders.
|
ScreenDockPerspective.ScreenPerspectiveWindow |
getWindow(PerspectiveDockable dockable)
Gets access to the window that shows
dockable |
int |
indexOf(PerspectiveDockable dockable)
Gets the index of
dockable. |
void |
read(PlaceholderMap map,
Map<Integer,PerspectiveDockable> children)
Reads the contents of
map and replaces any content of this perspective. |
PerspectiveDockable |
remove(int index)
Removes the
index'th element of this station. |
boolean |
remove(PerspectiveDockable dockable)
Removes the child
dockable from this station. |
void |
replace(PerspectiveDockable oldDockable,
PerspectiveDockable newDockable)
Replaces
oldDockable by newDockable. |
void |
setPlaceholders(PlaceholderMap placeholders)
Informs this station of the content that it should show
|
PlaceholderMap |
toMap(Map<PerspectiveDockable,Integer> children)
Converts the content of this perspective to a
PlaceholderMap that can be
stored persistently. |
public void read(PlaceholderMap map, Map<Integer,PerspectiveDockable> children)
map and replaces any content of this perspective.map - the layoutchildren - the children of this stationpublic PerspectiveDockable getDockable(int index)
PerspectiveStationgetDockable in interface PerspectiveStationindex - the index of a childnullpublic int getDockableCount()
PerspectiveStationgetDockableCount in interface PerspectiveStationpublic PerspectiveDockable asDockable()
PerspectiveElementthis as PerspectiveDockable.asDockable in interface PerspectiveElementthis, 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 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)
PlaceholderMap that can be
stored persistently.children - unique identifiers for the children of this perspectivenullpublic void add(PerspectiveDockable dockable, Rectangle bounds)
dockable with boundaries bounds to this perspective.dockable - the element to addbounds - the boundaries of dockablepublic void add(PerspectiveDockable dockable, Rectangle bounds, boolean fullscreen)
dockable width boundaries bounds to this perspectivedockable - the element to add, not nullbounds - the boundaries of dockablefullscreen - whether dockable should be extended to fullscreen modepublic void add(PerspectiveDockable dockable, int x, int y, int width, int height)
dockable at location x/y with size width/height to
this perspective.dockable - the element to add, not nullx - the x-coordinate on the screeny - the y-coordinate on the screenwidth - the width of the windowheight - the height of the windowpublic void add(PerspectiveDockable dockable, int x, int y, int width, int height, boolean fullscreen)
dockable at location x/y with size width/height to
this perspective.dockable - the element to add, not nullx - the x-coordinate on the screeny - the y-coordinate on the screenwidth - the width of the windowheight - the height of the windowfullscreen - whether dockable should be extended to fullscreen modepublic void addPlaceholder(PerspectiveDockable dockable, Rectangle bounds)
dockable and all its children to this
station.dockable - the element whose placeholder should be insertedbounds - the location and size of dockablepublic void addPlaceholder(PerspectiveDockable dockable, int x, int y, int width, int height)
dockable and all its children to this
station.dockable - the element whose placeholder should be insertedx - the x-coordinate on the screeny - the y-coordinate on the screenwidth - the width of the windowheight - the height of the windowpublic void addPlaceholder(Path placeholder, Rectangle bounds)
placeholder to this station.placeholder - the placeholder to addbounds - the location and size of placeholderpublic void addPlaceholder(Path placeholder, int x, int y, int width, int height)
placeholder to this station.placeholder - the placeholder to addx - the x-coordinate on the screeny - the y-coordinate on the screenwidth - the width of the windowheight - the height of the windowpublic int indexOf(PerspectiveDockable dockable)
dockable.dockable - some child of this stationdockable was not foundpublic boolean remove(PerspectiveDockable dockable)
dockable from this station.remove in interface PerspectiveStationdockable - the element to removetrue if dockable was removed,
false otherwisepublic PerspectiveDockable remove(int index)
index'th element of this station.index - the index of the element to removepublic 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 ScreenDockPerspective.ScreenPerspectiveWindow getWindow(PerspectiveDockable dockable)
dockabledockable - the element whose window is requestednull if dockable was not foundpublic 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.Copyright © 2017 Docking Frames. All rights reserved.