|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.PredefinedDockSituation.PreloadFactory
private class PredefinedDockSituation.PreloadFactory
A factory which uses other factories as delegate. This factory does
not always use the delegates, sometimes it does just read an element
which was predefined in PredefinedDockSituation
.
Constructor Summary | |
---|---|
private |
PredefinedDockSituation.PreloadFactory()
|
Method Summary | |
---|---|
java.lang.String |
getID()
Gets the unique name of this factory. |
DockElement |
read(java.util.Map<java.lang.Integer,Dockable> children,
boolean ignore,
java.io.DataInputStream in)
Reads a DockElement which was earlier stored by a DockFactoy
of the same type. |
void |
read(java.util.Map<java.lang.Integer,Dockable> children,
boolean ignore,
DockElement preloaded,
java.io.DataInputStream in)
Reads a DockElement which was earlier stored by a DockFactory
of the same type. |
void |
write(DockElement element,
java.util.Map<Dockable,java.lang.Integer> children,
java.io.DataOutputStream out)
Saves the properties of a DockElement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private PredefinedDockSituation.PreloadFactory()
Method Detail |
---|
public java.lang.String getID()
DockFactory
getID
in interface DockFactory<DockElement>
public DockElement read(java.util.Map<java.lang.Integer,Dockable> children, boolean ignore, java.io.DataInputStream in) throws java.io.IOException
DockFactory
DockElement
which was earlier stored by a DockFactoy
of the same type.
read
in interface DockFactory<DockElement>
children
- the known children of the element that is read. It's
possible that not all children that were stored last time could be
read again. In this case the map will contain no or a null
entry.ignore
- true
if the layout of the current
children should not be changed. The map children
is empty
if ignoreChildren
is true
.in
- the stream to read from. The number of bytes read don't have
to be the same number as the bytes that were written.
null
is a valid
result and indicates that an element is no longer available.
java.io.IOException
- if the element can't be read from the streampublic void read(java.util.Map<java.lang.Integer,Dockable> children, boolean ignore, DockElement preloaded, java.io.DataInputStream in) throws java.io.IOException
DockFactory
DockElement
which was earlier stored by a DockFactory
of the same type. The contents have to be written into an already
existing element.
read
in interface DockFactory<DockElement>
children
- the known children of the element that is read. It's
possible that not all children that were stored last time could be
read again. In this case the map will contain no or a null
entry.ignore
- true
if the layout of the current
children should not be changed. The map children
is empty
if ignoreChildren
is true
.preloaded
- an element which was created elsewhere and now
has to be set up correctly by this factoryin
- the stream to read from. The number of bytes read don't have
to be the same number as the bytes that were written.
java.io.IOException
- if the element can't be read from the streampublic void write(DockElement element, java.util.Map<Dockable,java.lang.Integer> children, java.io.DataOutputStream out) throws java.io.IOException
DockFactory
DockStation
, then the factory has to store the location
of the children. The factory can use the unique ids of the children
which are stored in the map children
. The factory
don't have to store any information about the children itself.element
is a Dockable, no information about the
parent has to be stored.
write
in interface DockFactory<DockElement>
element
- the element to savechildren
- a list of unique names for each child of element
,
may be null
if element
is not a DockStation.out
- a stream to write information
java.io.IOException
- if the element can't be saved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |