|
|||||||||
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.ParetoChart
public class ParetoChart
Pareto Chart chart template. The class includes all of the objects needed to draw a complete Pareto chart. These objects include objects for data, coordinate systems, titles, axes, axes labels, grids, numeric labels, and a line plot and 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 | |
---|---|
ParetoChart()
Default constructor for the class. |
|
ParetoChart(double[] categoryitems,
java.lang.String[] stringitems)
Constructor initializes the category values, and the category strings for the Pareto chart. |
Method Summary | |
---|---|
int |
addCategoryItem(double itemfreq,
java.lang.String itemstring)
Add an item to the categoryValues and categoryStrings arrays. |
void |
buildChart()
Builds the Pareto chart using the base objects ChartView. |
void |
buildChart(ChartView chartVu)
Builds the Pareto chart using the passed in ChartView object. |
void |
copy(ParetoChart source)
Copies the source ParetoChart object. |
void |
draw(java.awt.Graphics2D g)
s the Draw method of the underlying ChartView class. |
ChartAttribute |
getBarAttrib()
Get the default primary bar attribute object for the bars of the chart. |
NumericLabel |
getBarDataValue()
Get the default numeric label template used to label the values of bar plot of the frequency histogram part of the chart. |
SimpleBarPlot |
getBarPlot()
Get the histogram bar plot object of the frequency histogram part of the chart. |
double |
getBarWidth()
Get the default width value of the frequency histogram bars. |
StringArray |
getCategoryStrings()
Get the StringArray object holding the strings used to label the categories of the Pareto plot. |
DoubleArray |
getCategoryValues()
Get the DoubleArray object holding the category values used in building the Pareto plot. |
CartesianCoordinates |
getCoordinateSystem1()
Get the coordinate system object of the frequency histogram part of the chart. |
CartesianCoordinates |
getCoordinateSystem2()
Get the coordinate system object of the cumualtive frequency part of the chart. |
SimpleDataset |
getCumulativeFreqDataset()
Get the dataset object used to hold the cumualtive frequency values of the data plot. |
DataToolTip |
getDatatooltip()
Get the data tooltip object for the chart. |
static java.awt.Font |
getDefaultAxisLabelsFont()
Get default font object 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 |
getDefaultFooterFont()
Get the default footer font. |
ChartRectangle2D |
getDefaultGraphBorder()
Get/Set the default graph border object for the chart. |
static java.awt.Font |
getDefaultMainTitleFont()
Get the default chart title font. |
static java.awt.Font |
getDefaultSubHeadFont()
Get the default chart title font. |
static java.awt.Font |
getDefaultToolTipFont()
Get the default font object used for the tooltip. |
ChartTitle |
getFooter()
Get the footer of the chart. |
SimpleDataset |
getFrequencyDataset()
Get the dataset object used to hold the frequency histogram values of the bar plot. |
Background |
getGraphBackground()
Get the graph background object. |
ChartAttribute |
getLineAttrib()
Get the default primary line attribute object for the line plot of the chart. |
SimpleLineMarkerPlot |
getLineMarkerPlot()
Get the line marker plot object displaying the cumualtive frequency part of the chart. |
NumericLabel |
getLineMarkerPlotDataValue()
Get the default numeric template object used to label the line marker plot of the cumualtive frequency part of the chart. |
ChartTitle |
getMainTitle()
Get main title object of the chart. |
Background |
getPlotBackground()
Get the plot background object. |
boolean |
getResetOnDraw()
Get True the ChartView object list is cleared with each redraw |
double |
getScale2StartY()
Get the starting y-value for the cumulative frequency scale. |
double |
getScale2StopY()
Get the ending y-value for the cumulative frequency scale. |
ChartAttribute |
getSymbolAttrib()
Get the default symbolAttrib attribute object for the symbols of the chart. |
LinearAxis |
getXAxis()
Get the x-axis of the chart object. |
StringAxisLabels |
getXAxisLab()
Get the x-axis string labels object of the chart. |
AxisTitle |
getXAxisTitle()
Get the x-axis title object of the of the chart. |
LinearAxis |
getYAxis1()
Get the y-axis object of the frequency histogram part of the chart. |
LinearAxis |
getYAxis2()
Get the y-axis object of the cumualtive frequency part of the chart. |
NumericAxisLabels |
getYAxisLab1()
Get the y-axis labels object of the frequency histogram part of the chart. |
NumericAxisLabels |
getYAxisLab2()
Get the y-axis numeric labels object of the cumualtive frequency part of the chart. |
AxisTitle |
getYAxisTitle1()
Get the y-axis title object of the frequency histogram part of the chart. |
AxisTitle |
getYAxisTitle2()
Get the y-axis title object of the cumualtive frequency part of the chart. |
Grid |
getYGrid()
Get the y-axis grid object of the chart. |
void |
initParetoChart(double[] categoryitems,
java.lang.String[] stringitems)
Initializes the category values, and the category strings for the Pareto chart. |
void |
initParetoChartsDatasets()
Builds the histogram dataset, histogramDataset, using the values in frequencyValues and frequencyLimits. |
void |
setBarWidth(double value)
Get the default width value of the frequency histogram bars. |
static void |
setDefaultAxisLabelsFont(java.awt.Font value)
Set default font object used for the axes labels and axes titles. |
static void |
setDefaultFooterFont(java.awt.Font value)
Set the default footer font. |
void |
setDefaultGraphBorder(ChartRectangle2D value)
Set the default graph border object for the chart. |
static void |
setDefaultMainTitleFont(java.awt.Font value)
Set the default chart title font. |
static void |
setDefaultSubHeadFont(java.awt.Font value)
Set the default chart title font. |
static void |
setDefaultToolTipFont(java.awt.Font value)
Set the default font object used for the tooltip. |
void |
setResetOnDraw(boolean value)
Set True the ChartView object list is cleared with each redraw |
void |
setScale2StartY(double value)
Set the starting y-value for the cumulative frequency scale. |
void |
setScale2StopY(double value)
Set the ending y-value for the cumulative frequency scale. |
void |
sortCategoryItems(DoubleArray categoryitems,
StringArray stringitems,
boolean ascending)
Sort the category values and category strings. |
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 ParetoChart()
public ParetoChart(double[] categoryitems, java.lang.String[] stringitems)
categoryitems
- The values for each category in the Pareto chart.stringitems
- The strings indentifying each category in the Pareto chart.Method Detail |
---|
public int addCategoryItem(double itemfreq, java.lang.String itemstring)
itemfreq
- The count of how many times this category has occurred.itemstring
- The string idendifying the category item.public void buildChart()
public void buildChart(ChartView chartVu)
chartVu
- A ChartView object that the Pareto chart is to be drawn in.public void copy(ParetoChart source)
source
- The source ParetoChart object.public void draw(java.awt.Graphics2D g)
draw
in class ChartView
g
- The graphics context the chart is drawn to.public ChartAttribute getBarAttrib()
public NumericLabel getBarDataValue()
public SimpleBarPlot getBarPlot()
public double getBarWidth()
public StringArray getCategoryStrings()
public DoubleArray getCategoryValues()
public CartesianCoordinates getCoordinateSystem1()
public CartesianCoordinates getCoordinateSystem2()
public SimpleDataset getCumulativeFreqDataset()
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 getDefaultFooterFont()
public ChartRectangle2D getDefaultGraphBorder()
public static java.awt.Font getDefaultMainTitleFont()
public static java.awt.Font getDefaultSubHeadFont()
public static java.awt.Font getDefaultToolTipFont()
public ChartTitle getFooter()
public SimpleDataset getFrequencyDataset()
public Background getGraphBackground()
public ChartAttribute getLineAttrib()
public SimpleLineMarkerPlot getLineMarkerPlot()
public NumericLabel getLineMarkerPlotDataValue()
public ChartTitle getMainTitle()
public Background getPlotBackground()
public boolean getResetOnDraw()
public double getScale2StartY()
public double getScale2StopY()
public ChartAttribute getSymbolAttrib()
public LinearAxis getXAxis()
public StringAxisLabels getXAxisLab()
public AxisTitle getXAxisTitle()
public LinearAxis getYAxis1()
public LinearAxis getYAxis2()
public NumericAxisLabels getYAxisLab1()
public NumericAxisLabels getYAxisLab2()
public AxisTitle getYAxisTitle1()
public AxisTitle getYAxisTitle2()
public Grid getYGrid()
public void initParetoChart(double[] categoryitems, java.lang.String[] stringitems)
categoryitems
- The values for each category in the Pareto chart.stringitems
- The strings indentifying each category in the Pareto chart.public void initParetoChartsDatasets()
public void setBarWidth(double value)
public static void setDefaultAxisLabelsFont(java.awt.Font value)
public static void setDefaultFooterFont(java.awt.Font value)
public void setDefaultGraphBorder(ChartRectangle2D 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 setResetOnDraw(boolean value)
public void setScale2StartY(double value)
public void setScale2StopY(double value)
public void sortCategoryItems(DoubleArray categoryitems, StringArray stringitems, boolean ascending)
categoryitems
- The values for each category in the Pareto chart.stringitems
- The strings indentifying each category in the Pareto chart.ascending
- Set to true to sort the category items in ascending order.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |