net.infonode.docking.util

Class AbstractViewMap

public abstract class AbstractViewMap extends Object implements ViewFactoryManager, ViewSerializer

Base class for view maps.

Since: IDW 1.1.0

Version: $Revision: 1.11 $

Author: $Author: jesper $

Method Summary
protected voidaddView(Object id, View view)
booleancontains(View view)
Returns true if this view map contains the view.
protected ViewgetView(Object id)
ViewgetViewAtIndex(int index)
Returns the view at a specific index.
intgetViewCount()
Returns the number of views in this map.
ViewFactory[]getViewFactories()
ViewreadView(ObjectInputStream in)
protected abstract ObjectreadViewId(ObjectInputStream in)
protected voidremoveView(Object id)
voidwriteView(View view, ObjectOutputStream out)
protected abstract voidwriteViewId(Object id, ObjectOutputStream out)

Method Detail

addView

protected void addView(Object id, View view)

contains

public boolean contains(View view)
Returns true if this view map contains the view.

Parameters: view the view

Returns: true if this view map contains the view

Since: IDW 1.3.0

getView

protected View getView(Object id)

getViewAtIndex

public View getViewAtIndex(int index)
Returns the view at a specific index. The view index is the same as the number of views in the map when the view was added to the map.

Parameters: index the view index

Returns: the view at the index

getViewCount

public int getViewCount()
Returns the number of views in this map.

Returns: the number of views in this map

getViewFactories

public ViewFactory[] getViewFactories()

readView

public View readView(ObjectInputStream in)

readViewId

protected abstract Object readViewId(ObjectInputStream in)

removeView

protected void removeView(Object id)

writeView

public void writeView(View view, ObjectOutputStream out)

writeViewId

protected abstract void writeViewId(Object id, ObjectOutputStream out)