|
Version: 1.1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biomoby.service.dashboard.renderers.AbstractRenderer
org.biomoby.service.dashboard.renderers.CollectionRenderer
public abstract class 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.
Various subclasses of this class gets such renderer and a whole collection, and iterates over it - putting resulting components in various layouts (vertically below each other, in a tabbed pane, etc.).
Its method save2File(org.biomoby.service.dashboard.data.DataContainer, java.io.File) invents new file name for each
element in a collection and calls a specific renderer to save the
element in a file.
| Field Summary |
|---|
| Fields inherited from interface org.biomoby.service.dashboard.renderers.Renderer |
|---|
CLASS, CLASS_NAME, DATA, DATA_CONTAINER, MIME_TYPE, MOBY_TYPE |
| Method Summary | |
|---|---|
boolean |
canHandle(String criterion,
Object value)
Never used... |
abstract JComponent |
getComponent(DataContainer data)
Return a JComponent displaying (rendering) given data. |
boolean |
save2File(DataContainer data,
File file)
It creates a separate file for each element of the collection in 'data' (it does nothing if 'data' is null, or if it does not contain a collection - an array). |
| Methods inherited from class org.biomoby.service.dashboard.renderers.AbstractRenderer |
|---|
getIcon, getName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean canHandle(String criterion,
Object value)
canHandle in interface RenderercanHandle in class AbstractRenderercriterion - is a category of the value, e.g. "MIME-TYPE"value - is a value from the category criterion, e.g. "text/xml"
public abstract JComponent getComponent(DataContainer data)
throws MobyException
Renderer
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);
getComponent in interface RenderergetComponent in class AbstractRendererdata - to be rendered
MobyException - if called with wrong type of data
public boolean save2File(DataContainer data,
File file)
throws MobyException
Note that the real saving is done by a delegate renderer, nit by this class.
save2File in interface Renderersave2File in class AbstractRendererMobyException - if saving was tried but failed
|
Version: 1.1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||