|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.columbia.coms6901.pingtel.pingim.HelperClass | +--edu.columbia.coms6901.pingtel.pingim.GuiUtilities
Set of utilities for easy human IO interfacing, including popup menus, logging, etc.
Field Summary | |
private static java.io.PrintStream |
out
output stream, defaulted to STDOUT |
Fields inherited from class edu.columbia.coms6901.pingtel.pingim.HelperClass |
application |
Constructor Summary | |
GuiUtilities()
|
Method Summary | |
static void |
consoleLog(java.lang.String message)
Logs message to console with date stamp. |
static java.io.PrintStream |
getPrintStream()
Retrieves the output stream. |
static void |
popup(com.pingtel.xpressa.Application app,
java.lang.String text)
Displays a pop-up box |
static void |
popup(com.pingtel.xpressa.Application app,
java.lang.String text,
java.lang.String title)
Displays a pop-up box with a title |
static boolean |
printChoice(com.pingtel.xpressa.Application app,
java.lang.String title,
java.lang.String text,
java.lang.String option1,
java.lang.String option2)
Presents the user with a choice of two options. |
static boolean |
printConfirmation(com.pingtel.xpressa.Application app,
java.lang.String title,
java.lang.String text)
Prints confirmation dialogue to user |
static void |
printError(com.pingtel.xpressa.Application app,
java.lang.Exception e)
Prints an error message on the GUI |
static void |
printError(com.pingtel.xpressa.Application app,
java.lang.String sText)
Prints an error message on the GUI |
static void |
printError(com.pingtel.xpressa.Application app,
java.lang.String text,
java.lang.Exception e)
Prints an error message on the GUI. |
static java.lang.String |
readLine(com.pingtel.xpressa.Application app,
java.lang.String title,
java.lang.String instructions,
int mode)
Reads line of text from user |
static java.lang.String |
readLine(com.pingtel.xpressa.Application app,
java.lang.String title,
java.lang.String instructions,
int mode,
java.lang.String defaultValue)
Reads line of text from user |
static java.lang.String |
readLineReq(com.pingtel.xpressa.Application app,
java.lang.String title,
java.lang.String instructions,
int mode,
java.lang.String defaultValue)
Reads line of text from user, requiring the user to enter some text |
Methods inherited from class edu.columbia.coms6901.pingtel.pingim.HelperClass |
setApplication |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static java.io.PrintStream out
Constructor Detail |
public GuiUtilities()
Method Detail |
public static void popup(com.pingtel.xpressa.Application app, java.lang.String text)
app
- Refers to this PingTel Expressiontext
- Text to display in popup boxpublic static void popup(com.pingtel.xpressa.Application app, java.lang.String text, java.lang.String title)
app
- Refers to this PingTel Expressiontext
- Text to display in popup boxtitle
- Title of popup boxpublic static java.lang.String readLine(com.pingtel.xpressa.Application app, java.lang.String title, java.lang.String instructions, int mode, java.lang.String defaultValue)
app
- PingTel Expressiontitle
- Window titleinstructions
- Instructions for usermode
- E.g., ALPHANUMERIC, NUMERIC, etc.defaultValue
- Default valuepublic static java.lang.String readLineReq(com.pingtel.xpressa.Application app, java.lang.String title, java.lang.String instructions, int mode, java.lang.String defaultValue)
app
- PingTel Expressiontitle
- Window titleinstructions
- Instructions for usermode
- E.g., ALPHANUMERIC, NUMERIC, etc.defaultValue
- Default valuepublic static java.lang.String readLine(com.pingtel.xpressa.Application app, java.lang.String title, java.lang.String instructions, int mode)
app
- PingTel Expressiontitle
- Window titleinstructions
- Instructions for usermode
- E.g., ALPHANUMERIC, NUMERIC, etc.public static void consoleLog(java.lang.String message)
message
- message to logpublic static java.io.PrintStream getPrintStream()
public static void printError(com.pingtel.xpressa.Application app, java.lang.String text, java.lang.Exception e)
app
- Pointer to this instance of PingIMtext
- Error messagee
- An exception, if one occurred, or nullpublic static void printError(com.pingtel.xpressa.Application app, java.lang.Exception e)
app
- Pointer to this instance of PingIMe
- An exceptionpublic static void printError(com.pingtel.xpressa.Application app, java.lang.String sText)
app
- Pointer to this instance of PingIMsText
- Text of the error messagepublic static boolean printConfirmation(com.pingtel.xpressa.Application app, java.lang.String title, java.lang.String text)
app
- PingTel Expressiontitle
- Window titletext
- Instructions for userpublic static boolean printChoice(com.pingtel.xpressa.Application app, java.lang.String title, java.lang.String text, java.lang.String option1, java.lang.String option2)
app
- PingTel Expressiontitle
- Window titletext
- Instructions for useroption1
- Description of the first optionoption2
- Description of the second option
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |