com.ltu.smd116.beans
Class BoatMapBean
- public class BoatMapBean
The BoatMapBean class will draw the boatmap.
Either from the side or from the top.
- Author:
- Anna Nilsson
blBoatMap
private BLBoatMap blBoatMap
floor
private int floor
BoatMapBean
public BoatMapBean()
- The constructor
getFloor
public int getFloor()
- Gets the floor that already been set.
- Returns: the floornumber.
makeSideImage
public void makeSideImage(Writer out, int w, int h)
- creates the picture of the boat
from the side.
makeTopImage
public void makeTopImage(Writer out, int w, int h)
- creates the picture of the boat
from the top.
setFloor
public void setFloor(int i)
- Set which floor to draw, use makeSideImage and makeTopImage
to draw the floor.- Parameters:
- i - the number of the floor.
setTarget
public void setTarget(HotSpotContainer hs)
- set the destination of the HotSpotpath
- Parameters:
- hs - is a HotSpotContainer
sideClickToFloor
public int sideClickToFloor(int x, int y)
- Parameters:
- x - is the x-coordinate of the boat
- y - is the y-coordinate of the boat
- Returns: the floornumber that the user clicked on.
topClickToHotSpot
public HotSpotContainer topClickToHotSpot(int x, int y)
- Parameters:
- x - is the x-coordinate of the boat
- y - is the y-coordinate of the boat
- Returns: the HotSpot that the user clicked on.
to Class com.ltu.smd116.bl.boatmap.BLBoatMap