|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.layout.DockSituation
bibliothek.gui.dock.layout.PredefinedDockSituation
public class PredefinedDockSituation
A DockSituation
that does not load or store all DockElements
.
All elements which are registered by put(DockElement)
are stored in an
internal list. On writing, just a unique id is written to the stream.
A DockFactory
is still necessary for these elements, but the factory may
just do nothing.
Constructor Summary | |
---|---|
PredefinedDockSituation()
|
Method Summary | |
---|---|
void |
addBackup(DockFactory<? extends DockElement,BackupFactoryData<?>> factory)
Adds a backup factory to this situation. |
protected DockFactory<? extends DockElement,BackupFactoryData<?>> |
getBackup(String id)
Searches a backup factory with the name id . |
protected DockFactory<? extends DockElement,?> |
getFactory(String id)
Gets the factory which has the given id . |
protected String |
getID(DockElement dockable)
Gets the id of the factory which is needed to write (and later read) the element dockable . |
protected String |
getID(DockFactory<?,?> factory)
Gets the id of factory . |
void |
put(DockElement element)
Registers an element at this situation. |
void |
put(String key,
DockElement element)
Registers an element at this situation. |
void |
removeBackup(String id)
Removes the backup factory with the name id . |
Methods inherited from class bibliothek.gui.dock.layout.DockSituation |
---|
add, convert, convert, getIgnore, ignoreChildren, ignoreElement, read, read, readComposition, readCompositionXML, readXML, setIgnore, write, write, writeComposition, writeCompositionXML, writeXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PredefinedDockSituation()
Method Detail |
---|
public void addBackup(DockFactory<? extends DockElement,BackupFactoryData<?>> factory)
BackupFactoryData
object, the identifier of that
object does not have to be stored by factory
. The
factory has only to look at the data
-property.
This PredefinedDockSituation
will set the identifier whenever
a method of factory
is called, that has a BackupFactoryData
as parameter.
factory
- a backup factorypublic void removeBackup(String id)
id
.
id
- the id of the factory which should be removedpublic void put(DockElement element)
element
- the elementpublic void put(String key, DockElement element)
key
- the key of the elementelement
- the element
IllegalArgumentException
- if the key is already usedprotected String getID(DockElement dockable)
DockSituation
dockable
.
getID
in class DockSituation
dockable
- the dockable to write
DockSituation.getID(DockFactory)
,
DockSituation.getFactory(String)
protected String getID(DockFactory<?,?> factory)
DockSituation
factory
. The default behavior is just to
return DockFactory.getID()
. Note that this method should be
a bijection to DockSituation.getFactory(String)
.
getID
in class DockSituation
factory
- the factory whose id is needed
protected DockFactory<? extends DockElement,?> getFactory(String id)
DockSituation
id
. Note that this
method should be a bijection to DockSituation.getID(DockFactory)
. The
default behavior compares id
with the
DockSituation.getID(DockFactory)
.
getFactory
in class DockSituation
id
- the name of the factory
null
if no factory has this idprotected DockFactory<? extends DockElement,BackupFactoryData<?>> getBackup(String id)
id
.
id
- the name of the factory
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |