adams.gui.visualization.stats.paintlet
Class DiagonalPaintlet

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
                          extended by adams.gui.visualization.stats.paintlet.DiagonalPaintlet
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<Paintlet>, SizeOfHandler, AntiAliasingPaintlet, Paintlet, Serializable

public class DiagonalPaintlet
extends AbstractOverlayPaintlet
implements AntiAliasingPaintlet

Paintlet for displaying the diagonal overlay on the scatter plot.

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to
    the console (0 = off).
    default: 0
    minimum: 0
 
-stroke-thickness <float> (property: strokeThickness)
    The thickness of the stroke.
    default: 1.0
    minimum: 0.01
 
-color <java.awt.Color> (property: color)
    Stroke color for the paintlet
    default: #000000
 

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

Field Summary
protected  boolean m_AntiAliasingEnabled
          whether anti-aliasing is enabled.
protected  boolean m_Indicator
          Whether an indicator should be shown on the side indicating where the diagonal is and at what gradient
 
Fields inherited from class adams.gui.visualization.stats.paintlet.AbstractOverlayPaintlet
m_AxisBottom, m_AxisLeft, m_Calculated, m_XInd, m_YInd
 
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
DiagonalPaintlet()
           
 
Method Summary
 String antiAliasingEnabledTipText()
          Returns the tip text for this property.
 void calculate()
          Calculates the data for the paintlet, doesn't handle the drawing of the overlay.
 void defineOptions()
          Adds options to the internal list of options.
protected  void drawData(Graphics g)
          Draws the data on the graphics object
 String globalInfo()
          Returns a string describing the object.
 boolean isAntiAliasingEnabled()
          Returns whether anti-aliasing is used.
 void setAntiAliasingEnabled(boolean value)
          Sets whether to use anti-aliasing.
 void setIndicator(boolean val)
          Set whether an indicator should be shown on the sides
 
Methods inherited from class adams.gui.visualization.stats.paintlet.AbstractOverlayPaintlet
getCalculated, getPaintMoment, parameters, performPaint, setCalculated, setWindowSize
 
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, 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, 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_Indicator

protected boolean m_Indicator
Whether an indicator should be shown on the side indicating where the diagonal is and at what gradient


m_AntiAliasingEnabled

protected boolean m_AntiAliasingEnabled
whether anti-aliasing is enabled.

Constructor Detail

DiagonalPaintlet

public DiagonalPaintlet()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

defineOptions

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

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

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.

drawData

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

Specified by:
drawData in class AbstractOverlayPaintlet
Parameters:
g - Graphics object to display data on

calculate

public void calculate()
Description copied from class: AbstractOverlayPaintlet
Calculates the data for the paintlet, doesn't handle the drawing of the overlay. Sometimes just initializes the axispanels

Overrides:
calculate in class AbstractOverlayPaintlet

setIndicator

public void setIndicator(boolean val)
Description copied from class: AbstractOverlayPaintlet
Set whether an indicator should be shown on the sides

Overrides:
setIndicator in class AbstractOverlayPaintlet
Parameters:
val - true if indicator shown


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