|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnl.nikhef.slcshttps.gui.GraphTools
public class GraphTools
Static class providing several static helper methods for user interaction via a GUI, including popup methods for confirmation, errors etc.
| Constructor Summary | |
|---|---|
GraphTools()
|
|
| Method Summary | |
|---|---|
static boolean |
confirmPopup(String text)
Shows a confirm (OK / cancel) popup. |
static void |
errorPopup(String text)
Shows an error message popup using given text (newlines replaced with <BR>). |
static void |
errorPopup(String text,
Exception e)
Shows an error message popup using given text (newlines replaced with <BR>) and Exception (when non-null). |
static boolean |
isGraphic()
Method to determine if a GUI is available. |
protected static void |
optionPaneSetFocus(JComponent c)
Helper method to set the focus component of a JOptionPane. |
static boolean |
retryPopup(String text)
Shows an error message popup using given text (newlines replaced with <BR>) giving the user the option to choose to retry. |
static boolean |
retryPopup(String text,
Exception e)
Shows an error message popup using given text (newlines replaced with <BR>) and Exception (when non-null) giving the user
the option to choose to retry. |
static void |
successPopup(String text)
Shows a success message popup using given text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphTools()
| Method Detail |
|---|
public static void errorPopup(String text,
Exception e)
Exception (when non-null).
text - text to printe - Exception which was caught: used in errormessage, not thrown.retryPopup(String,Exception)public static void errorPopup(String text)
text - text to printerrorPopup(String,Exception),
retryPopup(String)
public static boolean retryPopup(String text,
Exception e)
Exception (when non-null) giving the user
the option to choose to retry.
text - text to printe - Exception which was caught: used in errormessage, not thrown.
true indicating whether to retry.errorPopup(String,Exception)public static boolean retryPopup(String text)
text - text to print
true indicating whether to retry.errorPopup(String),
retryPopup(String,Exception)public static void successPopup(String text)
text - text to printpublic static boolean confirmPopup(String text)
text - text to print
true upon confirmation.public static boolean isGraphic()
GraphicsEnvironment.isHeadless() is insufficient.
GraphicsEnvironment.getLocalGraphicsEnvironment(),
GraphicsEnvironment.getDefaultScreenDevice()()protected static void optionPaneSetFocus(JComponent c)
JOptionPane.
See explanation in Java bug 5018574
c - JComponent to give the focus.PasswordPopup
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
| nl.nikhef.slcshttps | Mischa Sallé - msalle(AT)nikhef.nl |