|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.GUIUtils
public class GUIUtils
Method Summary | |
---|---|
static void |
clearDrawingFrameData(boolean clearAll)
Clears the data in animated DrawingFrames and repaints the frame's content. |
static void |
closeAndDisposeOSPFrames(java.awt.Frame frame)
Disposes all OSP frames except the given frame. |
static void |
enableMenubars(boolean enable)
Enables and disables the menu bars in DrawingFrames and DrawingFrame3D. |
static java.awt.Component |
findInstance(java.awt.Container container,
java.lang.Class<?> c)
Finds an instance of a class in the given container. |
static java.lang.String |
parseTeX(java.lang.String input)
Deprecated. use TeXParser class. |
static java.lang.String |
removeSubscripting(java.lang.String input)
Deprecated. use TeXParser class. |
static void |
renderAnimatedFrames()
Renders all OSPFrames whose animated property is true. |
static void |
repaintAnimatedFrames()
Repaints all OSPFrames whose animated property is true. |
static void |
repaintOSPFrames()
Repaints all OSPFrames. |
static void |
saveImage(javax.swing.JComponent comp,
java.io.File outputFile,
java.lang.String outputFileFormat)
Saves the contents of the specified component in the given file format. |
static void |
saveImage(javax.swing.JComponent component,
java.lang.String ouputFileFormat,
java.awt.Component parent)
Saves the contents of the specified component in the given file format. |
static void |
setAnimatedFrameIgnoreRepaint(boolean ignoreRepaint)
Sets the IgnorRepaint for all animated frames to the given value. |
static void |
showDrawingAndTableFrames()
Shows all drawing and table frames. |
static java.io.File |
showOpenDialog(java.awt.Component parent)
|
static java.io.File |
showSaveDialog(java.awt.Component parent)
Pops up a "Save File" file chooser dialog and takes user through process of saving a file. |
static java.io.File |
showSaveDialog(java.awt.Component parent,
java.lang.String title)
Pops up a "Save File" file chooser dialog and takes user through process of saving a file. |
static void |
timingTest(Drawable drawable)
Test the time to render a drawable component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String parseTeX(java.lang.String input)
input
-
public static java.lang.String removeSubscripting(java.lang.String input)
input
-
public static java.awt.Component findInstance(java.awt.Container container, java.lang.Class<?> c)
container
- Containerc
- Class
public static void showDrawingAndTableFrames()
public static void renderAnimatedFrames()
public static void repaintAnimatedFrames()
public static void repaintOSPFrames()
public static void clearDrawingFrameData(boolean clearAll)
clearAll<\code> is true; otherwise only frames whose autoClear<\code> flag is
true will be cleared.
- Parameters:
clearAll
- clears all frames if true
public static void setAnimatedFrameIgnoreRepaint(boolean ignoreRepaint)
ignoreRepaint
- booleanpublic static void enableMenubars(boolean enable)
public static void closeAndDisposeOSPFrames(java.awt.Frame frame)
frame
- will not be disposedpublic static java.io.File showSaveDialog(java.awt.Component parent)
parent
- the parent component of the dialog,
can be null
;
see showDialog
in class JFileChooser for details
public static java.io.File showSaveDialog(java.awt.Component parent, java.lang.String title)
parent
- the parent component of the dialog,
can be null
;
see showDialog
in class JFileChooser for detailstitle
-
public static java.io.File showOpenDialog(java.awt.Component parent)
public static void timingTest(Drawable drawable)
drawable
- public static void saveImage(javax.swing.JComponent comp, java.io.File outputFile, java.lang.String outputFileFormat) throws java.io.IOException
comp
- outputFile
- the output fileoutputFileFormat
- output file format. One of eps, jpeg, or png
java.io.IOException
public static void saveImage(javax.swing.JComponent component, java.lang.String ouputFileFormat, java.awt.Component parent)
component
- comp the componentouputFileFormat
- output file format. One of eps, jpeg, or pngparent
- dialog parent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |