com.steema.teechart
Class Rectangle

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by com.steema.teechart.Rectangle
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable

public final class Rectangle
extends java.awt.Rectangle

Title: Rectangle class

Description:

Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
static Rectangle EMPTY
           
 
Fields inherited from class java.awt.Rectangle
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
Rectangle()
           
Rectangle(int x, int y, int width, int height)
           
Rectangle(Point location, Dimension size)
           
Rectangle(Rectangle r)
           
Rectangle(java.awt.Rectangle r)
           
 
Method Summary
 Point center()
          Returns the center point of the rectangle
 Rectangle copy()
           
static Rectangle fromLTRB(int x, int y, int right, int bottom)
           
 int getBottom()
          Gets rectangle Bottom coordinate.
 int getLeft()
          Gets rectangle Left coordinate.
 Point getLocation()
           
 int getRight()
          Gets rectangle Right coordinate.
 int getTop()
          Gets rectangle Top coordinate.
 void inflate(int horizontal, int vertical)
           
 void intersect(Rectangle value)
           
 void offset(int w, int h)
           
 void setBottom(int value)
          Sets rectangle Bottom coordinate.
 void setLeft(int value)
          Sets rectangle Left coordinate.
 void setRight(int value)
          Sets rectangle Right coordinate.
 void setTop(int value)
          Sets rectangle Top coordinate.
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, 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
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
 

Field Detail

EMPTY

public static final Rectangle EMPTY
Constructor Detail

Rectangle

public Rectangle(Point location,
                 Dimension size)

Rectangle

public Rectangle()

Rectangle

public Rectangle(int x,
                 int y,
                 int width,
                 int height)

Rectangle

public Rectangle(Rectangle r)

Rectangle

public Rectangle(java.awt.Rectangle r)
Method Detail

center

public Point center()
Returns the center point of the rectangle

Returns:

copy

public Rectangle copy()

getLeft

public int getLeft()
Gets rectangle Left coordinate.

Returns:
int

setLeft

public void setLeft(int value)
Sets rectangle Left coordinate.


getRight

public int getRight()
Gets rectangle Right coordinate.

Returns:
int

setRight

public void setRight(int value)
Sets rectangle Right coordinate.


getTop

public int getTop()
Gets rectangle Top coordinate.

Returns:
int

setTop

public void setTop(int value)
Sets rectangle Top coordinate.


getBottom

public int getBottom()
Gets rectangle Bottom coordinate.

Returns:
int

setBottom

public void setBottom(int value)
Sets rectangle Bottom coordinate.


fromLTRB

public static Rectangle fromLTRB(int x,
                                 int y,
                                 int right,
                                 int bottom)

inflate

public void inflate(int horizontal,
                    int vertical)

intersect

public void intersect(Rectangle value)

offset

public void offset(int w,
                   int h)
Parameters:
w -
h -

getLocation

public Point getLocation()
Overrides:
getLocation in class java.awt.Rectangle