org.progeeks.util
Class DefaultViewFactory

java.lang.Object
  extended by org.progeeks.util.DefaultViewFactory
All Implemented Interfaces:
ViewFactory
Direct Known Subclasses:
DefaultJComponentFactory, DefaultWindowFactory

public class DefaultViewFactory
extends java.lang.Object
implements ViewFactory

Default implementation of ViewFactory that will instantiate a ContextView of a specified class type. A best effort is made to match the context with an appropriate constructor on the view class.

Version:
$Revision: 1.1 $
Author:
Paul Speed

Constructor Summary
DefaultViewFactory(java.lang.Class viewType)
           
 
Method Summary
 ContextView createView(ViewContext context)
          Called to create a view for the specified context.
 void destroyView(ContextView view)
          Called to destroy a specific view previously created with this factory.
 java.lang.Class getViewType()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultViewFactory

public DefaultViewFactory(java.lang.Class viewType)
Method Detail

getViewType

public java.lang.Class getViewType()

createView

public ContextView createView(ViewContext context)
Called to create a view for the specified context.

Specified by:
createView in interface ViewFactory

destroyView

public void destroyView(ContextView view)
Called to destroy a specific view previously created with this factory. Default implementation does nothing.

Specified by:
destroyView in interface ViewFactory

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2002-2003 Paul Speed. All Rights Reserved.