public class MixedViewHandler extends java.lang.Object implements ViewFactoryManager, ViewSerializer
AbstractViewMap
and the dynamic views are handled
by an custom ViewSerializer
.Constructor and Description |
---|
MixedViewHandler(AbstractViewMap viewMap,
ViewSerializer viewSerializer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ViewFactory[] |
getViewFactories()
Returns the view factories.
|
View |
readView(java.io.ObjectInputStream in)
Reads and returns a view.
|
void |
writeView(View view,
java.io.ObjectOutputStream out)
Writes a view to a stream.
|
public MixedViewHandler(AbstractViewMap viewMap, ViewSerializer viewSerializer)
viewMap
- this map is first searched when serializing a viewviewSerializer
- is used if the view was not found in the viewMappublic ViewFactory[] getViewFactories()
ViewFactoryManager
getViewFactories
in interface ViewFactoryManager
public void writeView(View view, java.io.ObjectOutputStream out) throws java.io.IOException
ViewSerializer
writeView
in interface ViewSerializer
view
- the view to writeout
- the stream on which to write the viewjava.io.IOException
- if there is a stream errorpublic View readView(java.io.ObjectInputStream in) throws java.io.IOException
ViewSerializer
ViewSerializer.writeView(net.infonode.docking.View, java.io.ObjectOutputStream)
method.
Note that the view property values are read automatically, so this method should not read them.
This method should return null if the serialized view can't be resolved.readView
in interface ViewSerializer
in
- the stream from which to read the view statejava.io.IOException
- if there is a stream error