Interface BaseFigure

All Superinterfaces:
Serializable
All Known Subinterfaces:
Figure
All Known Implementing Classes:
BaseFigureImpl, FigureImpl, FigureWidget, ScatterPlotMatrix

public interface BaseFigure extends Serializable
Container for Charts.
  • Method Details

    • figureRemoveSeries

      BaseFigure figureRemoveSeries(String... removeSeriesNames)
      Removes all series with names from this Figure.
      Parameters:
      removeSeriesNames - series names
      Returns:
      this Figure
    • updateInterval

      BaseFigure updateInterval(long updateIntervalMillis)
      Sets the update interval of this Figure. The plot will be redrawn at this update interval.
      Parameters:
      updateIntervalMillis - update interval, in milliseconds
      Returns:
      this Figure
    • figureTitle

      BaseFigure figureTitle(String title)
      Sets the title of this Figure
      Parameters:
      title - title
      Returns:
      this Figure
    • figureTitleFont

      BaseFigure figureTitleFont(Font font)
      Sets the font of this Figure's title
      Parameters:
      font - font
      Returns:
      this Figure
    • figureTitleFont

      BaseFigure figureTitleFont(String family, String style, int size)
      Sets the font of this Figure's title
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Figure
    • figureTitleColor

      BaseFigure figureTitleColor(Paint color)
      Sets the color of this Figure's title
      Parameters:
      color - color
      Returns:
      this Figure
    • figureTitleColor

      BaseFigure figureTitleColor(String color)
      Sets the color of this Figure's title
      Parameters:
      color - color
      Returns:
      this Figure
    • newChart

      Chart newChart()
      Adds a new Chart to this figure.
      Returns:
      the new Chart. The Chart is placed in the next available grid space, starting at the upper left hand corner of the grid, going left to right, top to bottom. If no available space is found in the grid:
      • if this Figure was created with no specified grid size, then the Figure will resize itself to add the new Chart;
      • if not, a RuntimeException will be thrown.
      Throws:
      RuntimeException - if no space for the new Chart exists or can not be made
    • newChart

      Chart newChart(int index)
      Adds a new Chart to this figure.
      Parameters:
      index - index from the Figure's grid to remove. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1] [2, 3].
      Returns:
      the new Chart. The Chart is placed at the grid space indicated by the index.
      Throws:
      RuntimeException - if index is outside this Figure's grid
    • newChart

      Chart newChart(int rowNum, int colNum)
      Adds a new Chart to this figure.
      Parameters:
      rowNum - row index in this Figure's grid. The row index starts at 0.
      colNum - column index in this Figure's grid. The column index starts at 0.
      Returns:
      the new Chart. The Chart is placed at the grid space [rowNum, colNum.
      Throws:
      RuntimeException - if the coordinates are outside the Figure's grid
    • removeChart

      BaseFigure removeChart(int removeChartIndex)
      Removes a chart from the Figure's grid.
      Parameters:
      removeChartIndex - index from the Figure's grid to remove. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1] [2, 3].
      Returns:
      this Figure with the chart removed.
    • removeChart

      BaseFigure removeChart(int removeChartRowNum, int removeChartColNum)
      Removes a chart from the Figure's grid.
      Parameters:
      removeChartRowNum - row index in this Figure's grid. The row index starts at 0.
      removeChartColNum - column index in this Figure's grid. The column index starts at 0.
      Returns:
      this Figure with the chart removed.
      Throws:
      RuntimeException - if the coordinates are outside the Figure's grid
    • chart

      Chart chart(int index)
      Returns a chart from this Figure's grid.
      Parameters:
      index - index from the Figure's grid. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1] [2, 3].
      Returns:
      selected Chart
      Throws:
      RuntimeException - if the index is outside the Figure's grid
    • chart

      Chart chart(int rowNum, int colNum)
      Returns a chart from this Figure's grid.
      Parameters:
      rowNum - row index in this Figure's grid. The row index starts at 0.
      colNum - column index in this Figure's grid. The column index starts at 0.
      Returns:
      selected Chart
      Throws:
      RuntimeException - if the coordinates are outside the Figure's grid
    • save

      default BaseFigure save(String path)
      Saves the Figure as an image.
      Parameters:
      path - path where the figure is saved. Must not be null
      Returns:
      figure
      Throws:
      RequirementFailure - path is null
    • save

      default BaseFigure save(String path, boolean wait, long timeoutSeconds)
      Saves the Figure as an image.
      Parameters:
      path - path where the figure is saved. Must not be null
      wait - whether to hold the calling thread until the file is written
      timeoutSeconds - timeout in seconds to wait.
      Returns:
      figure
      Throws:
      RequirementFailure - path is null
    • save

      default BaseFigure save(String path, int width, int height)
      Saves the Figure as an image.
      Parameters:
      path - path where the figure is saved. Must not be null
      width - image width
      height - image height
      Returns:
      figure
      Throws:
      RequirementFailure - path is null
    • save

      default BaseFigure save(String path, int width, int height, boolean wait, long timeoutSeconds)
      Saves the Figure as an image.
      Parameters:
      path - path where the figure is saved. Must not be null
      width - image width
      height - image height
      wait - whether to hold the calling thread until the file is written
      timeoutSeconds - timeout in seconds to wait.
      Returns:
      figure
      Throws:
      RequirementFailure - path is null