Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
L
M
N
O
P
Q
R
S
T
W
Y
A
addItem(String)
- Method in class javabook.
ListBox
Adds an item to the list.
appendToFile(String)
- Method in class javabook.
OutputBox
Appends the content of this dialog to filename.
B
BUTTON1
- Static variable in class javabook.
ResponseBox
The constant for the leftmost button whose value is equal to YES
BUTTON2
- Static variable in class javabook.
ResponseBox
The constant for the middle button whose value is equal to NO; this button is rightmost when the dialog has only two buttons
BUTTON3
- Static variable in class javabook.
ResponseBox
The constant for the rightmost button whose value is equal to CANCEL
C
CANCEL
- Static variable in class javabook.
ListBox
Constant to represent a user action where the Cancel button is clicked or the dialog is closed.
CANCEL
- Static variable in class javabook.
ResponseBox
The constant for the CANCEL button
Clock
- class javabook.
Clock
.
This class supports some basic clock functions such as reading the current time, getting today's date, and stop watch function.
Clock()
- Constructor for class javabook.
Clock
Default constructor.
Convert
- class javabook.
Convert
.
This class includes various methods for converting values from one data type to another data type.
Convert()
- Constructor for class javabook.
Convert
centerAlign(int, int, double)
- Static method in class javabook.
Format
Formats a real number using the center alignment.
centerAlign(int, long)
- Static method in class javabook.
Format
Formats an integer using the center alignment.
centerAlign(int, String)
- Static method in class javabook.
Format
Formats a
String
using the center alignment.
clear()
- Method in class javabook.
OutputBox
Implements the required method of the ActionListener.
D
DrawingBoard
- class javabook.
DrawingBoard
.
This class allows the drawing of lines, circles, and rectangles in the programmer designated color.
DrawingBoard()
- Constructor for class javabook.
DrawingBoard
Default constructor that creates an instance of DrawingBoard with the title "D R A W I N G B O A R D"
DrawingBoard(String)
- Constructor for class javabook.
DrawingBoard
Constructor that creates an instance of DrawingBoard with the designated title.
deleteItem(int)
- Method in class javabook.
ListBox
Deletes an item at position index from the list.
deleteItem(String)
- Method in class javabook.
ListBox
Deletes an item from the list.
drawCircle(int, int, int)
- Method in class javabook.
DrawingBoard
Draws a circle whose center point is designated by the parameters x and y.
drawLine(int, int, int, int)
- Method in class javabook.
DrawingBoard
Draws a line between two designated points p1 and p2.
drawRectangle(int, int, int, int)
- Method in class javabook.
DrawingBoard
Draws a rectangle with its origin (top, leftmost corner) at (x,y).
drawRectangle(Rectangle)
- Method in class javabook.
DrawingBoard
Draws a rectangle whose dimension is designated by the parameter rect of type Rectangle.
E
ERROR_ICON
- Static variable in class javabook.
JavaBookDialog
Constant for the error icon
F
Format
- class javabook.
Format
.
This class is used to format the numerical and textual values for a properly aligned output display.
Format()
- Constructor for class javabook.
Format
G
getCurrentDate()
- Method in class javabook.
Clock
Returns the current (today's) date in the mm/dd/yyyy format.
getCurrentDate(int)
- Method in class javabook.
Clock
Returns the current (today's) date in short or long format.
getCurrentTime()
- Method in class javabook.
Clock
Returns the current time in the 12-hr format.
getCurrentTime(int)
- Method in class javabook.
Clock
Returns the current time in 24-hr or 12-hr format.
getDouble()
- Method in class javabook.
InputBox
Allows the user to enter a double value.
getDouble(String)
- Method in class javabook.
InputBox
Allows the user to enter a double value.
getDouble()
- Static method in class javabook.
SimpleInput
Reads in a
double
using a default prompt text.
getDouble(String)
- Static method in class javabook.
SimpleInput
Reads in a
double
using the second parameter as its prompt text.
getElapsedTime()
- Method in class javabook.
Clock
Returns the elapsed time of the stop watch function.
getFloat()
- Method in class javabook.
InputBox
Allows the user to enter a double value.
getFloat(String)
- Method in class javabook.
InputBox
Allows the user to enter a float value.
getFloat()
- Static method in class javabook.
SimpleInput
Reads in a
float
using a default prompt text.
getFloat(String)
- Static method in class javabook.
SimpleInput
Reads in a
float
using the second parameter as its prompt text.
getInputs()
- Method in class javabook.
MultiInputBox
Returns the input values entered by the user.
getInteger()
- Method in class javabook.
InputBox
Allows the user to enter an integer value.
getInteger(String)
- Method in class javabook.
InputBox
Allows the user to enter an integer value.
getInteger()
- Static method in class javabook.
SimpleInput
Reads in an integer using a default prompt text.
getInteger(String)
- Static method in class javabook.
SimpleInput
Reads in an integer using the second parameter as its prompt text.
getItemFromIndex(int)
- Method in class javabook.
ListBox
Returns the string value of an iten given index.
getSelectedIndex()
- Method in class javabook.
ListBox
Prompts the user to select an item.
getSelectedItem()
- Method in class javabook.
ListBox
Prompts the user to select an item.
getString()
- Method in class javabook.
InputBox
Allows the user to enter a String.
getString(String)
- Method in class javabook.
InputBox
Allows the user to enter a String value.
getString()
- Static method in class javabook.
SimpleInput
Reads in a
String
using a default prompt text.
getString(String)
- Static method in class javabook.
SimpleInput
Reads in a
String
using the second parameter as its prompt text.
getTotalElapsedTime()
- Method in class javabook.
Clock
Returns the total elapsed time of the stop watch function.
H
hyperlinkUpdate(HyperlinkEvent)
- Method in class javabook.
MiniBrowser
Handles the hyperlink event
I
INFO_ICON
- Static variable in class javabook.
JavaBookDialog
Constant for the information icon
InputBox
- class javabook.
InputBox
.
This dialog is for getting a single input value.
InputBox(Frame)
- Constructor for class javabook.
InputBox
Default constructor.
InputBox(Frame, boolean)
- Constructor for class javabook.
InputBox
Constructs this dialog with 'owner' as its owner and display this dialog as modal if the parameter is true.
isCanceled()
- Method in class javabook.
MultiInputBox
Returns true if the state of this dialog is CANCEL.
J
JavaBookDialog
- class javabook.
JavaBookDialog
.
This abstract class defines behavior and data members common to javabook dialogs such as MessageBox, InputBox, and others.
JavaBookDialog(Component)
- Constructor for class javabook.
JavaBookDialog
JavaBookDialog(Component, boolean)
- Constructor for class javabook.
JavaBookDialog
javabook
- package javabook
L
LONG_FORMAT
- Static variable in class javabook.
Clock
Designates the long format for date
ListBox
- class javabook.
ListBox
.
This dialog is for listing a list of items from which the user can select.
ListBox(Frame)
- Constructor for class javabook.
ListBox
Constructs the standard modal ListBox dialog with 'owner' as its owner.
ListBox(Frame, String)
- Constructor for class javabook.
ListBox
Constructs a modal ListBox dialog with 'owner' as its owner and 'title' as its title.
ListBox(Frame, boolean)
- Constructor for class javabook.
ListBox
Constructs a ListBox dialog with 'owner' as its owner and default title.
ListBox(Frame, String, boolean)
- Constructor for class javabook.
ListBox
Constructs a ListBox dialog with 'owner' as its owner and 'title' as its title.
leftAlign(int, int, double)
- Static method in class javabook.
Format
Formats a real number using the left alignment.
leftAlign(int, long)
- Static method in class javabook.
Format
Formats an integer using the left alignment.
leftAlign(int, String)
- Static method in class javabook.
Format
Formats a
String
using the left alignment.
M
MainWindow
- class javabook.
MainWindow
.
This class is used as the top-level main window of an application.
MainWindow()
- Constructor for class javabook.
MainWindow
Default constructor.
MainWindow(String)
- Constructor for class javabook.
MainWindow
Creates a new MainWindow object with the designated title.
MessageBox
- class javabook.
MessageBox
.
This dialog is for displaying a single line of text.
MessageBox(Frame)
- Constructor for class javabook.
MessageBox
Default constructor.
MessageBox(Frame, boolean)
- Constructor for class javabook.
MessageBox
Constructs this dialog with 'owner' as its owner and display this dialog as modal if the parameter is true.
MiniBrowser
- class javabook.
MiniBrowser
.
A simpleton web browser to illustrate the power of Swing classes.
MiniBrowser()
- Constructor for class javabook.
MiniBrowser
Default constructor
MiniBrowser(String)
- Constructor for class javabook.
MiniBrowser
Constructs this object with urlString as the starting page.
MultiInputBox
- class javabook.
MultiInputBox
.
This dialog is for accepting multiple input values.
MultiInputBox(Frame, int)
- Constructor for class javabook.
MultiInputBox
Constructs a MultiInputBox with the owner frame and size input lines.
MultiInputBox(Frame, String[])
- Constructor for class javabook.
MultiInputBox
Constructs a MultiInputBox with the owner frame and labels for input lines.
main(String[])
- Static method in class javabook.
MiniBrowser
Sample main method
N
NO
- Static variable in class javabook.
ResponseBox
The constant for the NO button
NO_ICON
- Static variable in class javabook.
JavaBookDialog
Constant for no icon
NO_ITEM
- Static variable in class javabook.
ListBox
Constant to represent no selection for the getSelectedItem method.
NO_ITEM
- Static variable in class javabook.
MultiInputBox
Constant to represent no selection for the getSelectedItem method.
NO_SELECTION
- Static variable in class javabook.
ListBox
Constant to represent a user action where the Ok button is clicked, but no item is selected from the list.
O
OutputBox
- class javabook.
OutputBox
.
This dialog is for displaying the program output.
OutputBox(Frame, int, int, String)
- Constructor for class javabook.
OutputBox
Constructs a OutputBox whose dimension is set the parameters width and height, window title is set to the parameter title, and the owning frame to the parameter owner.
OutputBox(Frame, int, int)
- Constructor for class javabook.
OutputBox
Constructs a OutputBox whose dimension is the parameters width and height and the owning frame is the parameter owner.
OutputBox(Frame, String)
- Constructor for class javabook.
OutputBox
Constructs a OutputBox whose window title is the parameter title, and the owning frame is the parameter owner.
OutputBox(Frame)
- Constructor for class javabook.
OutputBox
Constructs a OutputBox whose dimension owning frame is the parameter owner.
P
pause(double)
- Method in class javabook.
Clock
Pauses the program execution.
print(boolean)
- Method in class javabook.
OutputBox
Prints out boolean b.
print(char)
- Method in class javabook.
OutputBox
Prints out char ch.
print(double)
- Method in class javabook.
OutputBox
Prints out a real number.
print(long)
- Method in class javabook.
OutputBox
Prints out an integer number.
print(String)
- Method in class javabook.
OutputBox
Prints out text.
print(StringBuffer)
- Method in class javabook.
OutputBox
Prints out strBuf.
printLine(boolean)
- Method in class javabook.
OutputBox
Prints out boolean b and moves the cursor to the next line.
printLine(char)
- Method in class javabook.
OutputBox
Prints out char ch and moves the cursor to the next line.
printLine(double)
- Method in class javabook.
OutputBox
Prints out a real number and moves the cursor to the next line.
printLine(long)
- Method in class javabook.
OutputBox
Prints out an integer number and moves the cursor to the next line.
printLine(String)
- Method in class javabook.
OutputBox
Prints out text and moves the cursor to the next line.
printLine(StringBuffer)
- Method in class javabook.
OutputBox
Prints out strBuf and moves the cursor to the next line.
println(boolean)
- Method in class javabook.
OutputBox
Prints out boolean b and moves the cursor to the next line.
println(char)
- Method in class javabook.
OutputBox
Prints out char ch and moves the cursor to the next line.
println(double)
- Method in class javabook.
OutputBox
Prints out a real number and moves the cursor to the next line.
println(long)
- Method in class javabook.
OutputBox
Prints out an integer number and moves the cursor to the next line.
println(String)
- Method in class javabook.
OutputBox
Prints out text and moves the cursor to the next line.
println(StringBuffer)
- Method in class javabook.
OutputBox
Prints out strBuf and moves the cursor to the next line.
prompt(String)
- Method in class javabook.
ResponseBox
Prompts the user and returns the result of user action.
Q
QUESTION_ICON
- Static variable in class javabook.
JavaBookDialog
Constant for the question icon
R
ResponseBox
- class javabook.
ResponseBox
.
This dialog is for prompting a yes-no response from the user.
ResponseBox(Frame)
- Constructor for class javabook.
ResponseBox
Constructs the standard ResponseBox dialog with two buttons labeled 'Yes' and 'No'.
ResponseBox(Frame, int)
- Constructor for class javabook.
ResponseBox
Constructs this dialog with 'owner' as its owner and buttonCount number of buttons.
reset()
- Method in class javabook.
Clock
Resets the stop watch to its initial state.
rightAlign(int, int, double)
- Static method in class javabook.
Format
Formats a real number using the right alignment.
rightAlign(int, long)
- Static method in class javabook.
Format
Formats an integer using the right alignment.
rightAlign(int, String)
- Static method in class javabook.
Format
Formats a
String
using the right alignment.
S
SHORT_FORMAT
- Static variable in class javabook.
Clock
Designates the short format for date
SimpleInput
- class javabook.
SimpleInput
.
Provides a simple input routine for non-GUI programs.
SimpleInput()
- Constructor for class javabook.
SimpleInput
SketchPad
- class javabook.
SketchPad
.
This window supports a freehand drawing.
SketchPad()
- Constructor for class javabook.
SketchPad
Default Constructor.
SketchPad(String)
- Constructor for class javabook.
SketchPad
Constructs a SketchPad object with the parameter title
saveToFile(String)
- Method in class javabook.
OutputBox
Saves the content of this dialog to fileName.
setColor(Color)
- Method in class javabook.
DrawingBoard
Sets the drawing color to the argument Color object.
setFont(Font)
- Method in class javabook.
OutputBox
Sets the font of this dialog to the parameter font.
setIcon(int)
- Method in class javabook.
JavaBookDialog
Sets the icon of this dialog
setLabel(int, String)
- Method in class javabook.
ResponseBox
Sets the label of the designated button identified by its id value.
setLabels(String[])
- Method in class javabook.
MultiInputBox
Assigns the input line labels to the passed array
setLocation(int, int)
- Method in class javabook.
JavaBookDialog
Sets the location of this dialog.
setResetOption(boolean)
- Method in class javabook.
MultiInputBox
Sets the reset flag.
setTitle(String)
- Method in class javabook.
JavaBookDialog
Sets the title of this dialog
setValue(int, String)
- Method in class javabook.
MultiInputBox
Sets the value to the input line at the index position.
setVisible(boolean)
- Method in class javabook.
DrawingBoard
Makes the window appear on disappear from the screen.
setVisible(boolean)
- Method in class javabook.
MiniBrowser
Overrides the ancestor setVisible by adding the display of url page.
show()
- Method in class javabook.
DrawingBoard
Deprecated.
This method is supported for backward compatibility. Use setVisible.
show(long)
- Method in class javabook.
MessageBox
Displays the integer value after converting it to a string.
show(double)
- Method in class javabook.
MessageBox
Displays the real number after converting it to a string.
show(String)
- Method in class javabook.
MessageBox
Displays the String value.
show(StringBuffer)
- Method in class javabook.
MessageBox
Displays the StringBuffer value after conveting it to a string.
show(long, int)
- Method in class javabook.
MessageBox
Displays the integer value after converting it to a string.
show(double, int)
- Method in class javabook.
MessageBox
Displays the real number after converting it to a string.
show(String, int)
- Method in class javabook.
MessageBox
Displays the String value.
show(StringBuffer, int)
- Method in class javabook.
MessageBox
Displays the StringBuffer value after conveting it to a string.
show(long, int, int)
- Method in class javabook.
MessageBox
Displays the integer value after converting it to a string.
show(double, int, int)
- Method in class javabook.
MessageBox
Displays the real number after converting it to a string.
show(String, int, int)
- Method in class javabook.
MessageBox
Displays the String value.
show(StringBuffer, int, int)
- Method in class javabook.
MessageBox
Displays the StringBuffer value after conveting it to a string.
show(long, int, int, int)
- Method in class javabook.
MessageBox
Displays the integer value after converting it to a string.
show(double, int, int, int)
- Method in class javabook.
MessageBox
Displays the real number after converting it to a string.
show(String, int, int, int)
- Method in class javabook.
MessageBox
Displays the String value.
show(StringBuffer, int, int, int)
- Method in class javabook.
MessageBox
Displays the StringBuffer value after conveting it to a string.
skipLine(int)
- Method in class javabook.
OutputBox
Skips the numberOfLines lines.
start()
- Method in class javabook.
Clock
Starts the clock's stop watch.
stop()
- Method in class javabook.
Clock
Stops the clock's stop watch.
T
TIME_12HR_FORMAT
- Static variable in class javabook.
Clock
Designates the 12-hr format for time
TIME_24HR_FORMAT
- Static variable in class javabook.
Clock
Designates the 24-hr format for time
toBoolean(String)
- Static method in class javabook.
Convert
Converts the argument String object str to a boolean value.
toChar(String)
- Static method in class javabook.
Convert
Converts the argument String object str to a char value.
toDouble(String)
- Static method in class javabook.
Convert
Converts the argument String object str to a double value.
toFloat(String)
- Static method in class javabook.
Convert
Converts the argument String object str to a float value.
toInt(String)
- Static method in class javabook.
Convert
Converts the argument String object str to an int value.
toLong(String)
- Static method in class javabook.
Convert
Converts the argument String object str to a long value.
toString(boolean)
- Static method in class javabook.
Convert
Converts the argument boolean value to a String value.
toString(char)
- Static method in class javabook.
Convert
Converts the argument char value to a String value.
toString(double)
- Static method in class javabook.
Convert
Converts the argument double value to a String value.
toString(long)
- Static method in class javabook.
Convert
Converts the argument long value to a String value.
W
WARNING_ICON
- Static variable in class javabook.
JavaBookDialog
Constant for the warning icon
waitUntilClose()
- Method in class javabook.
OutputBox
Changes this dialog to modal and thereby causes the program execution to pause until this dialog is closed.
Y
YES
- Static variable in class javabook.
ResponseBox
The constant for the YES button
A
B
C
D
E
F
G
H
I
J
L
M
N
O
P
Q
R
S
T
W
Y
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes