org.biomoby.service.dashboard.renderers
Class TabCollectionRenderer
java.lang.Object
org.biomoby.service.dashboard.renderers.AbstractRenderer
org.biomoby.service.dashboard.renderers.CollectionRenderer
org.biomoby.service.dashboard.renderers.TabCollectionRenderer
- All Implemented Interfaces:
- Renderer
public class TabCollectionRenderer
- extends CollectionRenderer
This is not a normal renderer that is loaded and used through
SPI. It is explicitly called if a service result is a collection
but no renderer is here to process it as a collection, but there is
one or more renderer(s) that can process individual elements of
such collection.
Instance of this class gets such renderer and a whole collection,
and iterates over it - putting resulting components in a tabbed
pane.
- Version:
- $Id: TabCollectionRenderer.java,v 1.2 2006/02/20 05:51:11 senger Exp $
- Author:
- Martin Senger
TabCollectionRenderer
public TabCollectionRenderer(Renderer renderer)
getComponent
public JComponent getComponent(DataContainer data)
throws MobyException
- Description copied from interface:
Renderer
- Return a JComponent displaying (rendering) given data.
If it gets an array of data, it can always delegate their
accumulation to the CollectionRenderer
by saying:
if (data.getData().getClass().isArray())
return new BoxCollectionRenderer (this).getComponent (data);
- Specified by:
getComponent
in interface Renderer
- Specified by:
getComponent
in class CollectionRenderer
- Parameters:
data
- to be rendered
- Returns:
- a component for displaying data, or null if there is a
problem with data
- Throws:
MobyException
- if called with wrong type of data
Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010