adams.gui.visualization.stats.paintlet
Class AbstractScatterPlotPaintlet

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.AbstractScatterPlotPaintlet
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<Paintlet>, SizeOfHandler, AntiAliasingPaintlet, Paintlet, Serializable
Direct Known Subclasses:
ScatterPaintletCircle, ScatterPaintletCross, ScatterPaintletErrors

public abstract class AbstractScatterPlotPaintlet
extends AbstractColorPaintlet
implements AntiAliasingPaintlet

Abstract class for creating scatterplot 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  int m_Size
          size of the plot points
protected  double[] m_XData
          Data to display on the x axis
protected  int m_XIndex
          index of attribute for x axis
protected  double[] m_YData
          Data to display on the y axis
protected  int m_YIndex
          Index of attribute for 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
AbstractScatterPlotPaintlet()
           
 
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)
          draws the data on the graphics object
 PaintEvent.PaintMoment getPaintMoment()
           
 int getX_Index()
          get index of chosen attribute for x axis
 int getY_Index()
          Get index of chosen attribute for y axis
protected  void initialize()
          Initializes the members.
 boolean isAntiAliasingEnabled()
          Returns whether anti-aliasing is used.
 void performPaint(Graphics g, PaintEvent.PaintMoment moment)
          The paint routine of the paintlet.
 void setAntiAliasingEnabled(boolean value)
          Sets whether to use anti-aliasing.
 void setX_Index(int val)
          Set the index of attribute for x axis
 void setY_Index(int val)
          Set the index of attribute for y axis
 String toString()
          Returns info on scatterpaintlet object
 
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
 
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_XIndex

protected int m_XIndex
index of attribute for x axis


m_YIndex

protected int m_YIndex
Index of attribute for y axis


m_Size

protected int m_Size
size of the plot points


m_XData

protected double[] m_XData
Data to display on the x axis


m_YData

protected double[] m_YData
Data to display on the y axis


m_AxisLeft

protected AxisPanel m_AxisLeft
y axis of plot


m_AxisBottom

protected AxisPanel m_AxisBottom
x axis of plot


m_AntiAliasingEnabled

protected boolean m_AntiAliasingEnabled
whether anti-aliasing is enabled.

Constructor Detail

AbstractScatterPlotPaintlet

public AbstractScatterPlotPaintlet()
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()
Initializes the members.

Overrides:
initialize in class AbstractPaintlet

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

toString

public String toString()
Returns info on scatterpaintlet object

Overrides:
toString in class AbstractOptionHandler

drawData

protected void drawData(Graphics g)
draws the data on the graphics object

Parameters:
g - Graphics object to draw on

getX_Index

public int getX_Index()
get index of chosen attribute for x axis

Returns:
chosen index

setX_Index

public void setX_Index(int val)
Set the index of attribute for x axis

Parameters:
val - Index to set

getY_Index

public int getY_Index()
Get index of chosen attribute for y axis

Returns:
chosen index

setY_Index

public void setY_Index(int val)
Set the index of attribute for y axis

Parameters:
val - Index to set


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