borland Packages Class Hierarchy jbcl.control Package Index
java.lang.Object +----borland.jbcl.control.StringInput
Variables Constructors Properties Methods Event Listeners
Implements WindowListener, Serializable, EventListener
A StringInput component is a dialog box that contains a text input box and an OK and a Cancel button. It is used to obtain a text string from the user.
To display the dialog box at runtime, call the show() method or set the visible property to true. When the user enters a string and chooses OK, the selection is stored in the value property.
The dialog box has two buttons, OK and Cancel. Which button the user chooses to put away the dialog box is stored as the value of the result property. The title property contains the text that appears on the title bar of the dialog box's frame.
You can make the StringInput component appear at design time:
public static final int CANCEL = ButtonDialog.CANCEL
protected StringInputDialog dialog
The dialog box that StringInput is a wrapper for.
protected Frame frame
The parent frame of StringInput.
protected transient Array listeners
The array of action listeners (buttons).
public static final int OK = ButtonDialog.OK
protected int result
Stores the user's choice of buttons, either OK or Cancel.
protected String title
The title text that appears on the title bar of StringInput.
protected String value
Holds the string in the input field.
public StringInput()
Constructs a StringInput dialog with no title, frame or initial value.
public StringInput(java.awt.Frame frame)
Constructs a StringInput dialog with the given frame.
Parameters:
public StringInput(java.awt.Frame frame, java.lang.String title)
Constructs a StringInput dialog with the given frame and title.
Parameters:
public StringInput(java.awt.Frame frame, java.lang.String title, java.lang.String value)
Constructs a StringInput dialog with the given frame, title, and initial value.
Parameters:
public Frame getFrame() public void setFrame(java.awt.Frame frame)
Determines the parent frame for StringInput.
public int getResult() public void setResult(int i)
Contains the value of the button the user chose to close the dialog box. The int value must be one of the StringInput variables
public String getTitle() public void setTitle(java.lang.String title)
Determines the text that appears on the title bar of the StringInput component.
public String getValue() public void setValue(java.lang.String value)
Determines the text that appears in the input field of StringInput.
public boolean isVisible() public void setVisible(boolean visible)
Determines whether the StringInput component is visible. If true, the StringInput component is visible; if false, the component is not visible.
public void show()Displays the StringInput dialog box.
public void addActionListener(java.awt.event.ActionListener l) public void removeActionListener(java.awt.event.ActionListener l)