|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
edu.rit.util.Transcript
public class Transcript
Class Transcript is a Java Swing component that displays plain text written
to an output stream. It is a JScrollPane
containing a
JTextArea
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JScrollPane |
---|
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static Font |
DEFAULT_FONT
Default font: sanserif, plain, 9 point. |
static int |
DEFAULT_MAX_LINES
Default maximum number of lines: 24. |
static int |
DEFAULT_VISIBLE_COLUMNS
Default visible number of columns: 80. |
static int |
DEFAULT_VISIBLE_LINES
Default visible number of lines: 24. |
Fields inherited from class javax.swing.JScrollPane |
---|
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Transcript()
Construct a new transcript. |
|
Transcript(Font theFont)
Construct a new transcript that will use the given font. |
|
Transcript(Font theFont,
int theMaxLines)
Construct a new transcript that will use the given font and that will display the given maximum number of lines. |
|
Transcript(Font theFont,
int theMaxLines,
int theVisibleLines,
int theVisibleColumns)
Construct a new transcript that will use the given font, that will display the given maximum number of lines, and that will have the given number of lines and columns visible. |
Method Summary | |
---|---|
void |
clear()
Clear this transcript. |
OutputStream |
getOutputStream()
Returns the OutputStream used
to write into this transcript. |
JTextArea |
getTextArea()
Returns the JTextArea
component used to display the text of this transcript. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Font DEFAULT_FONT
public static final int DEFAULT_MAX_LINES
public static final int DEFAULT_VISIBLE_LINES
public static final int DEFAULT_VISIBLE_COLUMNS
Constructor Detail |
---|
public Transcript()
public Transcript(Font theFont)
theFont
- Font to use for the transcript display.
NullPointerException
- (unchecked exception) Thrown if theFont is null.public Transcript(Font theFont, int theMaxLines)
theFont
- Font to use for the transcript display.theMaxLines
- Maximum number of lines displayed.
NullPointerException
- (unchecked exception) Thrown if theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if theMaxLines is less than or
equal to 0.public Transcript(Font theFont, int theMaxLines, int theVisibleLines, int theVisibleColumns)
theFont
- Font to use for the transcript display.theMaxLines
- Maximum number of lines displayed.theVisibleLines
- Number of lines visible.theVisibleColumns
- Number of columns visible.
NullPointerException
- (unchecked exception) Thrown if theFont is null.
IllegalArgumentException
- (unchecked exception) Thrown if theMaxLines is less than or
equal to 0. Thrown if theVisibleLines is less than or equal
to 0. Thrown if theVisibleColumns is less than or equal to
0.Method Detail |
---|
public JTextArea getTextArea()
JTextArea
component used to display the text of this transcript.
public OutputStream getOutputStream()
OutputStream
used
to write into this transcript.
public void clear() throws IOException
IOException
- Thrown if an I/O error occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |