Package net.infonode.docking.util
Class MixedViewHandler
java.lang.Object
net.infonode.docking.util.MixedViewHandler
- All Implemented Interfaces:
ViewFactoryManager,ViewSerializer
The mixed view map simplifies mixing static and dynamic views inside the same root window.
The static views are handled by an
AbstractViewMap and the dynamic views are handled
by an custom ViewSerializer.- Since:
- IDW 1.3.0
-
Constructor Summary
ConstructorsConstructorDescriptionMixedViewHandler(AbstractViewMap viewMap, ViewSerializer viewSerializer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the view factories.Reads and returns a view.voidwriteView(View view, ObjectOutputStream out) Writes a view to a stream.
-
Constructor Details
-
MixedViewHandler
Constructor.- Parameters:
viewMap- this map is first searched when serializing a viewviewSerializer- is used if the view was not found in the viewMap
-
-
Method Details
-
getViewFactories
Description copied from interface:ViewFactoryManagerReturns the view factories.- Specified by:
getViewFactoriesin interfaceViewFactoryManager- Returns:
- the view factories
-
writeView
Description copied from interface:ViewSerializerWrites a view to a stream. Note that the view property values are written automatically, so this method should not write them.- Specified by:
writeViewin interfaceViewSerializer- Parameters:
view- the view to writeout- the stream on which to write the view- Throws:
IOException- if there is a stream error
-
readView
Description copied from interface:ViewSerializerReads and returns a view. Must read all the data written in theViewSerializer.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.- Specified by:
readViewin interfaceViewSerializer- Parameters:
in- the stream from which to read the view state- Returns:
- the view, null if the view can't be resolved
- Throws:
IOException- if there is a stream error
-