|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.station.stack.StackDockStationFactory
public class StackDockStationFactory
A DockFactory
that can read and write instances of StackDockStation
.
This factory will create new instances of StackDockStation
through
the method createStation()
.
Field Summary | |
---|---|
static String |
ID
The ID which is returned by getID() |
Constructor Summary | |
---|---|
StackDockStationFactory()
|
Method Summary | |
---|---|
protected StackDockStation |
createStation()
Called when a new StackDockStation is required. |
String |
getID()
Gets the unique name of this factory. |
StackDockStationLayout |
getLayout(StackDockStation station,
Map<Dockable,Integer> children)
Gets the layout of element . |
StackDockStation |
layout(StackDockStationLayout layout)
Creates a new DockElement and changes the layout of the new
element such that is matches layout . |
StackDockStation |
layout(StackDockStationLayout layout,
Map<Integer,Dockable> children)
Creates a new DockElement and changes the layout of the new
element such that is matches layout . |
StackDockStationLayout |
read(DataInputStream in)
Reads a layout from a stream. |
StackDockStationLayout |
read(XElement element)
Reads a layout from an xml-element. |
void |
setLayout(StackDockStation element,
StackDockStationLayout layout)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
setLayout(StackDockStation station,
StackDockStationLayout layout,
Map<Integer,Dockable> children)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
write(StackDockStationLayout layout,
DataOutputStream out)
Writes the contents of layout into out . |
void |
write(StackDockStationLayout layout,
XElement element)
Writes the contents of layout into element . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ID
getID()
Constructor Detail |
---|
public StackDockStationFactory()
Method Detail |
---|
public String getID()
DockFactory
getID
in interface DockFactory<StackDockStation,StackDockStationLayout>
public StackDockStationLayout getLayout(StackDockStation station, Map<Dockable,Integer> children)
DockFactory
element
. This method should create
a new instance of the layout object, that new object should not be
tied to element
in any way. A layout can be living for
a long period of time and might be used on another dockable
object.
getLayout
in interface DockFactory<StackDockStation,StackDockStationLayout>
station
- 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.
public void setLayout(StackDockStation station, StackDockStationLayout layout, Map<Integer,Dockable> children)
DockFactory
layout
and changes the layout of
element
accordingly. This method should remove all
children from element
and add new children.
setLayout
in interface DockFactory<StackDockStation,StackDockStationLayout>
station
- 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.public void setLayout(StackDockStation element, StackDockStationLayout layout)
DockFactory
layout
and changes the layout of
element
accordingly. This method should not add or remove
children to or from element
.
setLayout
in interface DockFactory<StackDockStation,StackDockStationLayout>
element
- the element whose properties will be changedlayout
- the new set of propertiespublic StackDockStation layout(StackDockStationLayout layout, Map<Integer,Dockable> children)
DockFactory
DockElement
and changes the layout of the new
element such that is matches layout
.
layout
in interface DockFactory<StackDockStation,StackDockStationLayout>
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 usedpublic StackDockStation layout(StackDockStationLayout layout)
DockFactory
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
in interface DockFactory<StackDockStation,StackDockStationLayout>
layout
- the new layout
null
if layout can't be usedpublic void write(StackDockStationLayout layout, DataOutputStream out) throws IOException
DockFactory
layout
into out
.
write
in interface DockFactory<StackDockStation,StackDockStationLayout>
layout
- the layout to storeout
- the stream to write into
IOException
- if an I/O-error occurspublic StackDockStationLayout read(DataInputStream in) throws IOException
DockFactory
read
in interface DockFactory<StackDockStation,StackDockStationLayout>
in
- the stream to read from
IOException
- if an I/O-error occurspublic void write(StackDockStationLayout layout, XElement element)
DockFactory
layout
into element
.
write
in interface DockFactory<StackDockStation,StackDockStationLayout>
layout
- the layout to storeelement
- an xml-element into which this method should write, the
attributes of element
should not be changed.public StackDockStationLayout read(XElement element)
DockFactory
read
in interface DockFactory<StackDockStation,StackDockStationLayout>
element
- the element to read, should not be changed by this
method.
protected StackDockStation createStation()
StackDockStation
is required.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |