net.wimpi.telnetd.io.toolkit
Class Point

java.lang.Object
  extended by net.wimpi.telnetd.io.toolkit.Point

public class Point
extends java.lang.Object

Class that represents a point on the terminal. Respectively it specifies a character cell, encapsulating column and row coordinates.

Version:
2.0 (16/07/2006)
Author:
Dieter Wimberger

Constructor Summary
Point()
          Constructs an instance with its coordinates set to the origin (0/0).
Point(int col, int row)
          Constructs an instance with given coordinates.
 
Method Summary
 int getColumn()
          Accessor method for the column coordinate.
 int getRow()
          Accessor method for the row coordinate.
 void move(int col, int row)
          Convenience method to set the points coordinates.
 void setColumn(int col)
          Mutator method for the column coordinate of this Cell.
 void setLocation(int col, int row)
          Mutator method to set the points coordinate at once.
 void setRow(int row)
          Mutator method for the row coordinate of this Cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Point

public Point()
Constructs an instance with its coordinates set to the origin (0/0).


Point

public Point(int col,
             int row)
Constructs an instance with given coordinates.

Parameters:
col - Integer that represents a column position.
row - Integer that represents a row position
Method Detail

setLocation

public void setLocation(int col,
                        int row)
Mutator method to set the points coordinate at once.

Parameters:
col - Integer that represents a column position.
row - Integer that represents a row position

move

public void move(int col,
                 int row)
Convenience method to set the points coordinates.

Parameters:
col - Integer that represents a column position.
row - Integer that represents a row position

getColumn

public int getColumn()
Accessor method for the column coordinate.

Returns:
int that represents the cells column coordinate.

setColumn

public void setColumn(int col)
Mutator method for the column coordinate of this Cell.

Parameters:
col - Integer that represents a column position.

getRow

public int getRow()
Accessor method for the row coordinate.

Returns:
int that represents the cells row coordinate.

setRow

public void setRow(int row)
Mutator method for the row coordinate of this Cell.

Parameters:
row - Integer that represents a row position.


Copyright © 2010. All Rights Reserved.