|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.gui.ComponentHelper
public class ComponentHelper
A helper class for some common tasks with Dialogs, Icons, etc.
| Field Summary | |
|---|---|
static java.lang.String[] |
IMAGES
the default directories for images |
| Constructor Summary | |
|---|---|
ComponentHelper()
|
|
| Method Summary | |
|---|---|
static java.awt.Image |
getImage(java.lang.String filename)
returns the Image for a given filename, NULL if not successful |
static java.awt.Image |
getImage(java.lang.String dir,
java.lang.String filename)
returns the Image for a given directory and filename, NULL if not successful |
static javax.swing.ImageIcon |
getImageIcon(java.lang.String filename)
returns the ImageIcon for a given filename, NULL if not successful |
static javax.swing.ImageIcon |
getImageIcon(java.lang.String dir,
java.lang.String filename)
returns the ImageIcon for a given filename and directory, NULL if not successful |
static java.lang.String |
showInputBox(java.awt.Component parent,
java.lang.String title,
java.lang.String msg,
java.lang.Object initialValue)
pops up an input dialog |
static int |
showMessageBox(java.awt.Component parent,
java.lang.String title,
java.lang.String msg,
int buttons,
int messageType)
displays a message box with the given title, message, buttons and icon ant the dimension. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String[] IMAGES
| Constructor Detail |
|---|
public ComponentHelper()
| Method Detail |
|---|
public static javax.swing.ImageIcon getImageIcon(java.lang.String dir,
java.lang.String filename)
dir - the directory to look in for the filefilename - the file to retrieve
public static javax.swing.ImageIcon getImageIcon(java.lang.String filename)
filename - the file to retrieve
public static java.awt.Image getImage(java.lang.String dir,
java.lang.String filename)
dir - the directory to look in for the filefilename - the file to retrieve
public static java.awt.Image getImage(java.lang.String filename)
filename - the file to retrieve
public static int showMessageBox(java.awt.Component parent,
java.lang.String title,
java.lang.String msg,
int buttons,
int messageType)
parent - the parent componenttitle - the title of the message boxmsg - the text to displaybuttons - the captions of the buttons to displaymessageType - the type of message like defined in JOptionPane (the icon is determined on this basis)
JOptionPane
public static java.lang.String showInputBox(java.awt.Component parent,
java.lang.String title,
java.lang.String msg,
java.lang.Object initialValue)
parent - the parent of this dialog, can be nulltitle - the title to display, can be nullmsg - the message to displayinitialValue - the initial value to display as input
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||