|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.joctopus.core.Util
public class Util
Defines static utility methods, and serves as repository for config and users data.
Field Summary | |
---|---|
static java.util.Vector<Users> |
config
stores applns config. |
static Users |
me
stores applns config. |
static java.util.Vector<Users> |
users
stores users object, based on each |
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static double |
BytestoMB(double size)
Converts file size in Bytes to MB. |
static byte[] |
getBytes(java.lang.String ip)
Converts given ipaddress to raw byte format suitable in InetAddress.getByAddress(..) method |
static double |
MBtoBytes(double size)
Converts file size in MB to Bytes. |
static java.lang.String |
replace(java.lang.String pattern,
java.lang.String replace,
java.lang.String string)
|
static java.util.Vector<Users> |
searchByIPAddress(java.lang.String ipaddress,
java.util.Vector userconfig)
|
static void |
showInformationDialog(java.awt.Window parent,
boolean modal,
java.lang.Object message,
java.lang.String title,
boolean exitAfterShow)
Displays an information diaog to the user |
static void |
showSaveDialogAndSaveToFile(java.lang.StringBuffer message,
JOctopusConsole console,
java.awt.Component parent)
|
static boolean |
showYesNoDialog(java.awt.Window parent,
boolean modal,
java.lang.Object message,
java.lang.String title)
Displays a yes/no (Confirm) dialog to user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.Vector<Users> users
public static java.util.Vector<Users> config
public static Users me
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static java.util.Vector<Users> searchByIPAddress(java.lang.String ipaddress, java.util.Vector userconfig)
ipaddress
- userconfig
-
public static byte[] getBytes(java.lang.String ip)
ip
-
public static double BytestoMB(double size)
size
-
public static double MBtoBytes(double size)
size
-
public static void showInformationDialog(java.awt.Window parent, boolean modal, java.lang.Object message, java.lang.String title, boolean exitAfterShow)
parent
- the parent window, The parent should be of type Frame,Window,Dialog,JFrame,JDialog else parent window would not be set.modal
- wheather the dialog should be displayed as modal or non-modalmessage
- The message to be displayed on dialog (should be a Component object).title
- the title of dialogexitAfterShow
- wheather the system should exit after showing dialog.public static boolean showYesNoDialog(java.awt.Window parent, boolean modal, java.lang.Object message, java.lang.String title)
parent
- the parent windowmodal
- wheather the dialog should be displayed as modal or non-modalmessage
- The message to be displayed on dialog (should be a Component object).title
- the title of dialog
public static void showSaveDialogAndSaveToFile(java.lang.StringBuffer message, JOctopusConsole console, java.awt.Component parent)
message
- console
- parent
- message is text to be saved
console is JOctopusConsole object
parent is the parent window.public static java.lang.String replace(java.lang.String pattern, java.lang.String replace, java.lang.String string)
pattern
- replace
- string
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |