Generic Environment GUI Class Library
A B C D E F G H I L M N O P R S T U V W X Y Z

A

ActiveEnvFrame - class ActiveEnvFrame.
Environment-Based Applications:
The ActiveEnvFrame class provides a window in which to run and display an environment, holding the display steady for a length of time determined by a slider.
ActiveEnvFrame(EnvAppController, boolean, boolean, boolean, boolean) - Constructor for class ActiveEnvFrame
Creates an uninitialized ActiveEnvFrame.
ActiveEnvFrame(String, Color, int, int, int, EnvAppController, boolean, boolean, boolean, boolean) - Constructor for class ActiveEnvFrame
Creates a new ActiveEnvFrame with no menu bar.
ActiveEnvFrame(String, Color, int, int, int, int, int, int, EnvAppController, boolean, boolean, boolean, boolean) - Constructor for class ActiveEnvFrame
Creates a new ActiveEnvFrame with no menu bar.
add(Locatable) - Method in class BoundedEnv
Adds a new object to this environment at the location it specifies.
add(Locatable) - Method in interface Environment
Adds a new object to this environment at the location it specifies.
add(Locatable) - Method in class UnboundedEnv
Adds a new object to this environment at the location it specifies.
addBoundedEnvClassNames(String[]) - Static method in class MBSFactory
Adds bounded environment classes to the set maintained by the factory.
addBoundedEnvironments() - Method in class EnvChoiceComboBox
Adds bounded environment classes to the combo box.
addChoicesFromFactory(JComboBox) - Method in class EnvEditor
Builds up the list of environment object type choices for the editing palette.
addClassesToFactory(String[], String) - Static method in class MBSFactory
Helper to add new classes to the factory.
addEnvObjClassNames(String[]) - Static method in class MBSFactory
Adds environment object classes to the set maintained by the factory.
addUnboundedEnvClassNames(String[]) - Static method in class MBSFactory
Adds unbounded environment classes to the set maintained by the factory.
addUnboundedEnvironments() - Method in class EnvChoiceComboBox
Adds unbounded environment classes to the combo box.
adjust(Locatable, Component, Graphics2D) - Method in class RotatedDisplay
Adjusts the graphics system for drawing a rotated object.
adjust(Locatable, Component, Graphics2D) - Method in class RotatedImageDisplay
Adjusts the graphics system for drawing a rotated image.
adjust(Locatable, Component, Graphics2D) - Method in class RotatedTintedImageDisplay
Adjusts the graphics system for drawing a rotated tinted image.
adjust(Locatable, Component, Graphics2D) - Method in class ScaledDisplay
Adjusts the graphics system for drawing an object, as appropriate.
adjust(Locatable, Component, Graphics2D) - Method in class ScaledImageDisplay
Adjusts the graphics system for drawing an object, as appropriate.
adjust(Locatable, Component, Graphics2D) - Method in class TintedImageDisplay
Adjusts the graphics system for drawing a tinted image.
adjustForDirection(Locatable, Graphics2D) - Static method in class RotatedDisplay
Adjusts the graphics system for drawing an object with direction.
adjustForDirection(Locatable, Graphics2D) - Method in class RotatedImageDisplay
Adjusts the graphics system for drawing an object with direction.
allObjects() - Method in class BoundedEnv
Returns all the objects in this environment.
allObjects() - Method in interface Environment
Returns all the objects in this environment.
allObjects() - Method in class UnboundedEnv
Returns all the objects in this environment.
appController - Variable in class ActiveEnvFrame
 
approveSelection() - Method in class EnvFileChooser
Called when the user hits the approve button (Save/Open) to confirm the selected file is acceptable.
associate(String, LocatableDisplay) - Static method in class DisplayMap
Associates a display object with an environment object class.

B

backgroundColor() - Method in class ScrollableEnvDisplay
Gets the background color for displaying the environment.
bgColor - Variable in class ScrollableEnvDisplay
 
BLACK - Static variable in class ColorChoiceDDMenu
 
BLUE - Static variable in class ColorChoiceDDMenu
 
boundedChooser - Variable in class EnvFileChooser
 
boundedClass() - Method in class EnvFileChooser
Returns the bounded environment class selected on the open accessory.
BoundedEnv - class BoundedEnv.
AP® Computer Science Marine Biology Simulation:
The BoundedEnv class models a bounded, two-dimensional, grid-like environment containing locatable objects.
BoundedEnv(int, int) - Constructor for class BoundedEnv
Constructs an empty BoundedEnv object with the given dimensions.
boundedEnvClasses() - Static method in class MBSFactory
Returns the set of bounded environment classes known to the factory.

C

cellSize - Variable in class ScrollableEnvDisplay
 
chooseColor() - Method in class ColorChoiceDDMenu
Follows up when the user picks a new choice from the drop-down menu (specified listener action).
chooseEnvObjType() - Method in class EnvEditor
Follows up when the user picks a new choice from the environment object combo box (specified listener action).
col() - Method in class Location
Returns the column coordinate of this location.
color() - Method in class ColorBlock
Gets color value for color block.
ColorBlock - class ColorBlock.
Environment-Based Applications:
A ColorBlock object encapsulates a color for a colored cell in an environment.
ColorBlock(Color, Environment, Location) - Constructor for class ColorBlock
Constructs a color block with the specified color.
ColorBlockDisplay - class ColorBlockDisplay.
Environment-Based Applications:
A ColorBlockDisplay object displays a ColorBlock object in an environment.
ColorBlockDisplay() - Constructor for class ColorBlockDisplay
 
ColorChoiceDDMenu - class ColorChoiceDDMenu.
Environment-Based Applications:
The ColorChoiceDDMenu class provides a drop-down menu for choosing a color.
ColorChoiceDDMenu.ColorChoice - class ColorChoiceDDMenu.ColorChoice.
Nested class used to hold the per-item information for the entries in the combo box of color choices.
ColorChoiceDDMenu.ColorChoice(String, Color) - Constructor for class ColorChoiceDDMenu.ColorChoice
 
ColorChoiceDDMenu.ColorIcon - class ColorChoiceDDMenu.ColorIcon.
Nested class used to draw the color swatch icon used for color choice entries in the color combo box.
ColorChoiceDDMenu.ColorIcon(Color, int, int) - Constructor for class ColorChoiceDDMenu.ColorIcon
 
ColorChoiceDDMenu() - Constructor for class ColorChoiceDDMenu
Creates a color choice menu in which the selected choice to begin with is the "Random" color choice.
ColorChoiceDDMenu(ColorChoiceDDMenu.ColorChoice) - Constructor for class ColorChoiceDDMenu
Creates a color choice menu in which startingColorChoice is the selected one when the menu is created.
ColorChoiceDDMenu(ColorChoiceDDMenu.ColorChoice[], ColorChoiceDDMenu.ColorChoice) - Constructor for class ColorChoiceDDMenu
Creates a color choice menu with the specified color choices and with startingColorChoice as the selected one when the menu is created.
colToXCoord(int) - Method in class ScrollableEnvDisplay
 
compareTo(Object) - Method in class Location
Compares this location to other for ordering.
constructEnv(Class) - Static method in class MBSFactory
Creates an instance of an Environment using the default constructor of the given class.
constructEnv(Class, int, int) - Static method in class MBSFactory
Creates an instance of an Environment using the 2-argument constructor of the given class.
constructEnvObject(Class, Environment, Location) - Static method in class MBSFactory
Creates an instance of the given environment object class using a two-argument constructor that takes an environment and a location.
constructEnvObject(Class, Environment, Location, Direction) - Static method in class MBSFactory
Creates an instance of the given environment object class using a three-argument constructor that takes an environment, a location, and a direction.
constructEnvObject(Class, Environment, Location, Direction, Color) - Static method in class MBSFactory
Creates an instance of the given environment object class using a four-argument constructor that takes an environment, a location, a diredction, and a color.
constructObject(Class, Class[], Object[]) - Static method in class MBSFactory
Creates an object of the given class.
content - Variable in class EnvAppFrame
 
createEnvDialog - Variable in class EnvController
 
CreateEnvDialog - class CreateEnvDialog.
Environment-Based Applications:
An CreateEnvDialog is a dialog that allows the user to construct a new environment, choosing its type (bounded or unbounded) and, if appropriate, its dimensions.
CreateEnvDialog(JFrame, boolean) - Constructor for class CreateEnvDialog
Creates a dialog that allows the user to choose the type of environment to create and/or its dimensions.
createNewEnv() - Method in class EnvController
Creates a new empty environment and invokes the environment editor.
currentColor() - Method in class ColorChoiceDDMenu
Returns the currently selected color.
currentEnvObjectClass() - Method in class EnvEditor
Returns the currently selected environment object class.
CUSTOM - Static variable in class ColorChoiceDDMenu
 

D

DEFAULT_MIN_CELL_SIZE - Static variable in class ScrollableEnvDisplay
 
DEFAULT_VIEWABLE_SIZE - Static variable in class ScrollableEnvDisplay
 
defaultBounded - Variable in class EnvFileChooser
 
DefaultDisplay - class DefaultDisplay.
AP® Computer Science Marine Biology Simulation:
A DefaultDisplay draws a centered question-mark.
DefaultDisplay() - Constructor for class DefaultDisplay
 
defaultUnbounded - Variable in class EnvFileChooser
 
defineContent(Color, int, int, int) - Method in class ActiveEnvFrame
Defines contents of main window panel.
defineContent(Color, int, int, int) - Method in class EnvAppFrame
Defines contents of main window panel.
defineContent(Color, int, int, int) - Method in class EnvEditor
Defines contents of main window panel.
Direction - class Direction.
AP® Computer Science Marine Biology Simulation:
The Direction class encapsulates the notion of a compass direction such as North, East, South, West.
Direction() - Constructor for class Direction
Constructs a default Direction object facing North.
Direction(int) - Constructor for class Direction
Constructs a Direction object.
Direction(String) - Constructor for class Direction
Constructs a Direction object.
display - Variable in class EnvAppFrame
 
displayHeight - Variable in class ScrollableEnvDisplay
 
DisplayMap - class DisplayMap.
AP® Computer Science Marine Biology Simulation:
DisplayMap is a collection that maps environment object classes to objects that know how to display them.
DisplayMap() - Constructor for class DisplayMap
 
displayWidth - Variable in class ScrollableEnvDisplay
 
done() - Method in class EnvEditor
Leaves the editor, returning to the parent frame.
doneButton - Variable in class EnvEditor
 
draw(Locatable, Component, Graphics2D) - Method in class ColorBlockDisplay
Draw the given object (color block).
draw(Locatable, Component, Graphics2D) - Method in class DefaultDisplay
Draws the given object.
draw(Locatable, Component, Graphics2D) - Method in class ScaledDisplay
Draw the given Locatable object.
draw(Locatable, Component, Graphics2D) - Method in class ScaledImageDisplay
Draws a unit-length object using an image.
draw(Locatable, Component, Graphics2D) - Method in class TextCellDisplay
Draws the given object.
draw(Locatable, Component, Graphics2D, Rectangle) - Method in interface LocatableDisplay
Method invoked to draw a Locatable.
draw(Locatable, Component, Graphics2D, Rectangle) - Method in class ScaledDisplay
Draw the given object.
drawGridlines(Graphics2D) - Method in class ScrollableEnvDisplay
Draws the gridlines for the environment.
drawLocatable(Graphics2D, Locatable) - Method in class ScrollableEnvDisplay
Draws one environment object.

E

EAST - Static variable in class Direction
 
editAtLocation(Location) - Method in class EnvEditor
Using the location under the mouse, either add or remove an object in that location.
editAtLocation(MouseEvent) - Method in class EnvEditor
Makes an object in the location indicated by the mouse event.
editEnv(Environment) - Method in class EnvController
Enables editing of the existing environment.
enableItemsThatNeedEnvironment() - Method in class ActiveEnvFrame
Sets the enabled status of those GUI items that need an environment to be valid.
enableItemsThatNeedEnvironment() - Method in class EnvAppFrame
Sets the enabled status of those GUI items that need an environment to be valid.
enterNotRunningMode() - Method in class ActiveEnvFrame
Enables and disables GUI components as necessary when an application is not running.
enterRunningMode() - Method in class ActiveEnvFrame
Enables and disables GUI components as necessary while the application is running.
env - Variable in class EnvAppController
 
env - Variable in class EnvAppFrame
 
ENV_EXT - Static variable in class EnvFileChooser
 
EnvAppController - class EnvAppController.
Environment-Based Applications:
An EnvAppController controls the running of an environment application.
EnvAppController() - Constructor for class EnvAppController
 
EnvAppFrame - class EnvAppFrame.
Environment-Based Applications:
The EnvAppFrame class provides a window in which to display an environment.
EnvAppFrame.GUIExceptionHandler - class EnvAppFrame.GUIExceptionHandler.
Nested class that is registered as the handler for exceptions on the Swing event thread.
EnvAppFrame.GUIExceptionHandler() - Constructor for class EnvAppFrame.GUIExceptionHandler
 
EnvAppFrame() - Constructor for class EnvAppFrame
Creates an uninitialized EnvAppFrame.
EnvAppFrame(String, Color, int, int, int) - Constructor for class EnvAppFrame
Creates a new EnvAppFrame with no menu bar.
EnvChoiceComboBox - class EnvChoiceComboBox.
Environment-Based Applications:
An EnvChoiceComboBox is a dialog that allows the user to choose the type of environment to be created and, if appropriate, its dimensions.
EnvChoiceComboBox() - Constructor for class EnvChoiceComboBox
 
envController - Variable in class EnvAppFrame
 
EnvController - class EnvController.
Environment-Based Applications:
The EnvController class implements the methods used by the File menu defined in EnvApplFrame.
EnvController(EnvAppFrame, EnvDataFileHandler) - Constructor for class EnvController
Creates a new environment controller tied to the specified frame.
EnvDataFileHandler - interface EnvDataFileHandler.
Environment-Based Applications:
The EnvDataFileHandler interface specifies methods for reading environment information from a file and writing it to a file.
EnvDisplay - interface EnvDisplay.
AP® Computer Science Marine Biology Simulation:
The EnvDisplay interface describes the methods needed by all EnvDisplay objects.
EnvEditor - class EnvEditor.
Environment-Based Applications:
The EnvEditor class provides a window in which to edit an environment.
EnvEditor.EnvObjectChoice - class EnvEditor.EnvObjectChoice.
Nested class used to hold the per-item information for the entries in the combo box of environment object choices.
EnvEditor.EnvObjectChoice(EnvEditor, Class) - Constructor for class EnvEditor.EnvObjectChoice
 
EnvEditor.EnvObjectIcon - class EnvEditor.EnvObjectIcon.
Nested class used to draw the icons used for Locatable entries in the environment object combo box.
EnvEditor.EnvObjectIcon(EnvEditor, Class, Color, int, int) - Constructor for class EnvEditor.EnvObjectIcon
 
EnvEditor.EnvObjectIcon(EnvEditor, Class, int, int) - Constructor for class EnvEditor.EnvObjectIcon
 
EnvEditor(EnvAppFrame) - Constructor for class EnvEditor
Creates an uninitialized EnvEditor.
EnvFileChooser - class EnvFileChooser.
Environment-Based Applications:
An EnvFileChooser is a JFileChooser subclass that adds some specialized behavior for opening and saving environment data files.
EnvFileChooser() - Constructor for class EnvFileChooser
Creates a new EnvFileChooser.
EnvFrameWithSlider - class EnvFrameWithSlider.
Environment-Based Applications:
The EnvFrameWithSlider class provides a window in which to display an environment, holding the display steady for a length of time determined by a slider.
EnvFrameWithSlider() - Constructor for class EnvFrameWithSlider
Creates an uninitialized EnvFrameWithSlider.
EnvFrameWithSlider(String, Color, int, int, int) - Constructor for class EnvFrameWithSlider
Creates a new environment frame with a speed adjustment slider but no menu bar.
EnvFrameWithSlider(String, Color, int, int, int, int, int) - Constructor for class EnvFrameWithSlider
Creates a new environment frame with a speed adjustment slider but no menu bar.
EnvFrameWithSlider(String, Color, int, int, int, int, int, int) - Constructor for class EnvFrameWithSlider
Creates a new environment frame with a speed adjustment slider but no menu bar.
Environment - interface Environment.
AP® Computer Science Marine Biology Simulation:
Environment provides an interface for a two-dimensional, grid-like environment containing locatable objects.
environment() - Method in class ScrollableEnvDisplay
Gets the environment.
envObjectClasses() - Static method in class MBSFactory
Returns the set of environment object classes known to the factory.
equals(Object) - Method in class Direction
Indicates whether some other Direction object is "equal to" this one.
equals(Object) - Method in class Location
Indicates whether some other Location object is "equal to" this one.
extraHeight() - Method in class ScrollableEnvDisplay
 
extraWidth() - Method in class ScrollableEnvDisplay
 

F

fileChooser - Variable in class EnvController
 
fileHandler - Variable in class EnvController
 
fillPalette(JToolBar) - Method in class EnvEditor
Puts tools for choosing environment object attributes in the editing palette, in particular a Type tool for choosing the type of environment object.
findDisplayFor(Locatable) - Static method in class DisplayMap
Finds a display class that knows how to display the given object.
FULL_CIRCLE - Static variable in class Direction
Number of degrees in compass (will not be tested on the Advanced Placement exam).

G

getColor() - Method in class ColorChoiceDDMenu.ColorChoice
 
getDelay() - Method in class EnvFrameWithSlider
Gets the current delay value from the speed slider.
getDirection(Location, Location) - Method in interface Environment
Returns the direction from one location to another.
getDirection(Location, Location) - Method in class SquareEnvironment
Returns the direction from one location to another.
getDisplay() - Method in class EnvAppFrame
Gets the environment display.
getEnclosingViewport() - Method in class ScrollableEnvDisplay
 
getIconHeight() - Method in class ColorChoiceDDMenu.ColorIcon
 
getIconHeight() - Method in class EnvEditor.EnvObjectIcon
 
getIconWidth() - Method in class ColorChoiceDDMenu.ColorIcon
 
getIconWidth() - Method in class EnvEditor.EnvObjectIcon
 
getInstance() - Static method in class RandNumGenerator
Returns a random number generator.
getListCellRendererComponent(JList, Object, int, boolean, boolean) - Method in class TextAndIconRenderer
Returns a component that can display the specified value.
getMinimumSize() - Method in class ScrollableEnvDisplay
Returns the minimum size of the display, for use by layout manager.
getNeighbor(Location, Direction) - Method in interface Environment
Returns the adjacent neighbor (whether valid or invalid) of a location in the specified direction.
getNeighbor(Location, Direction) - Method in class SquareEnvironment
Returns the adjacent neighbor (whether valid or invalid) of a location in the specified direction.
getObjectClass() - Method in class EnvEditor.EnvObjectChoice
 
getPannableTipText() - Method in interface PseudoInfiniteViewport.Pannable
 
getPannableTipText() - Method in class ScrollableEnvDisplay
 
getPreferredScrollableViewportSize() - Method in class ScrollableEnvDisplay
 
getPreferredSize() - Method in class ScrollableEnvDisplay
Returns the desired size of the display, for use by layout manager.
getScrollableBlockIncrement(Rectangle, int, int) - Method in class ScrollableEnvDisplay
 
getScrollableTracksViewportHeight() - Method in class ScrollableEnvDisplay
 
getScrollableTracksViewportWidth() - Method in class ScrollableEnvDisplay
 
getScrollableUnitIncrement(Rectangle, int, int) - Method in class ScrollableEnvDisplay
 
getSelectedClass() - Method in class EnvChoiceComboBox
Returns the class associated with the selected item in the combo box.
getToolTipText(MouseEvent) - Method in class ScrollableEnvDisplay
Given a MouseEvent, determines what text to place in the floating tool tip when the the mouse hovers over this location.
getViewPosition() - Method in class PseudoInfiniteViewport
Returns current view position (upper left).
getViewSize() - Method in class PseudoInfiniteViewport
Returns current view size.
GRAY - Static variable in class ColorChoiceDDMenu
 
GREEN - Static variable in class ColorChoiceDDMenu
 
gridLinesAreVisible() - Method in class ScrollableEnvDisplay
Returns true if the grid lines are visible, false otherwise.

H

handle(Throwable) - Method in class EnvAppFrame.GUIExceptionHandler
 
hasCorrectCtor(Class, Class, Class[]) - Static method in class MBSFactory
Verifies that a class has the required constructor and is properly assignable.
hasFourArgCtor(Class) - Static method in class MBSFactory
Reports wehther a given environment object class has an accessible four-arg constructor that takes Environment, Location, Direction, and Color.
hashCode() - Method in class Direction
Generates a hash code for this direction (will not be tested on the Advanced Placement exam).
hashCode() - Method in class Location
Generates a hash code for this location (will not be tested on the Advanced Placement exam).
hasReachedStoppingState() - Method in class EnvAppController
Determines whether a running application has reached a desired stopping state.

I

inDegrees() - Method in class Direction
Returns this direction value in degrees.
indexOf(Location) - Method in class UnboundedEnv
Get the index of the object at the specified location.
init(String, Color, int, int, int) - Method in class EnvAppFrame
Initializes the contents of an EnvAppFrame, possibly with a File menu.
init(String, Color, int, int, int) - Method in class EnvEditor
Initializes the contents of an EnvEditor.
init(String, Color, int, int, int, int, int) - Method in class EnvFrameWithSlider
Initializes the contents of an EnvFrameWithSlider.
init(String, Color, int, int, int, int, int, int) - Method in class EnvFrameWithSlider
Initializes the contents of an EnvFrameWithSlider.
INITIAL_DELAY - Static variable in class EnvFrameWithSlider
 
invokeEditor(Environment) - Method in class EnvController
Invokes the appropriate environment editor.
isEmpty(Location) - Method in class BoundedEnv
Determines whether a specific location in this environment is empty.
isEmpty(Location) - Method in interface Environment
Determines whether a specific location in this environment is empty.
isEmpty(Location) - Method in class UnboundedEnv
Determines whether a specific location in this environment is empty.
isPannableUnbounded() - Method in interface PseudoInfiniteViewport.Pannable
 
isPannableUnbounded() - Method in class ScrollableEnvDisplay
 
isValid(Location) - Method in class BoundedEnv
Verifies whether a location is valid in this environment.
isValid(Location) - Method in interface Environment
Verifies whether a location is valid in this environment.
isValid(Location) - Method in class UnboundedEnv
Verifies whether a location is valid in this environment.
isValidEnvClass(Class, Class[]) - Static method in class MBSFactory
Verifies that a class has the required constructor and is properly assignable to Environment.
isValidEnvObjectClass(Class, Class[]) - Static method in class MBSFactory
Verifies that a class has the required constructor and is properly assignable to Locatable.

L

Locatable - interface Locatable.
AP® Computer Science Marine Biology Simulation:
Locatable is an interface that guarantees that an object knows its location and returns it when the location method is called.
LocatableDisplay - interface LocatableDisplay.
AP® Computer Science Marine Biology Simulation:
The LocatableDisplay interface contains the method needed to display an environment object.
Location - class Location.
AP® Computer Science Marine Biology Simulation:
A Location object represents the row and column of a location in a two-dimensional grid.
LOCATION_TOOL_TIPS - Static variable in class ScrollableEnvDisplay
 
location() - Method in class ColorBlock
Gets color block's location.
location() - Method in interface Locatable
Returns the location of this object.
location() - Method in class TextCell
Gets text cell's location.
Location(int, int) - Constructor for class Location
Constructs a Location object.
locationForPoint(Point) - Method in class ScrollableEnvDisplay
Given a Point, determines which environment location (if any) is under the mouse.

M

makeDimensionsDialog(JFrame) - Static method in class CreateEnvDialog
Creates a dialog that creates a BoundedEnv object after prompting the user for its dimensions.
makeDisplay(int, int, int, Color) - Method in class EnvAppFrame
Creates the environment display.
makeDisplay(int, int, int, Color) - Method in class EnvEditor
Creates the environment display.
makeDisplayPanel(Color, int, int, int) - Method in class EnvAppFrame
Creates the panel for displaying and controlling an environment application.
makeDisplayPanel(Color, int, int, int) - Method in class EnvFrameWithSlider
Creates the panel for displaying and controlling an environment application, along with a speed adjustment slider.
makeEditingPalette() - Method in class EnvEditor
Creates the editing palette.
makeEnvDisplay(Color, int, int, int) - Method in class EnvAppFrame
Creates a scrollable display for displaying an environment application.
makeEnvironmentChoiceDialog(JFrame) - Static method in class CreateEnvDialog
Creates a dialog that allows the user to choose the type of environment to create and, if appropriate, its dimensions.
makeFileMenu() - Method in class EnvAppFrame
Creates the File drop-down menu on the frame.
makeGridLinesVisible(boolean) - Method in class ScrollableEnvDisplay
Makes the gridlines visible or invisible, depending on the value of the visible parameter.
makeMenuBar() - Method in class EnvAppFrame
Creates the menu bar for drop-down menus on the frame.
makeMenus() - Method in class EnvAppFrame
Creates the drop-down menus on the frame.
makeObject(Class, Environment, Location) - Method in class EnvEditor
Constructs the specified type of object.
makeObject(Class, Environment, Location, Color) - Method in class EnvEditor
Constructs the specified type of object.
makeOpenAccessory() - Method in class EnvFileChooser
Builds the open accessory with combo boxes for choosing the bounded and unbounded environment classes.
makeRunButtons(String) - Method in class ActiveEnvFrame
Creates a panel with buttons for running the application.
makeSliderPanel() - Method in class EnvFrameWithSlider
Creates a speed slider for controling the speed of the animation.
makeToolTipsReportLocation() - Method in class ScrollableEnvDisplay
Sets tool tips to provide information about the locations of cells in the environment.
makeToolTipsReportObject() - Method in class ScrollableEnvDisplay
Sets tool tips to provide information about the contents of cells in the environment.
makeTypeChoiceComponent() - Method in class EnvEditor
Makes the environment object type choice combo box.
MAX_DELAY_MSECS - Static variable in class EnvFrameWithSlider
 
MBSFactory - class MBSFactory.
AP® Computer Science Marine Biology Simulation:
The MBSFactory class provides a set of static methods for constructing objects in the Marine Biology Simulation program, such as fish and environments, as well as tracking the available classes to use in constructing those objects.
MBSFactory() - Constructor for class MBSFactory
 
menuBar - Variable in class EnvAppFrame
 
menuItemsThatNeedAnEnvironment - Variable in class EnvAppFrame
 
menuMask - Variable in class EnvAppFrame
 
MIN_DELAY_MSECS - Static variable in class EnvFrameWithSlider
 
minCellSize - Variable in class ScrollableEnvDisplay
 
minimumCellSize() - Method in class ScrollableEnvDisplay
Gets the minimum cell size.

N

neighborsOf(Location) - Method in interface Environment
Returns the adjacent neighbors of a specified location.
neighborsOf(Location) - Method in class SquareEnvironment
Returns the adjacent neighbors of a specified location.
NORTH - Static variable in class Direction
 
NORTHEAST - Static variable in class Direction
 
NORTHWEST - Static variable in class Direction
 
nSteps() - Method in class ActiveEnvFrame
Advances the application multiple (N) steps (where N is provided by the user in a dialog box).
nStepsButton - Variable in class ActiveEnvFrame
 
numAdjacentNeighbors() - Method in interface Environment
Returns the number of adjacent neighbors around each cell.
numAdjacentNeighbors() - Method in class SquareEnvironment
Returns the number of adjacent neighbors around each cell.
numCellSides() - Method in interface Environment
Returns the number of sides around each cell.
numCellSides() - Method in class SquareEnvironment
Returns the number of sides around each cell.
numCols - Variable in class ScrollableEnvDisplay
 
numCols() - Method in class BoundedEnv
Returns number of columns in the environment.
numCols() - Method in interface Environment
Returns number of columns in this environment.
numCols() - Method in class UnboundedEnv
Returns number of columns in this environment.
numObjects() - Method in class BoundedEnv
Returns the number of objects in this environment.
numObjects() - Method in interface Environment
Returns the number of objects in this environment.
numObjects() - Method in class UnboundedEnv
Returns the number of objects in this environment.
numRows - Variable in class ScrollableEnvDisplay
 
numRows() - Method in class BoundedEnv
Returns number of rows in the environment.
numRows() - Method in interface Environment
Returns number of rows in this environment.
numRows() - Method in class UnboundedEnv
Returns number of rows in this environment.
numStepsSoFar - Variable in class ActiveEnvFrame
 
numStepsToRun - Variable in class ActiveEnvFrame
 

O

objComboBox - Variable in class EnvEditor
 
OBJECT_STRING_TOOL_TIPS - Static variable in class ScrollableEnvDisplay
 
objectAt(Location) - Method in class BoundedEnv
Returns the object at a specific location in this environment.
objectAt(Location) - Method in interface Environment
Returns the object at a specific location in this environment.
objectAt(Location) - Method in class UnboundedEnv
Returns the object at a specific location in this environment.
OCEAN_BLUE - Static variable in class ScrollableEnvDisplay
 
openAccessory - Variable in class EnvFileChooser
 
openFile() - Method in class EnvController
Reads a new environment from a saved data file.
ORANGE - Static variable in class ColorChoiceDDMenu
 
originCol - Variable in class ScrollableEnvDisplay
 
originRow - Variable in class ScrollableEnvDisplay
 

P

paint(Graphics) - Method in class ScrollableEnvDisplay
Shows the environment.
paintCenteredText(Graphics2D, String, float, float) - Method in class DefaultDisplay
Paints a horizontally and vertically-centered text string.
paintComponent(Graphics) - Method in class ScrollableEnvDisplay
Paints this component.
paintIcon(Component, Graphics, int, int) - Method in class ColorChoiceDDMenu.ColorIcon
 
paintIcon(Component, Graphics, int, int) - Method in class EnvEditor.EnvObjectIcon
 
panBy(int, int) - Method in interface PseudoInfiniteViewport.Pannable
 
panBy(int, int) - Method in class ScrollableEnvDisplay
 
parentFrame - Variable in class EnvController
 
parentFrame - Variable in class EnvEditor
 
PseudoInfiniteViewport - class PseudoInfiniteViewport.
AP® Computer Science Marine Biology Simulation:
A PseudoInfiniteViewport is a JViewport subclass that translates scroll actions into pan actions across an unbounded view.
PseudoInfiniteViewport.Pannable - interface PseudoInfiniteViewport.Pannable.
The Pannable interface contains those methods the view installed in a PseudoInfiniteViewport needs to support to enable panning behavior along with scrolling.
PseudoInfiniteViewport(JScrollPane) - Constructor for class PseudoInfiniteViewport
Construct a new PseudoInfiniteViewport object for the given scrollpane.
PURPLE - Static variable in class ColorChoiceDDMenu
 

R

RandNumGenerator - class RandNumGenerator.
AP® Computer Science Marine Biology Simulation:
The RandNumGenerator class provides a singleton java.util.Random object for random number generation.
RandNumGenerator() - Constructor for class RandNumGenerator
 
RANDOM - Static variable in class ColorChoiceDDMenu
 
RANDOM_COLOR - Static variable in class ColorChoiceDDMenu
Unique constant object representing a random color (to compare == to)
randomDirection() - Static method in class Direction
Returns a random direction.
randomDirection() - Method in interface Environment
Generates a random direction.
randomDirection() - Method in class SquareEnvironment
Generates a random direction.
readEnv(File) - Method in interface EnvDataFileHandler
Reads information about an environment from an initial configuration data file and creates the environment.
recalculateCellSize(JViewport, int) - Method in class ScrollableEnvDisplay
Calculates the cell size to use given the current viewable region and the the number of rows and columns in the environment.
recenterOnOrigin() - Method in class ScrollableEnvDisplay
Pans the display back to the origin, so that 0, 0 is at the the upper left of the visible viewport.
recordMove(Locatable, Location) - Method in class BoundedEnv
Updates this environment to reflect the fact that an object moved.
recordMove(Locatable, Location) - Method in interface Environment
Updates this environment to reflect the fact that an object moved.
recordMove(Locatable, Location) - Method in class UnboundedEnv
Updates this environment to reflect the fact that an object moved.
RED - Static variable in class ColorChoiceDDMenu
 
remove(Locatable) - Method in class BoundedEnv
Removes the object from this environment.
remove(Locatable) - Method in interface Environment
Removes the object from this environment.
remove(Locatable) - Method in class UnboundedEnv
Removes the object from this environment.
reportConstructionError(Class, Exception, String) - Method in class EnvEditor
Reports an error from attempting to construct an object.
restart() - Method in class EnvAppController
Re-initializes the state of the environment application for a restart.
restartButton - Variable in class ActiveEnvFrame
 
reverse() - Method in class Direction
Returns the direction that is the reverse of this Direction object.
RotatedDisplay - class RotatedDisplay.
Environment-Based Applications:
This abstract class provides common implementation code for drawing a Locatable object.
RotatedDisplay() - Constructor for class RotatedDisplay
 
RotatedImageDisplay - class RotatedImageDisplay.
Environment-Based Applications:
A RotatedImageDisplay displays an object in an environment.
RotatedImageDisplay(String, Direction) - Constructor for class RotatedImageDisplay
Constructs an object that knows how to display a rotatable image.
RotatedTintedImageDisplay - class RotatedTintedImageDisplay.
Environment-Based Applications:
A RotatedTintedImageDisplay displays an object as a tinted image in an environment.
RotatedTintedImageDisplay(String, Direction) - Constructor for class RotatedTintedImageDisplay
Constructs an object that knows how to display a rotatable tinted image.
roundedDir(int, Direction) - Method in class Direction
Rounds this direction to the nearest "cardinal" direction (will not be tested on the Advanced Placement exam).
The choice of possible cardinal directions depends on the number of cardinal directions and the starting direction.
row() - Method in class Location
Returns the row coordinate of this location.
rowToYCoord(int) - Method in class ScrollableEnvDisplay
 
run() - Method in class ActiveEnvFrame
Starts a timer to repeatedly step the application at the speed currently indicated by the speed slider.
runButton - Variable in class ActiveEnvFrame
 
running - Variable in class ActiveEnvFrame
 
runningNSteps - Variable in class ActiveEnvFrame
 

S

saveFile(Environment) - Method in class EnvController
Saves an environment to a data file.
ScaledDisplay - class ScaledDisplay.
Environment-Based Applications:
This abstract class provides common implementation code for drawing a Locatable object.
ScaledDisplay() - Constructor for class ScaledDisplay
 
ScaledImageDisplay - class ScaledImageDisplay.
Environment-Based Applications:
A ScaledImageDisplay uses an image read from a file to represent an object with a location in an environment.
ScaledImageDisplay(String) - Constructor for class ScaledImageDisplay
Constructs an object that knows how to display a Locatable object as an image.
ScrollableEnvDisplay - class ScrollableEnvDisplay.
Environment-Based Applications:
A ScrollableEnvDisplay is a panel containing a scrollable graphical display of an environment.
ScrollableEnvDisplay() - Constructor for class ScrollableEnvDisplay
Constructs a new ScrollableEnvDisplay object with no environment and an empty view.
ScrollableEnvDisplay(Color) - Constructor for class ScrollableEnvDisplay
Constructs a new ScrollableEnvDisplay object with no environment and an empty view.
ScrollableEnvDisplay(int) - Constructor for class ScrollableEnvDisplay
Constructs a new ScrollableEnvDisplay object with no environment and an empty view.
ScrollableEnvDisplay(int, Color) - Constructor for class ScrollableEnvDisplay
Constructs a new ScrollableEnvDisplay object with no environment and an empty view.
ScrollableEnvDisplay(int, int) - Constructor for class ScrollableEnvDisplay
Constructs a new ScrollableEnvDisplay object with no environment and an empty view.
ScrollableEnvDisplay(int, int, Color) - Constructor for class ScrollableEnvDisplay
Constructs a new ScrollableEnvDisplay object with no environment and an empty view.
ScrollableEnvDisplay(int, int, int) - Constructor for class ScrollableEnvDisplay
Constructs a new ScrollableEnvDisplay object with no environment and an empty view.
ScrollableEnvDisplay(int, int, int, Color) - Constructor for class ScrollableEnvDisplay
Constructs a new ScrollableEnvDisplay object with no environment and an empty view.
selectedClassIsBounded() - Method in class EnvChoiceComboBox
Returns true if the class associated with the selected item in the combo box is a bounded environment and false if it is an unbounded environment.
setBackgroundColor(Color) - Method in class ScrollableEnvDisplay
Sets the background color for displaying the environment.
setColor(Color) - Method in class ColorChoiceDDMenu.ColorChoice
 
setColor(Color) - Method in class ColorChoiceDDMenu.ColorIcon
 
setEnv(Environment) - Method in class ActiveEnvFrame
Sets the Environment being displayed.
setEnv(Environment) - Method in class EnvAppController
Sets the application's environment.
setEnv(Environment) - Method in class EnvAppFrame
Sets the Environment being displayed.
setEnv(Environment) - Method in class ScrollableEnvDisplay
Sets the Environment being displayed.
setEnv(Environment) - Method in interface SettableEnvDisplay
Sets the Environment being displayed.
SettableEnvDisplay - interface SettableEnvDisplay.
Environment-Based Applications:
The SettableEnvDisplay interface adds the setEnv method to the showEnv method specified by EnvDisplay.
setToolTipsEnabled(boolean) - Method in class ScrollableEnvDisplay
Enables/disables showing of tooltip giving information about the environment object beneath the mouse.
setViewPosition(Point) - Method in class PseudoInfiniteViewport
Sets the view position (upper left) to a new point.
shouldStop() - Method in class ActiveEnvFrame
Determines whether a running application has reached a desired stopping state.
showDialog() - Method in class CreateEnvDialog
Shows the modal dialog that allows the user to create a new environment.
showEnv() - Method in class ActiveEnvFrame
Shows the environment.
showEnv() - Method in class EnvAppFrame
Shows the environment.
showEnv() - Method in interface EnvDisplay
Shows the current state of the environment.
showEnv() - Method in class EnvFrameWithSlider
Shows the environment.
showEnv() - Method in class ScrollableEnvDisplay
Shows the environment.
showEnv() - Method in interface SettableEnvDisplay
Shows the current state of the environment.
showOpenDialog(Component) - Method in class EnvFileChooser
Brings up a modal file chooser dialog allowing the user to choose the environment file.
showOriginTip() - Method in class PseudoInfiniteViewport
Shows a tool tip over the upper left corner of the viewport with the contents of the pannable view's pannable tip text (typically a string identifiying the corner point).
showSaveDialog(Component) - Method in class EnvFileChooser
Brings up a modal file chooser dialog allowing the user to save to an environment file.
SOUTH - Static variable in class Direction
 
SOUTHEAST - Static variable in class Direction
 
SOUTHWEST - Static variable in class Direction
 
speedSlider - Variable in class EnvFrameWithSlider
 
SquareEnvironment - class SquareEnvironment.
AP® Computer Science Marine Biology Simulation:
SquareEnvironment is an abstract class that implements only the navigational methods in the Environment interface.
SquareEnvironment() - Constructor for class SquareEnvironment
Constructs a SquareEnvironment object in which cells have four adjacent neighbors -- those with which they share sides.
SquareEnvironment(boolean) - Constructor for class SquareEnvironment
Constructs a SquareEnvironment object in which cells have four or eight adjacent neighbors, depending on the value of the includeDiagonalNeighbors parameter.
STANDARD_CHOICES - Static variable in class ColorChoiceDDMenu
 
step() - Method in class ActiveEnvFrame
Advances the application one step.
step() - Method in class EnvAppController
Advances the simulation one step.
stepButton - Variable in class ActiveEnvFrame
 
stop() - Method in class ActiveEnvFrame
Stops any existing timer currently stepping the application.
stopButton - Variable in class ActiveEnvFrame
 
supportNSteps - Variable in class ActiveEnvFrame
 
supportRestart - Variable in class ActiveEnvFrame
 
supportRun - Variable in class ActiveEnvFrame
 
supportsEnvEditing() - Method in class EnvController
Indicates whether this controller supports environment editing.
supportsFileIO() - Method in class EnvController
Indicates whether this controller supports file i/o.
supportStep - Variable in class ActiveEnvFrame
 

T

text() - Method in class TextCell
Gets text in this text cell.
TextAndIconRenderer - class TextAndIconRenderer.
Environment-Based Applications:
The TextAndIconRenderer class provides a renderer that paints both the text and the icon of a JLabel.
TextAndIconRenderer(JComboBox) - Constructor for class TextAndIconRenderer
Constructs a renderer that will operate on the specified combo box.
TextCell - class TextCell.
Environment-Based Applications:
A TextCell object encapsulates text to go in a cell in an environment.
TextCell(String, Environment, Location) - Constructor for class TextCell
Constructs a text cell with the specified text.
TextCellDisplay - class TextCellDisplay.
Environment-Based Applications:
A TextCellDisplay object displays a TextCell object in an environment.
TextCellDisplay() - Constructor for class TextCellDisplay
 
theEnv - Variable in class ScrollableEnvDisplay
 
timer - Variable in class ActiveEnvFrame
 
tint(Locatable, Component, Graphics2D) - Method in class ScaledImageDisplay
Adjusts the graphics system to use an object's color to tint an image.
TintedImageDisplay - class TintedImageDisplay.
Environment-Based Applications:
A TintedImageDisplay displays an object as a tinted image in an environment.
TintedImageDisplay(String) - Constructor for class TintedImageDisplay
Constructs an object that knows how to display a tinted image.
toLeft() - Method in class Direction
Returns the direction that is a quarter turn to the left of this Direction object.
toLeft(int) - Method in class Direction
Returns the direction that is deg degrees to the left of this Direction object.
toolTipsEnabled() - Method in class ScrollableEnvDisplay
Indicates whether tool tips have been enabled.
toolTipsEnabledFlag - Variable in class ScrollableEnvDisplay
 
toolTipsType - Variable in class ScrollableEnvDisplay
 
toRight() - Method in class Direction
Returns the direction that is a quarter turn to the right of this Direction object.
toRight(int) - Method in class Direction
Returns the direction that is deg degrees to the right of this Direction object.
toString() - Method in class BoundedEnv
Creates a single string representing all the objects in this environment (not necessarily in any particular order).
toString() - Method in class ColorChoiceDDMenu.ColorChoice
 
toString() - Method in class Direction
Represents this direction as a string.
toString() - Method in class EnvEditor.EnvObjectChoice
 
toString() - Method in class Location
Represents this location as a string.
toString() - Method in class UnboundedEnv
Creates a single string representing all the objects in this environment (not necessarily in any particular order).

U

unboundedChooser - Variable in class EnvFileChooser
 
unboundedClass() - Method in class EnvFileChooser
Returns the unbounded environment class selected on the open accessory.
UnboundedEnv - class UnboundedEnv.
AP® Computer Science Marine Biology Simulation:
The UnboundedEnv class models an unbounded, two-dimensional, grid-like environment containing locatable objects.
UnboundedEnv() - Constructor for class UnboundedEnv
Constructs an empty UnboundedEnv object.
unboundedEnvClasses() - Static method in class MBSFactory
Returns the set of unbounded environment classes known to the factory.

V

visibleGridLines - Variable in class ScrollableEnvDisplay
 

W

WEST - Static variable in class Direction
 
WHITE - Static variable in class ColorChoiceDDMenu
 
writeEnv(Environment, File) - Method in interface EnvDataFileHandler
Writes information about an environment into a data file.

X

xCoordToCol(int) - Method in class ScrollableEnvDisplay
 

Y

yCoordToRow(int) - Method in class ScrollableEnvDisplay
 
YELLOW - Static variable in class ColorChoiceDDMenu
 

Z

zoomIn() - Method in class ScrollableEnvDisplay
Zooms in the display by doubling the current cell size.
zoomOut() - Method in class ScrollableEnvDisplay
Zooms out the display by halving the current cell size.

A B C D E F G H I L M N O P R S T U V W X Y Z
Generic Environment GUI Class Library

Copyright© 2003 Alyce Brady