ilog.views
Class IlvPoint

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Float
          extended by ilog.views.IlvPoint
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class IlvPoint
extends java.awt.geom.Point2D.Float
implements java.io.Serializable

The IlvPoint class defines a point specified in float precision representing a location in (x, y) coordinate space.

This class is a serializable subclass of the Java Point2D.Float class.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Point2D.Float
x, y
 
Constructor Summary
IlvPoint()
          Creates a new IlvPoint with coordinates (0, 0).
IlvPoint(float x, float y)
          Creates a new IlvPoint with the specified coordinates.
IlvPoint(IlvPoint p)
          Creates a new IlvPoint by copying the specified point.
 
Method Summary
 void floor()
          Modifies the point so that the coordinates becomes mathematical integers.
 void move(float x, float y)
          Changes the point location.
 java.lang.String toString()
          Returns a String that represents the value of this IlvPoint.
 void translate(float dx, float dy)
          Translates the point.
 int xFloor()
          Returns the x coordinate of the point as a mathematical integer.
 int yFloor()
          Returns the y coordinate of the point as a mathematical integer.
 
Methods inherited from class java.awt.geom.Point2D.Float
getX, getY, setLocation, setLocation
 
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvPoint

public IlvPoint()
Creates a new IlvPoint with coordinates (0, 0).


IlvPoint

public IlvPoint(float x,
                float y)
Creates a new IlvPoint with the specified coordinates.

Parameters:
x - the x coordinate.
y - the y coordinate.

IlvPoint

public IlvPoint(IlvPoint p)
Creates a new IlvPoint by copying the specified point.

Parameters:
p - The point to copy.
Method Detail

translate

public final void translate(float dx,
                            float dy)
Translates the point.


move

public final void move(float x,
                       float y)
Changes the point location.


floor

public final void floor()
Modifies the point so that the coordinates becomes mathematical integers. This is useful when you need to use a point to draw on a view.

See Also:
xFloor(), yFloor(), IlvTransformer.applyFloor(ilog.views.IlvPoint)

xFloor

public final int xFloor()
Returns the x coordinate of the point as a mathematical integer. This is useful when you need to use a point to draw on a view.

See Also:
floor(), yFloor(), IlvTransformer.applyFloor(ilog.views.IlvPoint)

yFloor

public final int yFloor()
Returns the y coordinate of the point as a mathematical integer. This is useful when you need to use a point to draw on a view.

See Also:
floor(), xFloor(), IlvTransformer.applyFloor(ilog.views.IlvPoint)

toString

public java.lang.String toString()
Returns a String that represents the value of this IlvPoint.

Overrides:
toString in class java.awt.geom.Point2D.Float
Returns:
a string representation of this IlvPoint.


Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.