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.
-
MyTextArea()
- Class constructor.
-
MyTextArea(int, int)
- Class constructor.
-
getBreakpoint()
- Returns the line number of the selected text if it is the only line
that is selected.
-
minimumSize()
- Returns the minimum size of MyTextArea.
-
preferredSize()
- Returns the preferred size of MyTextArea.
-
selectLine(int)
- Select the appropriate line of text based on the given line number.
-
setText(String)
- Generates a list of line nubmers associated with the stream of text
getting placed in the TextArea.
MyTextArea
public MyTextArea()
- Class constructor.
MyTextArea
public MyTextArea(int rows,
int columns)
- Class constructor.
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
selectLine
public synchronized void selectLine(int lineNumber)
- Select the appropriate line of text based on the given line number.
preferredSize
public Dimension preferredSize()
- Returns the preferred size of MyTextArea.
- Overrides:
- preferredSize in class TextArea
minimumSize
public Dimension minimumSize()
- Returns the minimum size of MyTextArea.
- Overrides:
- minimumSize in class TextArea
getBreakpoint
public int getBreakpoint()
- Returns the line number of the selected text if it is the only line
that is selected. Returns -1 otherwise.