- accept(File) - Method in class acm.util.FileChooserFilter
-
Returns true
if the specified file should be accepted by the
filter.
- acm.graphics - package acm.graphics
-
This package provides a set of classes that support the creation of simple,
object-oriented graphical displays.
- acm.gui - package acm.gui
-
This package provides a set of classes that support the creation of simple,
interactive programs.
- acm.io - package acm.io
-
This package includes two classes that simplify I/O operations.
- acm.program - package acm.program
-
This package provides a set of classes that simplify the creation of
programs.
- acm.util - package acm.util
-
This package includes several classes that are common to the ACM package
suite.
- actionPerformed(ActionEvent) - Method in class acm.program.Program
-
Called when a component (typically a button) is activated.
- add(GObject) - Method in class acm.graphics.GCanvas
-
Adds the graphical object to this canvas.
- add(GObject, double, double) - Method in class acm.graphics.GCanvas
-
Adds the graphical object to this canvas and sets its location to the point
(x
, y
).
- add(GObject, GPoint) - Method in class acm.graphics.GCanvas
-
Adds the graphical object to this canvas and sets its location to the
specified point.
- add(Component) - Method in class acm.graphics.GCanvas
-
Adds the component to this canvas without changing its location.
- add(Component, double, double) - Method in class acm.graphics.GCanvas
-
Adds the component to this canvas and sets its location to the point
(x
, y
).
- add(Component, GPoint) - Method in class acm.graphics.GCanvas
-
Adds the component to this canvas and sets its location to the specified
point.
- add(GObject) - Method in class acm.graphics.GCompound
-
Adds a new graphical object to this GCompound
.
- add(GObject, double, double) - Method in class acm.graphics.GCompound
-
Adds the graphical object to this canvas and sets its location to the point
(x
, y
).
- add(GObject, GPoint) - Method in class acm.graphics.GCompound
-
Adds the graphical object to this canvas and sets its location to the
specified point.
- add(GObject) - Method in interface acm.graphics.GContainer
-
Adds a new graphical object to this container.
- add(GObject, double, double) - Method in interface acm.graphics.GContainer
-
Adds the graphical object to this canvas and sets its location to the point
(x
, y
).
- add(GObject, GPoint) - Method in interface acm.graphics.GContainer
-
Adds the graphical object to this canvas and sets its location to the
specified point.
- add(GRectangle) - Method in class acm.graphics.GRectangle
-
Adjusts the bounds of the current GRectangle
so that it contains
the rectangle represented by the argument.
- add(double, double) - Method in class acm.graphics.GRectangle
-
Adds the specified point to the rectangle.
- add(GObject) - Method in class acm.program.GraphicsProgram
-
Adds a new graphical object to this container.
- add(GObject, double, double) - Method in class acm.program.GraphicsProgram
-
Adds the graphical object to the canvas and sets its location to the point
(x
, y
).
- add(GObject, GPoint) - Method in class acm.program.GraphicsProgram
-
Adds the graphical object to the canvas and sets its location to the
specified point.
- add(Component, double, double) - Method in class acm.program.GraphicsProgram
-
Adds the component to the canvas and sets its location to the point
(x
, y
).
- add(Component, GPoint) - Method in class acm.program.GraphicsProgram
-
Adds the component to the canvas and sets its location to the specified
point.
- add(Component, String, Object) - Method in class acm.program.Program
-
Adds the component to the specified border region with the indicated
constraints object.
- addActionListener(ActionListener) - Method in class acm.graphics.GObject
-
Adds an action listener to this graphical object.
- addActionListeners() - Method in class acm.program.Program
-
Adds the program as an ActionListener
to every button in the
structure that does not have a listener already.
- addActionListeners(ActionListener) - Method in class acm.program.Program
-
Adds the specified listener to every button in the structure that does not
have a listener already.
- addArc(double, double, double, double) - Method in class acm.graphics.GPolygon
-
Adds a series of edges to the polygon that simulates the arc specified by the
parameters.
- addEdge(double, double) - Method in class acm.graphics.GPolygon
-
Adds an edge to the polygon whose components are given by the displacements
dx
and dy
from the last vertex.
- addEditMenu() - Method in class acm.program.ProgramMenuBar
-
Installs the Edit
menu.
- addEditMenuItems(JMenu) - Method in class acm.program.ProgramMenuBar
-
Adds the standard Edit
items to the specified menu.
- addExitHook(Object) - Method in class acm.program.Program
-
Requests that the program call the exit
method in the specified
object before exiting.
- addFileMenu() - Method in class acm.program.ProgramMenuBar
-
Installs the File
menu.
- addFileMenuItems(JMenu) - Method in class acm.program.ProgramMenuBar
-
Adds the standard File
items to the specified menu.
- addImpl(Component, Object, int) - Method in class acm.program.Program
-
Adds the specified component to the content pane using the specified
constraints and index.
- addKeyListeners() - Method in class acm.program.GraphicsProgram
-
Adds the program as a KeyListener
to the canvas.
- addKeyListeners(KeyListener) - Method in class acm.program.GraphicsProgram
-
Adds the specified listener as a KeyListener
to the canvas.
- addLayoutComponent(String, Component) - Method in class acm.gui.TableLayout
-
Adds a component to the layout.
- addLayoutComponent(Component, Object) - Method in class acm.gui.TableLayout
-
Adds a component to the layout.
- addMenus() - Method in class acm.program.ProgramMenuBar
-
Adds menus to the menu bar.
- addMouseListener(MouseListener) - Method in class acm.graphics.GObject
-
Adds a mouse listener to this graphical object.
- addMouseListeners() - Method in class acm.program.GraphicsProgram
-
Adds the program as both a MouseListener
and
MouseMotionListener
to the canvas.
- addMouseListeners(EventListener) - Method in class acm.program.GraphicsProgram
-
Adds the specified listener as a MouseListener
and/or
MouseMotionListener
, as appropriate, to the canvas.
- addMouseMotionListener(MouseMotionListener) - Method in class acm.graphics.GObject
-
Adds a mouse motion listener to this graphical object.
- addPolarEdge(double, double) - Method in class acm.graphics.GPolygon
-
Adds an edge to the polygon specified in polar coordinates.
- addVertex(double, double) - Method in class acm.graphics.GPolygon
-
Adds a vertex at (x
, y
) relative to the polygon
origin.
- angle(double, double) - Static method in class acm.graphics.GMath
-
Returns the angle in degrees from the origin to the point
(x
, y
).
- angle(double, double, double, double) - Static method in class acm.graphics.GMath
-
Computes the angle in degrees formed by a line segment from the point
(x0
, y0
) and
(x1
, y1
).
- Animator - Class in acm.util
-
This class extends Thread
to provide several features that make
it easier to build animations.
- Animator() - Constructor for class acm.util.Animator
-
Creates a new Animator
object.
- Animator(ThreadGroup) - Constructor for class acm.util.Animator
-
Creates a new Animator
object and assigns it to the specified
thread group.
- Animator(Runnable) - Constructor for class acm.util.Animator
-
Creates a new Animator
object with the specified runnable
object.
- Animator(ThreadGroup, Runnable) - Constructor for class acm.util.Animator
-
Creates a new Animator
object with the specified runnable object
and assigns it to the specified thread group.
- ARC_TOLERANCE - Static variable in class acm.graphics.GArc
-
This constant defines how close (measured in pixel units) a point has to be
to an arc before that point is considered to be "contained" within the arc.
- areCollectionsAvailable() - Static method in class acm.util.Platform
-
Checks whether the JDK 1.2 collection classes are available.
- areMouseListenersEnabled() - Method in class acm.graphics.GCompound
-
Returns true
if mouse listeners have ever been assigned to this
object or to any of the contained objects.
- areMouseListenersEnabled() - Method in class acm.graphics.GObject
-
Returns true
if mouse listeners have ever been assigned to this
object.
- areStandardFontFamiliesAvailable() - Static method in class acm.util.Platform
-
Checks whether the JDK 1.2 standard font families (Serif
,
SansSerif
, and Monospaced
) are available.
- callAction() - Method in class acm.util.Animator
-
Triggers a "call"
action, as if the Call
button is
pushed.
- CALLING - Static variable in class acm.util.Animator
-
Constant indicating that the animator is running until the end of the current
call.
- CancelledException - Exception in acm.util
-
This class allows a dialog to signal clients that it has been cancelled.
- CancelledException() - Constructor for exception acm.util.CancelledException
-
Creates an CancelledException
.
- CENTER - Static variable in class acm.gui.TableLayout
-
Center table in the container
- CENTER - Static variable in class acm.gui.TablePanel
-
Center table in the container
- CENTER - Static variable in class acm.program.Program
-
Constant specifying the center of the container
- checkForTermination() - Method in class acm.util.Animator
-
Checks to see whether this Animator
has been asked to terminate.
- checkIfLoaded(String) - Static method in class acm.util.JTFTools
-
Returns true if the specified class is already loaded.
- clear() - Method in class acm.graphics.GPolygon
-
Calling this method deletes all vertices from the polygon and resets the
scale and rotation factors to the their default values.
- clear() - Method in class acm.io.IOConsole
-
Clears the console display.
- clone() - Method in class acm.graphics.GPolygon
-
Overrides clone
in Object
to make sure that the
vertex list is copied rather than shared.
- colorName(Color) - Static method in class acm.graphics.GObject
-
Translates a color to a string representation.
- compareVersion(String) - Static method in class acm.util.Platform
-
This method compares the Java version given in the system properties with the
specified version and returns -1, 0, or +1 depending on whether the system
version is earlier than, equal to, or later than the specified one.
- compareVersion(String, String) - Static method in class acm.util.Platform
-
This method compares the version strings v1
and v2
and returns -1, 0, or +1 depending on whether v1
is earlier
than, equal to, or later than v2
.
- conditionalRepaint() - Method in class acm.graphics.GCanvas
-
Repaints the canvas if auto-repaint is in effect.
- ConsoleProgram - Class in acm.program
-
This class is a standard subclass of
Program
that installs a console in
the window.
- ConsoleProgram() - Constructor for class acm.program.ConsoleProgram
-
Creates a new console program.
- contains(double, double) - Method in class acm.graphics.GArc
-
Checks to see whether a point is inside the object.
- contains(double, double) - Method in class acm.graphics.GCompound
-
Checks to see whether a point is "inside" the compound, which means that it
is inside one of the components.
- contains(double, double) - Method in class acm.graphics.GLine
-
Checks to see whether a point is inside the object.
- contains(double, double) - Method in class acm.graphics.GObject
-
Checks to see whether a point is inside the object.
- contains(GPoint) - Method in class acm.graphics.GObject
-
Checks to see whether a point is inside the object.
- contains(double, double) - Method in class acm.graphics.GOval
-
Checks to see whether a point is inside the object.
- contains(double, double) - Method in class acm.graphics.GPen
-
Contains is defined to be false for the GPen
object to avoid
having the trace intercept mouse clicks.
- contains(double, double) - Method in class acm.graphics.GPolygon
-
Checks to see whether a point is inside the object.
- contains(double, double) - Method in class acm.graphics.GRectangle
-
Returns true
if the GRectangle
contains the
specified point.
- contains(GPoint) - Method in class acm.graphics.GRectangle
-
Returns true
if the GRectangle
contains the
specified point.
- contains(double, double) - Method in class acm.graphics.GTurtle
-
Contains is defined to be false for the GTurtle
object to avoid
having the trace intercept mouse clicks.
- controllerHook() - Method in class acm.util.Animator
-
This method is called before the animator changes state in a way that might
interest a controller.
- copy() - Method in class acm.io.IOConsole
-
Implements the "Copy" menu operation.
- copyBytes(InputStream, OutputStream, long) - Static method in class acm.util.JTFTools
-
Copies the specified number bytes from the input stream to the output stream.
- copyFile(File, File) - Static method in class acm.util.JTFTools
-
Copies a file from oldFile
to newFile
.
- copyFileTypeAndCreator(File, File) - Static method in class acm.util.Platform
-
Sets the Macintosh file type and creator for the new file using the old file
as a model.
- cosDegrees(double) - Static method in class acm.graphics.GMath
-
Returns the trigonometric cosine of its argument where angle
is
expressed in degrees.
- createBufferedImage(Image, int) - Static method in class acm.util.MediaTools
-
Creates a BufferedImage
from the specified image.
- createConsole() - Method in class acm.program.ConsoleProgram
-
Creates the console used by the ConsoleProgram
.
- createConsole() - Method in class acm.program.Program
-
Creates the console used by the ConsoleProgram
.
- createConsoleModel() - Method in class acm.io.IOConsole
-
Creates the console model used by this console.
- createDialogIO() - Method in class acm.program.Program
-
Creates the dialog used for interaction (primarily by the
DialogProgram
class).
- createEmptyContainer() - Static method in class acm.util.JTFTools
-
Returns an empty lightweight container.
- createFocusedItem(String) - Method in class acm.program.ProgramMenuBar
-
Creates a focused menu item with the specified action command.
- createFocusedItem(String, int) - Method in class acm.program.ProgramMenuBar
-
Creates a focused menu item with the specified action command and accelerator
key.
- createGCanvas() - Method in class acm.program.GraphicsProgram
-
Creates the GCanvas
used by the GraphicsProgram
.
- createImage(int[][]) - Static method in class acm.util.MediaTools
-
Generates an image from a two-dimensional array of pixel values.
- createImage(int[], int, int) - Static method in class acm.util.MediaTools
-
Generates an image from a single-dimensional array of pixel values.
- createImage(InputStream) - Static method in class acm.util.MediaTools
-
Generates an image from an input stream containing the data bytes for the
image formatted in image/gif format.
- createImage(String[]) - Static method in class acm.util.MediaTools
-
Generates an image from a string array that provides the pixel values.
- createMenuBar() - Method in class acm.program.Program
-
Creates a menu bar for use with the program.
- createParameterTable(String[]) - Static method in class acm.program.Program
-
Creates a hash table containing the parameters specified in the argument
list.
- createProgramItem(String) - Method in class acm.program.ProgramMenuBar
-
Creates a program menu item with the specified action command.
- createProgramItem(String, int) - Method in class acm.program.ProgramMenuBar
-
Creates a program menu item with the specified action command and accelerator
key.
- createPSPreviewImage(Image, String[]) - Static method in class acm.util.MediaTools
-
Creates a new image that combines an existing image with a PostScript preview
represented as a string array.
- createRGBPixel(int, int, int) - Static method in class acm.graphics.GImage
-
Creates an opaque pixel value with the color components given by
red
, green
, and blue
.
- createRGBPixel(int, int, int, int) - Static method in class acm.graphics.GImage
-
Creates a pixel value with the color components given by red
,
green
, and blue
and the transparency value
alpha
.
- createStandardItem(String) - Method in class acm.program.ProgramMenuBar
-
Creates one of the standard menu items implemented by the
ProgramMenuBar
class.
- createTurtleImage(double) - Method in class acm.graphics.GTurtle
-
This method creates (or retrieves) an image of the turtle in the specified
direction.
- cut() - Method in class acm.io.IOConsole
-
Implements the "Cut" menu operation.
- G3DRect - Class in acm.graphics
-
The G3DRect
class is used to represent a rectangle whose borders
are drawn to create a three-dimensional effect.
- G3DRect(double, double) - Constructor for class acm.graphics.G3DRect
-
Constructs a new 3D rectangle with the specified width and height, positioned
at the origin.
- G3DRect(double, double, double, double) - Constructor for class acm.graphics.G3DRect
-
Constructs a new 3D rectangle with the specified bounds.
- G3DRect(double, double, double, double, boolean) - Constructor for class acm.graphics.G3DRect
-
Constructs a new 3D rectangle with the specified bounds which is raised if
the final parameter is true
.
- GArc - Class in acm.graphics
-
The GArc
class is a graphical object whose appearance consists
of an arc.
- GArc(double, double, double, double) - Constructor for class acm.graphics.GArc
-
Creates a new GArc
object consisting of an elliptical arc
located at the point (0, 0).
- GArc(double, double, double, double, double, double) - Constructor for class acm.graphics.GArc
-
Creates a new GArc
object consisting of an elliptical arc
inscribed in a rectangle located at the point
(x
, y
) with the specified width and height.
- GCanvas - Class in acm.graphics
-
The GCanvas
class is a lightweight component that also serves as
a container for graphical objects.
- GCanvas() - Constructor for class acm.graphics.GCanvas
-
Creates a new GCanvas
that contains no objects.
- GCompound - Class in acm.graphics
-
This class defines a graphical object that consists of a collection of other
graphical objects.
- GCompound() - Constructor for class acm.graphics.GCompound
-
Creates a new GCompound
object with no internal components.
- GContainer - Interface in acm.graphics
-
Defines the functionality of an object that can serve as the parent of a
GObject
.
- GDimension - Class in acm.graphics
-
This class is a double-precision version of the Dimension
class
in java.awt
.
- GDimension() - Constructor for class acm.graphics.GDimension
-
Constructs a new dimension object with zero values for width and height.
- GDimension(double, double) - Constructor for class acm.graphics.GDimension
-
Constructs a new dimension object with the specified components.
- GDimension(GDimension) - Constructor for class acm.graphics.GDimension
-
Constructs a new GDimension
object from an existing one.
- GDimension(Dimension) - Constructor for class acm.graphics.GDimension
-
Constructs a new GDimension
object from an AWT
Dimension
.
- getAllowCancel() - Method in class acm.io.IODialog
-
Returns the state of the cancellation mode.
- getAlpha(int) - Static method in class acm.graphics.GImage
-
Returns the alpha component from an RGB value.
- getAnchor() - Method in class acm.gui.TableConstraints
-
Returns the anchor
field from the constraint.
- getAnimatorState() - Method in class acm.util.Animator
-
Returns the state of the animator.
- getArcHeight() - Method in class acm.graphics.GRoundRect
-
Returns the y component of the corner radius.
- getArcWidth() - Method in class acm.graphics.GRoundRect
-
Returns the x component of the corner radius.
- getArgumentArray() - Method in class acm.program.Program
-
Retrieves the array of arguments passed in from the command line, or
null
if no arguments are available.
- getAscent() - Method in class acm.graphics.GLabel
-
Returns the distance this string extends above the baseline.
- getAssociatedConsole() - Method in class acm.io.IODialog
-
Returns the associated console for the dialog.
- getAutoRepaintFlag() - Method in class acm.graphics.GCanvas
-
- getAWTBounds() - Method in class acm.graphics.GArc
-
Returns an AWT Rectangle
that specifies the bounds of this
object.
- getAWTBounds() - Method in class acm.graphics.GImage
-
Returns an AWT Rectangle
that specifies the bounds of this
object.
- getAWTBounds() - Method in class acm.graphics.GOval
-
Returns an AWT Rectangle
that specifies the bounds of this
object.
- getAWTBounds() - Method in class acm.graphics.GRect
-
Returns an AWT Rectangle
that specifies the bounds of this
object.
- getBlue(int) - Static method in class acm.graphics.GImage
-
Returns the blue component from an RGB value.
- getBorder(String) - Method in class acm.program.Program
-
Returns the component installed as a border on the specified side, which must
be one of the constants from BorderLayout
(NORTH
,
SOUTH
, EAST
, WEST
).
- getBounds() - Method in class acm.graphics.GArc
-
Returns the bounding box of the arc.
- getBounds() - Method in class acm.graphics.GCompound
-
Returns the bounding rectangle for this compound object, which consists of
the union of the bounding rectangles for each of the components.
- getBounds() - Method in class acm.graphics.GImage
-
Returns the bounding box of this object.
- getBounds() - Method in class acm.graphics.GLabel
-
Returns a GRectangle
that specifies the bounding box for the
string.
- getBounds() - Method in class acm.graphics.GLine
-
Returns the bounding box for this object.
- getBounds() - Method in class acm.graphics.GObject
-
Returns the bounding box of this object, which is defined to be the smallest
rectangle that covers everything drawn by the figure.
- getBounds() - Method in class acm.graphics.GOval
-
Returns the bounding box of this object.
- getBounds() - Method in class acm.graphics.GPen
-
Returns the bounding box for the entire figure traced by the pen.
- getBounds() - Method in class acm.graphics.GPolygon
-
Returns the bounding box of this object, which is defined to be the smallest
rectangle that covers everything drawn by the figure.
- getBounds() - Method in class acm.graphics.GRect
-
Returns the bounding box of this object.
- getBounds() - Method in class acm.graphics.GRectangle
-
Returns a new GRectangle
whose bounds are the same as this one.
- getBounds() - Method in class acm.graphics.GTurtle
-
Returns the bounding box for the entire figure traced by the turtle.
- getCanvasPoint(GPoint) - Method in class acm.graphics.GCompound
-
Converts the location of the specified point in this compound to the
corresponding point in the enclosing canvas.
- getCanvasPoint(double, double) - Method in class acm.graphics.GCompound
-
Converts the location of the specified point in this compound to the
corresponding point in the enclosing canvas.
- getCentralRegionSize() - Method in class acm.program.Program
-
Returns the size of the central region.
- getColor() - Method in class acm.graphics.GObject
-
Returns the color used to display this object.
- getColumnCount() - Method in class acm.gui.TableLayout
-
Returns the number of columns in the table.
- getCommandLine() - Static method in class acm.util.JTFTools
-
Returns the command line that invoked this program, or null
if
no command line is available.
- getComponent() - Method in class acm.graphics.GObject
-
Returns the component in which this object is installed, or null
if none exists.
- getConsole() - Method in class acm.program.Program
-
Returns the console associated with this program.
- getConstraints(Component) - Method in class acm.gui.TableLayout
-
Returns a copy of the constraints requested for the specified component.
- getCurrentPoint() - Method in class acm.graphics.GPolygon
-
Returns the coordinates of the last vertex added to the polygon, or
null
if the polygon is empty.
- getDefaultFill() - Method in class acm.gui.TableLayout
-
Returns the default fill parameter for components in the table.
- getDefaultFill() - Method in class acm.gui.TablePanel
-
Returns the default fill parameter for components in the table.
- getDescent() - Method in class acm.graphics.GLabel
-
Returns the distance this string descends below the baseline.
- getDescription() - Method in class acm.util.FileChooserFilter
-
Returns a description of the accepted files.
- getDialog() - Method in class acm.program.Program
-
Returns the dialog used for user interaction.
- getDirection() - Method in class acm.graphics.GTurtle
-
- getDoubleOption(String) - Method in class acm.util.OptionTable
-
Returns the double
value associated with key
in the
option table, or 0.0 if no such value exists.
- getDoubleOption(String, double) - Method in class acm.util.OptionTable
-
Returns the double
value associated with key
in the
option table or the specified default value if no such binding exists.
- getElement(int) - Method in class acm.graphics.GCanvas
-
Returns the graphical object at the specified index, numbering from back to
front in the the z dimension.
- getElement(int) - Method in class acm.graphics.GCompound
-
Returns the graphical object at the specified index, numbering from back to
front in the the z dimension.
- getElement(int) - Method in interface acm.graphics.GContainer
-
Returns the graphical object at the specified index, numbering from back to
front in the the z dimension.
- getElement(int) - Method in class acm.program.GraphicsProgram
-
Returns the graphical object at the specified index, numbering from back to
front in the the z dimension.
- getElementAt(double, double) - Method in class acm.graphics.GCanvas
-
Returns the topmost graphical object that contains the point (x
,
y
), or null
if no such object exists.
- getElementAt(GPoint) - Method in class acm.graphics.GCanvas
-
Returns the topmost graphical object that contains the specified point, or
null
if no such object exists.
- getElementAt(double, double) - Method in class acm.graphics.GCompound
-
Returns the topmost graphical object that contains the point (x
,
y
), or null
if no such object exists.
- getElementAt(GPoint) - Method in class acm.graphics.GCompound
-
Returns the topmost graphical object that contains the specified point, or
null
if no such object exists.
- getElementAt(double, double) - Method in interface acm.graphics.GContainer
-
Returns the topmost graphical object that contains the point (x
,
y
), or null
if no such object exists.
- getElementAt(GPoint) - Method in interface acm.graphics.GContainer
-
Returns the topmost graphical object that contains the specified point, or
null
if no such object exists.
- getElementAt(double, double) - Method in class acm.program.GraphicsProgram
-
Returns the topmost graphical object that contains the point (x
,
y
), or null
if no such object exists.
- getElementAt(GPoint) - Method in class acm.program.GraphicsProgram
-
Returns the topmost graphical object that contains the specified point, or
null
if no such object exists.
- getElementCount() - Method in class acm.graphics.GCanvas
-
Returns the number of graphical objects stored in this GCanvas
.
- getElementCount() - Method in class acm.graphics.GCompound
-
Returns the number of graphical objects stored in this container.
- getElementCount() - Method in interface acm.graphics.GContainer
-
Returns the number of graphical objects stored in this container.
- getElementCount() - Method in class acm.program.GraphicsProgram
-
Returns the number of graphical objects stored in this GCanvas
.
- getEnclosingFrame(Component) - Static method in class acm.util.JTFTools
-
Returns the frame that encloses the specified component.
- getEndPoint() - Method in class acm.graphics.GArc
-
Returns the point at which the arc ends.
- getEndPoint() - Method in class acm.graphics.GLine
-
Returns the end point of the line as a GPoint
object.
- getErrorColor() - Method in class acm.io.IOConsole
-
Returns the color currently in use for console error messages.
- getErrorStyle() - Method in class acm.io.IOConsole
-
Returns the current style parameters for console error messages.
- getExceptionOnError() - Method in class acm.gui.DoubleField
-
Returns the state of the error-handling flag.
- getExceptionOnError() - Method in class acm.gui.IntField
-
Returns the state of the error-handling flag.
- getExceptionOnError() - Method in class acm.io.IOConsole
-
Returns the state of the error-handling flag.
- getExceptionOnError() - Method in class acm.io.IODialog
-
Returns the state of the error-handling flag.
- getFill() - Method in class acm.gui.TableConstraints
-
Returns the fill
field from the constraint.
- getFillColor() - Method in class acm.graphics.GArc
-
- getFillColor() - Method in interface acm.graphics.GFillable
-
Returns the color used to display the filled region of this object.
- getFillColor() - Method in class acm.graphics.GOval
-
Returns the color used to display the filled region of this object.
- getFillColor() - Method in class acm.graphics.GPen
-
Returns the color used to display the filled region of this object.
- getFillColor() - Method in class acm.graphics.GPolygon
-
Returns the color used to display the filled region of this object.
- getFillColor() - Method in class acm.graphics.GRect
-
Returns the color used to display the filled region of this object.
- getFont() - Method in class acm.graphics.GLabel
-
Returns the font in which the GLabel
is displayed.
- getFontList() - Static method in class acm.util.JTFTools
-
Returns an array of the available font family names.
- getFontMetrics() - Method in class acm.graphics.GLabel
-
Returns a FontMetrics
object describing the dimensions of this
string.
- getFormat() - Method in class acm.gui.DoubleField
-
Returns the format currently in use for this field, or null
if
no format has been set.
- getFormat() - Method in class acm.gui.IntField
-
Returns the format currently in use for this field, or null
if
no format has been set.
- getFrameRectangle() - Method in class acm.graphics.GArc
-
Returns the bounds of the GRectangle
in which this arc is
inscribed.
- getGCanvas() - Method in class acm.program.GraphicsProgram
-
Returns the GCanvas
object used by this program.
- getGreen(int) - Static method in class acm.graphics.GImage
-
Returns the green component from an RGB value.
- getGridHeight() - Method in class acm.gui.TableConstraints
-
Returns the gridheight
field from the constraint.
- getGridWidth() - Method in class acm.gui.TableConstraints
-
Returns the gridwidth
field from the constraint.
- getGridX() - Method in class acm.gui.TableConstraints
-
Returns the gridx
field from the constraint.
- getGridY() - Method in class acm.gui.TableConstraints
-
Returns the gridy
field from the constraint.
- getHeight() - Method in class acm.graphics.GCanvas
-
Returns the height of this canvas in pixels.
- getHeight() - Method in class acm.graphics.GDimension
-
Returns the height of this GDimension
.
- getHeight() - Method in class acm.graphics.GLabel
-
Returns the height of this string, as it appears on the display.
- getHeight() - Method in class acm.graphics.GObject
-
Returns the height of this object, which is defined to be the height of the
bounding box.
- getHeight() - Method in class acm.graphics.GOval
-
Returns the height of this object as a double-precision value, which is
defined to be the height of the bounding box.
- getHeight() - Method in class acm.graphics.GRect
-
Returns the height of this object as a double-precision value, which is
defined to be the height of the bounding box.
- getHeight() - Method in class acm.graphics.GRectangle
-
Returns the height of this GDimension
.
- getHeight() - Method in class acm.gui.TableConstraints
-
Returns the height
field from the constraint.
- getHexInputStream(String[]) - Static method in class acm.util.MediaTools
-
Returns an input stream whose bytes come from the string array
hex
, in which the elements consist of continuous bytes of hex
data.
- getHgap() - Method in class acm.gui.TableLayout
-
Returns the horizontal gap between components.
- getHgap() - Method in class acm.gui.TablePanel
-
Returns the horizontal gap between components.
- getHorizontalAlignment() - Method in class acm.gui.TableLayout
-
Returns the horizontal alignment for the table.
- getHorizontalAlignment() - Method in class acm.gui.TablePanel
-
Returns the horizontal alignment for the table.
- getImage() - Method in class acm.graphics.GImage
-
Returns the image stored inside this GImage
.
- getImageObserver() - Static method in class acm.util.MediaTools
-
This method returns a new lightweight component suitable as an
imageObserver
.
- getInputColor() - Method in class acm.io.IOConsole
-
Returns the color currently in use for console input.
- getInputModel() - Method in class acm.program.Program
-
Returns the IOModel
used for program input, which will
ordinarily be the console.
- getInputScript() - Method in class acm.io.IOConsole
-
Retrieves the input script.
- getInputStyle() - Method in class acm.io.IOConsole
-
Returns the current style parameters for console input.
- getInsets() - Method in class acm.gui.TableConstraints
-
Returns the insets
field from the constraint.
- getInstance() - Static method in class acm.util.RandomGenerator
-
Returns a RandomGenerator
instance that can be shared among
several classes.
- getIntOption(String) - Method in class acm.util.OptionTable
-
Returns the integer value associated with key
in the option
table, or 0 if no such value exists.
- getIntOption(String, int) - Method in class acm.util.OptionTable
-
Returns the integer value associated with key
in the option
table or the specified default value if no such binding exists.
- getIPadX() - Method in class acm.gui.TableConstraints
-
Returns the ipadx
field from the constraint.
- getIPadY() - Method in class acm.gui.TableConstraints
-
Returns the ipady
field from the constraint.
- getJTFVersion() - Static method in class acm.util.Platform
-
Returns the version number of the JTF libraries as a string suitable for use
with the compareVersion
method.
- getLabel() - Method in class acm.graphics.GLabel
-
Returns the string displayed by this object.
- getLayout() - Method in class acm.program.Program
-
Gets the layout manager for the central region of the content pane.
- getLayoutAlignmentX(Container) - Method in class acm.gui.TableLayout
-
Returns the alignment along the x-axis as described in the
LayoutManager2
interface.
- getLayoutAlignmentY(Container) - Method in class acm.gui.TableLayout
-
Returns the alignment along the y-axis as described in the
LayoutManager2
interface.
- getLocalHostName() - Static method in class acm.util.JTFTools
-
Returns the canonical name of the local host.
- getLocalPoint(GPoint) - Method in class acm.graphics.GCompound
-
Converts the location of the specified point on the enclosing canvas to the
corresponding point in the space of this compound.
- getLocalPoint(double, double) - Method in class acm.graphics.GCompound
-
Converts the specified point on the enclosing canvas to the corresponding
point in the space of this compound.
- getLocation() - Method in class acm.graphics.GObject
-
Returns the location of this object as a GPoint
.
- getLocation() - Method in class acm.graphics.GPoint
-
Returns a new GPoint
whose coordinates are the same as this one.
- getLocation() - Method in class acm.graphics.GRectangle
-
Returns a new GPoint
with the location of the rectangle.
- getMacMenuBarFlag() - Method in class acm.program.ProgramMenuBar
-
Retrieves the setting of the Mac menu bar flag.
- getMainClass() - Static method in class acm.util.JTFTools
-
Returns the name of the main class.
- getMainThread() - Method in class acm.program.Program
-
Returns the thread that is running the main program.
- getMap() - Method in class acm.util.OptionTable
-
Returns the HashMap
used to associate keys and options.
- getMenuBar() - Method in class acm.io.IOConsole
-
Returns the menu bar that controls this console.
- getMinimumSize() - Method in class acm.io.IOConsole
-
Overrides the getMinimumSize
method to ensure that an
IOConsole
is not too large.
- getNativeArcFlag() - Method in class acm.graphics.GCanvas
-
Returns the current setting of the native-arc flag as described in
setNativeArcFlag
.
- getObjectColor() - Method in class acm.graphics.GObject
-
This method returns the color set for this specific object, which may be
null
.
- getOption(String) - Method in class acm.util.OptionTable
-
Returns the value associated with key
in the option table, or
null
if no such value exists.
- getOption(String, String) - Method in class acm.util.OptionTable
-
Returns the value associated with key
in the option table or the
specified default value if no such binding exists.
- getOutputModel() - Method in class acm.program.Program
-
Returns the IOModel
used for program output, which will
ordinarily be the console.
- getParameter(String) - Method in class acm.program.Program
-
Returns the parameter associated with name.
- getParameterTable() - Method in class acm.program.Program
-
Retrieves the parameter table.
- getParent() - Method in class acm.graphics.GObject
-
Returns the parent of this object, which is the canvas or compound object in
which it is enclosed.
- getPenBounds() - Method in class acm.graphics.GPen
-
This method returns the bounds that the pen occupies.
- getPenImage() - Method in class acm.graphics.GPen
-
Returns the image used to draw the pen when setPenVisible
has
been called.
- getPixelArray() - Method in class acm.graphics.GImage
-
Returns a two-dimensional array of pixel values from the stored image.
- getPixelArray(Image) - Static method in class acm.util.MediaTools
-
Returns a two-dimensional array of the pixels in the image.
- getPlatform() - Static method in class acm.util.Platform
-
Returns an enumeration constant specifying the type of platform on which this
applet is running, which is one of the supported types defined at the
beginning of this class.
- getPolygon() - Method in class acm.graphics.GPolygon
-
Returns an AWT Polygon
whose points are as close as possible to
the ones in this GPolygon
.
- getPreferredSize() - Method in class acm.gui.DoubleField
-
Overrides the standard definition to impose a target size.
- getPreferredSize() - Method in class acm.gui.IntField
-
Overrides the standard definition to impose a target size.
- getPreferredSize() - Method in class acm.io.IOConsole
-
Overrides the getPreferredSize
method to ensure that an
IOConsole
is not too large.
- getProgram() - Method in class acm.program.ProgramMenuBar
-
Returns the Program
object associated with this menu.
- getProgramMenuBar() - Method in class acm.program.Program
-
Returns the menu bar associated with this program.
- getReader() - Method in class acm.io.IOConsole
-
Returns a BufferedReader
object that can be used to read from
the console.
- getReader() - Method in class acm.program.Program
-
Returns a BufferedReader
whose input comes from the console.
- getRed(int) - Static method in class acm.graphics.GImage
-
Returns the red component from an RGB value.
- getRegionPanel(String) - Method in class acm.program.Program
-
Gets the JPanel
for the specified region.
- getRowCount() - Method in class acm.gui.TableLayout
-
Returns the number of rows in the table.
- getSize() - Method in class acm.graphics.GDimension
-
Returns a new GDimension
object equal to this one.
- getSize() - Method in class acm.graphics.GImage
-
Returns the size of this object as a GDimension
.
- getSize() - Method in class acm.graphics.GObject
-
Returns the size of the bounding box for this object.
- getSize() - Method in class acm.graphics.GOval
-
Returns the size of this object as a GDimension
.
- getSize() - Method in class acm.graphics.GRect
-
Returns the size of this object as a GDimension
.
- getSize() - Method in class acm.graphics.GRectangle
-
Returns a new GDimension
object with the size of the
GRectangle
.
- getSpeed() - Method in class acm.graphics.GPen
-
Returns the current speed of the pen.
- getSpeed() - Method in class acm.graphics.GTurtle
-
Returns the current speed of the turtle.
- getSpeed() - Method in class acm.util.Animator
-
Returns the speed parameter for the animator.
- getSpeedBar() - Method in class acm.util.Animator
-
Returns the speed bar for the animator, if any.
- getStandardFont(Font) - Static method in class acm.util.JTFTools
-
Returns a font that will approximate the specified font in this environment.
- getStartAngle() - Method in class acm.graphics.GArc
-
Returns the starting angle for this GArc
object.
- getStartPoint() - Method in class acm.graphics.GArc
-
Returns the point at which the arc starts.
- getStartPoint() - Method in class acm.graphics.GLine
-
Returns the coordinates of the initial point in the line.
- getStartupObject() - Method in class acm.program.Program
-
Retrieves the object that was created when this program was started if that
object is something other than a Program
.
- getSweepAngle() - Method in class acm.graphics.GArc
-
Returns the sweep angle for this GArc
object.
- getTurtleBounds() - Method in class acm.graphics.GTurtle
-
This method returns the bounds that the turtle occupies.
- getTurtleSize() - Method in class acm.graphics.GTurtle
-
Returns the size of the turtle.
- getValue() - Method in class acm.gui.DoubleField
-
Returns the value of this field as a double
.
- getValue() - Method in class acm.gui.IntField
-
Returns the value of this field as a int
.
- getVerticalAlignment() - Method in class acm.gui.TableLayout
-
Returns the vertical alignment for the table.
- getVerticalAlignment() - Method in class acm.gui.TablePanel
-
Returns the vertical alignment for the table.
- getVgap() - Method in class acm.gui.TableLayout
-
Returns the vertical gap between components.
- getVgap() - Method in class acm.gui.TablePanel
-
Returns the vertical gap between components.
- getWeightX() - Method in class acm.gui.TableConstraints
-
Returns the weightx
field from the constraint.
- getWeightY() - Method in class acm.gui.TableConstraints
-
Returns the weighty
field from the constraint.
- getWidth() - Method in class acm.graphics.GCanvas
-
Returns the width of this canvas in pixels.
- getWidth() - Method in class acm.graphics.GDimension
-
Returns the width of this GDimension
.
- getWidth() - Method in class acm.graphics.GLabel
-
Returns the width of this string, as it appears on the display.
- getWidth() - Method in class acm.graphics.GObject
-
Returns the width of this object, which is defined to be the width of the
bounding box.
- getWidth() - Method in class acm.graphics.GOval
-
Returns the width of this object as a double-precision value, which is
defined to be the width of the bounding box.
- getWidth() - Method in class acm.graphics.GRect
-
Returns the width of this object as a double-precision value, which is
defined to be the width of the bounding box.
- getWidth() - Method in class acm.graphics.GRectangle
-
Returns the width of this GDimension
.
- getWidth() - Method in class acm.gui.TableConstraints
-
Returns the width
field from the constraint.
- getWriter() - Method in class acm.io.IOConsole
-
Returns a PrintWriter
object that can be used to send output to
the console.
- getWriter() - Method in class acm.program.Program
-
Returns a PrintWriter
whose output is directed to the console.
- getX() - Method in class acm.graphics.GObject
-
Returns the x-coordinate of the object.
- getX() - Method in class acm.graphics.GPoint
-
Returns the x coordinate of this GPoint
.
- getX() - Method in class acm.graphics.GRectangle
-
Returns the x coordinate of this GRectangle
.
- getY() - Method in class acm.graphics.GObject
-
Returns the y-coordinate of the object.
- getY() - Method in class acm.graphics.GPoint
-
Returns the y coordinate of this GPoint
.
- getY() - Method in class acm.graphics.GRectangle
-
Returns the y coordinate of this GRectangle
.
- GFillable - Interface in acm.graphics
-
Specifies the characteristics of a graphical object that supports filling.
- GImage - Class in acm.graphics
-
The GImage
class is a graphical object whose appearance is
defined by an image.
- GImage(Image) - Constructor for class acm.graphics.GImage
-
Creates a new GImage
object at the origin that displays the
specified image.
- GImage(String) - Constructor for class acm.graphics.GImage
-
Creates a new GImage
object by looking for an image with that
name.
- GImage(int[][]) - Constructor for class acm.graphics.GImage
-
Creates a new GImage
object at the origin.
- GImage(Image, double, double) - Constructor for class acm.graphics.GImage
-
Creates a new GImage
object at the specified coordinates.
- GImage(String, double, double) - Constructor for class acm.graphics.GImage
-
Creates a new GImage
object at the specified coordinates.
- GImage(int[][], double, double) - Constructor for class acm.graphics.GImage
-
Creates a new GImage
object at the specified coordinates.
- GLabel - Class in acm.graphics
-
The GLabel
class is a graphical object whose appearance consists
of a text string.
- GLabel(String) - Constructor for class acm.graphics.GLabel
-
Creates a new GLabel
object initialized to contain the specified
string.
- GLabel(String, double, double) - Constructor for class acm.graphics.GLabel
-
Creates a new GLabel
object with its baseline origin at the
specified position.
- GLine - Class in acm.graphics
-
The GLine
class is a graphical object whose appearance consists
of a line segment.
- GLine(double, double, double, double) - Constructor for class acm.graphics.GLine
-
Constructs a line segment from its endpoints.
- GMath - Class in acm.graphics
-
This class defines a variety of static mathematical methods that are useful
for the acm.graphics
package.
- GObject - Class in acm.graphics
-
This class is the common superclass of all graphical objects that can be
displayed on a
GCanvas
.
- GObject() - Constructor for class acm.graphics.GObject
-
Constructs a new GObject
and initializes its state.
- GOval - Class in acm.graphics
-
The GOval
class is a graphical object whose appearance consists
of an oval.
- GOval(double, double) - Constructor for class acm.graphics.GOval
-
Constructs a new oval with the specified width and height, positioned at the
origin.
- GOval(double, double, double, double) - Constructor for class acm.graphics.GOval
-
Constructs a new oval with the specified bounds.
- GPen - Class in acm.graphics
-
The GPen
class simulates a pen drawing on a canvas.
- GPen() - Constructor for class acm.graphics.GPen
-
Creates a new GPen
object with an empty path.
- GPen(double, double) - Constructor for class acm.graphics.GPen
-
Creates a new GPen
object with an empty path, initially
positioned at the point (x
, y
).
- GPoint - Class in acm.graphics
-
This class is a double-precision version of the Point
class in
java.awt
.
- GPoint() - Constructor for class acm.graphics.GPoint
-
Constructs a new GPoint
at the origin (0, 0).
- GPoint(double, double) - Constructor for class acm.graphics.GPoint
-
Constructs a new GPoint
with the specified coordinates.
- GPoint(GPoint) - Constructor for class acm.graphics.GPoint
-
Constructs a new GPoint
from an existing one.
- GPoint(Point) - Constructor for class acm.graphics.GPoint
-
Constructs a new GPoint
from an existing AWT Point
.
- GPolygon - Class in acm.graphics
-
The GPolygon
class is a graphical object whose appearance
consists of a polygon.
- GPolygon() - Constructor for class acm.graphics.GPolygon
-
Constructs a new empty polygon at the origin.
- GPolygon(double, double) - Constructor for class acm.graphics.GPolygon
-
Constructs a new empty polygon at (x
, y
).
- GPolygon(GPoint[]) - Constructor for class acm.graphics.GPolygon
-
Constructs a new polygon from the specified array of GPoint
objects.
- GraphicsProgram - Class in acm.program
-
This class is a standard subclass of
Program
whose principal window is
used for drawing graphics.
- GraphicsProgram() - Constructor for class acm.program.GraphicsProgram
-
Creates a new graphics program.
- GRect - Class in acm.graphics
-
The GRect
class is a graphical object whose appearance consists
of a rectangular box.
- GRect(double, double) - Constructor for class acm.graphics.GRect
-
Constructs a new rectangle with the specified width and height, positioned at
the origin.
- GRect(double, double, double, double) - Constructor for class acm.graphics.GRect
-
Constructs a new rectangle with the specified bounds.
- GRectangle - Class in acm.graphics
-
This class is a double-precision version of the Rectangle
class
in java.awt
.
- GRectangle() - Constructor for class acm.graphics.GRectangle
-
Constructs a new empty GRectangle
.
- GRectangle(double, double, double, double) - Constructor for class acm.graphics.GRectangle
-
Constructs a new GRectangle
with the specified coordinates and
size.
- GRectangle(double, double) - Constructor for class acm.graphics.GRectangle
-
Constructs a GRectangle
at the origin with the specified width
and height.
- GRectangle(GPoint, GDimension) - Constructor for class acm.graphics.GRectangle
-
Constructs a new GRectangle
with the specified location and
size.
- GRectangle(GPoint) - Constructor for class acm.graphics.GRectangle
-
Constructs a new empty GRectangle
at the specified location.
- GRectangle(GDimension) - Constructor for class acm.graphics.GRectangle
-
Constructs a new GRectangle
at the origin with the specified
size.
- GRectangle(GRectangle) - Constructor for class acm.graphics.GRectangle
-
Constructs a new GRectangle
from an existing one.
- GResizable - Interface in acm.graphics
-
Specifies the characteristics of a graphical object that supports the
setSize
and setBounds
methods.
- GRoundRect - Class in acm.graphics
-
The GRoundRect
class is a graphical object whose appearance
consists of a rounded rectangle.
- GRoundRect(double, double) - Constructor for class acm.graphics.GRoundRect
-
Constructs a new rounded rectangle with the specified width and height,
positioned at the origin.
- GRoundRect(double, double, double, double) - Constructor for class acm.graphics.GRoundRect
-
Constructs a new rounded rectangle with the specified bounds.
- GRoundRect(double, double, double, double, double) - Constructor for class acm.graphics.GRoundRect
-
Constructs a new rounded rectangle with the specified bounds and a single
parameter describing both the describing the curvature at the corners.
- GRoundRect(double, double, double, double, double, double) - Constructor for class acm.graphics.GRoundRect
-
Constructs a new rounded rectangle with the specified bounds and arc
parameters describing the curvature at the corners.
- grow(double, double) - Method in class acm.graphics.GRectangle
-
Adjusts the edges of a rectangle by the specified dx
and
dy
offsets along each of its borders.
- GScalable - Interface in acm.graphics
-
Specifies the characteristics of a graphical object that supports the
scale
method.
- GTurtle - Class in acm.graphics
-
The GTurtle
class simulates a turtle moving on a canvas.
- GTurtle() - Constructor for class acm.graphics.GTurtle
-
Creates a new GTurtle
object.
- GTurtle(double, double) - Constructor for class acm.graphics.GTurtle
-
Creates a new GTurtle
positioned at the point (x
,
y
).
- padBase64OutputStream(OutputStream) - Static method in class acm.util.JTFTools
-
Pads the data in the specified output stream without closing it.
- paint(Graphics) - Method in class acm.graphics.G3DRect
-
- paint(Graphics) - Method in class acm.graphics.GArc
-
- paint(Graphics) - Method in class acm.graphics.GCanvas
-
Paints the canvas.
- paint(Graphics) - Method in class acm.graphics.GCompound
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GImage
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GLabel
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GLine
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GObject
-
All subclasses of GObject
must define a paint
method which allows the object to draw itself on the Graphics
context passed in as the parameter g
.
- paint(Graphics) - Method in class acm.graphics.GOval
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GPen
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GPolygon
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GRect
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GRoundRect
-
Implements the paint
operation for this graphical object.
- paint(Graphics) - Method in class acm.graphics.GTurtle
-
Implements the paint
operation for this graphical object.
- paintObject(Graphics) - Method in class acm.graphics.GObject
-
Paints the object by setting up the necessary parameters and then dispatching
to the paint
procedure for this object.
- paramString() - Method in class acm.graphics.GArc
-
- paramString() - Method in class acm.graphics.GLabel
-
Returns a string indicating the parameters of this object.
- paramString() - Method in class acm.graphics.GLine
-
Returns a string indicating the parameters of this object.
- paramString() - Method in class acm.graphics.GObject
-
Returns a string indicating the parameters of this object.
- paste() - Method in class acm.io.IOConsole
-
Implements the "Paste" menu operation.
- pause(double) - Method in class acm.graphics.GObject
-
Delays the calling thread for the specified time, which is expressed in
milliseconds.
- pause(double) - Method in class acm.program.Program
-
Delays the calling thread for the specified time, which is expressed in
milliseconds.
- pause(double) - Method in class acm.util.Animator
-
Delays this thread for the specified time, which is expressed in
milliseconds.
- pause(double) - Static method in class acm.util.JTFTools
-
Delays the calling thread for the specified time, which is expressed in
milliseconds.
- penDown() - Method in class acm.graphics.GTurtle
-
Lowers the pen.
- penUp() - Method in class acm.graphics.GTurtle
-
Raises the pen.
- Platform - Class in acm.util
-
This class contains methods to support platform-specific code.
- preferredLayoutSize(Container) - Method in class acm.gui.TableLayout
-
Calculates the preferred size for the FrameLayout
component when
laid out in the target
container.
- print(String) - Method in class acm.io.IOConsole
-
Displays the argument value on the console, leaving the cursor at the end of
the output.
- print(boolean) - Method in class acm.io.IOConsole
-
Makes sure that print
can display a boolean
.
- print(char) - Method in class acm.io.IOConsole
-
Makes sure that print
can display a char
.
- print(double) - Method in class acm.io.IOConsole
-
Makes sure that print
can display a double
.
- print(float) - Method in class acm.io.IOConsole
-
Makes sure that print
can display a float
.
- print(int) - Method in class acm.io.IOConsole
-
Makes sure that print
can display an int
.
- print(long) - Method in class acm.io.IOConsole
-
Makes sure that print
can display a long
.
- print(Object) - Method in class acm.io.IOConsole
-
Makes sure that print
can display an Object
.
- print(String) - Method in class acm.io.IODialog
-
Displays the argument value, allowing for the possibility of more output in
the same dialog.
- print(boolean) - Method in class acm.io.IODialog
-
Makes sure that print
can display a boolean
.
- print(char) - Method in class acm.io.IODialog
-
Makes sure that print
can display a char
.
- print(double) - Method in class acm.io.IODialog
-
Makes sure that print
can display a double
.
- print(float) - Method in class acm.io.IODialog
-
Makes sure that print
can display a float
.
- print(int) - Method in class acm.io.IODialog
-
Makes sure that print
can display an int
.
- print(long) - Method in class acm.io.IODialog
-
Makes sure that print
can display a long
.
- print(Object) - Method in class acm.io.IODialog
-
Makes sure that print
can display an Object
.
- print(String) - Method in interface acm.io.IOModel
-
Displays the argument value, allowing for the possibility of more output on
the same line.
- print(boolean) - Method in interface acm.io.IOModel
-
Makes sure that print
can display a boolean
.
- print(char) - Method in interface acm.io.IOModel
-
Makes sure that print
can display a char
.
- print(double) - Method in interface acm.io.IOModel
-
Makes sure that print
can display a double
.
- print(float) - Method in interface acm.io.IOModel
-
Makes sure that print
can display a float
.
- print(int) - Method in interface acm.io.IOModel
-
Makes sure that print
can display an int
.
- print(long) - Method in interface acm.io.IOModel
-
Makes sure that print
can display a long
.
- print(Object) - Method in interface acm.io.IOModel
-
Makes sure that print
can display an Object
.
- print(String) - Method in class acm.program.Program
-
Displays the argument value on the console, leaving the cursor at the end of
the output.
- print(boolean) - Method in class acm.program.Program
-
Makes sure that print
can display a boolean
.
- print(char) - Method in class acm.program.Program
-
Makes sure that print
can display a char
.
- print(double) - Method in class acm.program.Program
-
Makes sure that print
can display a double
.
- print(float) - Method in class acm.program.Program
-
Makes sure that print
can display a float
.
- print(int) - Method in class acm.program.Program
-
Makes sure that print
can display an int
.
- print(long) - Method in class acm.program.Program
-
Makes sure that print
can display a long
.
- print(Object) - Method in class acm.program.Program
-
Makes sure that print
can display an Object
.
- printConsole() - Method in class acm.io.IOConsole
-
Implements the "Print Console" menu operation.
- printConsole(PrintJob) - Method in class acm.io.IOConsole
-
Prints the console output using the specified PrintJob
object.
- println() - Method in class acm.io.IOConsole
-
Advances the console cursor to the beginning of the next line.
- println(String) - Method in class acm.io.IOConsole
-
Displays the argument value on the console and then advances the cursor to
the beginning of the next line.
- println(boolean) - Method in class acm.io.IOConsole
-
Makes sure that println
can display a boolean
.
- println(char) - Method in class acm.io.IOConsole
-
Makes sure that println
can display a char
.
- println(double) - Method in class acm.io.IOConsole
-
Makes sure that println
can display a double
.
- println(float) - Method in class acm.io.IOConsole
-
Makes sure that println
can display a float
.
- println(int) - Method in class acm.io.IOConsole
-
Makes sure that println
can display an int
.
- println(long) - Method in class acm.io.IOConsole
-
Makes sure that println
can display a long
.
- println(Object) - Method in class acm.io.IOConsole
-
Makes sure that println
can display an Object
.
- println() - Method in class acm.io.IODialog
-
Completes the output line and displays the dialog.
- println(String) - Method in class acm.io.IODialog
-
Adds the value to the current output line and then displays the dialog.
- println(boolean) - Method in class acm.io.IODialog
-
Makes sure that println
can display a boolean
.
- println(char) - Method in class acm.io.IODialog
-
Makes sure that println
can display a char
.
- println(double) - Method in class acm.io.IODialog
-
Makes sure that println
can display a double
.
- println(float) - Method in class acm.io.IODialog
-
Makes sure that println
can display a float
.
- println(int) - Method in class acm.io.IODialog
-
Makes sure that println
can display an int
.
- println(long) - Method in class acm.io.IODialog
-
Makes sure that println
can display a long
.
- println(Object) - Method in class acm.io.IODialog
-
Makes sure that println
can display an Object
.
- println() - Method in interface acm.io.IOModel
-
Completes the output line.
- println(String) - Method in interface acm.io.IOModel
-
Displays the value and then completes the line.
- println(boolean) - Method in interface acm.io.IOModel
-
Makes sure that println
can display a boolean
.
- println(char) - Method in interface acm.io.IOModel
-
Makes sure that println
can display a char
.
- println(double) - Method in interface acm.io.IOModel
-
Makes sure that println
can display a double
.
- println(float) - Method in interface acm.io.IOModel
-
Makes sure that println
can display a float
.
- println(int) - Method in interface acm.io.IOModel
-
Makes sure that println
can display an int
.
- println(long) - Method in interface acm.io.IOModel
-
Makes sure that println
can display a long
.
- println(Object) - Method in interface acm.io.IOModel
-
Makes sure that println
can display an Object
.
- println() - Method in class acm.program.Program
-
Advances the console cursor to the beginning of the next line.
- println(String) - Method in class acm.program.Program
-
Displays the argument value on the console and then advances the cursor to
the beginning of the next line.
- println(boolean) - Method in class acm.program.Program
-
Makes sure that println
can display a boolean
.
- println(char) - Method in class acm.program.Program
-
Makes sure that println
can display a char
.
- println(double) - Method in class acm.program.Program
-
Makes sure that println
can display a double
.
- println(float) - Method in class acm.program.Program
-
Makes sure that println
can display a float
.
- println(int) - Method in class acm.program.Program
-
Makes sure that println
can display an int
.
- println(long) - Method in class acm.program.Program
-
Makes sure that println
can display a long
.
- println(Object) - Method in class acm.program.Program
-
Makes sure that println
can display an Object
.
- Program - Class in acm.program
-
This class is the superclass for all executable programs in the
acm.program
package.
- Program() - Constructor for class acm.program.Program
-
This code initializes the program data structures.
- ProgramMenuBar - Class in acm.program
-
This class standardizes the menu bars used in the ACM program package.
- ProgramMenuBar(Program) - Constructor for class acm.program.ProgramMenuBar
-
Creates an empty ProgramMenuBar
.
- RandomGenerator - Class in acm.util
-
This class implements a simple random number generator that allows clients to
generate pseudorandom integers, doubles, booleans, and colors.
- RandomGenerator() - Constructor for class acm.util.RandomGenerator
-
Creates a new random generator.
- readBoolean() - Method in class acm.io.IOConsole
-
Reads and returns a boolean value from the user, which must match either
true
or false
, ignoring case.
- readBoolean(String) - Method in class acm.io.IOConsole
-
Prompts the user to enter a boolean value, which is then returned as the
value of this method.
- readBoolean(String, String, String) - Method in class acm.io.IOConsole
-
Prompts the user to enter a value, which is interpreted as a boolean value by
matching it against the trueLabel
and falseLabel
parameters.
- readBoolean() - Method in class acm.io.IODialog
-
Reads and returns a boolean value from the user, which must match either
true
or false
, ignoring case.
- readBoolean(String) - Method in class acm.io.IODialog
-
Prompts the user to enter a boolean value, which is then returned as the
value of this method.
- readBoolean(String, String, String) - Method in class acm.io.IODialog
-
Prompts the user to enter a value, which is interpreted as a boolean value by
matching it against the trueLabel
and falseLabel
parameters.
- readBoolean() - Method in interface acm.io.IOModel
-
Reads and returns a boolean value from the user, which must match either
true
or false
, ignoring case.
- readBoolean(String) - Method in interface acm.io.IOModel
-
Prompts the user to enter a boolean value, which is then returned as the
value of this method.
- readBoolean(String, String, String) - Method in interface acm.io.IOModel
-
Prompts the user to enter a value, which is interpreted as a boolean value by
matching it against the trueLabel
and falseLabel
parameters.
- readBoolean() - Method in class acm.program.Program
-
Reads and returns a boolean value (true
or false
).
- readBoolean(String) - Method in class acm.program.Program
-
Prompts the user to enter a boolean value, which is returned as the value of
this method.
- readBoolean(String, String, String) - Method in class acm.program.Program
-
Prompts the user to enter a boolean value, which is matched against the
labels provided.
- readDouble() - Method in class acm.io.IOConsole
-
Reads and returns a double-precision value from the user.
- readDouble(double, double) - Method in class acm.io.IOConsole
-
Reads and returns a double-precision value from the user, which is
constrained to be within the specified inclusive range.
- readDouble(String) - Method in class acm.io.IOConsole
-
Prompts the user to enter an double-precision number, which is then returned
as the value of this method.
- readDouble(String, double, double) - Method in class acm.io.IOConsole
-
Prompts the user to enter an double-precision number, which is then returned
as the value of this method.
- readDouble() - Method in class acm.io.IODialog
-
Reads and returns a double-precision value from the user.
- readDouble(double, double) - Method in class acm.io.IODialog
-
Reads and returns a double-precision value from the user, which is
constrained to be within the specified inclusive range.
- readDouble(String) - Method in class acm.io.IODialog
-
Prompts the user to enter an double-precision number, which is then returned
as the value of this method.
- readDouble(String, double, double) - Method in class acm.io.IODialog
-
Prompts the user to enter an double-precision number, which is then returned
as the value of this method.
- readDouble() - Method in interface acm.io.IOModel
-
Reads and returns a double-precision value from the user.
- readDouble(double, double) - Method in interface acm.io.IOModel
-
Reads and returns a double-precision value from the user, which is
constrained to be within the specified inclusive range.
- readDouble(String) - Method in interface acm.io.IOModel
-
Prompts the user to enter an double-precision number, which is then returned
as the value of this method.
- readDouble(String, double, double) - Method in interface acm.io.IOModel
-
Prompts the user to enter an double-precision number, which is then returned
as the value of this method.
- readDouble() - Method in class acm.program.Program
-
Reads and returns a double-precision value from the user.
- readDouble(double, double) - Method in class acm.program.Program
-
Reads and returns a double-precision value from the user, which is
constrained to be within the specified inclusive range.
- readDouble(String) - Method in class acm.program.Program
-
Prompts the user to enter an double-precision number, which is then returned
as the value of this method.
- readDouble(String, double, double) - Method in class acm.program.Program
-
Prompts the user to enter an double-precision number, which is then returned
as the value of this method.
- readInt() - Method in class acm.io.IOConsole
-
Reads and returns an integer value from the user.
- readInt(int, int) - Method in class acm.io.IOConsole
-
Reads and returns an integer value from the user, which is constrained to be
within the specified inclusive range.
- readInt(String) - Method in class acm.io.IOConsole
-
Prompts the user to enter an integer, which is then returned as the value of
this method.
- readInt(String, int, int) - Method in class acm.io.IOConsole
-
Prompts the user to enter an integer, which is then returned as the value of
this method.
- readInt() - Method in class acm.io.IODialog
-
Reads and returns an integer value from the user.
- readInt(int, int) - Method in class acm.io.IODialog
-
Reads and returns an integer value from the user, which is constrained to be
within the specified inclusive range.
- readInt(String) - Method in class acm.io.IODialog
-
Prompts the user to enter an integer, which is then returned as the value of
this method.
- readInt(String, int, int) - Method in class acm.io.IODialog
-
Prompts the user to enter an integer, which is then returned as the value of
this method.
- readInt() - Method in interface acm.io.IOModel
-
Reads and returns an integer value from the user.
- readInt(int, int) - Method in interface acm.io.IOModel
-
Reads and returns an integer value from the user, which is constrained to be
within the specified inclusive range.
- readInt(String) - Method in interface acm.io.IOModel
-
Prompts the user to enter an integer, which is then returned as the value of
this method.
- readInt(String, int, int) - Method in interface acm.io.IOModel
-
Prompts the user to enter an integer, which is then returned as the value of
this method.
- readInt() - Method in class acm.program.Program
-
Reads and returns an integer value from the user.
- readInt(int, int) - Method in class acm.program.Program
-
Reads and returns an integer value from the user, which is constrained to be
within the specified inclusive range.
- readInt(String) - Method in class acm.program.Program
-
Prompts the user to enter an integer, which is then returned as the value of
this method.
- readInt(String, int, int) - Method in class acm.program.Program
-
Prompts the user to enter an integer, which is then returned as the value of
this method.
- readLine() - Method in class acm.io.IOConsole
-
Reads and returns a line of input from the console, without including the
end-of-line characters that terminate the input.
- readLine(String) - Method in class acm.io.IOConsole
-
Prompts the user to enter a line of text, which is then returned as the value
of this method.
- readLine() - Method in class acm.io.IODialog
-
Reads and returns a line of input from the dialog, without including the
end-of-line characters that terminate the input.
- readLine(String) - Method in class acm.io.IODialog
-
Prompts the user to enter a single character, which is then returned as the
value of this method.
- readLine() - Method in interface acm.io.IOModel
-
Reads and returns a line of input, without including the end-of-line
characters that terminate the input.
- readLine(String) - Method in interface acm.io.IOModel
-
Prompts the user to enter a line of text, which is then returned as the value
of this method.
- readLine() - Method in class acm.program.Program
-
Reads and returns a line of input from the console.
- readLine(String) - Method in class acm.program.Program
-
Prompts the user for a line of input.
- recenter() - Method in class acm.graphics.GPolygon
-
Recalculates the vertices of the polygon so that they are positioned relative
to the geometric center of the object.
- registerSpeedBar(JSlider) - Method in class acm.util.Animator
-
Registers the specified slider as the delay controller for the animator.
- registerSpeedBar(JScrollBar) - Method in class acm.util.Animator
-
Registers the specified scroll bar as the delay controller for the animator.
- remove(GObject) - Method in class acm.graphics.GCanvas
-
Removes a graphical object from this GCanvas
.
- remove(Component) - Method in class acm.graphics.GCanvas
-
Removes the component from the canvas.
- remove(GObject) - Method in class acm.graphics.GCompound
-
Removes a graphical object from this GCompound
.
- remove(GObject) - Method in interface acm.graphics.GContainer
-
Removes a graphical object from this container.
- remove(GObject) - Method in class acm.program.GraphicsProgram
-
Removes a graphical object from this container.
- remove(int) - Method in class acm.program.Program
-
Removes the component at the specified index from the central region.
- remove(Component) - Method in class acm.program.Program
-
Removes the specified component from the central region.
- removeActionListener(ActionListener) - Method in class acm.graphics.GObject
-
Removes an action listener from this graphical object.
- removeAll() - Method in class acm.graphics.GCanvas
-
Removes all graphical objects from this GCanvas
.
- removeAll() - Method in class acm.graphics.GCompound
-
Removes all graphical objects from this GCompound
.
- removeAll() - Method in interface acm.graphics.GContainer
-
Removes all graphical objects from this container.
- removeAll() - Method in class acm.program.GraphicsProgram
-
Removes all graphical objects from this container.
- removeAll() - Method in class acm.program.Program
-
Removes all components from the central region.
- removeAllComponents() - Method in class acm.program.GraphicsProgram
-
Removes all components from this container.
- removeLayoutComponent(Component) - Method in class acm.gui.TableLayout
-
Removes the specified component from the layout.
- removeMouseListener(MouseListener) - Method in class acm.graphics.GObject
-
Removes a mouse listener from this graphical object.
- removeMouseMotionListener(MouseMotionListener) - Method in class acm.graphics.GObject
-
Removes a mouse motion listener from this graphical object.
- repaint() - Method in class acm.graphics.GObject
-
Signals that the object needs to be repainted.
- repaint() - Method in class acm.graphics.GPolygon
-
Overrides repaint
in GObject
to invalidate the
cached polygon.
- repaint() - Method in class acm.program.GraphicsProgram
-
Signals a need to repaint this window.
- repaint() - Method in class acm.program.Program
-
Forwards repaint to the content pane.
- requestFocus() - Method in class acm.io.IOConsole
-
Overrides the requestFocus
method so that it forwards to the
console model.
- requestTermination() - Method in class acm.util.Animator
-
Signals the Animator
that it should stop running at the next
available opportunity, which is when the client next calls pause
or checkForTermination
.
- resumeHook() - Method in class acm.util.Animator
-
This method is called before the animator starts or restarts after a
breakpoint.
- right(double) - Method in class acm.graphics.GTurtle
-
Changes the direction of the turtle so that it moves the specified number of
degrees to the right.
- RIGHT - Static variable in class acm.gui.TableLayout
-
Align table horizontally at the right of its container
- RIGHT - Static variable in class acm.gui.TablePanel
-
Align table horizontally at the right of its container
- rotate(double) - Method in class acm.graphics.GPolygon
-
Rotates the polygon around its origin by the angle theta, measured in
degrees.
- round(double) - Static method in class acm.graphics.GMath
-
Rounds a double
value to the nearest int
.
- run() - Method in class acm.program.ConsoleProgram
-
Specifies the code to be executed as the program runs.
- run() - Method in class acm.program.DialogProgram
-
Specifies the code to be executed as the program runs.
- run() - Method in class acm.program.GraphicsProgram
-
Specifies the code to be executed as the program runs.
- run() - Method in class acm.program.Program
-
Specifies the code to be executed as the program runs.
- run() - Method in class acm.util.Animator
-
Specifies the code for the animator.
- runHook() - Method in class acm.program.Program
-
Calls the run method in the program.
- RUNNING - Static variable in class acm.util.Animator
-
Constant indicating that the animator is running.
- save() - Method in class acm.io.IOConsole
-
Implements the "Save" menu operation.
- save(Writer) - Method in class acm.io.IOConsole
-
Copies the console output to the specified writer.
- saveAs() - Method in class acm.io.IOConsole
-
Implements the "Save As" menu operation.
- saveImage(String) - Method in class acm.graphics.GImage
-
Saves the image to a file with the specified filename.
- saveImage(File) - Method in class acm.graphics.GImage
-
Saves the image to the specified file.
- saveImage(Image, String) - Static method in class acm.util.MediaTools
-
Saves an image to a file with the specified filename.
- saveImage(Image, File) - Static method in class acm.util.MediaTools
-
Saves an image to the specified file.
- scale(double, double) - Method in class acm.graphics.GArc
-
- scale(double) - Method in class acm.graphics.GArc
-
- scale(double, double) - Method in class acm.graphics.GCompound
-
Scales every object contained in this compound by the scale factors
sx
and sy
.
- scale(double) - Method in class acm.graphics.GCompound
-
Scales the object on the screen by the scale factor sf
, which
applies in both dimensions.
- scale(double, double) - Method in class acm.graphics.GImage
-
Scales the object on the screen by the scale factors sx
and
sy
.
- scale(double) - Method in class acm.graphics.GImage
-
Scales the object on the screen by the scale factor sf
, which
applies in both dimensions.
- scale(double, double) - Method in class acm.graphics.GLine
-
Scales the line on the screen by the scale factors sx
and
sy
.
- scale(double) - Method in class acm.graphics.GLine
-
Scales the object on the screen by the scale factor sf
, which
applies in both dimensions.
- scale(double, double) - Method in class acm.graphics.GOval
-
Scales the object on the screen by the scale factors sx
and
sy
.
- scale(double) - Method in class acm.graphics.GOval
-
Scales the object on the screen by the scale factor sf
, which
applies in both dimensions.
- scale(double, double) - Method in class acm.graphics.GPen
-
Sets the scale factors sx
and sy
.
- scale(double, double) - Method in class acm.graphics.GPolygon
-
Scales the polygon by the scale factors sx
and sy
.
- scale(double) - Method in class acm.graphics.GPolygon
-
Scales the object on the screen by the scale factor sf
, which
applies in both dimensions.
- scale(double, double) - Method in class acm.graphics.GRect
-
Scales the object on the screen by the scale factors sx
and
sy
.
- scale(double) - Method in class acm.graphics.GRect
-
Scales the object on the screen by the scale factor sf
, which
applies in both dimensions.
- scale(double, double) - Method in interface acm.graphics.GScalable
-
Scales the object on the screen by the scale factors sx
and
sy
.
- scale(double) - Method in interface acm.graphics.GScalable
-
Scales the object on the screen by the scale factor sf
, which
applies in both dimensions.
- script() - Method in class acm.io.IOConsole
-
Implements the "Script" menu operation.
- selectAll() - Method in class acm.io.IOConsole
-
Implements the "Select All" menu operation.
- sendBackward(GObject) - Method in class acm.graphics.GCanvas
-
Implements the sendBackward
function from the
GContainer
interface.
- sendBackward(GObject) - Method in class acm.graphics.GCompound
-
Implements the sendBackward
function from the
GContainer
interface.
- sendBackward() - Method in class acm.graphics.GObject
-
Moves this object one step toward the back in the z dimension.
- sendForward(GObject) - Method in class acm.graphics.GCanvas
-
Implements the sendForward
function from the
GContainer
interface.
- sendForward(GObject) - Method in class acm.graphics.GCompound
-
Implements the sendForward
function from the
GContainer
interface.
- sendForward() - Method in class acm.graphics.GObject
-
Moves this object one step toward the front in the z dimension.
- sendToBack(GObject) - Method in class acm.graphics.GCanvas
-
Implements the sendToBack
function from the
GContainer
interface.
- sendToBack(GObject) - Method in class acm.graphics.GCompound
-
Implements the sendToBack
function from the
GContainer
interface.
- sendToBack() - Method in class acm.graphics.GObject
-
Moves this object to the back of the display in the z dimension.
- sendToFront(GObject) - Method in class acm.graphics.GCanvas
-
Implements the sendToFront
function from the
GContainer
interface.
- sendToFront(GObject) - Method in class acm.graphics.GCompound
-
Implements the sendToFront
function from the
GContainer
interface.
- sendToFront() - Method in class acm.graphics.GObject
-
Moves this object to the front of the display in the z dimension.
- setAccelerator(JMenuItem, int) - Method in class acm.program.ProgramMenuBar
-
Sets the accelerator for the item as appropriate to the operating system
conventions.
- setAllowCancel(boolean) - Method in class acm.io.IODialog
-
Sets the cancellation mode of the dialog as specified by the
flag
parameter.
- setAssociatedConsole(IOConsole) - Method in class acm.io.IODialog
-
Establishes an associated console for the dialog.
- setAutoRepaintFlag(boolean) - Method in class acm.graphics.GCanvas
-
Changes the setting of the auto-repaint flag.
- setBackground(Color) - Method in class acm.io.IOConsole
-
Sets the background color used for the console.
- setBackground(Color) - Method in class acm.program.GraphicsProgram
-
Sets the background color of the GCanvas
.
- setBackground(Color) - Method in class acm.program.Program
-
Sets the background for the central region of the content pane.
- setBounds(double, double, double, double) - Method in class acm.graphics.GImage
-
Changes the bounds of this object to the specified values.
- setBounds(GRectangle) - Method in class acm.graphics.GImage
-
Changes the bounds of this object to the values from the specified
GRectangle
.
- setBounds(double, double, double, double) - Method in class acm.graphics.GOval
-
Changes the bounds of this object to the specified values.
- setBounds(GRectangle) - Method in class acm.graphics.GOval
-
Changes the bounds of this object to the values from the specified
Rectangle
.
- setBounds(double, double, double, double) - Method in class acm.graphics.GRect
-
Changes the bounds of this object to the specified values.
- setBounds(GRectangle) - Method in class acm.graphics.GRect
-
Changes the bounds of this object to the values from the specified
GRectangle
.
- setBounds(double, double, double, double) - Method in class acm.graphics.GRectangle
-
Sets the components of a GRectangle
from the specified values.
- setBounds(GPoint, GDimension) - Method in class acm.graphics.GRectangle
-
Sets the components of a GRectangle
from the specified location
and size.
- setBounds(GRectangle) - Method in class acm.graphics.GRectangle
-
Sets the bounds of one GRectangle
equal to that of another.
- setBounds(double, double, double, double) - Method in interface acm.graphics.GResizable
-
Changes the bounds of this object to the specified values.
- setBounds(GRectangle) - Method in interface acm.graphics.GResizable
-
Changes the bounds of this object to the values from the specified
GRectangle
.
- setCachingEnabled(boolean) - Static method in class acm.util.MediaTools
-
This method sets an internal flag in the MediaTools
package to
indicate whether images and audio clips are cached internally by name.
- setColor(Color) - Method in class acm.graphics.GObject
-
Sets the color used to display this object.
- setColor(Color) - Method in class acm.graphics.GPen
-
Sets the color of the pen.
- setColor(Color) - Method in class acm.graphics.GTurtle
-
Sets the color of the turtle's pen.
- setColumnCount(int) - Method in class acm.gui.TableLayout
-
Resets the number of columns in the table.
- setConsole(IOConsole) - Method in class acm.program.Program
-
Sets the console associated with this program.
- setConstraints(Component, GridBagConstraints) - Method in class acm.gui.TableLayout
-
Sets the constraints for the component to a copy of the supplied constraints.
- setConstraints(Component, String) - Method in class acm.gui.TableLayout
-
Sets the constraints for the component to the constraints specified by the
string.
- setContentSize(int, int) - Method in class acm.program.Program
-
Sets the window size such that the content area meets the given dimensions.
- setDebugOptions(String) - Static method in class acm.util.JTFTools
-
Sets the debugging options in place for this run.
- setDefaultFill(int) - Method in class acm.gui.TableLayout
-
Sets the default fill parameter for components in the table.
- setDefaultFill(int) - Method in class acm.gui.TablePanel
-
Sets the default fill parameter for components in the table.
- setDialog(IODialog) - Method in class acm.program.Program
-
Sets the dialog associated with this program.
- setDirection(double) - Method in class acm.graphics.GTurtle
-
Sets the direction in which the turtle is moving.
- setEnabled(String, boolean) - Method in class acm.program.ProgramMenuBar
-
Enables or disables any menu items that generate the specified action
command.
- setEndPoint(double, double) - Method in class acm.graphics.GLine
-
Sets the end point of the line to the point
(x
, y
).
- setErrorColor(Color) - Method in class acm.io.IOConsole
-
Sets the color used for console error messages.
- setErrorStyle(int) - Method in class acm.io.IOConsole
-
Sets the style parameters for console error messages.
- setExceptionOnError(boolean) - Method in class acm.gui.DoubleField
-
Sets the error-handling mode of this interactor as specified by the
flag
parameter.
- setExceptionOnError(boolean) - Method in class acm.gui.IntField
-
Sets the error-handling mode of this interactor as specified by the
flag
parameter.
- setExceptionOnError(boolean) - Method in class acm.io.IOConsole
-
Sets the error-handling mode of the console as specified by the
flag
parameter.
- setExceptionOnError(boolean) - Method in class acm.io.IODialog
-
Sets the error-handling mode of the dialog as specified by the
flag
parameter.
- setFileTypeAndCreator(String, String, String) - Static method in class acm.util.Platform
-
Sets the Macintosh file type and creator.
- setFileTypeAndCreator(File, String, String) - Static method in class acm.util.Platform
-
Sets the Macintosh file type and creator.
- setFillColor(Color) - Method in class acm.graphics.GArc
-
- setFillColor(Color) - Method in interface acm.graphics.GFillable
-
Sets the color used to display the filled region of this object.
- setFillColor(Color) - Method in class acm.graphics.GOval
-
Sets the color used to display the filled region of this object.
- setFillColor(Color) - Method in class acm.graphics.GPen
-
Sets the color used to fill a region.
- setFillColor(Color) - Method in class acm.graphics.GPolygon
-
Sets the color used to display the filled region of this object.
- setFillColor(Color) - Method in class acm.graphics.GRect
-
Sets the color used to display the filled region of this object.
- setFilled(boolean) - Method in class acm.graphics.GArc
-
- setFilled(boolean) - Method in interface acm.graphics.GFillable
-
Sets whether this object is filled.
- setFilled(boolean) - Method in class acm.graphics.GOval
-
Sets whether this object is filled.
- setFilled(boolean) - Method in class acm.graphics.GPolygon
-
Sets whether this object is filled.
- setFilled(boolean) - Method in class acm.graphics.GRect
-
Sets whether this object is filled.
- setFocusedListener(ActionListener) - Method in class acm.program.ProgramMenuBar
-
Registers a listener that responds while the caller holds the keyboard focus.
- setFont(Font) - Method in class acm.graphics.GLabel
-
Changes the font used to display the GLabel
.
- setFont(String) - Method in class acm.graphics.GLabel
-
Changes the font used to display the GLabel
as specified by the
string str
, which is interpreted in the style of
Font.decode
.
- setFont(String) - Method in class acm.io.IOConsole
-
Sets the font used for the console as specified by the string
str
, which is interpreted in the style of
Font.decode
.
- setFont(Font) - Method in class acm.io.IOConsole
-
Sets the font for the console.
- setFont(String) - Method in class acm.program.ConsoleProgram
-
Sets the font used for the console as specified by the string
str
, which is interpreted in the style of
Font.decode
.
- setFont(Font) - Method in class acm.program.ConsoleProgram
-
Sets the font for the console.
- setForeground(Color) - Method in class acm.io.IOConsole
-
Sets the foreground color used for the output text.
- setFormat(String) - Method in class acm.gui.DoubleField
-
Sets the format used for the field.
- setFormat(String) - Method in class acm.gui.IntField
-
Sets the format used for the field.
- setFrameRectangle(double, double, double, double) - Method in class acm.graphics.GArc
-
Changes the arc bounds to the specified values.
- setFrameRectangle(GRectangle) - Method in class acm.graphics.GArc
-
Changes the arc bounds to the values from the specified
GRectangle
.
- setHgap(int) - Method in class acm.gui.TableLayout
-
Sets the horizontal gap between components.
- setHgap(int) - Method in class acm.gui.TablePanel
-
Sets the horizontal gap between components.
- setHorizontalAlignment(int) - Method in class acm.gui.TableLayout
-
Sets the horizontal alignment for the table.
- setHorizontalAlignment(int) - Method in class acm.gui.TablePanel
-
Sets the horizontal alignment for the table.
- setImage(Image) - Method in class acm.graphics.GImage
-
Resets the image used by this GImage
object to the new image
specified as an argument.
- setImage(String) - Method in class acm.graphics.GImage
-
Resets the image used by this GImage
object to the one
identified by the argument name
, which is processed exactly as
described in the constructors.
- setInputColor(Color) - Method in class acm.io.IOConsole
-
Sets the color used for console input.
- setInputModel(IOModel) - Method in class acm.program.Program
-
Sets the input model associated with this program.
- setInputScript(BufferedReader) - Method in class acm.io.IOConsole
-
Sets a new input script for the console, which will subsequently take input
from the specified reader.
- setInputStyle(int) - Method in class acm.io.IOConsole
-
Sets the style parameters for console input.
- setLabel(String) - Method in class acm.graphics.GLabel
-
Changes the string stored within the GLabel
object, so that a
new text string appears on the display.
- setLayout(LayoutManager) - Method in class acm.program.Program
-
Sets the layout manager for the central region of the content pane.
- setLocation(double, double) - Method in class acm.graphics.GObject
-
Sets the location of this object to the point (x
,
y
).
- setLocation(GPoint) - Method in class acm.graphics.GObject
-
Sets the location of this object to the specified point.
- setLocation(double, double) - Method in class acm.graphics.GPen
-
Moves the pen to the point (x
, y
) without drawing a
line.
- setLocation(double, double) - Method in class acm.graphics.GPoint
-
Sets the location of the GPoint
to the specified x
and y
values.
- setLocation(GPoint) - Method in class acm.graphics.GPoint
-
Sets the location of the GPoint
to that of an existing one.
- setLocation(double, double) - Method in class acm.graphics.GRectangle
-
Sets the location of the GRectangle
to the specified
x
and y
values.
- setLocation(GPoint) - Method in class acm.graphics.GRectangle
-
Sets the location of the GRectangle
to the specified point.
- setLocation(double, double) - Method in class acm.graphics.GTurtle
-
Moves the turtle to the point (x
, y
) without
drawing a line.
- setMacMenuBarFlag(boolean) - Method in class acm.program.ProgramMenuBar
-
Sets a flag indicating whether applications running on the Macintosh should
use standard Mac menus.
- setMenuBar(ProgramMenuBar) - Method in class acm.io.IOConsole
-
Sets the menu bar that controls this console.
- setNativeArcFlag(boolean) - Method in class acm.graphics.GCanvas
-
Sets whether the redering code for GArc
and GOval
should use Java arcs.
- setOpaque(boolean) - Method in class acm.graphics.GCanvas
-
Sets a flag indicating whether this canvas is opaque, which means that it
obscures anything behind it.
- setOutputModel(IOModel) - Method in class acm.program.Program
-
Sets the output model associated with this program.
- setParameter(String, String) - Method in class acm.program.Program
-
Sets a new value for the named parameter.
- setParameterTable(HashMap<String, String>) - Method in class acm.program.Program
-
Sets the parameter table for this program.
- setParent(GContainer) - Method in class acm.graphics.GObject
-
Sets the parent of this object, which should be called only by the
GContainer
in which this is installed.
- setPenImage(Image) - Method in class acm.graphics.GPen
-
Sets the image of the pen to be the specified image.
- setRaised(boolean) - Method in class acm.graphics.G3DRect
-
Sets whether this object appears raised.
- setRowCount(int) - Method in class acm.gui.TableLayout
-
Resets the number of rows in the table.
- setSize(double, double) - Method in class acm.graphics.GDimension
-
Sets the components of the dimension object from the specified parameters.
- setSize(GDimension) - Method in class acm.graphics.GDimension
-
Sets the width and height of one GDimension
object equal to that
of another.
- setSize(double, double) - Method in class acm.graphics.GImage
-
Changes the size of this object to the specified width and height.
- setSize(GDimension) - Method in class acm.graphics.GImage
-
Changes the size of this object to the specified GDimension
.
- setSize(double, double) - Method in class acm.graphics.GOval
-
Changes the size of this object to the specified width and height.
- setSize(GDimension) - Method in class acm.graphics.GOval
-
Changes the size of this object to the specified GDimension
.
- setSize(double, double) - Method in class acm.graphics.GRect
-
Changes the size of this object to the specified width and height.
- setSize(GDimension) - Method in class acm.graphics.GRect
-
Changes the size of this object to the specified GDimension
.
- setSize(double, double) - Method in class acm.graphics.GRectangle
-
Sets the size of the GRectangle
to the specified values.
- setSize(GDimension) - Method in class acm.graphics.GRectangle
-
Sets the size of the GRectangle
to the specified dimension.
- setSize(double, double) - Method in interface acm.graphics.GResizable
-
Changes the size of this object to the specified width and height.
- setSize(GDimension) - Method in interface acm.graphics.GResizable
-
Changes the size of this object as specified by the GDimension
object.
- setSize(int) - Method in class acm.graphics.GTurtle
-
Sets the size of the turtle.
- setSpeed(double) - Method in class acm.graphics.GPen
-
Sets the speed of the pen, which must be a number between 0 (slowest) and 1
(fastest).
- setSpeed(double) - Method in class acm.graphics.GTurtle
-
Sets the speed of the turtle, which must be a number between 0 (slowest) and
1 (fastest).
- setSpeed(double) - Method in class acm.util.Animator
-
Sets the speed parameter for the animator.
- setStartAngle(double) - Method in class acm.graphics.GArc
-
Sets the starting angle for this GArc
object.
- setStartPoint(double, double) - Method in class acm.graphics.GLine
-
Sets the initial point in the line to (x
, y
),
leaving the end point unchanged.
- setStartupObject(Object) - Method in class acm.program.Program
-
Sets the object that is created when the program is started so that it can be
retrieved later by getStartupObject
.
- setStrictGridBagModel(boolean) - Method in class acm.gui.TableLayout
-
Sets a flag indicating whether the layout manager should match the model used
in GridBagLayout
even when that interpretation seems wrong.
- setSweepAngle(double) - Method in class acm.graphics.GArc
-
Sets the sweep angle for this GArc
object.
- setValue(double) - Method in class acm.gui.DoubleField
-
Sets the value of a field.
- setValue(int) - Method in class acm.gui.IntField
-
Sets the value of a field.
- setVerticalAlignment(int) - Method in class acm.gui.TableLayout
-
Sets the vertical alignment for the table.
- setVerticalAlignment(int) - Method in class acm.gui.TablePanel
-
Sets the vertical alignment for the table.
- setVgap(int) - Method in class acm.gui.TableLayout
-
Sets the vertical gap between components.
- setVgap(int) - Method in class acm.gui.TablePanel
-
Sets the vertical gap between components.
- setVisible(boolean) - Method in class acm.graphics.GObject
-
Sets whether this object is visible.
- SHIFT - Static variable in class acm.program.ProgramMenuBar
-
Constant indicating that an accelerator key requires the SHIFT modifier.
- showErrorMessage(String) - Method in class acm.io.IOConsole
-
Displays the error message on the console.
- showErrorMessage(String) - Method in class acm.io.IODialog
-
Displays the error message in an error dialog.
- showErrorMessage(String) - Method in interface acm.io.IOModel
-
Displays the error message.
- showErrorMessage(String) - Method in class acm.program.Program
-
Displays the error message in the standard output model.
- showPen() - Method in class acm.graphics.GPen
-
Makes the pen itself visible.
- showTurtle() - Method in class acm.graphics.GTurtle
-
Makes the turtle visible.
- sinDegrees(double) - Static method in class acm.graphics.GMath
-
Returns the trigonometric sine of its argument where angle
is
expressed in degrees.
- SOUTH - Static variable in class acm.program.Program
-
Constant specifying the south edge of the container
- start() - Method in class acm.graphics.GObject
-
Starts a GraphicsProgram
containing this object.
- start(String[]) - Method in class acm.graphics.GObject
-
Starts a GraphicsProgram
containing this object, passing it the
specified arguments.
- start() - Method in class acm.graphics.GTurtle
-
Starts a GraphicsProgram
containing this object.
- start(String[]) - Method in class acm.graphics.GTurtle
-
Starts a GraphicsProgram
containing this object, passing it the
specified arguments.
- start(String[]) - Method in class acm.program.Program
-
Starts the program using the specified argument list.
- start() - Method in class acm.program.Program
-
Starts the program when it is running in application mode.
- start() - Method in class acm.util.Animator
-
Starts the thread.
- startAction() - Method in class acm.util.Animator
-
Triggers a "start"
action, as if the Start
button
is pushed.
- startFilledRegion() - Method in class acm.graphics.GPen
-
Starts defining a region that will be filled with the current color.
- startGraphicsProgram(GObject, String[]) - Static method in class acm.program.GraphicsProgram
-
Creates a GraphicsProgram
containing the specified
GObject
and then starts it.
- startHook() - Method in class acm.program.Program
-
Performs class-specific initialization for the program just before it starts.
- startRun() - Method in class acm.program.Program
-
Initializes and runs the run method.
- stepAction() - Method in class acm.util.Animator
-
Triggers a "step"
action, as if the Step
button is
pushed.
- STEPPING - Static variable in class acm.util.Animator
-
Constant indicating that the animator is running in single-step mode.
- stopAction() - Method in class acm.util.Animator
-
Triggers a "stop"
action, as if the Stop
button is
pushed.
- STOPPED - Static variable in class acm.util.Animator
-
Constant indicating that the animator is suspended waiting for restart.
- STOPPING - Static variable in class acm.util.Animator
-
Constant indicating that the animator should stop at the next trace point.
- SwingTimer - Class in acm.util
-
This class is equivalent to javax.swing.Timer
and exists only to
avoid the ambiguity that arises because there is also a Timer
class in java.util
.
- SwingTimer(int, ActionListener) - Constructor for class acm.util.SwingTimer
-
Creates a new timer that ticks at the specified rate.
- SYSTEM_CONSOLE - Static variable in class acm.io.IOConsole
-
This constant is an object that offers the functionality of the
IOConsole
class, but which does so using the standard I/O
streams System.in
and System.out
.