adams.gui.visualization.stats.paintlet
Class AbstractOverlayPaintlet

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.gui.visualization.core.AbstractPaintlet
              extended by adams.gui.visualization.core.AbstractStrokePaintlet
                  extended by adams.gui.visualization.stats.paintlet.AbstractColorPaintlet
                      extended by adams.gui.visualization.stats.paintlet.AbstractOverlayPaintlet
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<Paintlet>, SizeOfHandler, Paintlet, Serializable
Direct Known Subclasses:
DiagonalPaintlet, LowessPaintlet

public abstract class AbstractOverlayPaintlet
extends AbstractColorPaintlet

Abstract class for paintlets that draw the overlays.

Version:
$Revision: 5341 $
Author:
msf8
See Also:
Serialized Form

Field Summary
protected  AxisPanel m_AxisBottom
          X axis of scatter plot
protected  AxisPanel m_AxisLeft
          y axis of scatter plot
protected  boolean m_Calculated
          Whether the overlay has been calculated
protected  int m_XInd
          Index of the attribute displayed on the x axis
protected  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_Instances
 
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_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractOverlayPaintlet()
           
 
Method Summary
 void calculate()
          Calculates the data for the paintlet, doesn't handle the drawing of the overlay.
protected abstract  void drawData(Graphics g)
          Draw the overlay onto the scatter plot, only calculates the value to position in this method
 boolean getCalculated()
          Get whether the paintlet has been calculated
 PaintEvent.PaintMoment getPaintMoment()
           
 void parameters(Instances inst, int x, int y)
          Pass the parameters required by the overlay paintlet
 void performPaint(Graphics g, PaintEvent.PaintMoment moment)
          The paint routine of the paintlet.
 void setCalculated(boolean val)
          set whether the paintlet has been calculated
 void setIndicator(boolean val)
          Set whether an indicator should be shown on the sides
 void 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, getInstances, setColor, setInstances
 
Methods inherited from class adams.gui.visualization.core.AbstractStrokePaintlet
getStrokeThickness, paint, 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, repaint, setEnabled, setPanel, setRepaintOnChange, shallowCopy, shallowCopy, updatePanel
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, getDebugLevel, getOptionManager, globalInfo, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

Constructor Detail

AbstractOverlayPaintlet

public AbstractOverlayPaintlet()
Method Detail

getPaintMoment

public PaintEvent.PaintMoment getPaintMoment()
Specified by:
getPaintMoment in interface Paintlet
Specified by:
getPaintMoment in class AbstractPaintlet

parameters

public void parameters(Instances inst,
                       int x,
                       int y)
Pass the parameters required by the overlay paintlet

Parameters:
inst - instances to plot
x - Index of attribute on x axis
y - 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


performPaint

public void performPaint(Graphics g,
                         PaintEvent.PaintMoment moment)
The paint routine of the paintlet.

Specified by:
performPaint in interface Paintlet
Specified by:
performPaint in class AbstractPaintlet
Parameters:
g - the graphics context to use for painting
moment - what PaintEvent.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


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.