ppJava.serie04.oceanlife
Class Bubble

java.lang.Object
  extended by ppJava.serie04.oceanlife.OceanObject
      extended by ppJava.serie04.oceanlife.Bubble
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable

public class Bubble
extends OceanObject

A bubble floating up in the ocean

Author:
ken, bpei
See Also:
Serialized Form

Field Summary
(package private)  int fixedEndingPos
           
(package private)  int moveLimit
           
private static long serialVersionUID
           
 
Constructor Summary
Bubble(int x, int y)
          Constructor for a bubble at position (x,y)
 
Method Summary
 void run()
          The movement of a bubble
 void setMoveLimit(int moveLimit)
          Sets the Limit to where the bubble is allowed to move
 java.lang.String toString()
           
 
Methods inherited from class ppJava.serie04.oceanlife.OceanObject
calcAbsDistance, changeDirections, checkBarrier, checkPosition, createImageIcon, genRandomVector, getBarrier, getBorders, getClassName, getDiffVector, getDistance, getImageIcon, getImageResource, getImageSize, getMoveVector, getObjectCount, getOffset, getPosition, hasSameDirection, incPosX, incPosY, isVulnerableTo, moveStep, normalizeImage, setBarrier, setBorders, setImageIcon, setImageResource, setImageSize, setMoveVector, setOffset, setPosition, switchMovementDirection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

moveLimit

int moveLimit

fixedEndingPos

int fixedEndingPos
Constructor Detail

Bubble

public Bubble(int x,
              int y)
Constructor for a bubble at position (x,y)

Parameters:
x -
y -
Method Detail

setMoveLimit

public void setMoveLimit(int moveLimit)
Sets the Limit to where the bubble is allowed to move

Parameters:
moveLimit -

toString

public java.lang.String toString()
Overrides:
toString in class OceanObject

run

public void run()
The movement of a bubble