public class EZEnvironment extends Object
Modifier and Type | Field and Description |
---|---|
static int |
LINUX_OS
Linux OS.
|
static int |
MAC_OS
MacOSX OS.
|
static String[] |
OS_NAMES
Access this string array using the xxx_OS constants defined here
|
static int |
OTHER_OS
Other OS.
|
static int |
WINDOWS_OS
Windows OS.
|
Modifier and Type | Method and Description |
---|---|
static void |
addResourceLocator(Class<?> cl)
Add a class used to enable JRE to locate resources such as images.
|
static void |
clearResourceLocator()
Clear the resource locator.
|
static boolean |
confirmBeforeExit()
Figures out whether or not the application asks to user if the application can be closed.
|
static boolean |
confirmMessage(Component parent,
String msg)
Display a confirmation modal dialogue box.
|
static void |
displayErrorMessage(Component parent,
String msg)
Display an error modal dialogue box.
|
static void |
displayInfoMessage(Component parent,
String msg)
Display an information modal dialogue box.
|
static void |
displayWarnMessage(Component parent,
String msg)
Display a warning modal dialogue box.
|
static EZActionManager |
getActionsManager()
Returns the ActionManager singleton instance.
|
static String[] |
getApplicationArguments()
Returns the application command-line arguments.
|
static String |
getApplicationProperty(String key)
Returns a persistent property.
|
static List<String> |
getApplicationPropertyKeys()
Returns list of keys of persistent property.
|
static ImageIcon |
getImageIcon(String key)
Returns an image given a key.
|
static String |
getMessage(String key)
Returns a message from the user-defined messages resource bundle.
|
static String |
getOSName()
Returns the operating system name.
|
static int |
getOSType()
Returns the operating system type.
|
static Frame |
getParentFrame()
Returns the application main frame.
|
static String |
getPreferencesConfigurationFile()
Gets the Preferences configuration file.
|
static EZUIStarterListener |
getUIStarterListener()
Returns the current UIStarterListener.
|
static String |
inputValueMessage(Component parent,
String msg)
Display an input value modal dialogue box.
|
static String |
inputValueMessage(Component parent,
String msg,
String initValue)
Display an input value modal dialogue box.
|
static void |
removeResourceLocatro(Class<?> cl)
Remove a class used to enable JRE to locate resources such as images.
|
static void |
resetApplicationProperty()
Clears all stored application properties.
|
static void |
setApplicationArguments(String[] args)
Sets the application command-line arguments.
|
static void |
setApplicationProperty(String key,
String value)
Sets a persistent application property.
|
static void |
setConfirmBeforeExit(boolean confirm)
Sets whether or not the application asks to user if the application can be closed.
|
static void |
setDefaultCursor()
Display the Arrow cursor.
|
static void |
setHandCursor()
Display the Hand cursor.
|
static void |
setParentFrame(Frame compo)
Sets the application main frame.
|
static void |
setPreferencesConfigurationFile(String confFile)
Sets the Preferences configuration file.
|
static void |
setUIStarterListener(EZUIStarterListener listener)
Registers a UIStarterListener.
|
static void |
setUserDefinedActionsResourceBundle(ResourceBundle rb)
Sets the resource bundle that contains your Menu Actions.
|
static void |
setUserDefinedMessagesResourceBundle(ResourceBundle rb)
Sets the resource bundle that contains your messages.
|
static void |
setWaitCursor()
Display the Wait cursor.
|
public static final int WINDOWS_OS
public static final int MAC_OS
public static final int LINUX_OS
public static final int OTHER_OS
public static final String[] OS_NAMES
public static String getMessage(String key)
key
- message key.setUserDefinedMessagesResourceBundle(ResourceBundle)
public static ImageIcon getImageIcon(String key)
addResourceLocator(Class)
methods.key
- image key.public static void addResourceLocator(Class<?> cl)
public static void removeResourceLocatro(Class<?> cl)
public static void clearResourceLocator()
public static int getOSType()
public static String getOSName()
public static void setUserDefinedMessagesResourceBundle(ResourceBundle rb)
public static void setUserDefinedActionsResourceBundle(ResourceBundle rb)
public static EZActionManager getActionsManager()
public static Frame getParentFrame()
public static void setParentFrame(Frame compo)
public static void setApplicationArguments(String[] args)
public static String[] getApplicationArguments()
public static void setUIStarterListener(EZUIStarterListener listener)
public static EZUIStarterListener getUIStarterListener()
public static void setPreferencesConfigurationFile(String confFile)
public static String getPreferencesConfigurationFile()
public static void setWaitCursor()
public static void setDefaultCursor()
public static void setHandCursor()
public static String inputValueMessage(Component parent, String msg, String initValue)
parent
- parent of this dialogue box. Either another dialogue box or the main frame. Passing
null is authorized; in that case, the main frame is considered as the parent of the dialogue box.msg
- messageinitValue
- initial value displayed in the dialogue boxpublic static String inputValueMessage(Component parent, String msg)
parent
- parent of this dialogue box. Either another dialogue box or the main frame. Passing
null is authorized; in that case, the main frame is considered as the parent of the dialogue box.msg
- messagepublic static boolean confirmMessage(Component parent, String msg)
parent
- parent of this dialogue box. Either another dialogue box or the main frame. Passing
null is authorized; in that case, the main frame is considered as the parent of the dialogue box.msg
- messagepublic static void displayErrorMessage(Component parent, String msg)
parent
- parent of this dialogue box. Either another dialogue box or the main frame. Passing
null is authorized; in that case, the main frame is considered as the parent of the dialogue box.msg
- messagepublic static void displayWarnMessage(Component parent, String msg)
parent
- parent of this dialogue box. Either another dialogue box or the main frame. Passing
null is authorized; in that case, the main frame is considered as the parent of the dialogue box.msg
- messagepublic static void displayInfoMessage(Component parent, String msg)
parent
- parent of this dialogue box. Either another dialogue box or the main frame. Passing
null is authorized; in that case, the main frame is considered as the parent of the dialogue box.msg
- messagepublic static boolean confirmBeforeExit()
EZDefaultActionHandler.handleExit()
method.public static void setConfirmBeforeExit(boolean confirm)
public static void setApplicationProperty(String key, String value)
key
- property keyvalue
- property valuepublic static String getApplicationProperty(String key)
key
- property keypublic static void resetApplicationProperty()
Plealog Software - 2003-2017