Class ControlUtils

java.lang.Object
org.opensourcephysics.controls.ControlUtils

public class ControlUtils extends Object
  • Field Details

  • Method Details

    • f2

      public static String f2(double d)
      Convert a double to a string, printing two decimal places.
      Parameters:
      d - Input double
    • f3

      public static String f3(double d)
      Convert a double to a string, printing three decimal places.
      Parameters:
      d - Input double
    • e2

      public static String e2(double d)
      Convert a double to a string, printing two decimal places including exponent.
      Parameters:
      d - Input double
    • e3

      public static String e3(double d)
      Convert a double to a string, printing three decimal places including exponent.
      Parameters:
      d - Input double
    • e4

      public static String e4(double d)
      Convert a double to a string, printing four decimal places including exponent.
      Parameters:
      d - Input double
    • f4

      public static String f4(double d)
      Convert a double to a string, printing four decimal places.
      Parameters:
      d - Input double
    • showSystemProperties

      public static JFrame showSystemProperties(boolean vis)
      Shows the about dialog.
    • getSystemProperties

      public static String getSystemProperties()
    • loadParameters

      public static void loadParameters(Control control, Component parent)
      Loads control parameters from a text file using a dialog box.
    • saveToFile

      public static void saveToFile(Object object, Component parent)
      Pops up a "Save File" file chooser dialog and takes user through process of saving and object to a file.
      Parameters:
      object - the object that will be converted to a string and saved
      parent - the parent component of the dialog, can be null; see showDialog in class JFileChooser for details
    • saveXML

      public static void saveXML(Object obj)
    • getXMLFileChooser

      public static JFileChooser getXMLFileChooser()
      Gets a file chooser.
      Returns:
      the chooser