Package adams.flow.sink.sequenceplotter
Class SimpleErrorPaintlet
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Paintlet>
,SizeOfHandler
,Paintlet
,PaintletWithOptionalPointPreprocessor
,Serializable
public class SimpleErrorPaintlet extends AbstractErrorPaintlet
Simple error plots: line, errorbar, box.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
SimpleErrorPaintlet.PlotType
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleErrorPaintlet.PlotType
how to paint the errors.
-
Field Summary
Fields Modifier and Type Field Description protected int
m_MarkerLength
the length of the markers in case ofSimpleErrorPaintlet.PlotType.BAR
.protected SimpleErrorPaintlet.PlotType
m_PlotType
the plot type.-
Fields inherited from class adams.flow.sink.sequenceplotter.AbstractErrorPaintlet
m_PointPreprocessor
-
Fields inherited from class adams.gui.visualization.core.AbstractStrokePaintlet
m_StrokeThickness
-
Fields inherited from class adams.gui.visualization.core.AbstractPaintlet
m_Enabled, m_Initializing, m_Panel, m_RepaintOnChange
-
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 SimpleErrorPaintlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected void
drawData(Graphics g, SequencePlotSequence data, Color color)
Draws the error data with the given color.protected void
drawErrorBar(Graphics g, AxisPanel axisX, AxisPanel axisY, SequencePlotPoint point)
Draws a bars representing the errors.protected void
drawErrorBox(Graphics g, AxisPanel axisX, AxisPanel axisY, SequencePlotPoint point)
Draws a box representing the errors.protected void
drawErrorLine(Graphics g, AxisPanel axisX, AxisPanel axisY, SequencePlotPoint point)
Draws a simple line representing the errors.int
getMarkerLength()
Returns the length of the markers in case ofSimpleErrorPaintlet.PlotType.BAR
.SimpleErrorPaintlet.PlotType
getPlotType()
Returns the type of plot.String
globalInfo()
Returns a string describing the object.String
markerLengthTipText()
Returns the tip text for this property.String
plotTypeTipText()
Returns the tip text for this property.void
setMarkerLength(int value)
Sets the length of the markers in case ofSimpleErrorPaintlet.PlotType.BAR
.void
setPlotType(SimpleErrorPaintlet.PlotType value)
Sets the type of plot.boolean
supportsPointPreprocessor()
Returns whether point preprocessing is actually supported.-
Methods inherited from class adams.flow.sink.sequenceplotter.AbstractErrorPaintlet
doPerformPaint, getColor, getPaintMoment, getPlotterPanel, getPointPreprocessor, initialize, newPointPreprocessor, pointPreprocessorTipText, setPointPreprocessor
-
Methods inherited from class adams.gui.visualization.core.AbstractStrokePaintlet
applyStroke, getStrokeThickness, getStrokeWidth, performPaint, setStrokeThickness, strokeThicknessTipText
-
Methods inherited from class adams.gui.visualization.core.AbstractPaintlet
canPaint, finishInit, forCommandLine, forName, getPaintlets, getPanel, getPlot, getRepaintOnChange, hasPanel, isEnabled, isInitializing, memberChanged, memberChanged, paint, repaint, setEnabled, setPanel, setPanel, setRepaintOnChange, shallowCopy, shallowCopy, updatePanel
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, getDefaultLoggingLevel, getOptionManager, 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.gui.visualization.core.Paintlet
canPaint, getPanel, getPlot, getRepaintOnChange, hasPanel, isEnabled, paint, performPaint, setEnabled, setPanel, setPanel, setRepaintOnChange
-
Methods inherited from interface adams.core.ShallowCopySupporter
shallowCopy, shallowCopy
-
-
-
-
Field Detail
-
m_PlotType
protected SimpleErrorPaintlet.PlotType m_PlotType
the plot type.
-
m_MarkerLength
protected int m_MarkerLength
the length of the markers in case ofSimpleErrorPaintlet.PlotType.BAR
.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractErrorPaintlet
-
setPlotType
public void setPlotType(SimpleErrorPaintlet.PlotType value)
Sets the type of plot.- Parameters:
value
- the type
-
getPlotType
public SimpleErrorPaintlet.PlotType getPlotType()
Returns the type of plot.- Returns:
- the type
-
plotTypeTipText
public String plotTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMarkerLength
public void setMarkerLength(int value)
Sets the length of the markers in case ofSimpleErrorPaintlet.PlotType.BAR
.- Parameters:
value
- the length in pixels
-
getMarkerLength
public int getMarkerLength()
Returns the length of the markers in case ofSimpleErrorPaintlet.PlotType.BAR
.- Returns:
- the length in pixels
-
markerLengthTipText
public String markerLengthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
supportsPointPreprocessor
public boolean supportsPointPreprocessor()
Returns whether point preprocessing is actually supported.- Specified by:
supportsPointPreprocessor
in interfacePaintletWithOptionalPointPreprocessor
- Overrides:
supportsPointPreprocessor
in classAbstractErrorPaintlet
- Returns:
- true if supported
-
drawErrorLine
protected void drawErrorLine(Graphics g, AxisPanel axisX, AxisPanel axisY, SequencePlotPoint point)
Draws a simple line representing the errors.- Parameters:
g
- the graphics contextaxisX
- the X axisaxisY
- the Y axispoint
- the point to draw
-
drawErrorBar
protected void drawErrorBar(Graphics g, AxisPanel axisX, AxisPanel axisY, SequencePlotPoint point)
Draws a bars representing the errors.- Parameters:
g
- the graphics contextaxisX
- the X axisaxisY
- the Y axispoint
- the point to draw
-
drawErrorBox
protected void drawErrorBox(Graphics g, AxisPanel axisX, AxisPanel axisY, SequencePlotPoint point)
Draws a box representing the errors.- Parameters:
g
- the graphics contextaxisX
- the X axisaxisY
- the Y axispoint
- the point to draw
-
drawData
protected void drawData(Graphics g, SequencePlotSequence data, Color color)
Draws the error data with the given color.- Specified by:
drawData
in classAbstractErrorPaintlet
- Parameters:
g
- the graphics contextdata
- the error data to drawcolor
- the color to draw in
-
-