Package net.sourceforge.chart2d

# Class GraphChart2D

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
net.sourceforge.chart2d.Object2D
net.sourceforge.chart2d.Chart2D
net.sourceforge.chart2d.GraphChart2D

All Implemented Interfaces:
  `ImageObserver`, `MenuContainer`, `Serializable`

Direct Known Subclasses:
  `LBChart2D`, `LLChart2D`

public abstract class GraphChart2D extends Chart2D
An abstract class for the common methods of LBChart2D and LLChart2D. A GraphChart2D object is an area that contains axes and one or more overlaid graphs. Changes through its set methods are updated upon next repaint() or getImage() calls.

See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class javax.swing.JComponent

  `JComponent.AccessibleJComponent`

  ## Nested classes/interfaces inherited from class java.awt.Container

  `Container.AccessibleAWTContainer`

  ## Nested classes/interfaces inherited from class java.awt.Component

  `Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy`

- ## Field Summary

  ### Fields inherited from class net.sourceforge.chart2d.Object2D

  `MAX_SIZE_DEFAULT, MIN_SIZE_DEFAULT`

  ### Fields inherited from class javax.swing.JComponent

  `listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

  ### Fields inherited from class java.awt.Component

  `accessibleContext, 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

  Constructors
  Constructor
  Description
  `GraphChart2D()`
  Creates a GraphChart2D object with its defaults.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `addDataset(Dataset dataset)`
  Adds a Dataset object to this chart.
  `final void`
  `addGraphProperties(GraphProperties graphProps)`
  Adds a GraphProperties object to this chart.
  `final void`
  `addMultiColorsProperties(MultiColorsProperties multiColorsProps)`
  Adds a MultiColorsProperties object to this chart.
  `final void`
  `addWarningRegionProperties(WarningRegionProperties warningRegionProps)`
  Adds a WarningRegionProperties object to this chart.
  `final Dataset`
  `getDataset(int i)`
  Gets a dataset based on the order the dataset was added.
  `final GraphChart2DProperties`
  `getGraphChart2DProperties()`
  Gets the GraphChart2DProperties for this Chart2D.
  `final GraphProperties`
  `getGraphProperties(int i)`
  Gets a graph properties based on the order the graph properties were added.
  `final MultiColorsProperties`
  `getMultiColorsProperties(int i)`
  Gets a multiColorsProps based on the order the multiColorsProps was added.
  `final WarningRegionProperties`
  `getWarningRegionProperties(int i)`
  Gets a warning region properties based on the order the properties were added.
  `final void`
  `removeDataset(Dataset dataset)`
  Removes a Dataset object from this chart.
  `final void`
  `removeGraphProperties(GraphProperties graphProps)`
  Removes GraphProperties object from this chart.
  `final void`
  `removeMultiColorsProperties(MultiColorsProperties multiColorsProps)`
  Removes a MultiColorsProperties object from this chart.
  `final void`
  `removeWarningRegionProperties(WarningRegionProperties warningRegionProps)`
  Removes a warning region with the specified properties to this chart.
  `final void`
  `setGraphChart2DProperties(GraphChart2DProperties props)`
  Sets the GraphChart2DProperties for this GraphChart2D.
  `final void`
  `setLayoutRatios(float graphW, float graphH, float legendW)`
  Sets the allocation of space to each component of a graph chart.

  ### Methods inherited from class net.sourceforge.chart2d.Chart2D

  `getChart2DProperties, getLegendProperties, setChart2DProperties, setLegendProperties`

  ### Methods inherited from class net.sourceforge.chart2d.Object2D

  `getImage, getObject2DProperties, getPreferredSize, pack, setMaximumSize, setMinimumSize, setObject2DProperties, setPreferredSize, validate`

  ### Methods inherited from class javax.swing.JComponent

  `addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI`

  ### Methods inherited from class java.awt.Container

  `add, add, add, add, add, addContainerListener, addImpl, 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, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree`

  ### Methods inherited from class java.awt.Component

  `action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### GraphChart2D

    public GraphChart2D()
    Creates a GraphChart2D object with its defaults. A GraphChart2DProperties object must be set for this object before it is used. A GraphProperties object must be added for this object before it is used. A Dataset object must be added for this object before it is used. A MultiColorsProperties object must be added for this object before it is used.

- ## Method Details

  - ### setGraphChart2DProperties

    public final void setGraphChart2DProperties(GraphChart2DProperties props)
    Sets the GraphChart2DProperties for this GraphChart2D.
    Parameters:
      `props` - The GraphChart2DProperties.

  - ### setLayoutRatios

    public final void setLayoutRatios(float graphW, float graphH, float legendW)
    Sets the allocation of space to each component of a graph chart. There are four components: numbers axis, labels axis, graph, and legend. The ratios of the axes can be determined from the ratios of the graph and the legend. Depending on the chart type, the left and bottom axes can be the numbers axis and labels axis. The width of the left axis is 1f - graphW - legendW. The width of the bottom axis is graphW. The height of the left axis is graphH. The ratio of the legend height is always 1f.
    Parameters:
      `graphW` - The ratio of graph width to total.
      `graphH` - The ratio of graph height to total.
      `legendW` - The ratio of graph width to total.
      `legendH` - The ratio of legend height to total.

  - ### getGraphChart2DProperties

    public final GraphChart2DProperties getGraphChart2DProperties()
    Gets the GraphChart2DProperties for this Chart2D.
    Parameters:
      `props` - The GraphChart2DProperties.

  - ### getGraphProperties

    public final GraphProperties getGraphProperties(int i)
    Gets a graph properties based on the order the graph properties were added. First added is number zero.
    Returns:
      The graph properties object added to this chart.

  - ### getDataset

    public final Dataset getDataset(int i)
    Gets a dataset based on the order the dataset was added. First added is number zero.
    Returns:
      The dataset added to this chart.

  - ### getMultiColorsProperties

    public final MultiColorsProperties getMultiColorsProperties(int i)
    Gets a multiColorsProps based on the order the multiColorsProps was added. First added is number zero.
    Returns:
      The multiColorsProps added to this chart.

  - ### getWarningRegionProperties

    public final WarningRegionProperties getWarningRegionProperties(int i)
    Gets a warning region properties based on the order the properties were added. First added is number zero.
    Returns:
      The warning region properties object added to this chart.

  - ### addGraphProperties

    public final void addGraphProperties(GraphProperties graphProps)
    Adds a GraphProperties object to this chart.
    Parameters:
      `graphProps` - The graph properties to add to this chart.

  - ### addDataset

    public final void addDataset(Dataset dataset)
    Adds a Dataset object to this chart.
    Parameters:
      `dataset` - The dataset to add to this chart.

  - ### addMultiColorsProperties

    public final void addMultiColorsProperties(MultiColorsProperties multiColorsProps)
    Adds a MultiColorsProperties object to this chart.
    Parameters:
      `multiColorsProps` - The multi colors properties to add to this chart.

  - ### addWarningRegionProperties

    public final void addWarningRegionProperties(WarningRegionProperties warningRegionProps)
    Adds a WarningRegionProperties object to this chart.
    Parameters:
      `warningRegion` - The warning region properties to add to this chart.

  - ### removeGraphProperties

    public final void removeGraphProperties(GraphProperties graphProps)
    Removes GraphProperties object from this chart.
    Parameters:
      `graphProps` - The graph properties to remove from this chart.

  - ### removeDataset

    public final void removeDataset(Dataset dataset)
    Removes a Dataset object from this chart.
    Parameters:
      `dataset` - The dataset to remove from this chart.

  - ### removeMultiColorsProperties

    public final void removeMultiColorsProperties(MultiColorsProperties multiColorsProps)
    Removes a MultiColorsProperties object from this chart.
    Parameters:
      `multiColorsProperties` - The multi colors properties to remove from this chart.

  - ### removeWarningRegionProperties

    public final void removeWarningRegionProperties(WarningRegionProperties warningRegionProps)
    Removes a warning region with the specified properties to this chart.
    Parameters:
      `warningRegion` - The warning region to remove from this chart.