All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class scrobble.Positioner

java.lang.Object
   |
   +----scrobble.Positioner

public class Positioner
extends Object
implements Serializable
Positioner.java positionne un objet sur le board


Variable Index

 o heightPosition
Height position
 o widthPosition
Width position

Constructor Index

 o Positioner()
Creates a new Positioner
 o Positioner(int, int)
Creates a new Positioner with the given coordinates

Method Index

 o comparePositions(Positioner)
Compare the widthPosition and the heightPosition of the Positioner with these of another positioner.
 o getHeightPosition()
Returns the second coordinate of the Positioner, that is heightPosition
 o getWidthPosition()
Returns the first coordinate of the Positioner, that is widthPosition
 o setHeightPosition(int)
Modifies the second coordinate of the Positioner, that is heightPosition
 o setWidthPosition(int)
Modifies the first coordinate of the Positioner, that is widthPosition

Variables

 o widthPosition
 int widthPosition
Width position

 o heightPosition
 int heightPosition
Height position

Constructors

 o Positioner
 public Positioner()
Creates a new Positioner

 o Positioner
 public Positioner(int widthPosition,
                   int heightPosition)
Creates a new Positioner with the given coordinates

Parameters:
widthPosition - the first coordinate of the new Positioner
heightPosition - the second coordinate of the new Positioner

Methods

 o setWidthPosition
 public void setWidthPosition(int newW)
Modifies the first coordinate of the Positioner, that is widthPosition

Parameters:
newW - the new first coordinate of the Positioner
 o getWidthPosition
 public int getWidthPosition()
Returns the first coordinate of the Positioner, that is widthPosition

Returns:
widthPosition
 o setHeightPosition
 public void setHeightPosition(int newH)
Modifies the second coordinate of the Positioner, that is heightPosition

Parameters:
newH - the new second coordinate of the Positioner
 o getHeightPosition
 public int getHeightPosition()
Returns the second coordinate of the Positioner, that is heightPosition

Returns:
heightPosition
 o comparePositions
 public boolean comparePositions(Positioner p)
Compare the widthPosition and the heightPosition of the Positioner with these of another positioner.

Returns:
true if the widthPosition and the heightPosition are the same ; false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index