Class cynosurex.awt.Position
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cynosurex.awt.Position

java.lang.Object
   |
   +----cynosurex.awt.Position

public class Position
extends Object
A position representing a location in (row, col) coordinate space.

Constructor Index

 o Position()
Constructs and initializes a Position initialized with (0, 0).
 o Position(int, int)
Constructs and initializes a Position from the specified row and column coordinates.
 o Position(Position)
Constructs and initializes a Position with the same location as the specified Position.

Method Index

 o getCol()
Returns the column of this Position.
 o getPosition()
Returns the location of this Position.
 o getRow()
Returns the row of this Position.
 o setCol(int)
Set the column of this Position.
 o setPosition(int, int)
Set the row and column of this position.
 o setRow(int)
Set the row of this Position.

Constructors

 o Position
  public Position()
Constructs and initializes a Position initialized with (0, 0).
 o Position
  public Position(int r,
                  int c)
Constructs and initializes a Position from the specified row and column coordinates.
 o Position
  public Position(Position p)
Constructs and initializes a Position with the same location as the specified Position.

Methods

 o getRow
  public int getRow()
Returns the row of this Position.
 o getCol
  public int getCol()
Returns the column of this Position.
 o setRow
  public void setRow(int r)
Set the row of this Position. @param r - row.
 o setCol
  public void setCol(int c)
Set the column of this Position. @param c - column.
 o getPosition
  public synchronized Position getPosition()
Returns the location of this Position.
 o setPosition
  public synchronized void setPosition(int r,
                                       int c)
Set the row and column of this position. @param r - row. @param c - col.

All Packages  Class Hierarchy  This Package  Previous  Next  Index