|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.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 Dockable
s.
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(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 Dockable s. |
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. |
java.lang.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,
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 Dockable s 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,
java.util.Map<java.lang.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 Dockable s remain open even if they lost the focus. |
void |
setDefaultSize(int defaultSize)
Sets the default size of the window of newly added Dockable s. |
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(java.util.Map<PerspectiveDockable,java.lang.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 |
---|
@Todo public void read(PlaceholderMap map, java.util.Map<java.lang.Integer,PerspectiveDockable> children)
map
.
map
- the placeholderschildren
- the possible children of this perspectivepublic 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(java.util.Map<PerspectiveDockable,java.lang.Integer> children)
public int getDefaultSize()
Dockable
s.
public void setDefaultSize(int defaultSize)
Dockable
s. Changing
this property has no effect on Dockable
s that were already added to this
station.
defaultSize
- the default size, at least 0public boolean isDefaultHold()
Dockable
s normally remain open even if they loose the
focus.
true
if the elements remain openpublic void setDefaultHold(boolean defaultHold)
Dockable
s 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 dockable
dockable
- the element which is stored as placeholderpublic 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 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 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 parentpublic void insert(int index, PerspectiveDockable dockable, boolean hold, int size)
dockable
to this station.
index
- the location of dockable
dockable
- the new elementhold
- whether dockable
should remain open even if the focus is lostsize
- the preferred size of dockable
public 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 PerspectiveStation
dockable
- the element to remove
true
if dockable
was removed, false
otherwisepublic 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 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
java.lang.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
java.lang.IllegalArgumentException
- 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 0
java.lang.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
java.lang.IllegalArgumentException
- if dockable
is not known to this stationpublic 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 java.lang.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |