|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
D
- the type of element which can be written and read by this factoryL
- the type of object that stores the contents of a D
public interface DockFactory<D extends DockElement,L extends DockLayout>
A DockFactory
can convert the contents of a DockElement
in
a persistent form.
Some kind of DockElement
will be converted into a DockLayout
,
this layout can then be written into a stream.
Method Summary | |
---|---|
String |
getID()
Gets the unique name of this factory. |
L |
getLayout(D element,
Map<Dockable,Integer> children)
Gets the layout of element . |
D |
layout(L layout)
Creates a new DockElement and changes the layout of the new
element such that is matches layout . |
D |
layout(L layout,
Map<Integer,Dockable> children)
Creates a new DockElement and changes the layout of the new
element such that is matches layout . |
L |
read(DataInputStream in)
Reads a layout from a stream. |
L |
read(XElement element)
Reads a layout from an xml-element. |
void |
setLayout(D element,
L layout)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
setLayout(D element,
L layout,
Map<Integer,Dockable> children)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
write(L layout,
DataOutputStream out)
Writes the contents of layout into out . |
void |
write(L layout,
XElement element)
Writes the contents of layout into element . |
Method Detail |
---|
String getID()
L getLayout(D element, Map<Dockable,Integer> children)
element
.
element
- the element for which a new layout should be createdchildren
- a map containing unique identifiers for the children
of the element. Children which are not in this map should not be
stored in the layout.
void setLayout(D element, L layout, Map<Integer,Dockable> children)
layout
and changes the layout of
element
accordingly. This method should remove all
children from element
and add new children.
element
- the element whose content and children will be rearranged.layout
- the new layout of element
children
- some children, note that the map may not contain all elements
which were present when the layout was created.void setLayout(D element, L layout)
layout
and changes the layout of
element
accordingly. This method should not add or remove
children to or from element
.
element
- the element whose properties will be changedlayout
- the new set of propertiesD layout(L layout, Map<Integer,Dockable> children)
DockElement
and changes the layout of the new
element such that is matches layout
.
layout
- the new layoutchildren
- some children, note that the map may not contain all elements
which were present when the layout was created.
null
if layout can't be usedD layout(L layout)
DockElement
and changes the layout of the new
element such that is matches layout
. This method should
not add any children to the element.
layout
- the new layout
null
if layout can't be usedvoid write(L layout, DataOutputStream out) throws IOException
layout
into out
.
layout
- the layout to storeout
- the stream to write into
IOException
- if an I/O-error occursvoid write(L layout, XElement element)
layout
into element
.
layout
- the layout to storeelement
- an xml-element into which this method should write, the
attributes of element
should not be changed.L read(DataInputStream in) throws IOException
in
- the stream to read from
IOException
- if an I/O-error occursL read(XElement element)
element
- the element to read, should not be changed by this
method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |