ilog.cpl.graphic
Class IlpRelativePoint

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
                  extended by ilog.cpl.graphic.IlpRelativePoint
All Implemented Interfaces:
IlpPosition, Serializable, Cloneable

public class IlpRelativePoint
extends IlpPoint

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

For instance IlpPoint defines a position in pixels, to be placed directly in the view. For card items placed within card item containers, the position is also in pixels, but relative to the parent.

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
IlpRelativePoint()
          Creates a new relative point located at (0,0).
IlpRelativePoint(float x, float y)
          Creates a new relative point at the specified location.
IlpRelativePoint(IlvPoint p)
          Creates a new relative point by copying an existing point.
IlpRelativePoint(String s)
          Creates a new relative point by parsing a string.
 
Method Summary
 Object clone()
          Copies the point.
static Object valueOf(String s)
          Creates a new relative point by parsing a string.
 
Methods inherited from class ilog.cpl.graphic.IlpPoint
equals
 
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

IlpRelativePoint

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


IlpRelativePoint

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

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

IlpRelativePoint

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


IlpRelativePoint

public IlpRelativePoint(String s)
                 throws IllegalArgumentException
Creates a new relative point by parsing a string. 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 relative 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 IlpPoint


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