public class GUIUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Map |
charMap |
Modifier and Type | Method and Description |
---|---|
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 inputStr) |
static java.lang.String |
removeSubscripting(java.lang.String input) |
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.
|
public static java.lang.String parseTeX(java.lang.String inputStr)
public static java.lang.String removeSubscripting(java.lang.String input)
public static java.awt.Component findInstance(java.awt.Container container, java.lang.Class c)
container
- Containerc
- Classpublic 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.
clearAll
- clears all frames if truepublic 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 detailspublic 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 pngjava.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