|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.station.screen.ScreenDockStationFactory
public class ScreenDockStationFactory
A DockFactory
which writes and reads instances
of ScreenDockStation
. For every station, the bounds of all
dialogs are stored.
Field Summary | |
---|---|
static String |
ID
|
Constructor Summary | |
---|---|
ScreenDockStationFactory(Window owner)
Constructs a factory |
|
ScreenDockStationFactory(WindowProvider owner)
Constructs a factory |
Method Summary | |
---|---|
protected ScreenDockStation |
createStation()
Creates a new ScreenDockStation . |
String |
getID()
Gets the unique name of this converter. |
ScreenDockStationLayout |
getLayout(ScreenDockStation station,
Map<Dockable,Integer> children)
Gets the layout of element . |
Window |
getOwner()
Deprecated. replaced by getProvider() |
WindowProvider |
getProvider()
Gets the provider for windows, which will be used as owner for newly created dialogs. |
ScreenDockStation |
layout(ScreenDockStationLayout layout)
Creates a new DockElement and changes the layout of the new
element such that is matches layout . |
ScreenDockStation |
layout(ScreenDockStationLayout layout,
Map<Integer,Dockable> children)
Creates a new DockElement and changes the layout of the new
element such that is matches layout . |
ScreenDockStationLayout |
read(DataInputStream in)
Reads a layout from a stream. |
ScreenDockStationLayout |
read(XElement element)
Reads a layout from an xml-element. |
void |
setLayout(ScreenDockStation element,
ScreenDockStationLayout layout)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
setLayout(ScreenDockStation station,
ScreenDockStationLayout layout,
Map<Integer,Dockable> children)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
write(ScreenDockStationLayout layout,
DataOutputStream out)
Writes the contents of layout into out . |
void |
write(ScreenDockStationLayout 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 ScreenDockStationFactory(Window owner)
owner
- the window which will be used as owner for dialogs
public ScreenDockStationFactory(WindowProvider owner)
owner
- the window which will be used as owner for dialogs
Method Detail |
---|
@Deprecated public Window getOwner()
getProvider()
public WindowProvider getProvider()
public String getID()
DockConverter
getID
in interface DockConverter<ScreenDockStation,ScreenDockStationLayout>
public ScreenDockStationLayout getLayout(ScreenDockStation station, Map<Dockable,Integer> children)
DockConverter
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 DockConverter<ScreenDockStation,ScreenDockStationLayout>
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(ScreenDockStation element, ScreenDockStationLayout layout)
DockConverter
layout
and changes the layout of
element
accordingly. This method should not add or remove
children to or from element
.
setLayout
in interface DockConverter<ScreenDockStation,ScreenDockStationLayout>
element
- the element whose properties will be changedlayout
- the new set of propertiespublic void setLayout(ScreenDockStation station, ScreenDockStationLayout layout, Map<Integer,Dockable> children)
DockConverter
layout
and changes the layout of
element
accordingly. This method should remove all
children from element
and add new children.
setLayout
in interface DockConverter<ScreenDockStation,ScreenDockStationLayout>
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 ScreenDockStation layout(ScreenDockStationLayout 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<ScreenDockStation,ScreenDockStationLayout>
layout
- the new layout
null
if layout can't be usedpublic ScreenDockStation layout(ScreenDockStationLayout layout, Map<Integer,Dockable> children)
DockFactory
DockElement
and changes the layout of the new
element such that is matches layout
.
layout
in interface DockFactory<ScreenDockStation,ScreenDockStationLayout>
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 void write(ScreenDockStationLayout layout, DataOutputStream out) throws IOException
DockConverter
layout
into out
.
write
in interface DockConverter<ScreenDockStation,ScreenDockStationLayout>
layout
- the layout to storeout
- the stream to write into
IOException
- if an I/O-error occurspublic ScreenDockStationLayout read(DataInputStream in) throws IOException
DockConverter
read
in interface DockConverter<ScreenDockStation,ScreenDockStationLayout>
in
- the stream to read from
IOException
- if an I/O-error occurspublic void write(ScreenDockStationLayout layout, XElement element)
DockConverter
layout
into element
.
write
in interface DockConverter<ScreenDockStation,ScreenDockStationLayout>
layout
- the layout to storeelement
- an xml-element into which this method should write, the
attributes of element
should not be changed.public ScreenDockStationLayout read(XElement element)
DockConverter
read
in interface DockConverter<ScreenDockStation,ScreenDockStationLayout>
element
- the element to read, should not be changed by this
method.
protected ScreenDockStation createStation()
ScreenDockStation
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |