Class WekaInstancesRenderer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
-
- adams.gui.visualization.debug.objectrenderer.WekaInstancesRenderer
-
- All Implemented Interfaces:
adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,adams.gui.visualization.debug.objectrenderer.ObjectRenderer
,Serializable
public class WekaInstancesRenderer extends adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
Renders Weka Instances/Instance objects.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Integer
m_LastLimit
the last limit.protected InstancesTable
m_LastTable
the last setup.static int
MAX_ROWS
-
Constructor Summary
Constructors Constructor Description WekaInstancesRenderer()
-
Method Summary
All Methods Instance Methods Concrete 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.protected String
doRender(Object obj, JPanel panel, Integer limit)
Performs the actual rendering.protected String
doRenderCached(Object obj, JPanel panel, Integer limit)
Performs the actual rendering.boolean
handles(Class cls)
Checks whether the renderer can handle the specified class.boolean
supportsLimit(Object obj)
Returns whether a limit is supported by the renderer.-
Methods inherited from class adams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
getRenderer, getRenderer, getRenderers, initRenderers, instantiate, render, renderCached
-
-
-
-
Field Detail
-
MAX_ROWS
public static final int MAX_ROWS
- See Also:
- Constant Field Values
-
m_LastTable
protected InstancesTable m_LastTable
the last setup.
-
m_LastLimit
protected Integer m_LastLimit
the last limit.
-
-
Method Detail
-
supportsLimit
public boolean supportsLimit(Object obj)
Returns whether a limit is supported by the renderer.- Specified by:
supportsLimit
in interfaceadams.gui.visualization.debug.objectrenderer.ObjectRenderer
- Overrides:
supportsLimit
in classadams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
- Parameters:
obj
- the object to render- Returns:
- true if supplying a limit has an effect
-
handles
public boolean handles(Class cls)
Checks whether the renderer can handle the specified class.- Specified by:
handles
in interfaceadams.gui.visualization.debug.objectrenderer.ObjectRenderer
- Specified by:
handles
in classadams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
- Parameters:
cls
- the class to check- Returns:
- true if the renderer can handle this type of object
-
canRenderCached
public boolean canRenderCached(Object obj, JPanel panel)
Checks whether the renderer can use a cached setup to render an object.- Specified by:
canRenderCached
in interfaceadams.gui.visualization.debug.objectrenderer.ObjectRenderer
- Overrides:
canRenderCached
in classadams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
- Parameters:
obj
- the object to renderpanel
- the panel to render into- Returns:
- true if possible
-
doRenderCached
protected String doRenderCached(Object obj, JPanel panel, Integer limit)
Performs the actual rendering.- Overrides:
doRenderCached
in classadams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
- 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
-
doRender
protected String doRender(Object obj, JPanel panel, Integer limit)
Performs the actual rendering.- Specified by:
doRender
in classadams.gui.visualization.debug.objectrenderer.AbstractObjectRenderer
- 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
-
-