public abstract class PredefinedPerspective extends Perspective
Perspective
that works together with PredefinedDockSituation
. These perspectives
cannot be created directly, clients need to call PredefinedDockSituation.createPerspective()
to
obtain an instance.put(String, PerspectiveElement)
in order to register the PerspectiveElement
s
that are "predefined".Constructor and Description |
---|
PredefinedPerspective(PredefinedDockSituation situation)
Creates a new perspective using
situation to read and write elements. |
Modifier and Type | Method and Description |
---|---|
String |
get(PerspectiveElement element)
Gets the key for
element . |
PerspectiveElement |
get(String key)
Gets the element which was stored using
key . |
String[] |
getKeys()
Gets all the keys known to this perspective.
|
PredefinedDockSituation |
getSituation()
|
void |
put(PredefinedMap map)
Adds an additional set of items to this perspective.
|
void |
put(String key,
PerspectiveElement element)
Registers
element on this PredefinedPerspective . |
convert, convert, getFactory, getID, read, readXML, write, writeXML
public PredefinedPerspective(PredefinedDockSituation situation)
situation
to read and write elements.situation
- the set of factories to usepublic PredefinedDockSituation getSituation()
Perspective
getSituation
in class Perspective
null
public void put(PredefinedMap map)
map
- the set of known items, not null
public void put(String key, PerspectiveElement element)
element
on this PredefinedPerspective
. When writing the layout the
identifier key
will be written instead of element
.key
- the key of the elementelement
- the new elementpublic String[] getKeys()
public String get(PerspectiveElement element)
element
.element
- some element whose key is searched, not null
null
public PerspectiveElement get(String key)
key
.key
- the key of some elementnull