|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.dockable.DefaultDockableFactory
public class DefaultDockableFactory
A factory which can read and write the properties of a
DefaultDockable
. Note that this factory does not store any
information about the components added to the content pane of the
DefaultDockable.
Nested Class Summary | |
---|---|
static class |
DefaultDockableFactory.DefaultDockLayout
A simple layout that does not store any information. |
Field Summary | |
---|---|
static String |
ID
The unique id of this factory |
Constructor Summary | |
---|---|
DefaultDockableFactory()
|
Method Summary | |
---|---|
String |
getID()
Gets the unique name of this factory. |
DefaultDockableFactory.DefaultDockLayout |
getLayout(DefaultDockable element,
Map<Dockable,Integer> children)
Gets the layout of element . |
DefaultDockable |
layout(DefaultDockableFactory.DefaultDockLayout layout)
Creates a new DockElement and changes the layout of the new
element such that is matches layout . |
DefaultDockable |
layout(DefaultDockableFactory.DefaultDockLayout layout,
Map<Integer,Dockable> children)
Creates a new DockElement and changes the layout of the new
element such that is matches layout . |
DefaultDockableFactory.DefaultDockLayout |
read(DataInputStream in)
Reads a layout from a stream. |
DefaultDockableFactory.DefaultDockLayout |
read(XElement element)
Reads a layout from an xml-element. |
void |
setLayout(DefaultDockable element,
DefaultDockableFactory.DefaultDockLayout layout)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
setLayout(DefaultDockable element,
DefaultDockableFactory.DefaultDockLayout layout,
Map<Integer,Dockable> children)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
write(DefaultDockableFactory.DefaultDockLayout layout,
DataOutputStream out)
Writes the contents of layout into out . |
void |
write(DefaultDockableFactory.DefaultDockLayout 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
Constructor Detail |
---|
public DefaultDockableFactory()
Method Detail |
---|
public String getID()
DockFactory
getID
in interface DockFactory<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
public DefaultDockableFactory.DefaultDockLayout getLayout(DefaultDockable element, Map<Dockable,Integer> children)
DockFactory
element
.
getLayout
in interface DockFactory<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
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.
public void setLayout(DefaultDockable element, DefaultDockableFactory.DefaultDockLayout 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<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
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.public void setLayout(DefaultDockable element, DefaultDockableFactory.DefaultDockLayout 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<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
element
- the element whose properties will be changedlayout
- the new set of propertiespublic DefaultDockable layout(DefaultDockableFactory.DefaultDockLayout layout, Map<Integer,Dockable> children)
DockFactory
DockElement
and changes the layout of the new
element such that is matches layout
.
layout
in interface DockFactory<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
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 DefaultDockable layout(DefaultDockableFactory.DefaultDockLayout 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<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
layout
- the new layout
null
if layout can't be usedpublic DefaultDockableFactory.DefaultDockLayout read(DataInputStream in) throws IOException
DockFactory
read
in interface DockFactory<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
in
- the stream to read from
IOException
- if an I/O-error occurspublic DefaultDockableFactory.DefaultDockLayout read(XElement element)
DockFactory
read
in interface DockFactory<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
element
- the element to read, should not be changed by this
method.
public void write(DefaultDockableFactory.DefaultDockLayout layout, DataOutputStream out) throws IOException
DockFactory
layout
into out
.
write
in interface DockFactory<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
layout
- the layout to storeout
- the stream to write into
IOException
- if an I/O-error occurspublic void write(DefaultDockableFactory.DefaultDockLayout layout, XElement element)
DockFactory
layout
into element
.
write
in interface DockFactory<DefaultDockable,DefaultDockableFactory.DefaultDockLayout>
layout
- the layout to storeelement
- an xml-element into which this method should write, the
attributes of element
should not be changed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |