|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectar.edu.unr.fceia.bottallo.Dimension
public class Dimension
Store graphical information (position & dimension) of graphical objects.
Dimension is definded by a positional corner point, width and height of an object
Constructor Summary | |
---|---|
Dimension()
Creates a new instance of Dimension |
Method Summary | |
---|---|
protected float |
getHeight()
Get the height of the graphical object |
protected static float |
getMetric(Dimension s,
Dimension t)
Compute the inclusion-metric of a graphical object respect to other object (using the dimensions of the objects) |
protected Point |
getPointA()
Get the A-point of the grafical object |
protected Point |
getPointB()
Get the B-point of the grafical object |
protected Point |
getPointC()
Get the C-point of the grafical object |
protected Point |
getPointD()
Get the D-point of the grafical object |
protected float |
getPosX()
Return the x-coordinate of the positional point of the graphical object |
protected float |
getPosY()
Return the y-coordinate of the positional point of the graphical object |
protected float |
getWidth()
Get the width of the graphical object |
protected static boolean |
isIncluded(Dimension s,
Dimension t)
Check if a graphical object is included in other |
protected static boolean |
pointIn(Point p,
Dimension dim)
Check if a point pertains to a grafical object (i.e. is inside the dimensio of a graphical object) |
protected void |
setHeight(float h)
Set the height of the graphical object |
protected void |
setPointA(float x,
float y)
Set the A-point of the grafical object (left-top corner) |
protected void |
setPointB(float x,
float y)
Set the B-point of the grafical object (right-top corner) |
protected void |
setPointC(float x,
float y)
Set the C-point of the grafical object (left-bottom corner) |
protected void |
setPointD(float x,
float y)
Set the D-point of the grafical object (right-bottom corner) |
protected void |
setPosX(float x)
Set the x coordinate of the positional point of the graphical object |
protected void |
setPosY(float y)
Set the y coordinate of the positional point of the graphical object |
protected void |
setWidth(float w)
Set the width of the graphical object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Dimension()
Method Detail |
---|
protected void setPosX(float x)
x
- coordinateprotected float getPosX()
protected void setPosY(float y)
y
- coordinateprotected float getPosY()
protected void setWidth(float w)
w
- width of the objectprotected float getWidth()
protected void setHeight(float h)
h
- height of the objectprotected float getHeight()
protected void setPointA(float x, float y)
x
- coordinate of the pointy
- coordinate of the pointprotected Point getPointA()
protected void setPointB(float x, float y)
x
- coordinate of the pointy
- coordinate of the pointprotected Point getPointB()
protected void setPointC(float x, float y)
x
- coordinate of the pointy
- coordinate of the pointprotected Point getPointC()
protected void setPointD(float x, float y)
x
- coordinate of the pointy
- coordinate of the pointprotected Point getPointD()
protected static float getMetric(Dimension s, Dimension t)
s
- Dimension of the object chequed por inclusiont
- Dimension of the object eventually including the first object
protected static boolean pointIn(Point p, Dimension dim)
p
- pointdim
- dimension of a graphical object
protected static boolean isIncluded(Dimension s, Dimension t)
s
- object being checked for "included in"t
- object being checked for "include the object"
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |