Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

postgresql.geometric
Class PGpoint  view PGpoint download PGpoint.java

java.lang.Object
  extended bypostgresql.util.PGobject
      extended bypostgresql.geometric.PGpoint
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class PGpoint
extends postgresql.util.PGobject
implements java.io.Serializable, java.lang.Cloneable

This implements a version of java.awt.Point, except it uses double to represent the coordinates.

It maps to the point datatype in postgresql.


Field Summary
 double x
          The X coordinate of the point
 double y
          The Y coordinate of the point
 
Fields inherited from class postgresql.util.PGobject
type, value
 
Constructor Summary
PGpoint()
          Required by the driver
PGpoint(double x, double y)
           
PGpoint(java.lang.String value)
          This is called mainly from the other geometric types, when a point is imbeded within their definition.
 
Method Summary
 java.lang.Object clone()
          This must be overidden to allow the object to be cloned
 boolean equals(java.lang.Object obj)
          This must be overidden to allow comparisons of objects
 java.lang.String getValue()
          This must be overidden, to return the value of the object, in the form required by postgresql.
 void move(double x, double y)
          Moves the point to the supplied coordinates.
 void move(int x, int y)
          Moves the point to the supplied coordinates.
 void setLocation(int x, int y)
          Moves the point to the supplied coordinates.
 void setLocation(java.awt.Point p)
          Moves the point to the supplied java.awt.Point refer to java.awt.Point for description of this
 void setValue(java.lang.String s)
          This method sets the value of this object.
 void translate(double x, double y)
          Translate the point with the supplied amount.
 void translate(int x, int y)
          Translate the point with the supplied amount.
 
Methods inherited from class postgresql.util.PGobject
getType, setType, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x
The X coordinate of the point


y

public double y
The Y coordinate of the point

Constructor Detail

PGpoint

public PGpoint(double x,
               double y)

PGpoint

public PGpoint(java.lang.String value)
        throws java.sql.SQLException
This is called mainly from the other geometric types, when a point is imbeded within their definition.


PGpoint

public PGpoint()
Required by the driver

Method Detail

setValue

public void setValue(java.lang.String s)
              throws java.sql.SQLException
Description copied from class: postgresql.util.PGobject
This method sets the value of this object. It must be overidden.


equals

public boolean equals(java.lang.Object obj)
Description copied from class: postgresql.util.PGobject
This must be overidden to allow comparisons of objects


clone

public java.lang.Object clone()
This must be overidden to allow the object to be cloned


getValue

public java.lang.String getValue()
Description copied from class: postgresql.util.PGobject
This must be overidden, to return the value of the object, in the form required by postgresql.


translate

public void translate(int x,
                      int y)
Translate the point with the supplied amount.


translate

public void translate(double x,
                      double y)
Translate the point with the supplied amount.


move

public void move(int x,
                 int y)
Moves the point to the supplied coordinates.


move

public void move(double x,
                 double y)
Moves the point to the supplied coordinates.


setLocation

public void setLocation(int x,
                        int y)
Moves the point to the supplied coordinates. refer to java.awt.Point for description of this


setLocation

public void setLocation(java.awt.Point p)
Moves the point to the supplied java.awt.Point refer to java.awt.Point for description of this