Class AbstractOverlayPaintlet
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.core.AbstractPaintlet
-
- adams.gui.visualization.core.AbstractStrokePaintlet
-
- adams.gui.visualization.stats.paintlet.AbstractColorPaintlet
-
- adams.gui.visualization.stats.paintlet.AbstractOverlayPaintlet
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Paintlet>
,SizeOfHandler
,Paintlet
,Serializable
- Direct Known Subclasses:
CoordinatesPaintlet
,DiagonalPaintlet
,LowessPaintlet
,ScatterPlotPolygonPaintlet
public abstract class AbstractOverlayPaintlet extends AbstractColorPaintlet
Abstract class for paintlets that draw the overlays.- Version:
- $Revision$
- Author:
- msf8
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AxisPanel
m_AxisBottom
X axis of scatter plotprotected AxisPanel
m_AxisLeft
y axis of scatter plotprotected boolean
m_Calculated
Whether the overlay has been calculatedprotected int
m_XInd
Index of the attribute displayed on the x axisprotected int
m_YInd
Index of the attribute displayed on the y axis-
Fields inherited from class adams.gui.visualization.stats.paintlet.AbstractColorPaintlet
m_Color, m_Data
-
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 AbstractOverlayPaintlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
calculate()
Calculates the data for the paintlet, doesn't handle the drawing of the overlay.protected void
doPerformPaint(Graphics g, PaintEvent.PaintMoment moment)
The paint routine of the paintlet.protected abstract void
drawData(Graphics g)
Draw the overlay onto the scatter plot, only calculates the value to position in this methodboolean
getCalculated()
Get whether the paintlet has been calculatedPaintEvent.PaintMoment
getPaintMoment()
Returns when this paintlet is to be executed.void
parameters(SpreadSheet data, int x, int y)
Pass the parameters required by the overlay paintletvoid
setCalculated(boolean val)
set whether the paintlet has been calculatedvoid
setIndicator(boolean val)
Set whether an indicator should be shown on the sidesvoid
setWindowSize(int val)
Set the window size, only applicable for the lowess overlay paintlet-
Methods inherited from class adams.gui.visualization.stats.paintlet.AbstractColorPaintlet
colorTipText, defineOptions, getColor, getData, setColor, setData
-
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, initialize, 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, globalInfo, 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
-
-
-
-
Field Detail
-
m_XInd
protected int m_XInd
Index of the attribute displayed on the x axis
-
m_YInd
protected int m_YInd
Index of the attribute displayed on the y axis
-
m_Calculated
protected boolean m_Calculated
Whether the overlay has been calculated
-
m_AxisBottom
protected AxisPanel m_AxisBottom
X axis of scatter plot
-
m_AxisLeft
protected AxisPanel m_AxisLeft
y axis of scatter plot
-
-
Method Detail
-
getPaintMoment
public PaintEvent.PaintMoment getPaintMoment()
Description copied from class:AbstractPaintlet
Returns when this paintlet is to be executed.- Specified by:
getPaintMoment
in interfacePaintlet
- Specified by:
getPaintMoment
in classAbstractPaintlet
- Returns:
- when this paintlet is to be executed
-
parameters
public void parameters(SpreadSheet data, int x, int y)
Pass the parameters required by the overlay paintlet- Parameters:
data
- instances to plotx
- Index of attribute on x axisy
- Index of attribute on y axis
-
setWindowSize
public void setWindowSize(int val)
Set the window size, only applicable for the lowess overlay paintlet- Parameters:
val
- int size of window
-
setIndicator
public void setIndicator(boolean val)
Set whether an indicator should be shown on the sides- Parameters:
val
- true if indicator shown
-
calculate
public void calculate()
Calculates the data for the paintlet, doesn't handle the drawing of the overlay. Sometimes just initializes the axispanels
-
doPerformPaint
protected void doPerformPaint(Graphics g, PaintEvent.PaintMoment moment)
The paint routine of the paintlet.- Specified by:
doPerformPaint
in classAbstractStrokePaintlet
- Parameters:
g
- the graphics context to use for paintingmoment
- whatPaintEvent.PaintMoment
is currently being painted
-
drawData
protected abstract void drawData(Graphics g)
Draw the overlay onto the scatter plot, only calculates the value to position in this method- Parameters:
g
- Graphics drawn on
-
setCalculated
public void setCalculated(boolean val)
set whether the paintlet has been calculated- Parameters:
val
- True if paintlet calculated
-
getCalculated
public boolean getCalculated()
Get whether the paintlet has been calculated- Returns:
- True if paintlet calculated
-
-