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 StringDOTSprotected intm_ActualLimitthe actual limit.protected intm_Limitthe 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 voiddefineOptions()Adds options to the internal list of options.protected intgetActualLimit()Returns the actual limit to use.abstract intgetDefaultLimit()Returns the default limit.intgetLimit()Returns the maximum of rows to render.abstract IntegergetMaxLimit()Returns the maximum limit.abstract IntegergetMinLimit()Returns the minimum limit.abstract StringlimitTipText()Returns the tip text for this property.Stringrender(Object obj)Renders the object as text.StringrenderUnlimited(Object obj)Renders the object as text with no limits.voidsetLimit(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:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
getDefaultLimit
public abstract int getDefaultLimit()
Returns the default limit.- Specified by:
getDefaultLimitin interfaceLimitedTextRenderer- Returns:
- the default
-
getMinLimit
public abstract Integer getMinLimit()
Returns the minimum limit.- Specified by:
getMinLimitin interfaceLimitedTextRenderer- Returns:
- the minimum
-
getMaxLimit
public abstract Integer getMaxLimit()
Returns the maximum limit.- Specified by:
getMaxLimitin interfaceLimitedTextRenderer- Returns:
- the maximum
-
setLimit
public void setLimit(int value)
Sets the maximum of rows to render.- Specified by:
setLimitin interfaceLimitedTextRenderer- Parameters:
value- the maximum
-
getLimit
public int getLimit()
Returns the maximum of rows to render.- Specified by:
getLimitin interfaceLimitedTextRenderer- Returns:
- the maximum
-
limitTipText
public abstract String limitTipText()
Returns the tip text for this property.- Specified by:
limitTipTextin 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:
renderin interfaceTextRenderer- Overrides:
renderin 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:
renderUnlimitedin interfaceLimitedTextRenderer- Parameters:
obj- the object to render- Returns:
- the generated string or null if failed to render
-
-