ilog.cpl.graphic
Class IlpRect

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.geom.Rectangle2D.Float
              extended by ilog.views.IlvRect
                  extended by ilog.cpl.graphic.IlpRect
All Implemented Interfaces:
IlpPosition, Shape, Serializable, Cloneable
Direct Known Subclasses:
IlpRelativeRect

public class IlpRect
extends IlvRect
implements IlpPosition

This class implements a rectangle 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.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Rectangle2D.Float
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
IlpRect()
          Creates a new rectangle.
IlpRect(float x, float y, float width, float height)
          Creates a new rectangle.
IlpRect(IlvRect rect)
          Creates a new rectangle by copying an existing one.
 
Method Summary
 Object clone()
          Copies the rectangle.
 double getHeight()
          Returns the rectangle height.
 double getWidth()
          Returns the rectangle width.
 void setHeight(double height)
          Sets the rectangle height.
 void setWidth(double width)
          Sets the rectangle width.
 void setX(double x)
          Sets the rectangle X coordinate.
 void setY(double y)
          Sets the rectangle Y coordinate.
 
Methods inherited from class ilog.views.IlvRect
add, add, contains, expand, expand, floor, heightFloor, inside, intersection, intersects, move, reshape, resize, toString, translate, widthFloor, xFloor, yFloor
 
Methods inherited from class java.awt.geom.Rectangle2D.Float
createIntersection, createUnion, getBounds2D, getX, getY, isEmpty, outcode, setRect, setRect, setRect
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union
 
Methods inherited from class java.awt.geom.RectangularShape
contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlpRect

public IlpRect()
Creates a new rectangle. The location is (0,0) and the width and height are 0.


IlpRect

public IlpRect(float x,
               float y,
               float width,
               float height)
Creates a new rectangle.


IlpRect

public IlpRect(IlvRect rect)
Creates a new rectangle by copying an existing one.

Parameters:
rect - The copied rectangle.
Method Detail

clone

public Object clone()
Copies the rectangle.

Overrides:
clone in class RectangularShape

setX

public void setX(double x)
Sets the rectangle X coordinate.


setY

public void setY(double y)
Sets the rectangle Y coordinate.


setWidth

public void setWidth(double width)
Sets the rectangle width.

Parameters:
width - New width

setHeight

public void setHeight(double height)
Sets the rectangle height.

Parameters:
height - New height

getWidth

public double getWidth()
Returns the rectangle width.

Overrides:
getWidth in class Rectangle2D.Float

getHeight

public double getHeight()
Returns the rectangle height.

Overrides:
getHeight in class Rectangle2D.Float


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