gumbo.visualize.data
Interface DataViewFactory

All Known Implementing Classes:
AbstractDataViewFactory

public interface DataViewFactory

An interface for a factory that creates data views and their graphic implementations. Implementations support a specific type of presentation (graph, tree, list, etc.) using a specific type of native graphics (Swing, Java 3D, JOGL, etc.). By convention, the view factory is responsible for initiating updates to a view, including its layout, but implementation of the layout is left to the client, graphic, and/or a layout engine (see LayoutWholeView). A factory can be stateless, in which case it can be a singleton, or it can be stateful, maintaining the current whole view.

To assure proper coordination of view update and disposal, clients must use the methods in this class and its subclasses and not the dispose() methods in the whole and part data views and graphic views.

Version:
$Revision: 1.3 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Method Summary
 void disposeWholeView(WholeView wholeView)
          Called by the client to destroy a whole view compatible with this factory, including the view's graphic implementation and any part views and their graphic implementations.
 WholeView newWholeView(WholeModel wholeModel)
          Called by the client to create a new whole view of a whole model, including its graphic implementation and any part views and their graphic implementations.
 

Method Detail

newWholeView

public WholeView newWholeView(WholeModel wholeModel)
Called by the client to create a new whole view of a whole model, including its graphic implementation and any part views and their graphic implementations.

Parameters:
wholeModel - The whole model. Never null.
Returns:
A new whole view. Never null.
Throws:
java.lang.UnsupportedOperationException - Unsupported whole or part data model type.

disposeWholeView

public void disposeWholeView(WholeView wholeView)
Called by the client to destroy a whole view compatible with this factory, including the view's graphic implementation and any part views and their graphic implementations. Does nothing if the view has already been disposed. To assure proper coordination of disposal, clients must use this method and not the dispose() method on the whole view.

Parameters:
wholeView - The whole view. Never null.
Throws:
java.lang.UnsupportedOperationException - Unsupported whole or part data model type.