Interface ObjectRenderer
-
- All Known Implementing Classes:
AbstractObjectRenderer
,FlowContainerRenderer
,ImageRenderer
,MapRenderer
,Mat5ArrayRenderer
,PlainTextRenderer
,PropertiesRenderer
,ReportRenderer
,SetRenderer
,SpreadSheetRenderer
,TimeseriesRenderer
,WekaInstancesRenderer
public interface ObjectRenderer
Interface for classes that render objects visually.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canRenderCached(Object obj, JPanel panel)
Checks whether the renderer can use a cached setup to render an object.boolean
handles(Class cls)
Checks whether the renderer can handle the specified class.String
render(Object obj, JPanel panel, Integer limit)
Renders the object with a new renderer setup.String
renderCached(Object obj, JPanel panel, Integer limit)
Renders the object using a cached setup (if available).boolean
supportsLimit(Object obj)
Returns whether a limit is supported by the renderer.
-
-
-
Method Detail
-
supportsLimit
boolean supportsLimit(Object obj)
Returns whether a limit is supported by the renderer.- Parameters:
obj
- the object to render- Returns:
- true if supplying a limit has an effect
-
handles
boolean handles(Class cls)
Checks whether the renderer can handle the specified class.- Parameters:
cls
- the class to check- Returns:
- true if the renderer can handle this type of object
-
render
String render(Object obj, JPanel panel, Integer limit)
Renders the object with a new renderer setup.- Parameters:
obj
- the object to renderpanel
- the panel to render intolimit
- the limit to use for the rendering (if applicable), ignored if null- Returns:
- null if successful, otherwise error message
-
canRenderCached
boolean canRenderCached(Object obj, JPanel panel)
Checks whether the renderer can use a cached setup to render an object.- Parameters:
obj
- the object to renderpanel
- the panel to render into- Returns:
- true if possible
-
renderCached
String renderCached(Object obj, JPanel panel, Integer limit)
Renders the object using a cached setup (if available).- Parameters:
obj
- the object to renderpanel
- the panel to render intolimit
- the limit to use for the rendering (if applicable), ignored if null- Returns:
- null if successful, otherwise error message
-
-