Package regress

Class RegView

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

public class RegView extends JFrame implements Runnable
Class for a regression model.
Since:
2007.03.19
See Also:
  • Field Details

    • VERSION

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

      public static final int PROGRAM
      mode flag: the viewer 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:
    • SAVE_ITEMS

      public static final int SAVE_ITEMS
      mode flag: add menu items for saving tables
      See Also:
    • FILE_ITEMS

      public static final int FILE_ITEMS
      mode flag: add menu items for loading and saving tables
      See Also:
    • ALL_ITEMS

      public static final int ALL_ITEMS
      mode flag: all optional menu items
      See Also:
  • Constructor Details

    • RegView

      public RegView(int mode)
      Create a regression model viewer.
      Parameters:
      mode - the mode flags
      Since:
      2007.03.19 (Christian Borgelt)
    • RegView

      public RegView(Component owner, int mode)
      Create a regression model viewer.
      Parameters:
      owner - the component that is to own this viewer
      mode - the mode flags
      Since:
      2007.03.19 (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.03.19 (Christian Borgelt)
    • setMessage

      public void setMessage(String msg)
      Set the message to display in the status line.
      Parameters:
      msg - the message to display
      Since:
      2007.03.19 (Christian Borgelt)
    • setRegression

      public void setRegression(Regression reg)
      Set the regression model to display.
      Parameters:
      reg - the regression model to display
      Since:
      2007.03.19 (Christian Borgelt)
    • setZeros

      public void setZeros(boolean zeros)
      Set the flag for zero exponents.
      Parameters:
      zeros - whether to display zero exponents
      Since:
      2007.03.19 (Christian Borgelt)
    • setEpsilon

      public void setEpsilon(double eps)
      Set the epsilon for the coefficient display.
      Parameters:
      eps - the epsilon for the coefficient display
      Since:
      2007.03.19 (Christian Borgelt)
    • getRegression

      public Regression getRegression()
      Get the currently displayed regression model.
      Returns:
      the currently displayed regression model
      Since:
      2007.03.19 (Christian Borgelt)
    • loadRegression

      public boolean loadRegression(File file)
      Load the regression model to display.
      Parameters:
      file - the file to load the regression model from
      Returns:
      whether the file was successfully loaded
      Since:
      2007.03.19 (Christian Borgelt)
    • saveRegression

      public boolean saveRegression(File file)
      Save the displayed regression model.
      Parameters:
      file - the file to save the regression model to
      Returns:
      whether the file was successfully saved
      Since:
      2007.03.19 (Christian Borgelt)
    • main

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