Serialized Form


Package infpp.oceanlife

Class infpp.oceanlife.Bubble extends OceanObject implements Serializable

Serialized Fields

dir0

int dir0
Sets the width of the x-direction of the bubble's movement.


dir1

int dir1
Sets the amplitude of the x-direction of the bubble's movement.


dir2

int dir2
Sets the width of the y-direction of the bubble's movement.


dir3

int dir3
Sets the amplitude of the y-direction of the bubble's movement.

Class infpp.oceanlife.Fish extends OceanObject implements Serializable

Serialized Fields

fishIcon

javax.swing.ImageIcon fishIcon
the icon to use for the fish


dir0

int dir0
Sets the width of the x-direction of the bubble's movement.


dir1

int dir1
Sets the amplitude of the x-direction of the bubble's movement.


dir2

int dir2
Sets the width of the y-direction of the bubble's movement.


dir3

int dir3
Sets the amplitude of the y-direction of the bubble's movement.

Class infpp.oceanlife.Ocean extends java.lang.Object implements Serializable

Serialized Fields

width

int width
The width of the ocean.


depth

int depth
The width of the ocean.


animationSpeed

int animationSpeed
The sleep time for ocean object threads.


oceanObjects

java.util.LinkedList<E> oceanObjects
The linked list that holds the information about ocean objects.


oceanBackgroundColor

java.awt.Color oceanBackgroundColor
The ocean background colour


oilCatastrophe

boolean oilCatastrophe
Indicates whether an oil catastrophe is happening.


ClickPosition

java.awt.Point ClickPosition
The position of the last mouse click


numberOfHighlightedObjects

int numberOfHighlightedObjects
Gives the number of currently highlighted objects.


oceanGUIRunning

boolean oceanGUIRunning
Indicates whether the GUI thread is currently running.


OceanObjectStrings

java.lang.String[] OceanObjectStrings
The types of ocean object available


FishIconLeftwardLocation

java.lang.String FishIconLeftwardLocation
The location of the icon to use if the fish swims leftward and is not highlighted.


FishIconRightwardLocation

java.lang.String FishIconRightwardLocation
The location of the icon to use if the fish swims rightward and is not highlighted.


HighlightedFishIconLeftwardLocation

java.lang.String HighlightedFishIconLeftwardLocation
The location of the icon to use if the fish swims leftward and is highlighted.


HighlightedFishIconRightwardLocation

java.lang.String HighlightedFishIconRightwardLocation
The location of the icon to use if the fish swims rightward and is highlighted.


OilBlobLocation

java.lang.String OilBlobLocation
The location of the icon to use for oil blobs.


StoneIconLocation

java.lang.String StoneIconLocation
The location of the icon to use for stones.


HighlightedStoneIconLocation

java.lang.String HighlightedStoneIconLocation
The location of the icon to use for highlighted stones.


BubbleIconLocation

java.lang.String BubbleIconLocation
The location of the icon to use for bubbles.


HighlightedBubbleIconLocation

java.lang.String HighlightedBubbleIconLocation
The location of the icon to use for highlighted bubbles.


PlantIconLocation

java.lang.String PlantIconLocation
The location of the icon to use for plants.


HighlightedPlantIconLocation

java.lang.String HighlightedPlantIconLocation
The location of the icon to use for highlighted plants.

Class infpp.oceanlife.OceanGUI extends javax.swing.JFrame implements Serializable

Serialized Fields

localOcean

Ocean localOcean
the ocean we work with


objectsToAdd

javax.swing.JComboBox objectsToAdd
the dropdown box to select what kind of OceanObject to add


xEntry

java.awt.TextField xEntry
the TextField to specify the x coordinate of a new object's position


yEntry

java.awt.TextField yEntry
the TextField to specify the y coordinate of a new object's position


xValue

java.lang.String xValue
the string to hold the user's input to xEntry


yValue

java.lang.String yValue
the string to hold the user's input to yEntry


ClickPosition

java.awt.Point ClickPosition
the position of the last mouse click, regardless of button


dragPositionStart

java.awt.Point dragPositionStart
the position where a drag with the mouse originated


dragPositonEnd

java.awt.Point dragPositonEnd
the position where a drag with the mouse ended


mousePointerPosition

java.awt.Point mousePointerPosition
the current position of the pointer


fireMode

boolean fireMode
says whether fire mode is on, which adds objects in rapid succession


selectedRectangle

java.awt.Rectangle selectedRectangle
the rectangle most recently selected


oldRectangle

java.awt.Rectangle oldRectangle
the rectangle selected before the current selection was made


addButton

javax.swing.JButton addButton
the button that adds objects at the specified position


removeButton

javax.swing.JButton removeButton
the button that removes highlighted objects


startButton

javax.swing.JButton startButton
the button that starts the fun!


stepButton

javax.swing.JButton stepButton
the button that steps through the motion


stopButton

javax.swing.JButton stopButton
the button that stops the motion


loadButton

javax.swing.JButton loadButton
the button that loads an ocean from a file


saveButton

javax.swing.JButton saveButton
the button that saves an ocean to a file


printButton

javax.swing.JButton printButton
the button that prints the ocean's current population


quitButton

javax.swing.JButton quitButton
Press this button should you ever want to leave the ocean.


water

javax.swing.JPanel water
Does what it says on the box: Displays the ocean and all of its inhabitants.


buttonPanel

javax.swing.JPanel buttonPanel
the panel where all the controls go.


fKeyPressed

javax.swing.Action fKeyPressed
Here we specify how the GUI should react to the keyboard input.


sKeyPressed

javax.swing.Action sKeyPressed

bKeyPressed

javax.swing.Action bKeyPressed

pKeyPressed

javax.swing.Action pKeyPressed

oKeyPressed

javax.swing.Action oKeyPressed

ExclamationMarkKeyPressed

javax.swing.Action ExclamationMarkKeyPressed

Class infpp.oceanlife.OceanObject extends java.lang.Thread implements Serializable

Serialized Fields

myID

int myID
ID for each ocean object.


objectIcon

javax.swing.ImageIcon objectIcon
ID for each ocean object.


isHighlighted

boolean isHighlighted
A flag to indicate whether the object is currently highlighted.


currentOcean

Ocean currentOcean
The currently-used ocean.


toDie

boolean toDie
A flag indicating whether the object's thread should die.


position

int[] position
The object's position vector.


direction

int[] direction
The object's direction vector.

Class infpp.oceanlife.OilBlob extends OceanObject implements Serializable

Serialized Fields

dir0

int dir0
Sets the width of the x-direction of the bubble's movement.


dir1

int dir1
Sets the amplitude of the x-direction of the bubble's movement.


dir2

int dir2
Sets the width of the y-direction of the bubble's movement.


dir3

int dir3
Sets the amplitude of the y-direction of the bubble's movement.

Class infpp.oceanlife.Plant extends OceanObject implements Serializable

Serialized Fields

dir0

int dir0
Sets the width of the x-direction of the bubble's movement.


dir1

int dir1
Sets the amplitude of the x-direction of the bubble's movement.


dir2

int dir2
Sets the width of the y-direction of the bubble's movement.


dir3

int dir3
Sets the amplitude of the y-direction of the bubble's movement.

Class infpp.oceanlife.Stone extends OceanObject implements Serializable

Serialized Fields

dir0

int dir0
Sets the width of the x-direction of the bubble's movement.


dir1

int dir1
Sets the amplitude of the x-direction of the bubble's movement.


dir2

int dir2
Sets the width of the y-direction of the bubble's movement.


dir3

int dir3
Sets the amplitude of the y-direction of the bubble's movement.