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:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.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 inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.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
accessibleContext, 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
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
GraphChart2D()
          Creates a GraphChart2D object with its defaults.
 
Method Summary
 void addDataset(net.sourceforge.chart2d.Dataset dataset)
          Adds a Dataset object to this chart.
 void addGraphProperties(net.sourceforge.chart2d.GraphProperties graphProps)
          Adds a GraphProperties object to this chart.
 void addMultiColorsProperties(net.sourceforge.chart2d.MultiColorsProperties multiColorsProps)
          Adds a MultiColorsProperties object to this chart.
 void addWarningRegionProperties(net.sourceforge.chart2d.WarningRegionProperties warningRegionProps)
          Adds a WarningRegionProperties object to this chart.
 net.sourceforge.chart2d.Dataset getDataset(int i)
          Gets a dataset based on the order the dataset was added.
 net.sourceforge.chart2d.GraphChart2DProperties getGraphChart2DProperties()
          Gets the GraphChart2DProperties for this Chart2D.
 net.sourceforge.chart2d.GraphProperties getGraphProperties(int i)
          Gets a graph properties based on the order the graph properties were added.
 net.sourceforge.chart2d.MultiColorsProperties getMultiColorsProperties(int i)
          Gets a multiColorsProps based on the order the multiColorsProps was added.
 net.sourceforge.chart2d.WarningRegionProperties getWarningRegionProperties(int i)
          Gets a warning region properties based on the order the properties were added.
 void removeDataset(net.sourceforge.chart2d.Dataset dataset)
          Removes a Dataset object from this chart.
 void removeGraphProperties(net.sourceforge.chart2d.GraphProperties graphProps)
          Removes GraphProperties object from this chart.
 void removeMultiColorsProperties(net.sourceforge.chart2d.MultiColorsProperties multiColorsProps)
          Removes a MultiColorsProperties object from this chart.
 void removeWarningRegionProperties(net.sourceforge.chart2d.WarningRegionProperties warningRegionProps)
          Removes a warning region with the specified properties to this chart.
 void setGraphChart2DProperties(net.sourceforge.chart2d.GraphChart2DProperties props)
          Sets the GraphChart2DProperties for this GraphChart2D.
 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, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

setGraphChart2DProperties

public final void setGraphChart2DProperties(net.sourceforge.chart2d.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.

getGraphChart2DProperties

public final net.sourceforge.chart2d.GraphChart2DProperties getGraphChart2DProperties()
Gets the GraphChart2DProperties for this Chart2D.


getGraphProperties

public final net.sourceforge.chart2d.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 net.sourceforge.chart2d.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 net.sourceforge.chart2d.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 net.sourceforge.chart2d.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(net.sourceforge.chart2d.GraphProperties graphProps)
Adds a GraphProperties object to this chart.

Parameters:
graphProps - The graph properties to add to this chart.

addDataset

public final void addDataset(net.sourceforge.chart2d.Dataset dataset)
Adds a Dataset object to this chart.

Parameters:
dataset - The dataset to add to this chart.

addMultiColorsProperties

public final void addMultiColorsProperties(net.sourceforge.chart2d.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(net.sourceforge.chart2d.WarningRegionProperties warningRegionProps)
Adds a WarningRegionProperties object to this chart.


removeGraphProperties

public final void removeGraphProperties(net.sourceforge.chart2d.GraphProperties graphProps)
Removes GraphProperties object from this chart.

Parameters:
graphProps - The graph properties to remove from this chart.

removeDataset

public final void removeDataset(net.sourceforge.chart2d.Dataset dataset)
Removes a Dataset object from this chart.

Parameters:
dataset - The dataset to remove from this chart.

removeMultiColorsProperties

public final void removeMultiColorsProperties(net.sourceforge.chart2d.MultiColorsProperties multiColorsProps)
Removes a MultiColorsProperties object from this chart.


removeWarningRegionProperties

public final void removeWarningRegionProperties(net.sourceforge.chart2d.WarningRegionProperties warningRegionProps)
Removes a warning region with the specified properties to this chart.