TPTP 4.2.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.drawutil.internal
Class Rect

java.lang.Object
  extended byorg.eclipse.tptp.platform.report.drawutil.internal.Rect

Deprecated. since 1.2.1. This could be fully replaced by org.eclipse.tptp.platform.report.igc.util.internal.Rect class. except methods dealing with org.eclipse.swt.graphics.Rectangle (as IGC must be independant from SWT).

public class Rect
extends java.lang.Object

A Rectangle with a lot of functionnality, that SWT .... ok, nothing


Field Summary
protected  int h_
          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(Rect _r)
          Deprecated. Create a rectangle copying value
Rect(org.eclipse.swt.graphics.Rectangle _r)
          Deprecated. Create a rectangle from SWT' one
 
Method Summary
 int bottom()
          Deprecated.  
 org.eclipse.swt.graphics.Point center()
          Deprecated.  
 int centerX()
          Deprecated.  
 int centerY()
          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(org.eclipse.swt.graphics.Point _p)
          Deprecated.  
 boolean containsBorder(int _px, int _py)
          Deprecated.  
static boolean ContainsBorder(int _lx, int _ty, int _w, int _h, int _px, int _py)
          Deprecated.  
 boolean containsBorder(org.eclipse.swt.graphics.Point _p)
          Deprecated.  
 boolean equals(java.lang.Object o)
          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(Rect _r)
          Deprecated. Setup this rect with the intersection area of this and parameter.
static Rect Intersection(Rect _r1, Rect _r2)
          Deprecated.  
static org.eclipse.swt.graphics.Rectangle IntersectionR(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2)
          Deprecated.  
 int left()
          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(org.eclipse.swt.graphics.Point _p)
          Deprecated. Move center of rectangle to given position
 void moveTo(int _x, int _y)
          Deprecated. Move rectangle to position
 Rect normalize()
          Deprecated. Normalize rectangle, set width and height >=0.
 int right()
          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(org.eclipse.swt.graphics.Point _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(Rect _r)
          Deprecated. Change rectangle values
 void setRect(org.eclipse.swt.graphics.Rectangle _r)
          Deprecated. Change rectangle values
 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(org.eclipse.swt.graphics.Point _size)
          Deprecated. Change width and height of the rectangle using swt's Point.
 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.  
 org.eclipse.swt.graphics.Rectangle toRectangle()
          Deprecated.  
 org.eclipse.swt.graphics.Rectangle toRectangle(org.eclipse.swt.graphics.Rectangle _r)
          Deprecated.  
 java.lang.String toString()
          Deprecated. return rectangle as "X,Y,WxH"
 Rect union(Rect _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. 
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(Rect _r)
Deprecated. 
Create a rectangle copying value


Rect

public Rect(org.eclipse.swt.graphics.Rectangle _r)
Deprecated. 
Create a rectangle from SWT' one

Method Detail

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

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 org.eclipse.swt.graphics.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(org.eclipse.swt.graphics.Point _size)
Deprecated. 
Change width and height of the rectangle using swt's Point.


setLocation

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


setLocation

public final void setLocation(org.eclipse.swt.graphics.Point _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.

ContainsBorder

public static boolean ContainsBorder(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), including border.

contains

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

containsBorder

public boolean containsBorder(int _px,
                              int _py)
Deprecated. 
Returns:
true is point is inside rectangle. border of the rectangle is included in test.

contains

public final boolean contains(org.eclipse.swt.graphics.Point _p)
Deprecated. 
See Also:
contains(int, int)

containsBorder

public final boolean containsBorder(org.eclipse.swt.graphics.Point _p)
Deprecated. 
See Also:
containsBorder(int, int)

setRect

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


setRect

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


setRect

public void setRect(org.eclipse.swt.graphics.Rectangle _r)
Deprecated. 
Change rectangle values


toRectangle

public org.eclipse.swt.graphics.Rectangle toRectangle()
Deprecated. 
Returns:
swt's rectangle

toRectangle

public org.eclipse.swt.graphics.Rectangle toRectangle(org.eclipse.swt.graphics.Rectangle _r)
Deprecated. 
Returns:
swt's rectangle filling the field of parameter

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(org.eclipse.swt.graphics.Point _p)
Deprecated. 
Move center of rectangle to given position


intersection

public Rect intersection(Rect _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(Rect _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

IntersectionR

public static org.eclipse.swt.graphics.Rectangle IntersectionR(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"


equals

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

TPTP 4.2.0 Platform Project
Internal API Specification