Package draw

Class ScatterPlot

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Runnable, Accessible, RootPaneContainer, WindowConstants

public class ScatterPlot extends JFrame implements Runnable
Class for a 3D scatter plot frame.
Since:
2004.06.02
See Also:
  • Field Details

    • VERSION

      public static final String VERSION
      the version string
      See Also:
    • PROGRAM

      public static final int PROGRAM
      mode flag: the scatter plot is a stand-alone program
      See Also:
    • LOAD_ITEMS

      public static final int LOAD_ITEMS
      mode flag: add menu items for loading tables
      See Also:
  • Constructor Details

    • ScatterPlot

      public ScatterPlot(int mode)
      Create a 3D scatter plot frame.
      Parameters:
      mode - the mode flags
      Since:
      2004.06.02 (Christian Borgelt)
    • ScatterPlot

      public ScatterPlot(Component owner, int mode)
      Create a 3D scatter plot frame.
      Parameters:
      owner - the component that is to own this scatter plot
      mode - the mode flags
      Since:
      2004.06.02 (Christian Borgelt)
  • Method Details

    • run

      public void run()
      Create the user interface.

      Following the recommendations in the Java tutorial, the user interface is created in the "run" method, which is invoked from the event queue, in order to avoid problems with threads.

      Specified by:
      run in interface Runnable
      Since:
      2007.02.07 (Christian Borgelt)
    • setTable

      public void setTable(table.Table tab)
      Set the table to display.
      Parameters:
      tab - the table to display
      Since:
      2004.06.02 (Christian Borgelt)
    • getTable

      public table.Table getTable()
      Get the currently displayed table.
      Returns:
      the currently displayed table
      Since:
      2007.02.12 (Christian Borgelt)
    • reportError

      public void reportError(String msg)
      Report an I/O error.
      Parameters:
      msg - the error message to report
      Since:
      2007.06.07 (Christian Borgelt)
    • loadTable

      public boolean loadTable(File file)
      Load the table to display.
      Parameters:
      file - the file to load the table from
      Returns:
      whether the file was successfully loaded
      Since:
      2007.02.07 (Christian Borgelt)
    • saveImage

      public boolean saveImage(File file)
      Save a PNG image of the panel.
      Parameters:
      file - the file to save the image to
      Returns:
      whether the file was successfully written
      Since:
      2007.02.07 (Christian Borgelt)
    • main

      public static void main(String[] args)
      Main function for command line invocation.
      Parameters:
      args - the command line arguments
      Since:
      2004.06.02 (Christian Borgelt)