cynosurex.awt
Class Position

java.lang.Object
  extended by cynosurex.awt.Position
All Implemented Interfaces:
cynosurex.internal.AuthorCommon, cynosurex.internal.CommonInterface, cynosurex.internal.CompanyCommon

public class Position
extends java.lang.Object
implements cynosurex.internal.CommonInterface

A position representing a location in (row, col) coordinate space.


Field Summary
 
Fields inherited from interface cynosurex.internal.CommonInterface
copyright, copyrightYears, notice, program, version
 
Fields inherited from interface cynosurex.internal.AuthorCommon
author, copyrightSymbol, noticeMsg, rights
 
Fields inherited from interface cynosurex.internal.CompanyCommon
company, email, website
 
Constructor Summary
Position()
          Constructs and initializes a Position initialized with (0, 0).
Position(int r, int c)
          Constructs and initializes a Position from the specified row and column coordinates.
Position(Position p)
          Constructs and initializes a Position with the same location as the specified Position.
 
Method Summary
 int getCol()
          Returns the column of this Position.
 Position getPosition()
          Returns the location of this Position.
 int getRow()
          Returns the row of this Position.
 void setCol(int c)
          Set the column of this Position.
 void setPosition(int r, int c)
          Set the row and column of this position.
 void setRow(int r)
          Set the row of this Position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Position

public Position()
Constructs and initializes a Position initialized with (0, 0).


Position

public Position(int r,
                int c)
Constructs and initializes a Position from the specified row and column coordinates.


Position

public Position(Position p)
Constructs and initializes a Position with the same location as the specified Position.

Method Detail

getRow

public int getRow()
Returns the row of this Position.


getCol

public int getCol()
Returns the column of this Position.


setRow

public void setRow(int r)
Set the row of this Position.

Parameters:
r - - row.

setCol

public void setCol(int c)
Set the column of this Position.

Parameters:
c - - column.

getPosition

public Position getPosition()
Returns the location of this Position.


setPosition

public void setPosition(int r,
                        int c)
Set the row and column of this position.

Parameters:
r - - row.
c - - col.