Package org.opensourcephysics.controls
Class ControlUtils
java.lang.Object
org.opensourcephysics.controls.ControlUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
e2
(double d) Convert a double to a string, printing two decimal places including exponent.static String
e3
(double d) Convert a double to a string, printing three decimal places including exponent.static String
e4
(double d) Convert a double to a string, printing four decimal places including exponent.static String
f2
(double d) Convert a double to a string, printing two decimal places.static String
f3
(double d) Convert a double to a string, printing three decimal places.static String
f4
(double d) Convert a double to a string, printing four decimal places.static String
static JFileChooser
Gets a file chooser.static void
loadParameters
(Control control, Component parent) Loads control parameters from a text file using a dialog box.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.static void
static JFrame
showSystemProperties
(boolean vis) Shows the about dialog.
-
Field Details
-
chooser
-
-
Method Details
-
f2
Convert a double to a string, printing two decimal places.- Parameters:
d
- Input double
-
f3
Convert a double to a string, printing three decimal places.- Parameters:
d
- Input double
-
e2
Convert a double to a string, printing two decimal places including exponent.- Parameters:
d
- Input double
-
e3
Convert a double to a string, printing three decimal places including exponent.- Parameters:
d
- Input double
-
e4
Convert a double to a string, printing four decimal places including exponent.- Parameters:
d
- Input double
-
f4
Convert a double to a string, printing four decimal places.- Parameters:
d
- Input double
-
showSystemProperties
Shows the about dialog. -
getSystemProperties
-
loadParameters
Loads control parameters from a text file using a dialog box. -
saveToFile
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 savedparent
- the parent component of the dialog, can benull
; seeshowDialog
in class JFileChooser for details
-
saveXML
-
getXMLFileChooser
Gets a file chooser.- Returns:
- the chooser
-