From 3d976d1a3d12022ecf0c1f6b71166107abeed54c Mon Sep 17 00:00:00 2001 From: myles p Date: Sat, 18 Apr 2020 21:59:05 -0400 Subject: [PATCH] Revamp chartlibrary. Co-authored-by: Sam Belliveau --- .gitignore | 2 +- docs/allclasses-index.html | 133 ++- .../stuypulse/stuylib/util/chart/Chart.html | 930 ------------------ .../stuylib/util/chart/ChartGroup.html | 705 ------------- .../stuylib/util/chart/FilteredChart.html | 443 --------- .../stuylib/util/chart/FilteredGraphData.html | 275 ++++++ .../stuylib/util/chart/GraphData.html | 391 ++++++++ .../stuypulse/stuylib/util/chart/JGraph.html | 317 ++++++ .../stuylib/util/chart/MouseTracker.html | 41 +- .../stuypulse/stuylib/util/chart/NChart.html | 498 ---------- .../stuylib/util/chart/package-summary.html | 21 +- .../stuylib/util/chart/package-tree.html | 29 +- docs/index-all.html | 304 ++---- docs/member-search-index.js | 2 +- docs/member-search-index.zip | Bin 5219 -> 4944 bytes docs/overview-tree.html | 15 +- docs/package-search-index.zip | Bin 343 -> 343 bytes docs/script.js | 42 +- docs/search.js | 34 +- docs/serialized-form.html | 170 ---- docs/type-search-index.js | 2 +- docs/type-search-index.zip | Bin 886 -> 883 bytes .../stuypulse/stuylib/util/chart/Chart.java | 433 -------- .../stuylib/util/chart/ChartGroup.java | 274 ------ .../stuylib/util/chart/FilteredChart.java | 63 -- .../stuylib/util/chart/FilteredGraphData.java | 36 + .../stuylib/util/chart/GraphData.java | 144 +++ .../stuypulse/stuylib/util/chart/JGraph.java | 141 +++ .../stuylib/util/chart/KeyTracker.java | 4 +- .../stuylib/util/chart/MouseTracker.java | 32 +- .../stuypulse/stuylib/util/chart/NChart.java | 141 --- 31 files changed, 1499 insertions(+), 4123 deletions(-) delete mode 100644 docs/com/stuypulse/stuylib/util/chart/Chart.html delete mode 100644 docs/com/stuypulse/stuylib/util/chart/ChartGroup.html delete mode 100644 docs/com/stuypulse/stuylib/util/chart/FilteredChart.html create mode 100644 docs/com/stuypulse/stuylib/util/chart/FilteredGraphData.html create mode 100644 docs/com/stuypulse/stuylib/util/chart/GraphData.html create mode 100644 docs/com/stuypulse/stuylib/util/chart/JGraph.html delete mode 100644 docs/com/stuypulse/stuylib/util/chart/NChart.html delete mode 100644 src/com/stuypulse/stuylib/util/chart/Chart.java delete mode 100644 src/com/stuypulse/stuylib/util/chart/ChartGroup.java delete mode 100644 src/com/stuypulse/stuylib/util/chart/FilteredChart.java create mode 100644 src/com/stuypulse/stuylib/util/chart/FilteredGraphData.java create mode 100644 src/com/stuypulse/stuylib/util/chart/GraphData.java create mode 100644 src/com/stuypulse/stuylib/util/chart/JGraph.java delete mode 100644 src/com/stuypulse/stuylib/util/chart/NChart.java diff --git a/.gitignore b/.gitignore index af1fb373..aa0f29cd 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ build/ .DS_Store .idea/ -StuyLib.iml +StuyLib.iml \ No newline at end of file diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index ea20b94a..7160fdc6 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -19,7 +19,7 @@ - - - - - - - - - - -
- -
- -
-
- -

Class Chart

-
-
-
java.lang.Object -
java.awt.Component -
java.awt.Container -
java.awt.Window -
java.awt.Frame -
javax.swing.JFrame -
com.stuypulse.stuylib.util.chart.Chart
-
-
-
-
-
-
-
-
-
All Implemented Interfaces:
-
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
-
-
-
Direct Known Subclasses:
-
ChartGroup, FilteredChart, NChart
-
-
-
public class Chart
-extends javax.swing.JFrame
-
Basic single series chart for a chart group.
-
-
See Also:
-
Serialized Form
-
-
-
-
    - -
  • -
    - - -

    Nested Class Summary

    -
    -

    Nested classes/interfaces inherited from class javax.swing.JFrame

    - - -javax.swing.JFrame.AccessibleJFrame
    -
    -

    Nested classes/interfaces inherited from class java.awt.Frame

    - - -java.awt.Frame.AccessibleAWTFrame
    -
    -

    Nested classes/interfaces inherited from class java.awt.Window

    - - -java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
    -
    -

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

    - - -java.awt.Container.AccessibleAWTContainer
    -
    -

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

    - - -java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    -
    -
  • - -
  • -
    - - -

    Field Summary

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Fields 
    Modifier and TypeFieldDescription
    protected org.knowm.xchart.XChartPanel<org.knowm.xchart.XYChart>chartPanel -
    Swing panel to store the chart.
    -
    protected org.knowm.xchart.XYChartinstance -
    The instance of the XYChart
    -
    protected KeyTrackerkeyTracker -
    Key tracker with built in escape function and adding key binding functionality.
    -
    protected intmaxDataSize -
    Stores the max number of ordered pairs - - Anything less than 0 turns off max size
    -
    protected MouseTrackermouseTracker -
    Mouse tracker for getting mouse x and y as a percentage of the screen width and height.
    -
    -
    -
    -

    Fields inherited from class javax.swing.JFrame

    - - -accessibleContext, rootPane, rootPaneCheckingEnabled
    -
    -

    Fields inherited from class java.awt.Frame

    - - -CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
    -
    -

    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
    -
    -

    Fields inherited from interface javax.swing.WindowConstants

    - - -DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
    -
    -
  • - -
  • -
    - - -

    Constructor Summary

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Constructors 
    ModifierConstructorDescription
    protected Chart() -
    Default constructor that creates an empty frame.
    -
     Chart​(java.lang.String title) -
    Conveience chart with default x and y axes.
    -
     Chart​(java.lang.String title, -java.lang.String x, -java.lang.String y) -
    Full constructor for creating a chart.
    -
    -
    -
    -
  • - -
  • -
    - - -

    Method Summary

    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Modifier and TypeMethodDescription
    ChartaddBind​(java.lang.String key, -KeyTracker.KeyFunction function) -
    Add key binding to chart's key tracker.
    -
    Chartdisplay() -
    Show the chart.
    -
    java.lang.StringgetChartTitle() -
    Return chart title.
    -
    booleangetKey​(java.lang.String key) -
    Gets the boolean value of a key
    -
    intgetMaxSize() -
    Return the maximum number of (x,y) entries
    -
    doublegetMouseX() -
    Gets the mouse position as a percentage of the width
    -
    doublegetMouseY() -
    Gets the mouse position as a percentage of the height
    -
    java.lang.Double[]getXBounds() -
    Return x bounds of the chart as an array.
    -
    java.util.List<java.lang.Double>getXData() -
    Get x data.
    -
    java.lang.Double[]getYBounds() -
    Return y bounds as an array.
    -
    java.util.List<java.lang.Double>getYData() -
    Get y data.
    -
    voidredraw() -
    Revalidate and repaint panel.
    -
    voidreset() -
    Clears x and y data, and sets x and y to a default 0,0.
    -
    voidreset​(double x, -double y) -
    Clears x and y data.
    -
    ChartresetXBounds() -
    Remove x boundaries of the graph.
    -
    ChartresetYBounds() -
    Remove y boundaries of the chart.
    -
    ChartsetMaxSize​(int max) -
    Set the maximum number of (x,y) entries
    -
    ChartsetXBounds​(double min, -double max) -
    Set x boundaries of the chart.
    -
    ChartsetYBounds​(double min, -double max) -
    Set y boundaries of the chart.
    -
    java.lang.StringtoString() 
    Chartundisplay() -
    Hide the chart.
    -
    voidupdate​(double y) -
    Add y-data and increment x by 1.
    -
    voidupdate​(double x, -double y) -
    Add a new ordered pair to the x-data and y-data.
    -
    -
    -
    -
    -

    Methods inherited from class javax.swing.JFrame

    - - -addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
    -
    -

    Methods inherited from class java.awt.Frame

    - - -addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
    -
    -

    Methods inherited from class java.awt.Window

    - - -addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
    -
    -

    Methods inherited from class java.awt.Container

    - - -add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
    -
    -

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.awt.MenuContainer

    - - -getFont, postEvent
    -
    -
  • -
-
-
-
    - -
  • -
    - - -

    Field Details

    -
      -
    • -
      -

      instance

      -
      protected org.knowm.xchart.XYChart instance
      -
      The instance of the XYChart
      -
      -
    • -
    • -
      -

      maxDataSize

      -
      protected int maxDataSize
      -
      Stores the max number of ordered pairs - - Anything less than 0 turns off max size
      -
      -
    • -
    • -
      -

      mouseTracker

      -
      protected final MouseTracker mouseTracker
      -
      Mouse tracker for getting mouse x and y as a percentage of the screen width and height.
      -
      -
    • -
    • -
      -

      keyTracker

      -
      protected final KeyTracker keyTracker
      -
      Key tracker with built in escape function and adding key binding functionality. Gets key presses - as booleans.
      -
      -
    • -
    • -
      -

      chartPanel

      -
      protected org.knowm.xchart.XChartPanel<org.knowm.xchart.XYChart> chartPanel
      -
      Swing panel to store the chart.
      -
      -
    • -
    -
    -
  • - -
  • -
    - - -

    Constructor Details

    -
      -
    • -
      -

      Chart

      -
      protected Chart()
      -
      Default constructor that creates an empty frame.
      -
      -
    • -
    • -
      -

      Chart

      -
      public Chart​(java.lang.String title)
      -
      Conveience chart with default x and y axes.
      -
      -
      Parameters:
      -
      title - Title of the chart
      -
      -
      -
    • -
    • -
      -

      Chart

      -
      public Chart​(java.lang.String title, -java.lang.String x, -java.lang.String y)
      -
      Full constructor for creating a chart.
      -
      -
      Parameters:
      -
      title - Title of the chart
      -
      x - x-axis name
      -
      y - y-axis name
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    - - -

    Method Details

    -
      -
    • -
      -

      getXData

      -
      public java.util.List<java.lang.Double> getXData()
      -
      Get x data.
      -
      -
      Returns:
      -
      x data list
      -
      -
      -
    • -
    • -
      -

      getYData

      -
      public java.util.List<java.lang.Double> getYData()
      -
      Get y data.
      -
      -
      Returns:
      -
      y data list
      -
      -
      -
    • -
    • -
      -

      addBind

      -
      public Chart addBind​(java.lang.String key, -KeyTracker.KeyFunction function)
      -
      Add key binding to chart's key tracker.
      -
      -
      Parameters:
      -
      key - key code
      -
      function - custom binding function
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      display

      -
      public Chart display()
      -
      Show the chart.
      -
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      undisplay

      -
      public Chart undisplay()
      -
      Hide the chart.
      -
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      getChartTitle

      -
      public java.lang.String getChartTitle()
      -
      Return chart title. Title is also session name.
      -
      -
      Returns:
      -
      text containing title
      -
      -
      -
    • -
    • -
      -

      update

      -
      public void update​(double x, -double y)
      -
      Add a new ordered pair to the x-data and y-data.
      -
      -
      Parameters:
      -
      x - new x
      -
      y - new y
      -
      -
      -
    • -
    • -
      -

      update

      -
      public void update​(double y)
      -
      Add y-data and increment x by 1.
      -
      -
      Parameters:
      -
      y - new y value
      -
      -
      -
    • -
    • -
      -

      reset

      -
      public void reset​(double x, -double y)
      -
      Clears x and y data. Reset x-data and y-data to a default value.
      -
      -
      Parameters:
      -
      x - default x value
      -
      y - default y value
      -
      -
      -
    • -
    • -
      -

      reset

      -
      public void reset()
      -
      Clears x and y data, and sets x and y to a default 0,0.
      -
      -
    • -
    • -
      -

      getMaxSize

      -
      public int getMaxSize()
      -
      Return the maximum number of (x,y) entries
      -
      -
      Returns:
      -
      max size
      -
      -
      -
    • -
    • -
      -

      setMaxSize

      -
      public Chart setMaxSize​(int max)
      -
      Set the maximum number of (x,y) entries
      -
      -
      Parameters:
      -
      max - max size
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      getXBounds

      -
      public java.lang.Double[] getXBounds()
      -
      Return x bounds of the chart as an array.
      -
      -
      Returns:
      -
      double containing x boundaries
      -
      -
      -
    • -
    • -
      -

      setXBounds

      -
      public Chart setXBounds​(double min, -double max)
      -
      Set x boundaries of the chart.
      -
      -
      Parameters:
      -
      min - minimum x value
      -
      max - maximum x value
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      resetXBounds

      -
      public Chart resetXBounds()
      -
      Remove x boundaries of the graph.
      -
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      getYBounds

      -
      public java.lang.Double[] getYBounds()
      -
      Return y bounds as an array.
      -
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      setYBounds

      -
      public Chart setYBounds​(double min, -double max)
      -
      Set y boundaries of the chart.
      -
      -
      Parameters:
      -
      min - minimum y value
      -
      max - maximum y value
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      resetYBounds

      -
      public Chart resetYBounds()
      -
      Remove y boundaries of the chart.
      -
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      redraw

      -
      public void redraw()
      -
      Revalidate and repaint panel. Necessary for real-time graphing.
      -
      -
    • -
    • -
      -

      getMouseY

      -
      public double getMouseY()
      -
      Gets the mouse position as a percentage of the height
      -
      -
      Returns:
      -
      y position
      -
      -
      -
    • -
    • -
      -

      getMouseX

      -
      public double getMouseX()
      -
      Gets the mouse position as a percentage of the width
      -
      -
      Returns:
      -
      x position
      -
      -
      -
    • -
    • -
      -

      getKey

      -
      public boolean getKey​(java.lang.String key)
      -
      Gets the boolean value of a key
      -
      -
      Parameters:
      -
      key - key to check
      -
      Returns:
      -
      boolean value of the key
      -
      -
      -
    • -
    • -
      -

      toString

      -
      public java.lang.String toString()
      -
      -
      Overrides:
      -
      toString in class java.awt.Component
      -
      -
      -
    • -
    -
    -
  • -
-
-
-
- - - - diff --git a/docs/com/stuypulse/stuylib/util/chart/ChartGroup.html b/docs/com/stuypulse/stuylib/util/chart/ChartGroup.html deleted file mode 100644 index 030c4349..00000000 --- a/docs/com/stuypulse/stuylib/util/chart/ChartGroup.html +++ /dev/null @@ -1,705 +0,0 @@ - - - - - -ChartGroup (StuyLib 1.0.0 API) - - - - - - - - - - - - - - - -
- -
- -
-
- -

Class ChartGroup

-
-
-
java.lang.Object -
java.awt.Component -
java.awt.Container -
java.awt.Window -
java.awt.Frame -
javax.swing.JFrame -
com.stuypulse.stuylib.util.chart.Chart -
com.stuypulse.stuylib.util.chart.ChartGroup
-
-
-
-
-
-
-
-
-
-
All Implemented Interfaces:
-
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
-
-
-
public class ChartGroup
-extends Chart
-
Group of charts.
-
-
See Also:
-
Serialized Form
-
-
-
-
    - -
  • -
    - - -

    Nested Class Summary

    -
    -

    Nested classes/interfaces inherited from class javax.swing.JFrame

    - - -javax.swing.JFrame.AccessibleJFrame
    -
    -

    Nested classes/interfaces inherited from class java.awt.Frame

    - - -java.awt.Frame.AccessibleAWTFrame
    -
    -

    Nested classes/interfaces inherited from class java.awt.Window

    - - -java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
    -
    -

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

    - - -java.awt.Container.AccessibleAWTContainer
    -
    -

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

    - - -java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    -
    -
  • - -
  • -
    - - -

    Field Summary

    -
    -

    Fields inherited from class com.stuypulse.stuylib.util.chart.Chart

    - - -chartPanel, instance, keyTracker, maxDataSize, mouseTracker
    -
    -

    Fields inherited from class javax.swing.JFrame

    - - -accessibleContext, rootPane, rootPaneCheckingEnabled
    -
    -

    Fields inherited from class java.awt.Frame

    - - -CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
    -
    -

    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
    -
    -

    Fields inherited from interface javax.swing.WindowConstants

    - - -DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
    -
    -
  • - -
  • -
    - - -

    Constructor Summary

    -
    - - - - - - - - - - - - - - -
    Constructors 
    ConstructorDescription
    ChartGroup​(Chart... charts) -
    Constructor to take in charts.
    -
    -
    -
    -
  • - -
  • -
    - - -

    Method Summary

    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Modifier and TypeMethodDescription
    Chartadd​(Chart... charts) -
    Add addition charts to the chart group.
    -
    intgetMaxSize() -
    Gets the max size from the current selected chart.
    -
    doublegetMouseX() -
    Gets the mouse x from the current selected chart.
    -
    doublegetMouseY() -
    Gets the mouse y from the current selected chart.
    -
    java.lang.Double[]getXBounds() -
    Get the x bounds from the current selected chart.
    -
    java.lang.Double[]getYBounds() -
    Get the y bounds from the current selected chart.
    -
    voidredraw() -
    Redraw the current selected chart.
    -
    voidreset() -
    Reset each chart's data.
    -
    voidreset​(double x, -double y) -
    Reset each chart's data.
    -
    ChartresetXBounds() -
    Reset each chart's x boundaries.
    -
    ChartresetYBounds() -
    Reset each chart's y data.
    -
    ChartsetMaxSize​(int max) -
    Set each chart's max size.
    -
    ChartsetXBounds​(double min, -double max) -
    Set x bounds of each chart.
    -
    ChartsetYBounds​(double min, -double max) -
    Set y bounds of each chart.
    -
    voidupdate​(double y) -
    Update each chart's data.
    -
    voidupdate​(double x, -double y) -
    Update each chart's data.
    -
    -
    -
    -
    -

    Methods inherited from class com.stuypulse.stuylib.util.chart.Chart

    - - -addBind, display, getChartTitle, getKey, getXData, getYData, toString, undisplay
    -
    -

    Methods inherited from class javax.swing.JFrame

    - - -addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
    -
    -

    Methods inherited from class java.awt.Frame

    - - -addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
    -
    -

    Methods inherited from class java.awt.Window

    - - -addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
    -
    -

    Methods inherited from class java.awt.Container

    - - -add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
    -
    -

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.awt.MenuContainer

    - - -getFont, postEvent
    -
    -
  • -
-
-
-
    - -
  • -
    - - -

    Constructor Details

    -
      -
    • -
      -

      ChartGroup

      -
      public ChartGroup​(Chart... charts)
      -
      Constructor to take in charts.
      -
      -
      Parameters:
      -
      charts - Charts to group.
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    - - -

    Method Details

    -
      -
    • -
      -

      add

      -
      public Chart add​(Chart... charts)
      -
      Add addition charts to the chart group.
      -
      -
      Parameters:
      -
      charts - Charts to add
      -
      Returns:
      -
      reference to chart group
      -
      -
      -
    • -
    • -
      -

      update

      -
      public void update​(double x, -double y)
      -
      Update each chart's data.
      -
      -
      Overrides:
      -
      update in class Chart
      -
      Parameters:
      -
      x - new x for each chart
      -
      y - new y for each chart
      -
      -
      -
    • -
    • -
      -

      update

      -
      public void update​(double y)
      -
      Update each chart's data. Increment x by 1.
      -
      -
      Overrides:
      -
      update in class Chart
      -
      Parameters:
      -
      y - new y for each chart
      -
      -
      -
    • -
    • -
      -

      reset

      -
      public void reset​(double x, -double y)
      -
      Reset each chart's data.
      -
      -
      Overrides:
      -
      reset in class Chart
      -
      Parameters:
      -
      x - default x for each chart
      -
      y - default y for each chart
      -
      -
      -
    • -
    • -
      -

      reset

      -
      public void reset()
      -
      Reset each chart's data.
      -
      -
      Overrides:
      -
      reset in class Chart
      -
      -
      -
    • -
    • -
      -

      setMaxSize

      -
      public Chart setMaxSize​(int max)
      -
      Set each chart's max size.
      -
      -
      Overrides:
      -
      setMaxSize in class Chart
      -
      Parameters:
      -
      max - max size
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      setXBounds

      -
      public Chart setXBounds​(double min, -double max)
      -
      Set x bounds of each chart.
      -
      -
      Overrides:
      -
      setXBounds in class Chart
      -
      Parameters:
      -
      min - minimum x value
      -
      max - maximum x value
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      setYBounds

      -
      public Chart setYBounds​(double min, -double max)
      -
      Set y bounds of each chart.
      -
      -
      Overrides:
      -
      setYBounds in class Chart
      -
      Parameters:
      -
      min - minimum y value
      -
      max - maximum y value
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      resetXBounds

      -
      public Chart resetXBounds()
      -
      Reset each chart's x boundaries.
      -
      -
      Overrides:
      -
      resetXBounds in class Chart
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      resetYBounds

      -
      public Chart resetYBounds()
      -
      Reset each chart's y data.
      -
      -
      Overrides:
      -
      resetYBounds in class Chart
      -
      Returns:
      -
      Reference to chart
      -
      -
      -
    • -
    • -
      -

      redraw

      -
      public void redraw()
      -
      Redraw the current selected chart.
      -
      -
      Overrides:
      -
      redraw in class Chart
      -
      -
      -
    • -
    • -
      -

      getMouseX

      -
      public double getMouseX()
      -
      Gets the mouse x from the current selected chart.
      -
      -
      Overrides:
      -
      getMouseX in class Chart
      -
      Returns:
      -
      x position
      -
      -
      -
    • -
    • -
      -

      getMouseY

      -
      public double getMouseY()
      -
      Gets the mouse y from the current selected chart.
      -
      -
      Overrides:
      -
      getMouseY in class Chart
      -
      Returns:
      -
      y position
      -
      -
      -
    • -
    • -
      -

      getMaxSize

      -
      public int getMaxSize()
      -
      Gets the max size from the current selected chart.
      -
      -
      Overrides:
      -
      getMaxSize in class Chart
      -
      Returns:
      -
      max size
      -
      -
      -
    • -
    • -
      -

      getXBounds

      -
      public java.lang.Double[] getXBounds()
      -
      Get the x bounds from the current selected chart.
      -
      -
      Overrides:
      -
      getXBounds in class Chart
      -
      Returns:
      -
      x boundaries as an array
      -
      -
      -
    • -
    • -
      -

      getYBounds

      -
      public java.lang.Double[] getYBounds()
      -
      Get the y bounds from the current selected chart.
      -
      -
      Overrides:
      -
      getYBounds in class Chart
      -
      Returns:
      -
      y boundaries as an array
      -
      -
      -
    • -
    -
    -
  • -
-
-
-
- - - - diff --git a/docs/com/stuypulse/stuylib/util/chart/FilteredChart.html b/docs/com/stuypulse/stuylib/util/chart/FilteredChart.html deleted file mode 100644 index 248d7eb4..00000000 --- a/docs/com/stuypulse/stuylib/util/chart/FilteredChart.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - -FilteredChart (StuyLib 1.0.0 API) - - - - - - - - - - - - - - - -
- -
- -
-
- -

Class FilteredChart

-
-
-
java.lang.Object -
java.awt.Component -
java.awt.Container -
java.awt.Window -
java.awt.Frame -
javax.swing.JFrame -
com.stuypulse.stuylib.util.chart.Chart -
com.stuypulse.stuylib.util.chart.FilteredChart
-
-
-
-
-
-
-
-
-
-
All Implemented Interfaces:
-
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
-
-
-
public class FilteredChart
-extends Chart
-
A single session chart with a stream filter.
-
-
See Also:
-
Serialized Form
-
-
-
-
    - -
  • -
    - - -

    Nested Class Summary

    -
    -

    Nested classes/interfaces inherited from class javax.swing.JFrame

    - - -javax.swing.JFrame.AccessibleJFrame
    -
    -

    Nested classes/interfaces inherited from class java.awt.Frame

    - - -java.awt.Frame.AccessibleAWTFrame
    -
    -

    Nested classes/interfaces inherited from class java.awt.Window

    - - -java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
    -
    -

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

    - - -java.awt.Container.AccessibleAWTContainer
    -
    -

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

    - - -java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    -
    -
  • - -
  • -
    - - -

    Field Summary

    -
    -

    Fields inherited from class com.stuypulse.stuylib.util.chart.Chart

    - - -chartPanel, instance, keyTracker, maxDataSize, mouseTracker
    -
    -

    Fields inherited from class javax.swing.JFrame

    - - -accessibleContext, rootPane, rootPaneCheckingEnabled
    -
    -

    Fields inherited from class java.awt.Frame

    - - -CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
    -
    -

    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
    -
    -

    Fields inherited from interface javax.swing.WindowConstants

    - - -DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
    -
    -
  • - -
  • -
    - - -

    Constructor Summary

    -
    - - - - - - - - - - - - - - - - - - -
    Constructors 
    ConstructorDescription
    FilteredChart​(java.lang.String title, -IFilter filter) -
    Chart with a filter.
    -
    FilteredChart​(java.lang.String title, -java.lang.String x, -java.lang.String y, -IFilter filter) -
    Chart with a filter.
    -
    -
    -
    -
  • - -
  • -
    - - -

    Method Summary

    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - -
    Modifier and TypeMethodDescription
    voidupdate​(double y) -
    Update Y value with the chart's filter.
    -
    voidupdate​(double x, -double y) -
    Update Y value with the chart's filter.
    -
    -
    -
    - -
    -

    Methods inherited from class javax.swing.JFrame

    - - -addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
    -
    -

    Methods inherited from class java.awt.Frame

    - - -addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
    -
    -

    Methods inherited from class java.awt.Window

    - - -addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
    -
    -

    Methods inherited from class java.awt.Container

    - - -add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
    -
    -

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.awt.MenuContainer

    - - -getFont, postEvent
    -
    -
  • -
-
-
-
    - -
  • -
    - - -

    Constructor Details

    -
      -
    • -
      -

      FilteredChart

      -
      public FilteredChart​(java.lang.String title, -java.lang.String x, -java.lang.String y, -IFilter filter)
      -
      Chart with a filter.
      -
      -
      Parameters:
      -
      title - Chart title
      -
      x - x-axis title
      -
      y - y-axis title
      -
      filter - IStreamFilter to apply to all incoming y-values
      -
      -
      -
    • -
    • -
      -

      FilteredChart

      -
      public FilteredChart​(java.lang.String title, -IFilter filter)
      -
      Chart with a filter.
      -
      -
      Parameters:
      -
      title - Chart title
      -
      filter - IStreamFilter to apply to all incoming y-values
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    - - -

    Method Details

    -
      -
    • -
      -

      update

      -
      public void update​(double y)
      -
      Update Y value with the chart's filter.
      -
      -
      Overrides:
      -
      update in class Chart
      -
      Parameters:
      -
      y - Y value to be filtered
      -
      -
      -
    • -
    • -
      -

      update

      -
      public void update​(double x, -double y)
      -
      Update Y value with the chart's filter. Y is filtered in order, set X accordingly
      -
      -
      Overrides:
      -
      update in class Chart
      -
      Parameters:
      -
      x - X value
      -
      y - Y value to be filtered
      -
      -
      -
    • -
    -
    -
  • -
-
-
-
- - - - diff --git a/docs/com/stuypulse/stuylib/util/chart/FilteredGraphData.html b/docs/com/stuypulse/stuylib/util/chart/FilteredGraphData.html new file mode 100644 index 00000000..afee7b5c --- /dev/null +++ b/docs/com/stuypulse/stuylib/util/chart/FilteredGraphData.html @@ -0,0 +1,275 @@ + + + + + +FilteredGraphData (StuyLib 1.0.0 API) + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FilteredGraphData

+
+
+
java.lang.Object +
com.stuypulse.stuylib.util.chart.GraphData +
com.stuypulse.stuylib.util.chart.FilteredGraphData
+
+
+
+
+
public class FilteredGraphData
+extends GraphData
+
Graph data with a filter.
+
+
+
    + +
  • +
    + + +

    Constructor Summary

    +
    + + + + + + + + + + + + + + +
    Constructors 
    ConstructorDescription
    FilteredGraphData​(GraphData graph, +IFilter filter) +
    Create a Graph (no gui) with the following configuration
    +
    +
    +
    +
  • + +
  • +
    + + +

    Method Summary

    +
    +
    +
    + + + + + + + + + + + + + + + +
    Modifier and TypeMethodDescription
    voidupdate​(double val) +
    Add a value to the graph as the next filtered entry
    +
    +
    +
    +
    +

    Methods inherited from class com.stuypulse.stuylib.util.chart.GraphData

    + + +getLength, getMaxValue, getMinValue, getName, getValue, updateXYChart
    +
    +

    Methods inherited from class java.lang.Object

    + + +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    + + +

    Constructor Details

    +
      +
    • +
      +

      FilteredGraphData

      +
      public FilteredGraphData​(GraphData graph, +IFilter filter)
      +
      Create a Graph (no gui) with the following configuration
      +
      +
      Parameters:
      +
      graph - graph configuration to make a filtered graph from
      +
      filter - filter to filter all the values through
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    + + +

    Method Details

    +
      +
    • +
      +

      update

      +
      public void update​(double val)
      +
      Add a value to the graph as the next filtered entry
      +
      +
      Overrides:
      +
      update in class GraphData
      +
      Parameters:
      +
      val - the next value for the graph
      +
      +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/docs/com/stuypulse/stuylib/util/chart/GraphData.html b/docs/com/stuypulse/stuylib/util/chart/GraphData.html new file mode 100644 index 00000000..695d790c --- /dev/null +++ b/docs/com/stuypulse/stuylib/util/chart/GraphData.html @@ -0,0 +1,391 @@ + + + + + +GraphData (StuyLib 1.0.0 API) + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class GraphData

+
+
+
java.lang.Object +
com.stuypulse.stuylib.util.chart.GraphData
+
+
+
+
Direct Known Subclasses:
+
FilteredGraphData
+
+
+
public class GraphData
+extends java.lang.Object
+
Specialized structure for representing graph data.
+
+
+
    + +
  • +
    + + +

    Constructor Summary

    +
    + + + + + + + + + + + + + + + + + + +
    Constructors 
    ConstructorDescription
    GraphData​(GraphData other) +
    Create a Graph (no gui) with the following configuration
    +
    GraphData​(java.lang.String name, +int maxLength, +double min, +double max) +
    Create a Graph (no gui) with the following configuration
    +
    +
    +
    +
  • + +
  • +
    + + +

    Method Summary

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Modifier and TypeMethodDescription
    intgetLength() 
    doublegetMaxValue() 
    doublegetMinValue() 
    java.lang.StringgetName() 
    doublegetValue​(int delta) +
    Get a value from the buffer of graph data
    +
    voidupdate​(double val) +
    Add a value to the graph as the next entry
    +
    voidupdateXYChart​(org.knowm.xchart.XYChart chart) +
    Draw the Graph to an XYChart
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    + + +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    + + +

    Constructor Details

    +
      +
    • +
      +

      GraphData

      +
      public GraphData​(java.lang.String name, +int maxLength, +double min, +double max)
      +
      Create a Graph (no gui) with the following configuration
      +
      +
      Parameters:
      +
      name - the name of the graph
      +
      maxLength - the number of entries in the graph
      +
      min - the lowest value of the graph
      +
      max - the highest value of the graph
      +
      +
      +
    • +
    • +
      +

      GraphData

      +
      public GraphData​(GraphData other)
      +
      Create a Graph (no gui) with the following configuration
      +
      +
      Parameters:
      +
      other - GraphData to copy from
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    + + +

    Method Details

    +
      +
    • +
      +

      update

      +
      public void update​(double val)
      +
      Add a value to the graph as the next entry
      +
      +
      Parameters:
      +
      val - the next value for the graph
      +
      +
      +
    • +
    • +
      +

      getName

      +
      public final java.lang.String getName()
      +
      +
      Returns:
      +
      name
      +
      +
      +
    • +
    • +
      +

      getLength

      +
      public final int getLength()
      +
      +
      Returns:
      +
      length
      +
      +
      +
    • +
    • +
      +

      getMinValue

      +
      public final double getMinValue()
      +
      +
      Returns:
      +
      minumum value
      +
      +
      +
    • +
    • +
      +

      getMaxValue

      +
      public final double getMaxValue()
      +
      +
      Returns:
      +
      maximum value
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public final double getValue​(int delta)
      +
      Get a value from the buffer of graph data
      +
      +
      Parameters:
      +
      delta - how many entries you want to go back
      +
      Returns:
      +
      the value in the buffer
      +
      +
      +
    • +
    • +
      +

      updateXYChart

      +
      public final void updateXYChart​(org.knowm.xchart.XYChart chart)
      +
      Draw the Graph to an XYChart
      +
      +
      Parameters:
      +
      chart - XYChart to draw to
      +
      +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/docs/com/stuypulse/stuylib/util/chart/JGraph.html b/docs/com/stuypulse/stuylib/util/chart/JGraph.html new file mode 100644 index 00000000..c6e00344 --- /dev/null +++ b/docs/com/stuypulse/stuylib/util/chart/JGraph.html @@ -0,0 +1,317 @@ + + + + + +JGraph (StuyLib 1.0.0 API) + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class JGraph

+
+
+
java.lang.Object +
com.stuypulse.stuylib.util.chart.JGraph
+
+
+
+
public class JGraph
+extends java.lang.Object
+
GUI wrapper for graph data.
+
+
+
    + +
  • +
    + + +

    Constructor Summary

    +
    + + + + + + + + + + + + + + +
    Constructors 
    ConstructorDescription
    JGraph​(GraphData... graphs) +
    Create a JGraph
    +
    +
    +
    +
  • + +
  • +
    + + +

    Method Summary

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Modifier and TypeMethodDescription
    KeyTrackergetKeyTracker() 
    MouseTrackergetMouseTracker() 
    voidupdate() +
    Update the graphs without sending any new value + + This is useful because it lets you send the update function directly instead of through the + JGraph.
    +
    voidupdate​(double val) +
    Update all the charts with the same value
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    + + +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    + + +

    Constructor Details

    +
      +
    • +
      +

      JGraph

      +
      public JGraph​(GraphData... graphs)
      +
      Create a JGraph
      +
      +
      Parameters:
      +
      graphs - any graphical information to be represented
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    + + +

    Method Details

    +
      +
    • +
      +

      getKeyTracker

      +
      public KeyTracker getKeyTracker()
      +
      +
      Returns:
      +
      key tracker
      +
      See Also:
      +
      KeyTracker
      +
      +
      +
    • +
    • +
      +

      getMouseTracker

      +
      public MouseTracker getMouseTracker()
      +
      +
      Returns:
      +
      mouse tracker
      +
      See Also:
      +
      MouseTracker
      +
      +
      +
    • +
    • +
      +

      update

      +
      public void update()
      +
      Update the graphs without sending any new value + + This is useful because it lets you send the update function directly instead of through the + JGraph.
      +
      +
    • +
    • +
      +

      update

      +
      public void update​(double val)
      +
      Update all the charts with the same value
      +
      +
      Parameters:
      +
      val - the value to send to all the charts
      +
      +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/docs/com/stuypulse/stuylib/util/chart/MouseTracker.html b/docs/com/stuypulse/stuylib/util/chart/MouseTracker.html index 5520822e..17b01fc1 100644 --- a/docs/com/stuypulse/stuylib/util/chart/MouseTracker.html +++ b/docs/com/stuypulse/stuylib/util/chart/MouseTracker.html @@ -19,7 +19,7 @@ - - - - - - - - - - -
- -
- -
-
- -

Class NChart

-
-
-
java.lang.Object -
java.awt.Component -
java.awt.Container -
java.awt.Window -
java.awt.Frame -
javax.swing.JFrame -
com.stuypulse.stuylib.util.chart.Chart -
com.stuypulse.stuylib.util.chart.NChart
-
-
-
-
-
-
-
-
-
-
All Implemented Interfaces:
-
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
-
-
-
public class NChart
-extends Chart
-
A class for handling multi-series graphing by combining the data from multiple singe=series - charts.
-
-
See Also:
-
Serialized Form
-
-
-
-
    - -
  • -
    - - -

    Nested Class Summary

    -
    -

    Nested classes/interfaces inherited from class javax.swing.JFrame

    - - -javax.swing.JFrame.AccessibleJFrame
    -
    -

    Nested classes/interfaces inherited from class java.awt.Frame

    - - -java.awt.Frame.AccessibleAWTFrame
    -
    -

    Nested classes/interfaces inherited from class java.awt.Window

    - - -java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
    -
    -

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

    - - -java.awt.Container.AccessibleAWTContainer
    -
    -

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

    - - -java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    -
    -
  • - -
  • -
    - - -

    Field Summary

    -
    -

    Fields inherited from class com.stuypulse.stuylib.util.chart.Chart

    - - -chartPanel, instance, keyTracker, maxDataSize, mouseTracker
    -
    -

    Fields inherited from class javax.swing.JFrame

    - - -accessibleContext, rootPane, rootPaneCheckingEnabled
    -
    -

    Fields inherited from class java.awt.Frame

    - - -CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
    -
    -

    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
    -
    -

    Fields inherited from interface javax.swing.WindowConstants

    - - -DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
    -
    -
  • - -
  • -
    - - -

    Constructor Summary

    -
    - - - - - - - - - - - - - - -
    Constructors 
    ConstructorDescription
    NChart​(Chart... charts) -
    Creates an NChart with the data of given charts.
    -
    -
    -
    -
  • - -
  • -
    - - -

    Method Summary

    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Modifier and TypeMethodDescription
    Chartadd​(Chart... charts) -
    Adds charts.
    -
    voidreset() -
    Reset each chart to 0,0 and reset each's corresponding series.
    -
    voidreset​(double x, -double y) -
    Reset each chart to an ordered pair and reset each's corresponding series.
    -
    ChartsetMaxSize​(int max) -
    Set max size of each chart.
    -
    voidupdate​(double y) -
    Updates each chart's data and a corresponding series based on a given y value
    -
    voidupdate​(double x, -double y) -
    Updates each chart's data and a corresponding series based on an ordered pair.
    -
    -
    -
    - -
    -

    Methods inherited from class javax.swing.JFrame

    - - -addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
    -
    -

    Methods inherited from class java.awt.Frame

    - - -addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
    -
    -

    Methods inherited from class java.awt.Window

    - - -addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
    -
    -

    Methods inherited from class java.awt.Container

    - - -add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
    -
    -

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.awt.MenuContainer

    - - -getFont, postEvent
    -
    -
  • -
-
-
-
    - -
  • -
    - - -

    Constructor Details

    -
      -
    • -
      -

      NChart

      -
      public NChart​(Chart... charts)
      -
      Creates an NChart with the data of given charts.
      -
      -
      Parameters:
      -
      charts - Charts to incorperate.
      -
      -
      -
    • -
    -
    -
  • - -
  • -
    - - -

    Method Details

    -
      -
    • -
      -

      add

      -
      public Chart add​(Chart... charts)
      -
      Adds charts.
      -
      -
      Parameters:
      -
      charts - Charts to add.
      -
      Returns:
      -
      Returns reference to self.
      -
      -
      -
    • -
    • -
      -

      update

      -
      public void update​(double x, -double y)
      -
      Updates each chart's data and a corresponding series based on an ordered pair.
      -
      -
      Overrides:
      -
      update in class Chart
      -
      Parameters:
      -
      x - new x value
      -
      y - new y value
      -
      -
      -
    • -
    • -
      -

      update

      -
      public void update​(double y)
      -
      Updates each chart's data and a corresponding series based on a given y value
      -
      -
      Overrides:
      -
      update in class Chart
      -
      Parameters:
      -
      y - new y value
      -
      -
      -
    • -
    • -
      -

      reset

      -
      public void reset​(double x, -double y)
      -
      Reset each chart to an ordered pair and reset each's corresponding series.
      -
      -
      Overrides:
      -
      reset in class Chart
      -
      Parameters:
      -
      x - default x value
      -
      y - default y value
      -
      -
      -
    • -
    • -
      -

      reset

      -
      public void reset()
      -
      Reset each chart to 0,0 and reset each's corresponding series.
      -
      -
      Overrides:
      -
      reset in class Chart
      -
      -
      -
    • -
    • -
      -

      setMaxSize

      -
      public Chart setMaxSize​(int max)
      -
      Set max size of each chart.
      -
      -
      Overrides:
      -
      setMaxSize in class Chart
      -
      Parameters:
      -
      max - max size
      -
      Returns:
      -
      Reference to chart.
      -
      -
      -
    • -
    -
    -
  • -
-
-
-
- - - - diff --git a/docs/com/stuypulse/stuylib/util/chart/package-summary.html b/docs/com/stuypulse/stuylib/util/chart/package-summary.html index 14a0c9c4..d497ae82 100644 --- a/docs/com/stuypulse/stuylib/util/chart/package-summary.html +++ b/docs/com/stuypulse/stuylib/util/chart/package-summary.html @@ -103,21 +103,21 @@

Package com.stuypulse.stuylib.util.chart< -Chart +FilteredGraphData -
Basic single series chart for a chart group.
+
Graph data with a filter.
-ChartGroup +GraphData -
Group of charts.
+
Specialized structure for representing graph data.
-FilteredChart +JGraph -
A single session chart with a stream filter.
+
GUI wrapper for graph data.
@@ -129,14 +129,7 @@

Package com.stuypulse.stuylib.util.chart< MouseTracker -
Tracks the mouse on a container
- - - -NChart - -
A class for handling multi-series graphing by combining the data from multiple singe=series - charts.
+
Tracks the mouse on a container without the need for a listener.
diff --git a/docs/com/stuypulse/stuylib/util/chart/package-tree.html b/docs/com/stuypulse/stuylib/util/chart/package-tree.html index fce2c24a..94a2ad40 100644 --- a/docs/com/stuypulse/stuylib/util/chart/package-tree.html +++ b/docs/com/stuypulse/stuylib/util/chart/package-tree.html @@ -77,39 +77,18 @@

Class Hierarchy

diff --git a/docs/index-all.html b/docs/index-all.html index 7a7bb1ea..b7420b5d 100644 --- a/docs/index-all.html +++ b/docs/index-all.html @@ -67,7 +67,7 @@

Index

-
A B C D E F G H I K L M N O P R S T U V W X Y 
All Classes All Packages +
A B C D E F G H I J K L M N O P R S T U V W X Y 
All Classes All Packages

A

@@ -80,18 +80,6 @@

A

Add two Vector2Ds
-
add(Chart...) - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Add addition charts to the chart group.
-
-
add(Chart...) - Method in class com.stuypulse.stuylib.util.chart.NChart
-
-
Adds charts.
-
-
addBind(String, KeyTracker.KeyFunction) - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Add key binding to chart's key tracker.
-
addBind(String, KeyTracker.KeyFunction) - Method in class com.stuypulse.stuylib.util.chart.KeyTracker
Add a basic binding to a key code
@@ -162,34 +150,6 @@

C

CARRET - com.stuypulse.stuylib.file.csv.CSVType
 
-
Chart - Class in com.stuypulse.stuylib.util.chart
-
-
Basic single series chart for a chart group.
-
-
Chart() - Constructor for class com.stuypulse.stuylib.util.chart.Chart
-
-
Default constructor that creates an empty frame.
-
-
Chart(String) - Constructor for class com.stuypulse.stuylib.util.chart.Chart
-
-
Conveience chart with default x and y axes.
-
-
Chart(String, String, String) - Constructor for class com.stuypulse.stuylib.util.chart.Chart
-
-
Full constructor for creating a chart.
-
-
ChartGroup - Class in com.stuypulse.stuylib.util.chart
-
-
Group of charts.
-
-
ChartGroup(Chart...) - Constructor for class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Constructor to take in charts.
-
-
chartPanel - Variable in class com.stuypulse.stuylib.util.chart.Chart
-
-
Swing panel to store the chart.
-
circular(double) - Static method in class com.stuypulse.stuylib.math.SLMath
Use the shape of a circle to scale the input
@@ -348,10 +308,6 @@

D

Construct a new Angle class with a double in degrees
-
display() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Show the chart.
-
distance() - Method in class com.stuypulse.stuylib.math.Vector2D
Get the distance from 0, 0
@@ -404,17 +360,13 @@

E

F

-
FilteredChart - Class in com.stuypulse.stuylib.util.chart
+
FilteredGraphData - Class in com.stuypulse.stuylib.util.chart
-
A single session chart with a stream filter.
+
Graph data with a filter.
-
FilteredChart(String, IFilter) - Constructor for class com.stuypulse.stuylib.util.chart.FilteredChart
+
FilteredGraphData(GraphData, IFilter) - Constructor for class com.stuypulse.stuylib.util.chart.FilteredGraphData
-
Chart with a filter.
-
-
FilteredChart(String, String, String, IFilter) - Constructor for class com.stuypulse.stuylib.util.chart.FilteredChart
-
-
Chart with a filter.
+
Create a Graph (no gui) with the following configuration
FilteredIStream - Class in com.stuypulse.stuylib.streams
@@ -561,10 +513,6 @@

G

Get button from underlying joystick
-
getChartTitle() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Return chart title.
-
getCodeValue() - Method in enum com.stuypulse.stuylib.network.limelight.Limelight.CameraStream
 
getCodeValue() - Method in enum com.stuypulse.stuylib.network.limelight.Limelight.CamMode
@@ -661,10 +609,6 @@

G

Gets if key is pressed
-
getKey(String) - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Gets the boolean value of a key
-
getKey(String) - Method in class com.stuypulse.stuylib.util.chart.KeyTracker
Get the value of a key press.
@@ -677,6 +621,8 @@

G

Returns Set of Strings with the names of every key that is pressed
+
getKeyTracker() - Method in class com.stuypulse.stuylib.util.chart.JGraph
+
 
getLatencyMs() - Static method in class com.stuypulse.stuylib.network.limelight.Limelight
Get the latency of limelight information in milli-seconds
@@ -731,6 +677,8 @@

G

 
getLeftY() - Method in class com.stuypulse.stuylib.input.gamepads.Xbox
 
+
getLength() - Method in class com.stuypulse.stuylib.util.chart.GraphData
+
 
getLogData() - Method in interface com.stuypulse.stuylib.file.FRCLogger.Loggable
Implement this method with something that reports the message or data that should be fed into the @@ -749,34 +697,16 @@

G

Get the sidelength of longest side of the fitted bounding box (0 - 320 pixels)
-
getMaxSize() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Return the maximum number of (x,y) entries
-
-
getMaxSize() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Gets the max size from the current selected chart.
-
-
getMouseX() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Gets the mouse position as a percentage of the width
-
-
getMouseX() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Gets the mouse x from the current selected chart.
-
+
getMaxValue() - Method in class com.stuypulse.stuylib.util.chart.GraphData
+
 
+
getMinValue() - Method in class com.stuypulse.stuylib.util.chart.GraphData
+
 
+
getMouseTracker() - Method in class com.stuypulse.stuylib.util.chart.JGraph
+
 
getMouseX() - Method in class com.stuypulse.stuylib.util.chart.MouseTracker
Get mouse x
-
getMouseY() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Gets the mouse position as a percentage of the height
-
-
getMouseY() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Gets the mouse y from the current selected chart.
-
getMouseY() - Method in class com.stuypulse.stuylib.util.chart.MouseTracker
Get mouse y
@@ -785,6 +715,8 @@

G

 
getName() - Method in class com.stuypulse.stuylib.commands.ThreadedCommand
 
+
getName() - Method in class com.stuypulse.stuylib.util.chart.GraphData
+
 
getNetKeyboard() - Method in class com.stuypulse.stuylib.input.keyboard.computer.NetKeyListener
Returns underlying NetKeyboard class
@@ -1136,6 +1068,10 @@

G

getTopButton() - Method in class com.stuypulse.stuylib.input.Gamepad
 
+
getValue(int) - Method in class com.stuypulse.stuylib.util.chart.GraphData
+
+
Get a value from the buffer of graph data
+
getVector() - Method in class com.stuypulse.stuylib.math.Angle
Get the point of the angle on the unit circle
@@ -1154,18 +1090,6 @@

G

Get x from Solve3D Result
-
getXBounds() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Return x bounds of the chart as an array.
-
-
getXBounds() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Get the x bounds from the current selected chart.
-
-
getXData() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Get x data.
-
getY() - Method in class com.stuypulse.stuylib.network.limelight.Solve3DResult
Get y from Solve3D Result
@@ -1174,21 +1098,21 @@

G

Get yaw from Solve3D Result
-
getYBounds() - Method in class com.stuypulse.stuylib.util.chart.Chart
+
getZ() - Method in class com.stuypulse.stuylib.network.limelight.Solve3DResult
-
Return y bounds as an array.
+
Get z from Solve3D Result
-
getYBounds() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
+
GraphData - Class in com.stuypulse.stuylib.util.chart
-
Get the y bounds from the current selected chart.
+
Specialized structure for representing graph data.
-
getYData() - Method in class com.stuypulse.stuylib.util.chart.Chart
+
GraphData(GraphData) - Constructor for class com.stuypulse.stuylib.util.chart.GraphData
-
Get y data.
+
Create a Graph (no gui) with the following configuration
-
getZ() - Method in class com.stuypulse.stuylib.network.limelight.Solve3DResult
+
GraphData(String, int, double, double) - Constructor for class com.stuypulse.stuylib.util.chart.GraphData
-
Get z from Solve3D Result
+
Create a Graph (no gui) with the following configuration
@@ -1250,10 +1174,6 @@

I

 
initialize() - Method in class com.stuypulse.stuylib.commands.ThreadedCommand
 
-
instance - Variable in class com.stuypulse.stuylib.util.chart.Chart
-
-
The instance of the XYChart
-
intValue() - Method in class com.stuypulse.stuylib.network.SmartNumber
Gets the value of the number from SmartDashboard (casted to a int)
@@ -1317,6 +1237,20 @@

I

Allows the CSVReader class to be iterated over
+ + + +

J

+
+
JGraph - Class in com.stuypulse.stuylib.util.chart
+
+
GUI wrapper for graph data.
+
+
JGraph(GraphData...) - Constructor for class com.stuypulse.stuylib.util.chart.JGraph
+
+
Create a JGraph
+
+
@@ -1338,10 +1272,6 @@

K

keyReleased(KeyEvent) - Method in class com.stuypulse.stuylib.util.chart.KeyTracker
 
-
keyTracker - Variable in class com.stuypulse.stuylib.util.chart.Chart
-
-
Key tracker with built in escape function and adding key binding functionality.
-
KeyTracker - Class in com.stuypulse.stuylib.util.chart
Key tracker for swing components with key bindings.
@@ -1474,12 +1404,6 @@

M

 
MAX_Y_ANGLE - Static variable in class com.stuypulse.stuylib.network.limelight.Limelight
 
-
maxDataSize - Variable in class com.stuypulse.stuylib.util.chart.Chart
-
-
Stores the max number of ordered pairs - - Anything less than 0 turns off max size
-
MIN_SIDE_LENGTH - Static variable in class com.stuypulse.stuylib.network.limelight.Limelight
 
MIN_SKEW - Static variable in class com.stuypulse.stuylib.network.limelight.Limelight
@@ -1492,17 +1416,9 @@

M

 
MIN_Y_ANGLE - Static variable in class com.stuypulse.stuylib.network.limelight.Limelight
 
-
mouseDragged(MouseEvent) - Method in class com.stuypulse.stuylib.util.chart.MouseTracker
-
 
-
mouseMoved(MouseEvent) - Method in class com.stuypulse.stuylib.util.chart.MouseTracker
-
 
-
mouseTracker - Variable in class com.stuypulse.stuylib.util.chart.Chart
-
-
Mouse tracker for getting mouse x and y as a percentage of the screen width and height.
-
MouseTracker - Class in com.stuypulse.stuylib.util.chart
-
Tracks the mouse on a container
+
Tracks the mouse on a container without the need for a listener.
MouseTracker(Container) - Constructor for class com.stuypulse.stuylib.util.chart.MouseTracker
@@ -1531,15 +1447,6 @@

M

N

-
NChart - Class in com.stuypulse.stuylib.util.chart
-
-
A class for handling multi-series graphing by combining the data from multiple singe=series - charts.
-
-
NChart(Chart...) - Constructor for class com.stuypulse.stuylib.util.chart.NChart
-
-
Creates an NChart with the data of given charts.
-
NetKeyboard - Class in com.stuypulse.stuylib.input.keyboard
This class lets you send and receive keyboard information over network tables @@ -1721,14 +1628,6 @@

R

Makes a new IStream sourcing from a CSV file
-
redraw() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Revalidate and repaint panel.
-
-
redraw() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Redraw the current selected chart.
-
registerLoggable(FRCLogger.Loggable) - Method in class com.stuypulse.stuylib.file.FRCLogger
Registers a new Loggable that upon call will put the next getLogData() at level getLogLevel() to @@ -1750,18 +1649,6 @@

R

Resets the value on SmartDashboard to the default value
-
reset() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Clears x and y data, and sets x and y to a default 0,0.
-
-
reset() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Reset each chart's data.
-
-
reset() - Method in class com.stuypulse.stuylib.util.chart.NChart
-
-
Reset each chart to 0,0 and reset each's corresponding series.
-
reset() - Method in class com.stuypulse.stuylib.util.StopWatch
Resets the stop watch to the current time and returns time since last reset.
@@ -1770,34 +1657,6 @@

R

Reset all of the distance values
-
reset(double, double) - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Clears x and y data.
-
-
reset(double, double) - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Reset each chart's data.
-
-
reset(double, double) - Method in class com.stuypulse.stuylib.util.chart.NChart
-
-
Reset each chart to an ordered pair and reset each's corresponding series.
-
-
resetXBounds() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Remove x boundaries of the graph.
-
-
resetXBounds() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Reset each chart's x boundaries.
-
-
resetYBounds() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Remove y boundaries of the chart.
-
-
resetYBounds() - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Reset each chart's y data.
-
RollingAverage - Class in com.stuypulse.stuylib.streams.filters
Simple implementation of an Exponential Moving Average @@ -1895,18 +1754,6 @@

S

setLEDMode(Limelight.LEDMode) - Static method in class com.stuypulse.stuylib.network.limelight.Limelight
 
-
setMaxSize(int) - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Set the maximum number of (x,y) entries
-
-
setMaxSize(int) - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Set each chart's max size.
-
-
setMaxSize(int) - Method in class com.stuypulse.stuylib.util.chart.NChart
-
-
Set max size of each chart.
-
setNumber(String, Number) - Method in class com.stuypulse.stuylib.network.SLNetworkTable
Set Number in network table
@@ -1937,22 +1784,6 @@

S

Lets you specify a filter that will be applied to the velocity measurements.
-
setXBounds(double, double) - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Set x boundaries of the chart.
-
-
setXBounds(double, double) - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Set x bounds of each chart.
-
-
setYBounds(double, double) - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Set y boundaries of the chart.
-
-
setYBounds(double, double) - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Set y bounds of each chart.
-
sin() - Method in class com.stuypulse.stuylib.math.Angle
Get the sin of the angle
@@ -2166,8 +1997,6 @@

T

Format the angle into a string
-
toString() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
 
TRIGGER_AXIS_THRESHOLD - Static variable in class com.stuypulse.stuylib.input.Gamepad
 
TWO_PER_SECOND - com.stuypulse.stuylib.network.limelight.Limelight.SnapshotMode
@@ -2178,33 +2007,32 @@

T

U

-
undisplay() - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Hide the chart.
-
unregisterLoggable(FRCLogger.Loggable) - Method in class com.stuypulse.stuylib.file.FRCLogger
Removes the Loggable implemented object from the registered Loggables.
-
update(double) - Method in class com.stuypulse.stuylib.control.Controller
+
update() - Method in class com.stuypulse.stuylib.util.chart.JGraph
-
Update the controller with the error from the destination that you want to reach
+
Update the graphs without sending any new value + + This is useful because it lets you send the update function directly instead of through the + JGraph.
-
update(double) - Method in class com.stuypulse.stuylib.util.chart.Chart
+
update(double) - Method in class com.stuypulse.stuylib.control.Controller
-
Add y-data and increment x by 1.
+
Update the controller with the error from the destination that you want to reach
-
update(double) - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
+
update(double) - Method in class com.stuypulse.stuylib.util.chart.FilteredGraphData
-
Update each chart's data.
+
Add a value to the graph as the next filtered entry
-
update(double) - Method in class com.stuypulse.stuylib.util.chart.FilteredChart
+
update(double) - Method in class com.stuypulse.stuylib.util.chart.GraphData
-
Update Y value with the chart's filter.
+
Add a value to the graph as the next entry
-
update(double) - Method in class com.stuypulse.stuylib.util.chart.NChart
+
update(double) - Method in class com.stuypulse.stuylib.util.chart.JGraph
-
Updates each chart's data and a corresponding series based on a given y value
+
Update all the charts with the same value
update(double, double) - Method in class com.stuypulse.stuylib.control.Controller
@@ -2213,21 +2041,9 @@

U

This function just subtracts the two at this moment.
-
update(double, double) - Method in class com.stuypulse.stuylib.util.chart.Chart
-
-
Add a new ordered pair to the x-data and y-data.
-
-
update(double, double) - Method in class com.stuypulse.stuylib.util.chart.ChartGroup
-
-
Update each chart's data.
-
-
update(double, double) - Method in class com.stuypulse.stuylib.util.chart.FilteredChart
-
-
Update Y value with the chart's filter.
-
-
update(double, double) - Method in class com.stuypulse.stuylib.util.chart.NChart
+
updateXYChart(XYChart) - Method in class com.stuypulse.stuylib.util.chart.GraphData
-
Updates each chart's data and a corresponding series based on an ordered pair.
+
Draw the Graph to an XYChart
@@ -2370,7 +2186,7 @@

Y

The y position of the Vector2D
-
A B C D E F G H I K L M N O P R S T U V W X Y 
All Classes All Packages
+A B C D E F G H I J K L M N O P R S T U V W X Y 
All Classes All Packages