Package org.opensourcephysics.controls
Class ControlUtils
java.lang.Object
org.opensourcephysics.controls.ControlUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringe2(double d) Convert a double to a string, printing two decimal places including exponent.static Stringe3(double d) Convert a double to a string, printing three decimal places including exponent.static Stringe4(double d) Convert a double to a string, printing four decimal places including exponent.static Stringf2(double d) Convert a double to a string, printing two decimal places.static Stringf3(double d) Convert a double to a string, printing three decimal places.static Stringf4(double d) Convert a double to a string, printing four decimal places.static Stringstatic JFileChooserGets a file chooser.static voidloadParameters(Control control, Component parent) Loads control parameters from a text file using a dialog box.static voidsaveToFile(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 voidstatic JFrameshowSystemProperties(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; seeshowDialogin class JFileChooser for details
-
saveXML
-
getXMLFileChooser
Gets a file chooser.- Returns:
- the chooser
-