adams.gui.visualization.stats.paintlet
Class AbstractZScorePaintlet

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.AbstractZScorePaintlet
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<Paintlet>, SizeOfHandler, AntiAliasingPaintlet, Paintlet, Serializable
Direct Known Subclasses:
ZScoreCircle, ZScoreCross

public abstract class AbstractZScorePaintlet
extends AbstractColorPaintlet
implements AntiAliasingPaintlet

Abstract class for creating z score paintlets.

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

Field Summary
protected  boolean m_AntiAliasingEnabled
          whether anti-aliasing is enabled.
protected  AxisPanel m_AxisBottom
          x axis of plot
protected  AxisPanel m_AxisLeft
          y axis of plot
protected  double[] m_Data
          data from the attribute
protected  int m_Index
          index of the attribute being plotted
protected  Color m_LineColor
          the line color.
 
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
AbstractZScorePaintlet()
           
 
Method Summary
 String antiAliasingEnabledTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  void drawData(Graphics g)
           
 Color getLineColor()
          Get the color for drawing the lines
 PaintEvent.PaintMoment getPaintMoment()
           
protected  void initialize()
           
 boolean isAntiAliasingEnabled()
          Returns whether anti-aliasing is used.
 String lineColorTipText()
          Tip text for the line color property.
 void parameters(Instances inst, int ind)
          pass the required parameters for the paintlet
 void performPaint(Graphics g, PaintEvent.PaintMoment moment)
          The paint routine of the paintlet.
 void setAntiAliasingEnabled(boolean value)
          Sets whether to use anti-aliasing.
 void setIndex(int ind)
          set the index of the attribute
 void setLineColor(Color val)
          Set the color to draw the lines.
 
Methods inherited from class adams.gui.visualization.stats.paintlet.AbstractColorPaintlet
colorTipText, 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_Index

protected int m_Index
index of the attribute being plotted


m_Data

protected double[] m_Data
data from the attribute


m_AxisLeft

protected AxisPanel m_AxisLeft
y axis of plot


m_AxisBottom

protected AxisPanel m_AxisBottom
x axis of plot


m_LineColor

protected Color m_LineColor
the line color.


m_AntiAliasingEnabled

protected boolean m_AntiAliasingEnabled
whether anti-aliasing is enabled.

Constructor Detail

AbstractZScorePaintlet

public AbstractZScorePaintlet()
Method Detail

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractColorPaintlet

initialize

protected void initialize()
Overrides:
initialize in class AbstractPaintlet

setLineColor

public void setLineColor(Color val)
Set the color to draw the lines.

Parameters:
val - color for lines

getLineColor

public Color getLineColor()
Get the color for drawing the lines

Returns:
color for lines

lineColorTipText

public String lineColorTipText()
Tip text for the line color property.

Returns:
String to describe the property

setAntiAliasingEnabled

public void setAntiAliasingEnabled(boolean value)
Sets whether to use anti-aliasing.

Specified by:
setAntiAliasingEnabled in interface AntiAliasingPaintlet
Parameters:
value - if true then anti-aliasing is used

isAntiAliasingEnabled

public boolean isAntiAliasingEnabled()
Returns whether anti-aliasing is used.

Specified by:
isAntiAliasingEnabled in interface AntiAliasingPaintlet
Returns:
true if anti-aliasing is used

antiAliasingEnabledTipText

public String antiAliasingEnabledTipText()
Returns the tip text for this property.

Specified by:
antiAliasingEnabledTipText in interface AntiAliasingPaintlet
Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

getPaintMoment

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

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

setIndex

public void setIndex(int ind)
set the index of the attribute


parameters

public void parameters(Instances inst,
                       int ind)
pass the required parameters for the paintlet

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

drawData

protected void drawData(Graphics g)


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