程序包 weka.gui
类 ComponentHelper
java.lang.Object
weka.gui.ComponentHelper
A helper class for some common tasks with Dialogs, Icons, etc.
- 版本:
- $Revision: 7059 $
- 作者:
- FracPete (fracpete at waikato dot ac dot nz)
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Image
returns the Image for a given filename, NULL if not successfulstatic Image
returns the Image for a given directory and filename, NULL if not successfulstatic ImageIcon
getImageIcon
(String filename) returns the ImageIcon for a given filename, NULL if not successfulstatic ImageIcon
getImageIcon
(String dir, String filename) returns the ImageIcon for a given filename and directory, NULL if not successfulstatic String
showInputBox
(Component parent, String title, String msg, Object initialValue) pops up an input dialogstatic 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.
-
字段详细资料
-
IMAGES
the default directories for images
-
-
构造器详细资料
-
ComponentHelper
public ComponentHelper()
-
-
方法详细资料
-
getImageIcon
returns the ImageIcon for a given filename and directory, NULL if not successful- 参数:
dir
- the directory to look in for the filefilename
- the file to retrieve- 返回:
- the imageicon if found, otherwise null
-
getImageIcon
returns the ImageIcon for a given filename, NULL if not successful- 参数:
filename
- the file to retrieve- 返回:
- the imageicon if found, otherwise null
-
getImage
returns the Image for a given directory and filename, NULL if not successful- 参数:
dir
- the directory to look in for the filefilename
- the file to retrieve- 返回:
- the image if found, otherwise null
-
getImage
returns the Image for a given filename, NULL if not successful- 参数:
filename
- the file to retrieve- 返回:
- the image if found, otherwise null
-
showMessageBox
public 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. it returns the pressed button.- 参数:
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 inJOptionPane
(the icon is determined on this basis)- 返回:
- the button that was pressed
- 另请参阅:
-
showInputBox
pops up an input dialog- 参数:
parent
- the parent of this dialog, can benull
title
- the title to display, can benull
msg
- the message to displayinitialValue
- the initial value to display as input- 返回:
- the entered value, or if cancelled
null
-