Class MyTextArea

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.TextComponent
                   |
                   +----java.awt.TextArea
                           |
                           +----MyTextArea

public class MyTextArea
extends TextArea
A subclass of TextArea that adds some hightlight control of line operations.


Constructor Index

 o MyTextArea()
Class constructor.
 o MyTextArea(int, int)
Class constructor.

Method Index

 o getBreakpoint()
Returns the line number of the selected text if it is the only line that is selected.
 o minimumSize()
Returns the minimum size of MyTextArea.
 o preferredSize()
Returns the preferred size of MyTextArea.
 o selectLine(int)
Select the appropriate line of text based on the given line number.
 o setText(String)
Generates a list of line nubmers associated with the stream of text getting placed in the TextArea.

Constructors

 o MyTextArea
 public MyTextArea()
Class constructor.

 o MyTextArea
 public MyTextArea(int rows,
                   int columns)
Class constructor.

Methods

 o setText
 public synchronized void setText(String t)
Generates a list of line nubmers associated with the stream of text getting placed in the TextArea. This function overrides TextArea's setText() fuction and calls it too.

Overrides:
setText in class TextComponent
 o selectLine
 public synchronized void selectLine(int lineNumber)
Select the appropriate line of text based on the given line number.

 o preferredSize
 public Dimension preferredSize()
Returns the preferred size of MyTextArea.

Overrides:
preferredSize in class TextArea
 o minimumSize
 public Dimension minimumSize()
Returns the minimum size of MyTextArea.

Overrides:
minimumSize in class TextArea
 o getBreakpoint
 public int getBreakpoint()
Returns the line number of the selected text if it is the only line that is selected. Returns -1 otherwise.