TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.igc.util.internal
Class Rect

java.lang.Object
  extended by org.eclipse.tptp.platform.report.igc.util.internal.Rect
All Implemented Interfaces:
IPath, IRect, IShape

Deprecated. As of TPTP 4.5.0, use the TPTP Business Intelligence and Reporting Tools (BIRT) reporting infrastructure (org.eclipse.tptp.platform.report.birt).

public class Rect
extends java.lang.Object
implements IRect, IPath

Implementation of an IRect, with lots of


Field Summary
protected  int dx_
          Deprecated.  
protected  int dX_
          Deprecated.  
protected  int dy_
          Deprecated.  
protected  int dY_
          Deprecated.  
protected  int h_
          Deprecated.  
protected  int pe_
          Deprecated.  
protected  Segment segment_
          Deprecated.  
protected  int w_
          Deprecated.  
protected  int x_
          Deprecated.  
protected  int y_
          Deprecated.  
 
Constructor Summary
Rect()
          Deprecated. Create 0,0,0,0 rectagle
Rect(int _x, int _y, int _w, int _h)
          Deprecated. Create a rectangle
Rect(IRect _r)
          Deprecated. Create a rectangle copying value
Rect(IRect _r, int _grow)
          Deprecated. Create a rectangle copying value from given one and applying grow() on bounds
 
Method Summary
 int bottom()
          Deprecated.  
static int Bottom(IRect r)
          Deprecated.  
 Point center()
          Deprecated.  
 int centerX()
          Deprecated.  
static int CenterX(IRect r)
          Deprecated.  
 int centerY()
          Deprecated.  
static int CenterY(IRect r)
          Deprecated.  
 boolean contains(int _px, int _py)
          Deprecated.  
static boolean Contains(int _lx, int _ty, int _w, int _h, int _px, int _py)
          Deprecated.  
 boolean contains(IPoint _p)
          Deprecated.  
static boolean Contains(IRect _r, int _px, int _py)
          Deprecated.  
 IShape copyShape()
          Deprecated.  
 boolean equals(java.lang.Object o)
          Deprecated.  
 IRect getBounds()
          Deprecated.  
 int getH()
          Deprecated.  
 int getW()
          Deprecated.  
 int getX()
          Deprecated.  
 int getY()
          Deprecated.  
 void grow(int _amount)
          Deprecated. change all bounds using same amount, positive value make bigger rectangle
 int h()
          Deprecated.  
static Rect Intersection(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2)
          Deprecated.  
 Rect intersection(IRect _r)
          Deprecated. Setup this rect with the intersection area of this and parameter.
static Rect Intersection(Rect _r1, Rect _r2)
          Deprecated.  
 int left()
          Deprecated.  
static int Left(IRect r)
          Deprecated.  
 void moveBy(int _dx, int _dy)
          Deprecated. Move rectangle by delta
 void moveCenter(int _cx, int _cy)
          Deprecated. Move center of rectangle to given position
 void moveCenter(IPoint _p)
          Deprecated. Move center of rectangle to given position
 void moveTo(int _x, int _y)
          Deprecated. Move rectangle to position
 IPathElement nextPathElement()
          Deprecated.  
 Rect normalize()
          Deprecated. Normalize rectangle, set width and height >=0.
 boolean pathBegin(IGC gc, IGCDirect gd)
          Deprecated.  
 void pathEnd()
          Deprecated. Called to end the path, time to release any gc, gd memorized...
 int right()
          Deprecated.  
static int Right(IRect r)
          Deprecated.  
 void setBottom(int _b)
          Deprecated. Change bottom side of the rectangle, top is not affected, may change height
 void setHeight(int _h)
          Deprecated. Change height of the rectangle
 void setLeft(int _l)
          Deprecated. Change left side of the rectangle, right side is not affected, may change width.
 void setLocation(int _x, int _y)
          Deprecated. Change x and y value of rectangle
 void setLocation(IPoint _p)
          Deprecated. change x and y value of rectangle using swt's point
 void setRect(int _x, int _y, int _w, int _h)
          Deprecated. Change rectangle values
 void setRect(IRect _r)
          Deprecated. Change rectangle values
 void setRect(IRect _r, int _grow)
          Deprecated. Copy rectangle from given one and change bounds using grow()
 void setRight(int _r)
          Deprecated. Change right side of the rectangle, left side is not affected, may change width.
 void setSize(int _w, int _h)
          Deprecated. Change width and height of the rectangle
 void setSize(IPoint _size)
          Deprecated. Change width and height of the rectangle using swt's Point.
 void setSize(ISize _size)
          Deprecated.  
 void setTop(int _t)
          Deprecated. Change top side of the rectangle, bottom is not affected, mau change height
 void setWidth(int _w)
          Deprecated. Change width of the rectangle
 void setX(int _x)
          Deprecated. Change x value of rectangle
 void setY(int _y)
          Deprecated. Change y value of rectangle
 void shrink(int _amount)
          Deprecated. change all bounds using same amount, positive value make smaller rectangle
 int top()
          Deprecated.  
static int Top(IRect r)
          Deprecated.  
 java.lang.String toString()
          Deprecated. return rectangle as "X,Y,WxH"
 Rect union(IRect _r)
          Deprecated. Setup this rect with the union of this and parameter.
static Rect Union(Rect _r1, Rect _r2)
          Deprecated.  
 int w()
          Deprecated.  
 int x()
          Deprecated.  
 int y()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x_

protected int x_
Deprecated. 

y_

protected int y_
Deprecated. 

w_

protected int w_
Deprecated. 

h_

protected int h_
Deprecated. 

dx_

protected int dx_
Deprecated. 

dy_

protected int dy_
Deprecated. 

dX_

protected int dX_
Deprecated. 

dY_

protected int dY_
Deprecated. 

pe_

protected int pe_
Deprecated. 

segment_

protected Segment segment_
Deprecated. 
Constructor Detail

Rect

public Rect()
Deprecated. 
Create 0,0,0,0 rectagle


Rect

public Rect(int _x,
            int _y,
            int _w,
            int _h)
Deprecated. 
Create a rectangle


Rect

public Rect(IRect _r)
Deprecated. 
Create a rectangle copying value


Rect

public Rect(IRect _r,
            int _grow)
Deprecated. 
Create a rectangle copying value from given one and applying grow() on bounds

Method Detail

getBounds

public IRect getBounds()
Deprecated. 
Specified by:
getBounds in interface IShape
Returns:
bounding box of shape

copyShape

public IShape copyShape()
Deprecated. 
Specified by:
copyShape in interface IShape
Returns:
full deep-copy of this shape

x

public int x()
Deprecated. 
Returns:
x of rectangle, top left corner if w>0 and h>0

y

public int y()
Deprecated. 
Returns:
y of rectangle, top left corner if w>0 and h>0

w

public int w()
Deprecated. 
Returns:
width of the rectangle

h

public int h()
Deprecated. 
Returns:
height of the rectangle

getX

public int getX()
Deprecated. 
Specified by:
getX in interface IRect
Returns:
X coordinate of rectangle (this is top left corner if W and H are positive)

getY

public int getY()
Deprecated. 
Specified by:
getY in interface IRect
Returns:
Y coordinate of rectangle (this is top left corner if W and H are positive)

getW

public int getW()
Deprecated. 
Specified by:
getW in interface IRect
Returns:
width of rectangle

getH

public int getH()
Deprecated. 
Specified by:
getH in interface IRect
Returns:
height of rectangle

left

public int left()
Deprecated. 
Returns:
left side of the rectangle

right

public int right()
Deprecated. 
Returns:
right side of the rectangle

top

public int top()
Deprecated. 
Returns:
top of the rectangle

bottom

public int bottom()
Deprecated. 
Returns:
bottom of the rectangle

center

public Point center()
Deprecated. 
Returns:
center of the rectangle, allocate a Point

centerX

public int centerX()
Deprecated. 
Returns:
x of the center

centerY

public int centerY()
Deprecated. 
Returns:
y of the center

setX

public void setX(int _x)
Deprecated. 
Change x value of rectangle


setY

public void setY(int _y)
Deprecated. 
Change y value of rectangle


setWidth

public void setWidth(int _w)
Deprecated. 
Change width of the rectangle


setHeight

public void setHeight(int _h)
Deprecated. 
Change height of the rectangle


setSize

public void setSize(int _w,
                    int _h)
Deprecated. 
Change width and height of the rectangle


setSize

public final void setSize(IPoint _size)
Deprecated. 
Change width and height of the rectangle using swt's Point.


setSize

public final void setSize(ISize _size)
Deprecated. 

setLocation

public void setLocation(int _x,
                        int _y)
Deprecated. 
Change x and y value of rectangle


setLocation

public final void setLocation(IPoint _p)
Deprecated. 
change x and y value of rectangle using swt's point


setLeft

public void setLeft(int _l)
Deprecated. 
Change left side of the rectangle, right side is not affected, may change width.


setRight

public void setRight(int _r)
Deprecated. 
Change right side of the rectangle, left side is not affected, may change width.


setTop

public void setTop(int _t)
Deprecated. 
Change top side of the rectangle, bottom is not affected, mau change height


setBottom

public void setBottom(int _b)
Deprecated. 
Change bottom side of the rectangle, top is not affected, may change height


grow

public void grow(int _amount)
Deprecated. 
change all bounds using same amount, positive value make bigger rectangle


shrink

public void shrink(int _amount)
Deprecated. 
change all bounds using same amount, positive value make smaller rectangle


Contains

public static boolean Contains(int _lx,
                               int _ty,
                               int _w,
                               int _h,
                               int _px,
                               int _py)
Deprecated. 
Returns:
true if points (px,py) is inside rectangle (lx,ty,w,h), excluding border.

Contains

public static boolean Contains(IRect _r,
                               int _px,
                               int _py)
Deprecated. 
Returns:
true if points (px,py) is inside rectangle _r, excluding border.

contains

public boolean contains(int _px,
                        int _py)
Deprecated. 
Specified by:
contains in interface IShape
Returns:
true is point is inside rectangle. border of the rectangle is included in test.

contains

public final boolean contains(IPoint _p)
Deprecated. 
Specified by:
contains in interface IShape
Returns:
true if point (in pixels) is contained in shape
See Also:
contains(int, int)

setRect

public void setRect(int _x,
                    int _y,
                    int _w,
                    int _h)
Deprecated. 
Change rectangle values


setRect

public void setRect(IRect _r)
Deprecated. 
Change rectangle values


setRect

public void setRect(IRect _r,
                    int _grow)
Deprecated. 
Copy rectangle from given one and change bounds using grow()


normalize

public Rect normalize()
Deprecated. 
Normalize rectangle, set width and height >=0.

Returns:
this.

moveTo

public void moveTo(int _x,
                   int _y)
Deprecated. 
Move rectangle to position


moveBy

public void moveBy(int _dx,
                   int _dy)
Deprecated. 
Move rectangle by delta


moveCenter

public void moveCenter(int _cx,
                       int _cy)
Deprecated. 
Move center of rectangle to given position


moveCenter

public final void moveCenter(IPoint _p)
Deprecated. 
Move center of rectangle to given position


intersection

public Rect intersection(IRect _r)
Deprecated. 
Setup this rect with the intersection area of this and parameter. return width or height==0 if rectangle doesn't intersects.

Returns:
this.

union

public Rect union(IRect _r)
Deprecated. 
Setup this rect with the union of this and parameter.

Returns:
this.

Intersection

public static Rect Intersection(Rect _r1,
                                Rect _r2)
Deprecated. 
Returns:
the intersection area of the both rectangle, this is a new allocated rectangle.

Intersection

public static Rect Intersection(int x1,
                                int y1,
                                int w1,
                                int h1,
                                int x2,
                                int y2,
                                int w2,
                                int h2)
Deprecated. 
Returns:
the intersection area of both rectangle, null for no intersection

Union

public static Rect Union(Rect _r1,
                         Rect _r2)
Deprecated. 
Returns:
bounding rectangle of both given rectangle, this is a new allocated rects

toString

public java.lang.String toString()
Deprecated. 
return rectangle as "X,Y,WxH"

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Deprecated. 
Overrides:
equals in class java.lang.Object
Returns:
true if given object is equals (x,y,w,h) to current object. Object can be a swt.Rectangle or Rect

pathBegin

public boolean pathBegin(IGC gc,
                         IGCDirect gd)
Deprecated. 
Specified by:
pathBegin in interface IPath
Returns:
true if path contains at least one path element

pathEnd

public void pathEnd()
Deprecated. 
Description copied from interface: IPath
Called to end the path, time to release any gc, gd memorized...

Specified by:
pathEnd in interface IPath

nextPathElement

public IPathElement nextPathElement()
Deprecated. 
Specified by:
nextPathElement in interface IPath
Returns:
next IPathElement contained in this path, null is there are no more element. Take care the returned path element can be a reusage of previous returned one with new parameters (mainly for reduced memory consumption): If caller need to memorize a path element it's a good idea to .copyPathElement() it.

CenterX

public static int CenterX(IRect r)
Deprecated. 
Returns:
X coordinate of rectangle's center

CenterY

public static int CenterY(IRect r)
Deprecated. 
Returns:
Y coordinate of rectangle's center

Right

public static int Right(IRect r)
Deprecated. 
Returns:
rightest X coordinate of rectangle

Left

public static int Left(IRect r)
Deprecated. 
Returns:
leftest X coordinate of rectangle

Top

public static int Top(IRect r)
Deprecated. 
Returns:
topest Y coordinate of rectangle (in the meaning of Y screen coordinates)

Bottom

public static int Bottom(IRect r)
Deprecated. 
Returns:
leftest X coordinate of rectangle

TPTP 4.5.0 Platform Project
Internal API Specification