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)
PerspectiveStation
getDockable
in interface PerspectiveStation
index
- the index of a childnull
public int getDockableCount()
PerspectiveStation
getDockableCount
in interface PerspectiveStation
public PerspectiveDockable asDockable()
PerspectiveElement
this
as PerspectiveDockable
.asDockable
in interface PerspectiveElement
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 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
that can be
stored persistently.children
- unique identifiers for the children of this perspectivenull
public void add(PerspectiveDockable dockable, Rectangle bounds)
dockable
with boundaries bounds
to this perspective.dockable
- the element to addbounds
- the boundaries of dockable
public void add(PerspectiveDockable dockable, Rectangle bounds, boolean fullscreen)
dockable
width boundaries bounds
to this perspectivedockable
- the element to add, not null
bounds
- the boundaries of dockable
fullscreen
- 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 null
x
- 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 null
x
- 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 dockable
public 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 placeholder
public 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 PerspectiveStation
dockable
- 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)
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 ScreenDockPerspective.ScreenPerspectiveWindow getWindow(PerspectiveDockable dockable)
dockable
dockable
- the element whose window is requestednull
if dockable
was not foundpublic DockableProperty getDockableProperty(PerspectiveDockable child, PerspectiveDockable target)
PerspectiveStation
getDockableProperty
in interface PerspectiveStation
child
- 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.