All Packages Class Hierarchy This Package Previous Next Index
Class JObserve.GUI.TextBox
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----JObserve.GUI.ObserveBox
|
+----JObserve.GUI.TextBox
- public class TextBox
- extends ObserveBox
Scrollable text window.
Create a dialog with a public TextArea member and a dismiss button.
The displayed text can be manipulated through the text area.
Uses modless dialog.
-
text
- The TextArea in which the text is to be displayed.
-
TextBox(Frame, String, boolean)
- Make Simple Text Box.
-
TextBox(Frame, String, boolean, String, int, int, int)
- Make Text Box.
-
loadTextFile(String)
- Load TextFile.
-
main(String[])
-
main program for testing
-
saveTextFile(String)
- Save text to a text file.
text
public TextArea text
- The TextArea in which the text is to be displayed.
This member is public so that it may be directly manipulated.
TextBox
public TextBox(Frame parent,
String label,
boolean editable)
- Make Simple Text Box. Both scroll bars are present.
- Parameters:
- parent - A Frame on which to hang the dialog
- label - a string for the title bar of the box
- editable - if true the text will be user edited.
TextBox
public TextBox(Frame parent,
String label,
boolean editable,
String theText,
int rows,
int columns,
int scrollbars)
- Make Text Box.
Allows initial setup to be specified.
This gives control over the scrollbars.
- Parameters:
- parent - A Frame on which to hang the dialog
- label - a string for the title bar of the box
- editable - if true the text will be user edited.
- theText - Initial text for the box
- rows - the number of rows in the box
- columns - the number of columns.
- scrollbars - TextArea literal: SCROLLBARS_BOTH,
SCROLLBARS_VERTICAL_ONLY, SCROLLBARS_HORIZONTAL_ONLY,
or SCROLLBARS_NEITHER.
loadTextFile
public void loadTextFile(String file)
- Load TextFile.
Text file is closed when done.
- Parameters:
-
String -
name of file to display
saveTextFile
public void saveTextFile(String file)
- Save text to a text file.
- Parameters:
-
String -
name of file to display
main
public static void main(String args[])
- main program for testing
All Packages Class Hierarchy This Package Previous Next Index