adams.gui.visualization.stats.paintlet
Class AbstractZOverlayPaintlet

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.AbstractZOverlayPaintlet
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<Paintlet>, SizeOfHandler, Paintlet, Serializable
Direct Known Subclasses:
MeanPaintlet, StdDevPaintlet

public abstract class AbstractZOverlayPaintlet
extends AbstractColorPaintlet

abstract class for creating z score overlay paintlets.

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

Field Summary
protected  AxisPanel m_AxisBottom
          x axis of plot
protected  AxisPanel m_AxisLeft
          y axis of plot
protected  boolean m_Calculated
          whether the overlay has been calcualated
protected  int m_Ind
          index of the attribute being displayed
 
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
AbstractZOverlayPaintlet()
           
 
Method Summary
 void calculate()
          calculates the data for the paintlet, doesn't handle the drawing of the data
protected abstract  void drawData(Graphics g)
          Draw the overlay onto the z score plot, only calculates the value to position in this method
 boolean getCalculated()
          Get whether the paintlet has been calculated
 PaintEvent.PaintMoment getPaintMoment()
           
protected  void initialize()
           
 void parameters(Instances inst, int ind)
          Pass the paramters 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
abstract  void setStd(double val)
          set the number of standard deviations for the overlay only relevant for the stddev overlay
 
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, 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_Calculated

protected boolean m_Calculated
whether the overlay has been calcualated


m_Ind

protected int m_Ind
index of the attribute being displayed


m_AxisLeft

protected AxisPanel m_AxisLeft
y axis of plot


m_AxisBottom

protected AxisPanel m_AxisBottom
x axis of plot

Constructor Detail

AbstractZOverlayPaintlet

public AbstractZOverlayPaintlet()
Method Detail

getPaintMoment

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

initialize

protected void initialize()
Overrides:
initialize in class AbstractPaintlet

setStd

public abstract void setStd(double val)
set the number of standard deviations for the overlay only relevant for the stddev overlay

Parameters:
val - number of std dev from mean

parameters

public void parameters(Instances inst,
                       int ind)
Pass the paramters required by the overlay paintlet

Parameters:
inst - Instances to be plotted
ind - index of the attribute within the instacnes

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 z score plot, only calculates the value to position in this method

Parameters:
g - graphics to draw on

calculate

public void calculate()
calculates the data for the paintlet, doesn't handle the drawing of the data


setCalculated

public void setCalculated(boolean val)
set whether the paintlet has been calculated

Parameters:
val - Truen 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.