站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

Coord (Terminal Emulator) - NetBeans API Javadoc (Current Development Version)

org.netbeans.lib.terminalemulator 1.2

org.netbeans.lib.terminalemulator
Class Coord

java.lang.Object
  extended by org.netbeans.lib.terminalemulator.Coord
All Implemented Interfaces:
Comparable

public class Coord
extends Object
implements Comparable

A cartesian coordinate class, similar to Point. The equivalent of 'offset' in swing.text.Document.
Rows are 0-origin, columns are 0-origin.

Why not the regular Java Point? Because ...


Field Summary
 int col
           
 int row
           
 
Constructor Summary
Coord()
          Create a Coord at the origin (top-left)
Coord(org.netbeans.lib.terminalemulator.BCoord coord, int bias)
           
Coord(Coord coord)
           
 
Method Summary
 Object clone()
           
 int compareTo(Object o)
          Examples: To satisfy Comparable.
 void copyFrom(Coord src)
           
 boolean equals(Coord target)
           
static Coord make(int row, int col)
           
 org.netbeans.lib.terminalemulator.BCoord toBCoord(int bias)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

row

public int row

col

public int col
Constructor Detail

Coord

public Coord()
Create a Coord at the origin (top-left)


Coord

public Coord(Coord coord)

Coord

public Coord(org.netbeans.lib.terminalemulator.BCoord coord,
             int bias)
Method Detail

make

public static Coord make(int row,
                         int col)

toBCoord

public org.netbeans.lib.terminalemulator.BCoord toBCoord(int bias)

copyFrom

public void copyFrom(Coord src)

clone

public Object clone()
Overrides:
clone in class Object

equals

public boolean equals(Coord target)

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Object o)
              throws ClassCastException
Examples: To satisfy Comparable.

 a < b        === a.compareTo(b) < 0
 a >= b       === a.compareTo(b) >= 0
 

Specified by:
compareTo in interface Comparable
Throws:
ClassCastException

org.netbeans.lib.terminalemulator 1.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.