Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## sim.util.media
Class ChartGenerator

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      sim.util.media.ChartGenerator

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ChartGenerator
extends javax.swing.JPanel

ChartGenerator is a JPanel which displays a time-series chart using the JFreeChart library. The facility allows multiple time series to be displayed at one time, to be exported to PDF, and to be dynamically added and removed.

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

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
`protected javax.swing.Box` | `attributes`
`protected java.util.ArrayList` | `attributesList`
`protected JFreeChart` | `chart`
`protected ChartPanel` | `chartPanel`
`protected XYSeriesCollection` | `dataset`
`protected javax.swing.Box` | `globalAttributes`
`protected java.util.HashMap` | `stoppables`

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
`ChartGenerator()` Generates a new ChartGenerator with a blank chart.

Method Summary
`void` | `addGlobalAttribute(java.awt.Component component)` Adds a global attribute panel to the frame
`int` | `addSeries(XYSeries series, org.jfree.data.general.SeriesChangeListener stopper)` Adds a series, plus a (possibly null) SeriesChangeListener which will receive a single event if/when the series is deleted from the chart by the user.
`javax.swing.JFrame` | `createFrame(GUIState state)`
`java.lang.String` | `getDomainAxisLabel()`
`java.awt.Component` | `getGlobalAttribute(int index)` Returns global attribute panel of the given index.
`int` | `getGlobalAttributeCount()` Returns the number of global attribute panels.
`java.lang.String` | `getRangeAxisLabel()`
`XYSeries` | `getSeries(int index)` Returns the series at the given index.
`int` | `getSeriesCount()` Returns the number of series.
`java.lang.String` | `getTitle()`
`void` | `quit()`
`void` | `removeAllSeries()`
`java.awt.Component` | `removeGlobalAttribute(int index)` Remooves the global attribute at the given index and returns it.
`XYSeries` | `removeSeries(int index)`
`void` | `setDomainAxisLabel(java.lang.String val)`
`void` | `setRangeAxisLabel(java.lang.String val)`
`void` | `setTitle(java.lang.String title)`
`void` | `update()` Informs the chart of changes to the contents of its series.

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

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, 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, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

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`

Field Detail

### globalAttributes

    protected javax.swing.Box globalAttributes

### attributes

    protected javax.swing.Box attributes

### attributesList

    protected java.util.ArrayList attributesList

### dataset

    protected XYSeriesCollection dataset

### stoppables

    protected java.util.HashMap stoppables

### chart

    protected JFreeChart chart

### chartPanel

    protected ChartPanel chartPanel

Constructor Detail

### ChartGenerator

    public ChartGenerator()

  Generates a new ChartGenerator with a blank chart.

Method Detail

### update

    public void update()

  Informs the chart of changes to the contents of its series.

### addSeries

    public int addSeries(XYSeries series,
                         org.jfree.data.general.SeriesChangeListener stopper)

  Adds a series, plus a (possibly null) SeriesChangeListener which will receive a single event if/when the series is deleted from the chart by the user. Returns the series index number.

### getSeries

    public XYSeries getSeries(int index)

  Returns the series at the given index.

### getSeriesCount

    public int getSeriesCount()

  Returns the number of series.

### removeSeries

    public XYSeries removeSeries(int index)

### removeAllSeries

    public void removeAllSeries()

### quit

    public void quit()

### addGlobalAttribute

    public void addGlobalAttribute(java.awt.Component component)

  Adds a global attribute panel to the frame

### getGlobalAttribute

    public java.awt.Component getGlobalAttribute(int index)

  Returns global attribute panel of the given index.

### getGlobalAttributeCount

    public int getGlobalAttributeCount()

  Returns the number of global attribute panels.

### removeGlobalAttribute

    public java.awt.Component removeGlobalAttribute(int index)

  Remooves the global attribute at the given index and returns it.

### setTitle

    public void setTitle(java.lang.String title)

### getTitle

    public java.lang.String getTitle()

### setRangeAxisLabel

    public void setRangeAxisLabel(java.lang.String val)

### getRangeAxisLabel

    public java.lang.String getRangeAxisLabel()

### setDomainAxisLabel

    public void setDomainAxisLabel(java.lang.String val)

### getDomainAxisLabel

    public java.lang.String getDomainAxisLabel()

### createFrame

    public javax.swing.JFrame createFrame(GUIState state)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD