| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Presents dialof box with a textarea field on the top and two buttons on the bottom:
OK and CANCEL. It is possible only to get/set text in text area.
| Field Summary | |
final static int | CANCELReturned by show method if Cancel or Close button pressed. |
private int | myCurrentCaretPosition |
private JDialog | myDialog |
private boolean | myReadOnly |
private int | myResult |
private String | myText |
private JTextArea | myTextArea |
private String | myTitle |
final static int | OKReturned by show method if Ok button pressed. |
| Constructor Summary | |
TextAreaDialog(String title, String text)Constructs new dialog with specified title and text. | |
TextAreaDialog(String title, String text, boolean readOnly) | |
| Method Summary | |
void | actionPerformed(ActionEvent evt)Actions handling |
String | getText()Get text from the textarea. |
void | setCaretPosition(int position) |
void | setText(String text)Sets specified text into the textarea. |
int | show(Component parent)Paints this dialog box and adds default action listeners to the buttons. |
private void | showReadOnly() |
| Field Detail |
public final static int CANCEL
private int myCurrentCaretPosition
private JDialog myDialog
private boolean myReadOnly
private int myResult
private String myText
private JTextArea myTextArea
private String myTitle
public final static int OK
| Constructor Detail |
public TextAreaDialog(String title, String text)
public TextAreaDialog(String title, String text, boolean readOnly)
| Method Detail |
public void actionPerformed(ActionEvent evt)
public String getText()
public void setCaretPosition(int position)
public void setText(String text)
text into the textarea.public int show(Component parent)
private void showReadOnly()
| Association Links |
to Class java.lang.String
to Class javax.swing.JTextArea
to Class javax.swing.JDialog
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||