public class eveUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
stVersion
Contains the version of the class.
|
| Constructor and Description |
|---|
eveUtils()
Constructor of the class.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
displayHtmlFile(java.lang.String filename)
Displays a HTML file in a HtmlViewer.
|
static boolean |
displayHtmlFile(java.lang.String filename,
int options)
Displays a HTML file in a HtmlViewer.
|
static boolean |
displayHtmlFile(java.lang.String filename,
int options,
boolean bModal)
Displays a HTML file in a HtmlViewer.
|
static int |
exec(java.lang.String commandLine,
int maxWaitMillis)
Runs a command line with quoted executable.
|
static int |
exec(java.lang.String commandLine,
long maxRunMillis,
int maxWaitMillis,
eve.ui.Frame parentFrame)
Runs a command line with quoted executable.
|
static boolean |
fileCopy(eve.io.File source,
eve.io.File target)
Copies a file.
|
static java.lang.String |
getClipboardText()
Gets a text string from the clipboard
|
static java.lang.Integer[] |
getIntegerArray(int[] ints)
Gets an Integer array from an int array
Integer.valueOf is not supported in Eve.
|
static java.lang.String |
getLogonUser()
Get the currently logged in username
|
static java.lang.String |
getPlatform()
Returns the current platform
|
static java.io.InputStream |
getResourceAsStream(java.lang.Class clazz,
java.lang.String filename)
Gets an Inputstream to read a resource from the package name of a
class.
|
static java.lang.String |
getTimestamp()
Gets the current time in the format yyyy-MM-dd HH:mm:ss
|
static java.lang.String |
getVersion()
Returns the version of the class.
|
static boolean |
isVmSufficient(java.lang.String minVersion,
boolean showMsg)
Checks if the running is sufficient for the app's needs
|
static void |
messageForm(java.lang.String title,
java.lang.String text,
eve.ui.Frame frParent)
Calls messageForm (title, text, frParent, 20, 40);
|
static void |
messageForm(java.lang.String title,
java.lang.String text,
eve.ui.Frame frParent,
int rows,
int cols)
Displays a text in a TextPad of new modal AppForm.
|
static boolean |
restoreWindowRect(java.lang.String stCompany,
java.lang.String stProg,
eve.ui.Frame f)
Restores window position and size from the user registry.
|
static boolean |
restoreWindowSize(java.lang.String stCompany,
java.lang.String stProg,
eve.ui.Frame f)
Restores window size from the user registry.
|
static boolean |
saveWindowRect(java.lang.String stCompany,
java.lang.String stProg,
eve.ui.Frame f)
Saves window position and size to the user registry.
|
static boolean |
setClipboardText(java.lang.String text)
Puts a text into the clipboard.
|
static void |
setUseSystemClipboard(boolean useSystem) |
static boolean |
sleep(int millis)
Sleeps for millis milliseconds.
|
static void |
sort(java.lang.Object[] obj,
eve.util.Comparer c,
boolean descending)
Michael Brereton's fix for a bug in ewe.util.Utils.sort v1.49
The original code did not sort a String[][]
|
protected static java.lang.String stVersion
public eveUtils()
public static java.lang.String getVersion()
public static boolean displayHtmlFile(java.lang.String filename)
filename - Filename of the HTML file to be displayed.public static boolean displayHtmlFile(java.lang.String filename,
int options)
filename - Filename of the HTML file to be displayed.options - DISPLAY_XXX options of HtmlViewer ORed togetherpublic static boolean displayHtmlFile(java.lang.String filename,
int options,
boolean bModal)
filename - Filename of the HTML file to be displayed.options - DISPLAY_XXX options of HtmlViewer ORed togetherbModal - If set to true, HtmlViewer will be shown in modal window.
On Windows Mobile, this parameter is always set to truepublic static int exec(java.lang.String commandLine,
int maxWaitMillis)
commandLine - The command line to use, the executable may be placed in quotes.maxWaitMillis - max. milliseconds the thread waits for the command to end.public static int exec(java.lang.String commandLine,
long maxRunMillis,
int maxWaitMillis,
eve.ui.Frame parentFrame)
commandLine - The command line to use, the executable may be placed in quotes.maxRunMillis - max. milliseconds the executable is allowed run. Set to -1 for unlimited.maxWaitMillis - max. milliseconds the thread waits for the command to end.parentFrame - The frame of calling object. If not null, this frame will be refreshed while waiting;public static boolean fileCopy(eve.io.File source,
eve.io.File target)
source - full path of the source filetarget - full path of the target filepublic static java.lang.String getClipboardText()
public static java.lang.Integer[] getIntegerArray(int[] ints)
ints - An int arraypublic static java.lang.String getLogonUser()
public static java.lang.String getPlatform()
public static java.io.InputStream getResourceAsStream(java.lang.Class clazz,
java.lang.String filename)
clazz - Optional Classfilename - The name or full path of the resource filepublic static java.lang.String getTimestamp()
public static boolean isVmSufficient(java.lang.String minVersion,
boolean showMsg)
minVersion - minimal version required by appshowMsg - If true shows a message when VM is insufficientpublic static void messageForm(java.lang.String title,
java.lang.String text,
eve.ui.Frame frParent)
title - The title of the formtext - The text to displayfrParent - The (optional) parent framepublic static void messageForm(java.lang.String title,
java.lang.String text,
eve.ui.Frame frParent,
int rows,
int cols)
title - Title of the Formtext - Text to be displayedfrParent - parent frame, can be nullrows - number of rowscols - number of columnspublic static boolean restoreWindowRect(java.lang.String stCompany,
java.lang.String stProg,
eve.ui.Frame f)
stCompany - your (company) namestProg - the program namef - the program framepublic static boolean restoreWindowSize(java.lang.String stCompany,
java.lang.String stProg,
eve.ui.Frame f)
stCompany - your (company) namestProg - the program namef - the program framepublic static boolean saveWindowRect(java.lang.String stCompany,
java.lang.String stProg,
eve.ui.Frame f)
stCompany - your (company) namestProg - the program namef - the program framepublic static boolean setClipboardText(java.lang.String text)
text - The text to putpublic static void setUseSystemClipboard(boolean useSystem)
public static boolean sleep(int millis)
millis - milliseconds to sleeppublic static void sort(java.lang.Object[] obj,
eve.util.Comparer c,
boolean descending)
obj - The Object to sortc - The Comparer to be useddescending - true to sort descending, false to sort ascending