|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.gui.visualization.core.AbstractPaintlet
adams.gui.visualization.core.AbstractStrokePaintlet
adams.gui.visualization.stats.paintlet.AbstractColorPaintlet
adams.gui.visualization.stats.paintlet.HistogramPaintlet
public class HistogramPaintlet
Paints the histogram
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
-fill-bins (property: fillBins) Fill the bins with color
-fill-color <java.awt.Color> (property: fillColor) color for filling the bins default: #ff0000
| Field Summary | |
|---|---|
protected AxisPanel |
m_AxisBottom
x axis of the plot |
protected AxisPanel |
m_AxisLeft
Y axis of the plot |
protected double |
m_BinWidth
Width of each bin in the histogram |
protected double[][] |
m_Data
2d array containing bin min values and frequency values |
protected boolean |
m_Fill
Whether to fill the bins with color |
protected Color |
m_FillColor
Color to fill the bins with if fill is chosen |
protected String |
m_Name
Name for x axis |
protected int |
m_NumBins
Number of bins in the histogram |
| 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 | |
|---|---|
HistogramPaintlet()
|
|
| Method Summary | |
|---|---|
void |
defineOptions()
|
String |
fillBinsTipText()
Tip text for the fill bins property |
String |
fillColorTipText()
Tip text for the color property |
boolean |
getFillBins()
get whether the bins should be filled with color |
Color |
getFillColor()
Get the color for filling the bins |
PaintEvent.PaintMoment |
getPaintMoment()
|
String |
globalInfo()
|
void |
performPaint(Graphics g,
PaintEvent.PaintMoment moment)
The paint routine of the paintlet. |
void |
setData(double[][] data,
double binWidth,
String name)
Set the data for plotting the histogram |
void |
setFillBins(boolean val)
Set whether the bins should be filled with color |
void |
setFillColor(Color val)
Set the color for filling the bins |
void |
setNumBins(int val)
Set the number of bins in the histogram |
| 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 |
|---|
protected AxisPanel m_AxisLeft
protected AxisPanel m_AxisBottom
protected int m_NumBins
protected double m_BinWidth
protected double[][] m_Data
protected String m_Name
protected boolean m_Fill
protected Color m_FillColor
| Constructor Detail |
|---|
public HistogramPaintlet()
| Method Detail |
|---|
public PaintEvent.PaintMoment getPaintMoment()
getPaintMoment in interface PaintletgetPaintMoment in class AbstractPaintletpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractColorPaintletpublic void setFillBins(boolean val)
val - True if bins filledpublic boolean getFillBins()
public String fillBinsTipText()
public void setFillColor(Color val)
val - Color for fillpublic Color getFillColor()
public String fillColorTipText()
public void performPaint(Graphics g,
PaintEvent.PaintMoment moment)
performPaint in interface PaintletperformPaint in class AbstractPaintletg - the graphics context to use for paintingmoment - what PaintEvent.PaintMoment is currently being paintedpublic String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void setNumBins(int val)
val - Number of bins
public void setData(double[][] data,
double binWidth,
String name)
data - 2d array containing bin minimum values and frequenciesbinWidth - Width of each binname - Name for x axis
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||