|
||||||||||
| 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 String[] |
IMAGES
the default directories for images |
| Constructor Summary | |
|---|---|
ComponentHelper()
|
|
| Method Summary | |
|---|---|
static Image |
getImage(String filename)
returns the Image for a given filename, NULL if not successful |
static Image |
getImage(String dir,
String filename)
returns the Image for a given directory and filename, NULL if not successful |
static ImageIcon |
getImageIcon(String filename)
returns the ImageIcon for a given filename, NULL if not successful |
static ImageIcon |
getImageIcon(String dir,
String filename)
returns the ImageIcon for a given filename and directory, NULL if not successful |
static String |
showInputBox(Component parent,
String title,
String msg,
Object initialValue)
pops up an input dialog |
static int |
showMessageBox(Component parent,
String title,
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 String[] IMAGES
| Constructor Detail |
|---|
public ComponentHelper()
| Method Detail |
|---|
public static ImageIcon getImageIcon(String dir,
String filename)
dir - the directory to look in for the filefilename - the file to retrieve
public static ImageIcon getImageIcon(String filename)
filename - the file to retrieve
public static Image getImage(String dir,
String filename)
dir - the directory to look in for the filefilename - the file to retrieve
public static Image getImage(String filename)
filename - the file to retrieve
public static int showMessageBox(Component parent,
String title,
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 String showInputBox(Component parent,
String title,
String msg,
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 | |||||||||