public class OSPRuntime
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static javax.swing.JApplet |
applet
Static reference to an applet for document/code base access.
|
static boolean |
appletMode
True if running as an applet.
|
protected static boolean |
authorMode
True if users allowed to author internal parameters such as Locale strings.
|
static java.lang.String |
chooserDir
File Chooser starting directory.
|
static java.util.Locale[] |
defaultLocales
Array of default OSP Locales.
|
static boolean |
disableAllDrawing
Disables drawing for faster start-up and to avoid screen flash in Drawing Panels.
|
static boolean |
javaLookAndFeel
Look and feel property for the graphical user interface.
|
protected static boolean |
launcherMode
Set true if a program is being run within Launcher.
|
static boolean |
launchingInSingleVM
True if always launching in single vm (applet mode, etc).
|
static java.lang.String |
OSP_ICON_FILE
Location of OSP icon.
|
static Translator |
translator
Shared Translator, if available.
|
static boolean |
webStart
True if launched by WebStart.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
chooseFilename(javax.swing.JFileChooser chooser)
Uses a JFileChooser to ask for a name.
|
static java.lang.String |
chooseFilename(javax.swing.JFileChooser chooser,
java.awt.Component parent,
boolean toSave)
Uses a JFileChooser to ask for a name.
|
static javax.swing.JFileChooser |
createChooser(java.lang.String description,
java.lang.String[] extensions)
Creates a JFileChooser with given desription and extensions
|
static javax.swing.JFileChooser |
getChooser()
Gets a file chooser.
|
static java.util.Locale[] |
getDefaultLocales()
Gets Locales for languages that have properties files in the core library.
|
static java.util.Locale[] |
getInstalledLocales()
Gets Locales for languages that have properties files in the core library.
|
static java.util.jar.JarFile |
getLaunchJar()
Gets the jar from which the progam was launched.
|
static java.lang.String |
getLaunchJarDirectory()
Gets the launch jar directory, if any.
|
static java.lang.String |
getLaunchJarName()
Gets the launch jar nsme, if any.
|
static java.lang.String |
getLaunchJarPath()
Gets the launch jar path, if any.
|
static Translator |
getTranslator()
Gets the translator, if any.
|
static boolean |
isAppletMode()
Determines if running as an applet
|
static boolean |
isAuthorMode()
Determines if running in author mode
|
static boolean |
isLauncherMode()
Gets the launcherMode property.
|
static boolean |
isLinux()
Determines if OS is Linux
|
static boolean |
isMac()
Determines if OS is Mac
|
static boolean |
isVista()
Determines if OS is Vista
|
static boolean |
isWebStart()
Determines if launched by WebStart
|
static boolean |
isWindows()
Determines if OS is Windows
|
static void |
setAuthorMode(boolean b)
Sets the authorMode property.
|
static void |
setLauncherMode(boolean b)
Sets the launcherMode property.
|
static void |
setLaunchJarPath(java.lang.String path)
Sets the launch jar path.
|
static void |
showAboutDialog(java.awt.Component parent)
Shows the about dialog.
|
public static volatile boolean disableAllDrawing
public static Translator translator
public static java.util.Locale[] defaultLocales
protected static boolean launcherMode
public static boolean appletMode
public static javax.swing.JApplet applet
public static boolean webStart
protected static boolean authorMode
public static boolean javaLookAndFeel
public static java.lang.String chooserDir
public static final java.lang.String OSP_ICON_FILE
public static boolean launchingInSingleVM
public static void showAboutDialog(java.awt.Component parent)
public static boolean isWindows()
public static boolean isMac()
public static boolean isLinux()
public static boolean isVista()
public static boolean isWebStart()
public static boolean isAppletMode()
public static boolean isAuthorMode()
public static void setAuthorMode(boolean b)
b
- booleanpublic static void setLauncherMode(boolean b)
b
- booleanpublic static boolean isLauncherMode()
public static void setLaunchJarPath(java.lang.String path)
public static java.lang.String getLaunchJarName()
public static java.lang.String getLaunchJarPath()
public static java.lang.String getLaunchJarDirectory()
public static java.util.jar.JarFile getLaunchJar()
public static java.util.Locale[] getDefaultLocales()
public static java.util.Locale[] getInstalledLocales()
public static Translator getTranslator()
public static javax.swing.JFileChooser getChooser()
public static java.lang.String chooseFilename(javax.swing.JFileChooser chooser)
chooser
- JFileChooserpublic static java.lang.String chooseFilename(javax.swing.JFileChooser chooser, java.awt.Component parent, boolean toSave)
chooser
- JFileChooserparent
- Parent component for messagestoSave
- true if we will save to the chosen file, false if we will read from itpublic static javax.swing.JFileChooser createChooser(java.lang.String description, java.lang.String[] extensions)
description
- String A description stringextensions
- String[] An array of allowed extensions