com.jgoodies.uif
Class AbstractView

java.lang.Object
  extended by com.jgoodies.uif.AbstractView

public abstract class AbstractView
extends Object

An abstract superclass that reduces the effort to build views that return a lazily built panel.

Version:
$Revision: 1.5 $
Author:
Karsten Lentzsch

Constructor Summary
AbstractView()
           
 
Method Summary
protected abstract  JComponent buildPanel()
          Builds and returns this view's panel.
 JComponent getPanel()
          Returns this view's panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractView

public AbstractView()
Method Detail

getPanel

public JComponent getPanel()
Returns this view's panel. The default implementation builds the panel lazily when this method is invoked the first time. Subclasses may override this method to implement a better strategy that combines the lazy build with an eager build performed in a background thread.

Returns:
this view's built panel

buildPanel

protected abstract JComponent buildPanel()
Builds and returns this view's panel. This method is called by #getPanel if the panel has not been built before.

Returns:
this view's panel


Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.