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.


Variable Index

 o text
The TextArea in which the text is to be displayed.

Constructor Index

 o TextBox(Frame, String, boolean)
Make Simple Text Box.
 o TextBox(Frame, String, boolean, String, int, int, int)
Make Text Box.

Method Index

 o loadTextFile(String)
Load TextFile.
 o main(String[])
main program for testing
 o saveTextFile(String)
Save text to a text file.

Variables

 o 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.

Constructors

 o 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.
 o 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.

Methods

 o loadTextFile
 public void loadTextFile(String file)
Load TextFile. Text file is closed when done.

Parameters:
String - name of file to display
 o saveTextFile
 public void saveTextFile(String file)
Save text to a text file.

Parameters:
String - name of file to display
 o main
 public static void main(String args[])
main program for testing


All Packages  Class Hierarchy  This Package  Previous  Next  Index