public class Console
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
actualCol |
protected int |
actualRow |
protected static int |
BUFFER_SIZE |
protected boolean |
clearToEOL |
protected java.awt.Panel |
consoleCanvasPanelInner |
protected int |
currentCol
Console text variables
|
protected int |
currentRow
Console text variables
|
protected static int |
DEFAULT_COLUMNS |
protected static int |
DEFAULT_FONT_SIZE |
protected static int |
DEFAULT_ROWS |
protected static java.lang.String |
DEFAULT_TITLE |
protected boolean |
echoOn |
protected static int |
EMPTY_BUFFER |
protected boolean |
eofReached |
protected java.awt.Font |
font |
protected hsa.ConsoleCanvasGraphics |
graphicsCanvas |
protected java.awt.Color |
graphicsColor
Console graphics variables
|
protected char[] |
kbdBuffer |
protected int |
kbdBufferHead |
protected int |
kbdBufferTail |
protected char[] |
lineBuffer |
protected int |
lineBufferHead |
protected int |
lineBufferTail |
protected static boolean |
mainReturned |
protected int |
maxCol |
protected int |
maxRow |
protected static java.lang.String |
PRINT_COMMAND |
protected static java.lang.String |
QUIT_COMMAND |
protected static java.lang.String |
SAVE_COMMAND |
protected int |
startCol |
protected int |
startRow |
protected static int |
TAB_SIZE |
protected java.awt.Color |
textBGColor |
protected java.awt.Color |
textColor |
protected int |
ungotChar |
protected hsa.ConsoleFrame |
window |
Constructor and Description |
---|
Console()
Creates a console using the default values of:
25x80 screen, 14 pt font, "Console" as title.
|
Console(int fontSize)
Creates a console using the default values of:
25x80 screen, "Console" as title.
|
Console(int rows,
int columns)
Creates a console using the default values of:
14 pt font, "Console" as title.
|
Console(int rows,
int columns,
int fontSize)
Creates a console using the default values of:
"Console" as title.
|
Console(int rows,
int columns,
int fontSize,
java.lang.String title)
Creates a console.
|
Console(int rows,
int columns,
java.lang.String title)
Creates a console using the default values of:
14 pt font.
|
Console(int fontSize,
java.lang.String title)
Creates a console using the default values of:
25x80 screen.
|
Console(java.lang.String title)
Creates a console using the default values of:
25x80 screen, 14 pt font.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Quits the program, saves the contents of the window, or prints the
contents of the window, depending on which button is pressed.
|
void |
clear()
Clears the screen and moves the cursor to the top left corner.
|
void |
clearRect(int x,
int y,
int width,
int height)
Clears a rectangle in the console to white.
|
void |
close()
Closes the console window.
|
void |
copyArea(int x,
int y,
int width,
int height,
int delta_x,
int delta_y)
Copies an area of the screen from (x, y) to (x + width, y + height) onto
the screen with top corner at (x + delta_x, y + delta_y).
|
void |
draw3DRect(int x,
int y,
int width,
int height,
boolean raised)
Draws a 3D rectangle on the screen from (x, y) to
(x + width, y + width).
|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Draws an arc on the screen from (x, y) to
(x + width, y + height) from startAngle to startAngle + arcAngle
in specified colour.
|
void |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver obs)
Draws an image on the screen at (x, y).
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draws a line on the screen from (x1, y1) to (x2, y2).
|
void |
drawMapleLeaf(int x,
int y,
int width,
int height)
Draws a maple leaf on the screen from (x, y) to
(x + width, y + width).
|
void |
drawOval(int x,
int y,
int width,
int height)
Draws an oval on the screen in the sqaure from (x, y) to
(x + width, y + height).
|
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draws a polygon specified by the arrays of points.
|
void |
drawRect(int x,
int y,
int width,
int height)
Draws a rectangle on the screen from (x, y) to
(x + width, y + width).
|
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Draws a rounded rectangle on the screen from (x, y) to
(x + width, y + width).
|
void |
drawStar(int x,
int y,
int width,
int height)
Draws a star on the screen from (x, y) to (x + width, y + width).
|
void |
drawString(java.lang.String str,
int x,
int y)
Draws a text on the screen at location (x, y).
|
protected void |
enableButtons(boolean enable)
Enables or disables all the buttons in the Console.
|
protected void |
eraseLineOfInput()
Erases the entire line of input.
|
protected void |
erasePreviousChar()
Erases the previous character in a line of input.
|
void |
fill3DRect(int x,
int y,
int width,
int height,
boolean raised)
Draws a filled 3D rectangle on the screen from (x, y) to
(x + width, y + width).
|
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Draws a filled arc on the screen from (x, y) to
(x + width, y + height) from startAngle to startAngle + arcAngle
in specified colour.
|
void |
fillMapleLeaf(int x,
int y,
int width,
int height)
Draws a filled maple leaf on the screen from (x, y) to
(x + width, y + width).
|
void |
fillOval(int x,
int y,
int width,
int height)
Draws a filled oval on the screen in the sqaure from (x, y) to
(x + width, y + height).
|
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draws a filled polygon specified by the arrays of points..
|
void |
fillRect(int x,
int y,
int width,
int height)
Draws a filled rectangle on the screen from (x, y) to
(x + width, y + width).
|
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Draws a filled rounded rectangle on the screen from (x, y) to
(x + width, y + width).
|
void |
fillStar(int x,
int y,
int width,
int height)
Draws a filled star on the screen from (x, y) to
(x + width, y + width).
|
void |
focusGained(java.awt.event.FocusEvent e)
Sets the focus to the invisible button and then the console canvas.
|
void |
focusLost(java.awt.event.FocusEvent e)
Does nothing.
|
char |
getChar()
Returns the next character entered on the keyboard.
|
int |
getColumn()
Returns the current column number of the cursor.
|
int |
getHeight()
Returns the height of the console drawing surface in pixels.
|
int |
getMaxColumns()
Returns the number of columns in the console window.
|
int |
getMaxRows()
Returns the number of rows in the console window.
|
int |
getRow()
Returns the current row number of the cursor.
|
int |
getWidth()
Returns the width of the console drawing surface in pixels.
|
protected void |
initialize(int rows,
int columns,
int fontSize,
java.lang.String title)
Initializes the window.
|
boolean |
isCharAvail()
Returns whether a character is available in the keyboard buffer.
|
void |
keyPressed(java.awt.event.KeyEvent e)
Places a keystroke in the keyboard buffer.
|
void |
keyReleased(java.awt.event.KeyEvent e)
Does nothing.
|
void |
keyTyped(java.awt.event.KeyEvent e)
Does nothing.
|
static void |
mainReturned() |
protected void |
mainStopped()
This method is invoked if the "main" method appears to have
stopped executing.
|
int |
maxcol()
Returns the number of columns in the console window.
|
int |
maxrow()
Returns the number of rows in the console window.
|
int |
maxx()
Returns the maximum x coordinate of the console window in pixels.
|
int |
maxy()
Returns the maximum y coordinate of the console window in pixels.
|
void |
print(boolean value)
Writes the text representation of a boolean to the Console.
|
void |
print(boolean value,
int fieldSize)
Writes the text representation of a boolean to the Console with a
specified field size.
|
void |
print(byte number)
Writes the text representation of an 8-bit integer (a "byte") to
the Console.
|
void |
print(byte number,
int fieldSize)
Writes the text representation of an 8-bit integer (a "byte")
to the Console with a specified field size.
|
void |
print(char ch)
Writes a character to the Console.
|
void |
print(char ch,
int fieldSize)
Writes a character to the Console with a specified field size..
|
void |
print(double number)
Writes a double precision floating point number (a "double") to
the Console.
|
void |
print(double number,
int fieldSize)
Writes a double precision floating point number (a "double") to
the Console with a specified field size.
|
void |
print(double number,
int fieldSize,
int decimalPlaces)
Writes a double precision floating point number (a "double") to
the Console with a specified field size and a specified number of
decimal places.
|
void |
print(float number)
Writes a floating point number (a "float") to the Console.
|
void |
print(float number,
int fieldSize)
Writes a floating point number (a "float") to
the Console with a specified field size.
|
void |
print(float number,
int fieldSize,
int decimalPlaces)
Writes a floating point number (a "double") to the Console with a
specified field size and a specified number of decimal places.
|
void |
print(int number)
Writes the text representation of an 32-bit integer (an "int") to
the Console.
|
void |
print(int number,
int fieldSize)
Writes the text representation of an 32-bit integer (an "int")
to the Console with a specified field size.
|
void |
print(long number)
Writes the text representation of an 64-bit integer (a "long") to
the Console.
|
void |
print(long number,
int fieldSize)
Writes the text representation of an 64-bit integer (a "long")
to the Console with a specified field size.
|
void |
print(short number)
Writes the text representation of an 16-bit integer (a "short") to
the Console.
|
void |
print(short number,
int fieldSize)
Writes the text representation of an 16-bit integer (a "short")
to the Console with a specified field size.
|
void |
print(java.lang.String text)
Write a string to the Console.
|
void |
print(java.lang.String text,
int fieldSize)
Writes a string to the Console with a specified field size..
|
void |
println()
Writes a newline to the Console.
|
void |
println(boolean value)
Writes the text representation of a boolean to the Console followed
by a newline.
|
void |
println(boolean value,
int fieldSize)
Writes the text representation of a boolean to the Console with a
specified field size followed by a newline.
|
void |
println(byte number)
Writes the text representation of an 8-bit integer (a "byte") to
the Console followed by a newline.
|
void |
println(byte number,
int fieldSize)
Writes the text representation of an 8-bit integer (a "byte")
to the Console with a specified field size followed by a newline.
|
void |
println(char ch)
Writes a character to the Console followed by a newline.
|
void |
println(char ch,
int fieldSize)
Writes a character to the Console with a specified field size..
|
void |
println(double number)
Writes a double precision floating point number (a "double") to
the Console followed by a newline.
|
void |
println(double number,
int fieldSize)
Writes a double precision floating point number (a "double") to
the Console with a specified field size followed by a newline.
|
void |
println(double number,
int fieldSize,
int decimalPlaces)
Writes a double precision floating point number (a "double") to
the Console with a specified field size and a specified number of
decimal places followed by a newline.
|
void |
println(float number)
Writes a floating point number (a "float") to the Console followed by
a newline.
|
void |
println(float number,
int fieldSize)
Writes a floating point number (a "float") to the Console with a
specified field size followed by a newline.
|
void |
println(float number,
int fieldSize,
int decimalPlaces)
Writes a floating point number (a "double") to the Console with a
specified field size and a specified number of decimal places
followed by a newline.
|
void |
println(int number)
Writes the text representation of an 32-bit integer (an "int") to
the Console followed by a newline.
|
void |
println(int number,
int fieldSize)
Writes the text representation of an 32-bit integer (an "int")
to the Console with a specified field size followed by a newline.
|
void |
println(long number)
Writes the text representation of an 64-bit integer (a "long") to
the Console followed by a newline.
|
void |
println(long number,
int fieldSize)
Writes the text representation of an 64-bit integer (a "long")
to the Console with a specified field size followed by a newline.
|
void |
println(short number)
Writes the text representation of an 16-bit integer (a "short") to
the Console followed by a newline.
|
void |
println(short number,
int fieldSize)
Writes the text representation of an 16-bit integer (a "short")
to the Console with a specified field size followed by a newline.
|
void |
println(java.lang.String text)
Writes a string to the Console followed by a newline.
|
void |
println(java.lang.String text,
int fieldSize)
Writes a string to the Console with a specified field size followed by
a newline.
|
protected void |
quitProgram()
Hides the window and quits the program.
|
boolean |
readBoolean()
Reads a boolean from the Console.
|
byte |
readByte()
Reads an 8-bit integer (a "byte") from the Console.
|
char |
readChar()
Reads a single character from the Console.
|
double |
readDouble()
Reads a double precision floating point number (a "double") from
the Console.
|
float |
readFloat()
Reads a floating point number (a "float") from the Console.
|
int |
readInt()
Reads a 32-bit integer (an "int") from the Console.
|
java.lang.String |
readLine()
Reads a full line of text from the Console.
|
long |
readLong()
Reads a 64-bit integer (a "long") from the Console.
|
short |
readShort()
Reads a 16-bit integer (a "short") from the Console.
|
java.lang.String |
readString()
Reads a whitespace delimited token from the Console.
|
protected java.lang.String |
readToken()
Reads in input from the keyboard buffer until it hits a
whitespace, which indicates the end of a token.
|
void |
setColor(java.awt.Color color)
Sets the foreground color for any graphics.
|
void |
setColour(java.awt.Color colour)
Sets the foreground colour for any graphics.
|
void |
setCursor(int row,
int column)
Moves the cursor to the specified row and column.
|
void |
setCursorVisible(boolean visible)
Makes the blinking cursor visible or invisible.
|
void |
setFont(java.awt.Font font)
Sets the font for the drawString method.
|
void |
setPaintMode()
Sets the drawing mode for any graphics to "Paint".
|
void |
setTextBackgroundColor(java.awt.Color color)
Sets the background color for any text.
|
void |
setTextBackgroundColour(java.awt.Color colour)
Sets the background color for any text.
|
void |
setTextColor(java.awt.Color color)
Sets the foreground color for any text.
|
void |
setTextColour(java.awt.Color colour)
Sets the foreground colour for any text.
|
protected void |
setWindowTitle(java.lang.String s)
Sets the window title.
|
void |
setXORMode(java.awt.Color xorColor)
Sets the drawing mode for any graphics to "XOR".
|
void |
windowActivated(java.awt.event.WindowEvent e)
Does nothing.
|
void |
windowClosed(java.awt.event.WindowEvent e)
Does nothing.
|
void |
windowClosing(java.awt.event.WindowEvent e)
Quits the program.
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
Does nothing.
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
Does nothing.
|
void |
windowIconified(java.awt.event.WindowEvent e)
Does nothing.
|
void |
windowOpened(java.awt.event.WindowEvent e)
Does nothing.
|
protected int currentRow
protected int currentCol
protected int actualRow
protected int actualCol
protected int startCol
protected int startRow
protected java.awt.Color textColor
protected java.awt.Color textBGColor
protected boolean echoOn
protected boolean clearToEOL
protected java.awt.Color graphicsColor
protected java.awt.Font font
protected hsa.ConsoleCanvasGraphics graphicsCanvas
protected static boolean mainReturned
protected static final java.lang.String SAVE_COMMAND
protected static final java.lang.String PRINT_COMMAND
protected static final java.lang.String QUIT_COMMAND
protected static final int DEFAULT_ROWS
protected static final int DEFAULT_COLUMNS
protected static final int DEFAULT_FONT_SIZE
protected static final java.lang.String DEFAULT_TITLE
protected static final int TAB_SIZE
protected hsa.ConsoleFrame window
protected int maxRow
protected int maxCol
protected static final int BUFFER_SIZE
protected static final int EMPTY_BUFFER
protected char[] kbdBuffer
protected int kbdBufferHead
protected int kbdBufferTail
protected char[] lineBuffer
protected int lineBufferHead
protected int lineBufferTail
protected int ungotChar
protected java.awt.Panel consoleCanvasPanelInner
protected boolean eofReached
public Console()
public Console(int fontSize)
fontSize
- The size of the font to be used in the Console windowpublic Console(int rows, int columns)
rows
- The height of the window in rowscolumns
- The width of the window in columnspublic Console(int rows, int columns, int fontSize)
rows
- The height of the window in rowscolumns
- The width of the window in columnsfontSize
- The size of the font to be used in the Console windowpublic Console(int rows, int columns, int fontSize, java.lang.String title)
rows
- The height of the window in rowscolumns
- The width of the window in columnsfontSize
- The size of the font to be used in the Console windowtitle
- The title of the Console windowpublic Console(int rows, int columns, java.lang.String title)
rows
- The height of the window in rowscolumns
- The width of the window in columnstitle
- The title of the Console windowpublic Console(int fontSize, java.lang.String title)
fontSize
- The size of the font to be used in the Console window.title
- The title of the Console window.public Console(java.lang.String title)
title
- The title of the Console windowpublic void clear()
public void clearRect(int x, int y, int width, int height)
java.awt.Graphics.clearRect
public void copyArea(int x, int y, int width, int height, int delta_x, int delta_y)
java.awt.Graphics.copyArea
public void draw3DRect(int x, int y, int width, int height, boolean raised)
java.awt.Graphics.draw3DRect
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
java.awt.Graphics.drawArc
public void drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver obs)
java.awt.Graphics.drawImage
public void drawLine(int x1, int y1, int x2, int y2)
java.awt.Graphics.drawLine
public void drawMapleLeaf(int x, int y, int width, int height)
x
- The x coordinate of the top left corner of the
rectangle that the maple leaf is inscribed in.y
- The y coordinate of the top left corner of the
rectangle that the maple leaf is inscribed in.width
- The width of the rectangle that the
maple leaf is inscribed in.height
- The height of the rectangle that the
maple leaf is inscribed in.public void drawOval(int x, int y, int width, int height)
java.awt.Graphics.drawOval
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
java.awt.Graphics.drawPolygon
public void drawRect(int x, int y, int width, int height)
java.awt.Graphics.drawRect
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
java.awt.Graphics.drawRoundRect
public void drawStar(int x, int y, int width, int height)
x
- The x coordinate of the top left corner of the
rectangle that the star is inscribed in.y
- The y coordinate of the top left corner of the
rectangle that the star is inscribed in.width
- The width of the rectangle that the
star is inscribed in.height
- The height of the rectangle that the
star is inscribed in.public void drawString(java.lang.String str, int x, int y)
java.awt.Graphics.drawString
protected void eraseLineOfInput()
protected void erasePreviousChar()
public void fill3DRect(int x, int y, int width, int height, boolean raised)
java.awt.Graphics.fill3DRect
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
java.awt.Graphics.fillArc
public void fillMapleLeaf(int x, int y, int width, int height)
x
- int The x coordinate of the top left corner of the
rectangle that the maple leaf is inscribed in.y
- int The y coordinate of the top left corner of the
rectangle that the maple leaf is inscribed in.width
- int The width of the rectangle that the
maple leaf is inscribed in.height
- int The height of the rectangle that the
maple leaf is inscribed in.public void fillOval(int x, int y, int width, int height)
java.awt.Graphics.fillOval
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
java.awt.Graphics.fillPolygon
public void fillRect(int x, int y, int width, int height)
java.awt.Graphics.fillRect
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
java.awt.Graphics.fillRoundRect
public void fillStar(int x, int y, int width, int height)
x
- The x coordinate of the top left corner of the
rectangle that the star is inscribed in.y
- The y coordinate of the top left corner of the
rectangle that the star is inscribed in.width
- The width of the rectangle that the
star is inscribed in.height
- The height of the rectangle that the
star is inscribed in.public boolean isCharAvail()
public char getChar()
public int getColumn()
public int getHeight()
public int getMaxColumns()
public int getMaxRows()
public int getRow()
public int getWidth()
public int maxcol()
public int maxrow()
public int maxx()
public int maxy()
public void print(java.lang.String text)
text
- The string to be written to the Consolepublic char readChar()
public void setColor(java.awt.Color color)
java.awt.Graphics.setColor
public void setColour(java.awt.Color colour)
java.awt.Graphics.setColor
public void setCursor(int row, int column)
row
- The row to move the cursor tocolumn
- The column to move the cursor topublic void setCursorVisible(boolean visible)
public void setFont(java.awt.Font font)
java.awt.Graphics.setFont
public void setPaintMode()
java.awt.Graphics.setPaintMode
public void setTextBackgroundColor(java.awt.Color color)
color
- The color that text displayed by print and println
methods will appear on.public void setTextBackgroundColour(java.awt.Color colour)
colour
- The color that text displayed by print and println
methods will appear on.public void setTextColor(java.awt.Color color)
color
- The color that text displayed by print and println
methods will appear in.public void setTextColour(java.awt.Color colour)
colour
- The color that text displayed by print and println
methods will appear in.public void setXORMode(java.awt.Color xorColor)
java.awt.Graphics.setXORMode
public static void mainReturned()
protected void initialize(int rows, int columns, int fontSize, java.lang.String title)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void close()
protected void enableButtons(boolean enable)
public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
protected void mainStopped()
public void print(byte number)
number
- The number to be written to the Console.public void print(byte number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void print(char ch)
ch
- The character to be written to the Console.public void print(char ch, int fieldSize)
ch
- The character to be written to the Console.fieldSize
- The field width that the character is to be written in.public void print(double number)
number
- The number to be written to the Console.public void print(double number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void print(double number, int fieldSize, int decimalPlaces)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.decimalPlaces
- The number of decimal places of the number
to be displayed.public void print(float number)
number
- The number to be written to the Console.public void print(float number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void print(float number, int fieldSize, int decimalPlaces)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.decimalPlaces
- The number of decimal places of the number
to be displayed.public void print(int number)
number
- The number to be written to the Console.public void print(int number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void print(long number)
number
- The number to be written to the Console.public void print(long number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void print(java.lang.String text, int fieldSize)
text
- The string to be written to the Console.fieldSize
- The field width that the string is to be written in.public void print(short number)
number
- The number to be written to the Console.public void print(short number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void print(boolean value)
value
- The boolean to be written to the Console.public void print(boolean value, int fieldSize)
value
- The boolean to be written to the Console.fieldSize
- The field width that the boolean is to be written in.public void println()
public void println(byte number)
number
- The number to be written to the Console.public void println(byte number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void println(char ch)
ch
- The character to be written to the Console.public void println(char ch, int fieldSize)
ch
- The character to be written to the Console.fieldSize
- The field width that the character is to be written in.public void println(double number)
number
- The number to be written to the Console.public void println(double number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void println(double number, int fieldSize, int decimalPlaces)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.decimalPlaces
- The number of decimal places of the number
to be displayed.public void println(float number)
number
- The number to be written to the Console.public void println(float number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void println(float number, int fieldSize, int decimalPlaces)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.decimalPlaces
- The number of decimal places of the number
to be displayed.public void println(int number)
number
- The number to be written to the Console.public void println(int number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void println(long number)
number
- The number to be written to the Console.public void println(long number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void println(java.lang.String text)
text
- The string to be written to the Console.public void println(java.lang.String text, int fieldSize)
text
- The string to be written to the Console.fieldSize
- The field width that the string is to be written in.public void println(short number)
number
- The number to be written to the Console.public void println(short number, int fieldSize)
number
- The number to be written to the Console.fieldSize
- The field width that the number is to be written in.public void println(boolean value)
value
- The boolean to be written to the Console.public void println(boolean value, int fieldSize)
value
- The boolean to be written to the Console.fieldSize
- The field width that the boolean is to be written in.protected void quitProgram()
public boolean readBoolean()
public byte readByte()
public double readDouble()
public float readFloat()
public int readInt()
public java.lang.String readLine()
public long readLong()
public short readShort()
public java.lang.String readString()
protected java.lang.String readToken()
protected void setWindowTitle(java.lang.String s)
e
- The window eventpublic void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
e
- The window eventpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
e
- The window eventpublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
e
- The window eventpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
e
- The window eventpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
e
- The window eventpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
e
- The window eventpublic void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
e
- The window event