|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.quinncurtis.chart2djava.ChartView
com.quinncurtis.spcchartjava.FrequencyHistogramChart
public class FrequencyHistogramChart
Frequency Histogram chart template. The class includes all of the objects needed to draw a complete frequency histogram chart. These objects include objects for data, a coordinate system, titles, axes, axes labels, grids and a bar plot.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
FrequencyHistogramChart()
Default constructor for the class. |
|
FrequencyHistogramChart(double[] frequencylimits,
double[] frequencyvalues)
Constructor that initializes the histogram frequency bin limits, and the data values to be analyzed for the histogram. |
Method Summary | |
---|---|
void |
addFrequencyHistogramControlLine(double xvalue,
ChartAttribute attrib)
Add a control limit line to the frequency histogram. |
void |
buildChart()
Builds the histogram using the base objects ChartView. |
void |
buildChart(ChartView chartVu)
Builds the histogram using the passed in ChartView object. |
void |
copy(FrequencyHistogramChart source)
Copies the source FrequencyHistogramChart object. |
void |
draw(java.awt.Graphics2D g)
Overrides the Draw method of the underlying ChartView class. |
void |
drawFrequencyHistogramControlLines(ChartView chartvu,
double xvalue,
ChartAttribute attrib,
boolean text)
Add a control limit line to the frequency histogram. |
void |
drawNormalCurve(ChartView chartvu,
double mean,
double stddev,
double amp,
ChartAttribute attrib)
Add a normal curve to the histogram. |
boolean |
getAutoNormalCurve()
Set to true and the normal curve is automatically drawn |
ChartAttribute |
getBarAttrib()
Get the primary bar attribute object for the bars of the histogram. |
NumericLabel |
getBarDataValue()
Get the numeric label template object used to place numeric values on the bars. |
java.awt.Color |
getBarFillColor()
Sets the fill color for the chart object. |
java.awt.Color |
getBarLineColor()
Sets the line color for the chart object. |
double |
getBarLineWidth()
Sets the line width for the chart object. |
int |
getChartOrientation()
Get/Set the orientation of the histogram bars int the chart. |
CartesianCoordinates |
getCoordinateSystem()
Get the coordinate system object for the histogram. |
DataToolTip |
getDatatooltip()
Get the data tooltip object for the chart. |
static java.awt.Font |
getDefaultAxisLabelsFont()
Get/Set the default font used for the axes labels and axes titles. |
static java.lang.String |
getDefaultChartFontString()
Get the default font used in the chart. |
static void |
getDefaultChartFontString(java.lang.String value)
Get the default font used in the chart. |
static java.awt.Font |
getDefaultDataValueFont()
Get/Set the default font used for the numeric values labeling the bars. |
static java.awt.Font |
getDefaultFooterFont()
Get/Set the font used for the chart footer. |
static java.awt.Font |
getDefaultMainTitleFont()
Get/Set the font used for the main title. |
static java.awt.Font |
getDefaultSubHeadFont()
Get/Set the font used for the main title. |
static java.awt.Font |
getDefaultToolTipFont()
Get the default font object used for the tooltip. |
ChartTitle |
getFooter()
Get the footer object for the chart. |
HistogramPlot |
getFrequencyHistogramPlot()
Get the histogram plot object. |
DoubleArray |
getFrequencyLimits()
Get the DoubleArray object that holds the limit values for the frequency bins of the histogram. |
DoubleArray |
getFrequencyValues()
Get the DoubleArray object that holds the values that are counted with respect to the frequency bins. |
Background |
getGraphBackground()
Get the graph background object. |
ChartRectangle2D |
getGraphBorder()
Get the default graph border for the chart. |
GroupDataset |
getHistogramDataset()
Get the GroupDatset object that holds the data used to plot the histogram. |
ChartTitle |
getMainTitle()
Get the main title object for the chart. |
ChartAttribute |
getNormalCurveAttribute()
Set to true and the normal curve is automatically drawn |
Background |
getPlotBackground()
Get the plot background object. |
boolean |
getResetOnDraw()
Get True the ChartView object list is cleared with each redraw |
ChartTitle |
getSubHead()
Get the subhead title object for the chart. |
LinearAxis |
getXAxis()
Get the x-axis object. |
NumericAxisLabels |
getXAxisLab()
Get the x-axis labels object. |
AxisTitle |
getXAxisTitle()
Get the x-axis title object. |
Grid |
getXGrid()
Get the x-axis grid object. |
LinearAxis |
getYAxis()
Get the y-axis object. |
NumericAxisLabels |
getYAxisLab()
Get the y-axis labels object. |
AxisTitle |
getYAxisTitle()
Get the y-axis title object. |
Grid |
getYGrid()
Get the y-axis grid object. |
void |
initFrequencyHistogram(double[] frequencylimits,
double[] frequencyvalues)
Initializes the histogram frequency bin limits, and the data values to be analyzed for the histogram. |
void |
initFrequencyHistogramDataset()
Builds the histogram dataset, histogramDataset, using the values in frequencyValues and frequencyLimits. |
void |
setAutoNormalCurve(boolean value)
Set to true and the normal curve is automatically drawn |
void |
setBarFillColor(java.awt.Color value)
Sets the fill color for the chart object. |
void |
setBarLineColor(java.awt.Color value)
Sets the line color for the chart object. |
void |
setBarLineWidth(double value)
Sets the line width for the chart object. |
void |
setChartOrientation(int value)
Get/Set the orientation of the histogram bars int the chart. |
static void |
setDefaultAxisLabelsFont(java.awt.Font value)
Get/Set the default font used for the axes labels and axes titles. |
static void |
setDefaultDataValueFont(java.awt.Font value)
Get/Set the default font used for the numeric values labeling the bars. |
static void |
setDefaultFooterFont(java.awt.Font value)
Get/Set the font used for the chart footer. |
static void |
setDefaultMainTitleFont(java.awt.Font value)
Get/Set the font used for the main title. |
static void |
setDefaultSubHeadFont(java.awt.Font value)
Get/Set the font used for the main title. |
static void |
setDefaultToolTipFont(java.awt.Font value)
Set the default font object used for the tooltip. |
void |
setGraphBorder(ChartRectangle2D value)
Get the default graph border for the chart. |
void |
setNormalCurveAttribute(ChartAttribute value)
Set to true and the normal curve is automatically drawn |
void |
setResetOnDraw(boolean value)
Set True the ChartView object list is cleared with each redraw |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FrequencyHistogramChart()
public FrequencyHistogramChart(double[] frequencylimits, double[] frequencyvalues)
frequencylimits
- The frequency limits of the histogram bins.frequencyvalues
- An array the values that are counted with respect to the frequency bins.Method Detail |
---|
public void addFrequencyHistogramControlLine(double xvalue, ChartAttribute attrib)
xvalue
- The x-value for the limit line.attrib
- The attribute of the limit line.public void buildChart()
public void buildChart(ChartView chartVu)
chartVu
- A ChartView object that the histogram is to be drawn in.public void copy(FrequencyHistogramChart source)
source
- The source FrequencyHistogramChart object.public void draw(java.awt.Graphics2D g)
draw
in class ChartView
g
- The graphics context the chart is drawn to.public void drawFrequencyHistogramControlLines(ChartView chartvu, double xvalue, ChartAttribute attrib, boolean text)
chartvu
- The ChartView object the normal curve is added to.xvalue
- The x-value for the limit line.attrib
- The attribute of the limit line.text
- Set to true and the line is labeled with its numeric value.public void drawNormalCurve(ChartView chartvu, double mean, double stddev, double amp, ChartAttribute attrib)
chartvu
- The ChartView object the normal curve is added to.mean
- The mean of the normal curve.stddev
- The std dev of the normal curve.amp
- The amplitude of the normal curve.attrib
- The attribute of the curve.public boolean getAutoNormalCurve()
public ChartAttribute getBarAttrib()
public NumericLabel getBarDataValue()
public java.awt.Color getBarFillColor()
public java.awt.Color getBarLineColor()
public double getBarLineWidth()
public int getChartOrientation()
public CartesianCoordinates getCoordinateSystem()
public DataToolTip getDatatooltip()
public static java.awt.Font getDefaultAxisLabelsFont()
public static java.lang.String getDefaultChartFontString()
public static void getDefaultChartFontString(java.lang.String value)
public static java.awt.Font getDefaultDataValueFont()
public static java.awt.Font getDefaultFooterFont()
public static java.awt.Font getDefaultMainTitleFont()
public static java.awt.Font getDefaultSubHeadFont()
public static java.awt.Font getDefaultToolTipFont()
public ChartTitle getFooter()
public HistogramPlot getFrequencyHistogramPlot()
public DoubleArray getFrequencyLimits()
public DoubleArray getFrequencyValues()
public Background getGraphBackground()
public ChartRectangle2D getGraphBorder()
public GroupDataset getHistogramDataset()
public ChartTitle getMainTitle()
public ChartAttribute getNormalCurveAttribute()
public Background getPlotBackground()
public boolean getResetOnDraw()
public ChartTitle getSubHead()
public LinearAxis getXAxis()
public NumericAxisLabels getXAxisLab()
public AxisTitle getXAxisTitle()
public Grid getXGrid()
public LinearAxis getYAxis()
public NumericAxisLabels getYAxisLab()
public AxisTitle getYAxisTitle()
public Grid getYGrid()
public void initFrequencyHistogram(double[] frequencylimits, double[] frequencyvalues)
frequencylimits
- The frequency limits of the histogram bins.frequencyvalues
- An array the values that are counted with respect to the frequency bins.public void initFrequencyHistogramDataset()
public void setAutoNormalCurve(boolean value)
public void setBarFillColor(java.awt.Color value)
public void setBarLineColor(java.awt.Color value)
public void setBarLineWidth(double value)
public void setChartOrientation(int value)
public static void setDefaultAxisLabelsFont(java.awt.Font value)
public static void setDefaultDataValueFont(java.awt.Font value)
public static void setDefaultFooterFont(java.awt.Font value)
public static void setDefaultMainTitleFont(java.awt.Font value)
public static void setDefaultSubHeadFont(java.awt.Font value)
public static void setDefaultToolTipFont(java.awt.Font value)
public void setGraphBorder(ChartRectangle2D value)
public void setNormalCurveAttribute(ChartAttribute value)
public void setResetOnDraw(boolean value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |