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

Field Summary
 private BLBoatMapblBoatMap
           
 private intfloor
           

Constructor Summary
BoatMapBean()
          The constructor

Method Summary
 intgetFloor()
          Gets the floor that already been set.
 voidmakeSideImage(Writer out, int w, int h)
          creates the picture of the boat
from the side.
 voidmakeTopImage(Writer out, int w, int h)
          creates the picture of the boat
from the top.
 voidsetFloor(int i)
          Set which floor to draw, use makeSideImage and makeTopImage
to draw the floor.
 voidsetTarget(HotSpotContainer hs)
          set the destination of the HotSpotpath
 intsideClickToFloor(int x, int y)
           
 HotSpotContainertopClickToHotSpot(int x, int y)
           

Field Detail

blBoatMap

private BLBoatMap blBoatMap

floor

private int floor
Constructor Detail

BoatMapBean

public BoatMapBean()
The constructor
Method Detail

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.

Association Links

to Class com.ltu.smd116.bl.boatmap.BLBoatMap