public abstract class AbstractViewMap extends java.lang.Object implements ViewFactoryManager, ViewSerializer
Constructor and Description |
---|
AbstractViewMap() |
Modifier and Type | Method and Description |
---|---|
protected void |
addView(java.lang.Object id,
View view) |
boolean |
contains(View view)
Returns true if this view map contains the view.
|
protected View |
getView(java.lang.Object id) |
View |
getViewAtIndex(int index)
Returns the view at a specific index.
|
int |
getViewCount()
Returns the number of views in this map.
|
ViewFactory[] |
getViewFactories()
Returns the view factories.
|
View |
readView(java.io.ObjectInputStream in)
Reads and returns a view.
|
protected abstract java.lang.Object |
readViewId(java.io.ObjectInputStream in) |
protected void |
removeView(java.lang.Object id) |
void |
writeView(View view,
java.io.ObjectOutputStream out)
Writes a view to a stream.
|
protected abstract void |
writeViewId(java.lang.Object id,
java.io.ObjectOutputStream out) |
protected abstract void writeViewId(java.lang.Object id, java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
protected abstract java.lang.Object readViewId(java.io.ObjectInputStream in) throws java.io.IOException
java.io.IOException
public int getViewCount()
public View getViewAtIndex(int index)
index
- the view indexpublic ViewFactory[] getViewFactories()
ViewFactoryManager
getViewFactories
in interface ViewFactoryManager
public boolean contains(View view)
view
- the viewpublic 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 errorprotected void addView(java.lang.Object id, View view)
protected void removeView(java.lang.Object id)
protected View getView(java.lang.Object id)