|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.ui.ApplicationUtil
public final class ApplicationUtil
The ApplicationUtil
is a utility for application launchers.
Method Summary | |
---|---|
static boolean |
configureFrameBounds(ILauncher pLauncher,
java.awt.Frame pFrame)
Configures the bounds for the given frame, if the System property "framebounds" was set. |
static IApplication |
createApplication(ILauncher pLauncher,
java.lang.ClassLoader pClassLoader,
java.lang.String pClassName)
Creates an instance of an IApplication . |
static IApplication |
createApplication(ILauncher pLauncher,
java.lang.String pClassName)
Creates an instance of an IApplication . |
static XmlNode |
getConfig(java.lang.String pName)
Gets the parsed xml configuration. |
static java.lang.String |
getRegistryApplicationName(ILauncher pLauncher)
Gets the application name out of the launcher. |
static java.lang.String |
getRegistryKey(java.lang.String pApplication,
java.lang.String pKey)
Gets the value for an application specific registry key. |
static boolean |
isLinux()
Gets whether the operating system is Linux. |
static boolean |
isMacOS()
Gets whether the operating system is MacOS. |
static boolean |
isWindows()
Gets whether the operating system is Windows. |
static java.lang.String |
replaceParameter(java.lang.String pValue,
ILauncher pLauncher)
Replaces a parameter placeholder with the desired parameter. |
static void |
setRegistryKey(java.lang.String pApplication,
java.lang.String pKey,
java.lang.String pValue)
Sets the value for an application specific registry key. |
static java.util.HashMap<java.lang.String,java.lang.String> |
splitImageProperties(java.lang.String pImageDefinition)
Splits image properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IApplication createApplication(ILauncher pLauncher, java.lang.String pClassName) throws java.lang.Throwable
IApplication
.
pLauncher
- the launch configurationpClassName
- the full qualified class name of the desired class
IApplication
instance
java.lang.Throwable
- if the instance can not be createdpublic static IApplication createApplication(ILauncher pLauncher, java.lang.ClassLoader pClassLoader, java.lang.String pClassName) throws java.lang.Throwable
IApplication
.
pLauncher
- the launch configurationpClassLoader
- the class loaderpClassName
- the full qualified class name of the desired class
IApplication
instance
java.lang.Throwable
- if the instance can not be createdpublic static XmlNode getConfig(java.lang.String pName) throws java.lang.Exception
pName
- the configuration name or path
null
if the config was not found
java.lang.Exception
- xml parse errorpublic static java.lang.String replaceParameter(java.lang.String pValue, ILauncher pLauncher)
pValue
- the value of an application parameterpLauncher
- the launcher
public static void setRegistryKey(java.lang.String pApplication, java.lang.String pKey, java.lang.String pValue)
pApplication
- the application namepKey
- the key to setpValue
- the value to set
java.lang.SecurityException
- if a SecurityManager
is present and denies the registry access
java.lang.RuntimeException
- if it's not possible to save the registry keypublic static java.lang.String getRegistryKey(java.lang.String pApplication, java.lang.String pKey)
pApplication
- the application namepKey
- the key to get
pKey
or null
if the application or key is not visible
java.lang.SecurityException
- if a SecurityManager
is present and denies the registry accesspublic static java.lang.String getRegistryApplicationName(ILauncher pLauncher)
pLauncher
- the launcher with properties for the application
public static boolean configureFrameBounds(ILauncher pLauncher, java.awt.Frame pFrame)
pLauncher
- the launcherpFrame
- the frame to change
true
if bounds were changed, false
otherwisepublic static boolean isMacOS()
true
if MacOS, false
otherwisepublic static boolean isLinux()
true
if Linux, false
otherwisepublic static boolean isWindows()
true
if Windows, false
otherwisepublic static java.util.HashMap<java.lang.String,java.lang.String> splitImageProperties(java.lang.String pImageDefinition)
imagename;prop1=value1;prop2=value2. The imagename will be returned as property with the identifier
name
.
If a property with name name
was set, it won't be returned.
pImageDefinition
- the image definition
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |