ilog.cpl.graphic
Class IlpPoint

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Float
          extended by ilog.views.IlvPoint
              extended by ilog.cpl.graphic.IlpPoint
All Implemented Interfaces:
IlpPosition, Serializable, Cloneable
Direct Known Subclasses:
IlpRelativePoint

public class IlpPoint
extends IlvPoint
implements IlpPosition

This class implements a point that can be used as a position in the network component.

Since:
JTGO 3.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Point2D.Float
x, y
 
Constructor Summary
IlpPoint()
          Creates a new point located at (0,0).
IlpPoint(float x, float y)
          Creates a new point at the specified location.
IlpPoint(IlvPoint p)
          Creates a new point by copying an existing point.
IlpPoint(String s)
          Creates a new point by parsing a string.
 
Method Summary
 Object clone()
          Copies the point.
 boolean equals(Object other)
          Tests for equality.
static Object valueOf(String s)
          Creates a new point by parsing a string.
 
Methods inherited from class ilog.views.IlvPoint
floor, move, toString, translate, xFloor, yFloor
 
Methods inherited from class java.awt.geom.Point2D.Float
getX, getY, setLocation, setLocation
 
Methods inherited from class java.awt.geom.Point2D
distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlpPoint

public IlpPoint()
Creates a new point located at (0,0).


IlpPoint

public IlpPoint(float x,
                float y)
Creates a new point at the specified location.

Parameters:
x - The x coordinate.
y - The y coordinate.

IlpPoint

public IlpPoint(IlvPoint p)
Creates a new point by copying an existing point.


IlpPoint

public IlpPoint(String s)
         throws IllegalArgumentException
Creates a new point by parsing a string.

Point is created from String formed as x,y for instance 120,50. Throws an exception if the string cannot be parsed as a point.

Parameters:
s - The String containing the point.
Throws:
IllegalArgumentException - if the string does not contain a point that can be parsed.
Method Detail

valueOf

public static Object valueOf(String s)
                      throws IllegalArgumentException
Creates a new point by parsing a string. Throws an exception if the string cannot be parsed as a point.

Parameters:
s - The String containing the point.
Returns:
The parsed value of the point.
Throws:
IllegalArgumentException - if the string does not contain a point that can be parsed.

clone

public Object clone()
Copies the point.

Overrides:
clone in class Point2D

equals

public boolean equals(Object other)
Tests for equality.

Overrides:
equals in class Point2D
Internal method or field: do not use!


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.