java.awt.geom

Class Point2D.Float

Enclosing Class:
Point2D
Implemented Interfaces:
Cloneable

public static class Point2D.Float
extends Point2D

The Float class defines a point specified in float precision.

Nested Class Summary

Nested classes/interfaces inherited from class java.awt.geom.Point2D

Point2D.Double, Point2D.Float

Field Summary

float
x
The X coordinate of this Point2D.
float
y
The Y coordinate of this Point2D.

Constructor Summary

Float()
Constructs and initializes a Point2D with coordinates (0, 0).
Float(float x, float y)
Constructs and initializes a Point2D with the specified coordinates.

Method Summary

double
getX()
Returns the X coordinate of this Point2D in double precision.
double
getY()
Returns the Y coordinate of this Point2D in double precision.
void
setLocation(double x, double y)
Sets the location of this Point2D to the specified double coordinates.
void
setLocation(float x, float y)
Sets the location of this Point2D to the specified float coordinates.
String
toString()
Returns a String that represents the value of this Point2D.

Methods inherited from class java.awt.geom.Point2D

clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, getX, getY, hashCode, setLocation, setLocation

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

x

public float x
The X coordinate of this Point2D.
Since:
1.2

y

public float y
The Y coordinate of this Point2D.
Since:
1.2

Constructor Details

Float

public Float()
Constructs and initializes a Point2D with coordinates (0, 0).
Since:
1.2
Usages and Demos :

View More Examples of Float()
   1:     private Activity m_activity;
   2:     private Point2D  m_tmp = new Point2D.Float();
   3:     
   4:     public AnchorUpdateControl(Layout layout) {
   5:         this(layout,null);

View Full Code Here
   1: 
   2:     Point2D.Float p1 = new Point2D.Float();
   3:     double angle = -Rotation.getDouble() * Math.PI / 180.0;
   4:     AffineTransform rot = AffineTransform.getRotateInstance(angle);
   5:     boolean mirror = Mirror.getFlag();

View Full Code Here
   1:     public Object createObject() {
   2:         final Point2D point = new Point2D.Float();
   3: 
   4:         final float x = getFloatParameter("x");
   5:         final float y = getFloatParameter("y");

View Full Code Here
   1:     private int yLast;
   2:     private Point2D down = new Point2D.Float();
   3:     private int button = RIGHT_MOUSE_BUTTON; 
   4:     
   5:     public ZoomControl() {

View Full Code Here
   1:             AffineTransform af=canvas.getTransform();
   2:             Point2D.Float point2D=new Point2D.Float();
   3:             try {
   4:         ...
   5:     public Point transformPoint(AffineTransform af, Point pt){
   6:         Point2D.Float point2D=new Point2D.Float();
   7:         af.transform(new Point2D.Float(pt.x,pt.y), point2D);
   8:         ...
   9:     public Point inverseTransformPoint(AffineTransform af, Point pt){
  10:         Point2D.Float point2D=new Point2D.Float();
  11:         try {

View Full Code Here

Float

public Float(float x,
             float y)
Constructs and initializes a Point2D with the specified coordinates.
Parameters:
Since:
1.2
Usages and Demos :

View More Examples of Float(float x,float y)
   1:     LabelElementFactory labelFactory = new LabelElementFactory();
   2:     labelFactory.setAbsolutePosition(new Point2D.Float(0, 0));
   3:     labelFactory.setMinimumSize(new FloatDimension(200, 15));
   4:         ...
   5:     labelFactory = new LabelElementFactory();
   6:     labelFactory.setAbsolutePosition(new Point2D.Float(200, 0));
   7:     labelFactory.setMinimumSize(new FloatDimension(-100, 15));
   8:         ...
   9:     textFieldFactory.setFieldname("lunch.Meal");
  10:     textFieldFactory.setAbsolutePosition(new Point2D.Float(0, 0));
  11:     textFieldFactory.setMinimumSize(new FloatDimension(200, 12));

View Full Code Here
   1:     LabelElementFactory labelFactory = new LabelElementFactory();
   2:     labelFactory.setAbsolutePosition(new Point2D.Float(0, 0));
   3:     labelFactory.setMinimumSize(new FloatDimension(200, 15));
   4:         ...
   5:     labelFactory = new LabelElementFactory();
   6:     labelFactory.setAbsolutePosition(new Point2D.Float(200, 0));
   7:     labelFactory.setMinimumSize(new FloatDimension(-100, 15));
   8:         ...
   9:     textFieldFactory.setFieldname("office.Name");
  10:     textFieldFactory.setAbsolutePosition(new Point2D.Float(0, 0));
  11:     textFieldFactory.setMinimumSize(new FloatDimension(200, 12));

View Full Code Here
   1:     LabelElementFactory labelFactory = new LabelElementFactory();
   2:     labelFactory.setAbsolutePosition(new Point2D.Float(0, 0));
   3:     labelFactory.setMinimumSize(new FloatDimension(200, 15));
   4:         ...
   5:     labelFactory = new LabelElementFactory();
   6:     labelFactory.setAbsolutePosition(new Point2D.Float(200, 0));
   7:     labelFactory.setMinimumSize(new FloatDimension(-100, 15));
   8:         ...
   9:     textFieldFactory.setFieldname("activitylog.Time");
  10:     textFieldFactory.setAbsolutePosition(new Point2D.Float(0, 0));
  11:     textFieldFactory.setMinimumSize(new FloatDimension(200, 12));

View Full Code Here
   1:     factory.setName("T1");
   2:     factory.setAbsolutePosition(new Point2D.Float(0, 0));
   3:     factory.setMinimumSize(new FloatDimension(150, 12));
   4:         ...
   5:     factory.setName("T2");
   6:     factory.setAbsolutePosition(new Point2D.Float(200, 0));
   7:     factory.setHorizontalAlignment(ElementAlignment.LEFT);
   8:     factory.setFieldname(DemoReportControler.MESSAGE_TWO_FIELDNAME);
   9:     reportHeader.addElement(factory.createElement());

View Full Code Here
   1:     factory.setName("T1");
   2:     factory.setAbsolutePosition(new Point2D.Float(0, 0));
   3:     factory.setMinimumSize(new FloatDimension(150, 12));
   4:         ...
   5:     factory.setName("T2");
   6:     factory.setAbsolutePosition(new Point2D.Float(200, 0));
   7:     factory.setMinimumSize(new FloatDimension(150, 12));
   8:     factory.setColor(Color.black);
   9:     factory.setHorizontalAlignment(ElementAlignment.LEFT);

View Full Code Here

Method Details

getX

public double getX()
Returns the X coordinate of this Point2D in double precision.
Overrides:
getX in interface Point2D
Returns:
the X coordinate of this Point2D.
Since:
1.2

getY

public double getY()
Returns the Y coordinate of this Point2D in double precision.
Overrides:
getY in interface Point2D
Returns:
the Y coordinate of this Point2D.
Since:
1.2

setLocation

public void setLocation(double x,
                        double y)
Sets the location of this Point2D to the specified double coordinates.
Overrides:
setLocation in interface Point2D
Parameters:
Since:
1.2

setLocation

public void setLocation(float x,
                        float y)
Sets the location of this Point2D to the specified float coordinates.
Parameters:
Since:
1.2

toString

public String toString()
Returns a String that represents the value of this Point2D.
Overrides:
toString in interface Object
Returns:
a string representation of this Point2D.
Since:
1.2