Package adams.data.textrenderer
Class AbstractLimitedTextRenderer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.textrenderer.AbstractTextRenderer
-
- adams.data.textrenderer.AbstractLimitedTextRenderer
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,LimitedTextRenderer
,TextRenderer
,Serializable
- Direct Known Subclasses:
AbstractLineNumberedLimitedTextRenderer
,MapTextRenderer
,SpreadSheetTextRenderer
public abstract class AbstractLimitedTextRenderer extends AbstractTextRenderer implements LimitedTextRenderer
Ancestor for renderers that can limit the output.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DOTS
protected int
m_ActualLimit
the actual limit.protected int
m_Limit
the maximum to render.-
Fields inherited from class adams.data.textrenderer.AbstractTextRenderer
m_Default, m_Renderers
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractLimitedTextRenderer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected int
getActualLimit()
Returns the actual limit to use.abstract int
getDefaultLimit()
Returns the default limit.int
getLimit()
Returns the maximum of rows to render.abstract Integer
getMaxLimit()
Returns the maximum limit.abstract Integer
getMinLimit()
Returns the minimum limit.abstract String
limitTipText()
Returns the tip text for this property.String
render(Object obj)
Renders the object as text.String
renderUnlimited(Object obj)
Renders the object as text with no limits.void
setLimit(int value)
Sets the maximum of rows to render.-
Methods inherited from class adams.data.textrenderer.AbstractTextRenderer
check, doRender, getDefaultRenderer, getRenderer, getRenderer, getRenderers, getRenderers, renderObject
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.data.textrenderer.TextRenderer
handles, handles
-
-
-
-
Field Detail
-
DOTS
public static final String DOTS
- See Also:
- Constant Field Values
-
m_Limit
protected int m_Limit
the maximum to render.
-
m_ActualLimit
protected int m_ActualLimit
the actual limit.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
getDefaultLimit
public abstract int getDefaultLimit()
Returns the default limit.- Specified by:
getDefaultLimit
in interfaceLimitedTextRenderer
- Returns:
- the default
-
getMinLimit
public abstract Integer getMinLimit()
Returns the minimum limit.- Specified by:
getMinLimit
in interfaceLimitedTextRenderer
- Returns:
- the minimum
-
getMaxLimit
public abstract Integer getMaxLimit()
Returns the maximum limit.- Specified by:
getMaxLimit
in interfaceLimitedTextRenderer
- Returns:
- the maximum
-
setLimit
public void setLimit(int value)
Sets the maximum of rows to render.- Specified by:
setLimit
in interfaceLimitedTextRenderer
- Parameters:
value
- the maximum
-
getLimit
public int getLimit()
Returns the maximum of rows to render.- Specified by:
getLimit
in interfaceLimitedTextRenderer
- Returns:
- the maximum
-
limitTipText
public abstract String limitTipText()
Returns the tip text for this property.- Specified by:
limitTipText
in interfaceLimitedTextRenderer
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getActualLimit
protected int getActualLimit()
Returns the actual limit to use.- Returns:
- the actual limit
-
render
public String render(Object obj)
Renders the object as text.- Specified by:
render
in interfaceTextRenderer
- Overrides:
render
in classAbstractTextRenderer
- Parameters:
obj
- the object to render- Returns:
- the generated string or null if failed to render
-
renderUnlimited
public String renderUnlimited(Object obj)
Renders the object as text with no limits.- Specified by:
renderUnlimited
in interfaceLimitedTextRenderer
- Parameters:
obj
- the object to render- Returns:
- the generated string or null if failed to render
-
-