|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable jimm.datavision.field.Rectangle
public class Rectangle
A rectangle with double coordinates.
Field Summary | |
---|---|
double |
height
Warning: only read the height. |
double |
width
Warning: only read the width. |
double |
x
Warning: only read the x coordinate. |
double |
y
Warning: only read the y coordinate. |
Constructor Summary | |
---|---|
Rectangle()
Constructor. |
|
Rectangle(double x,
double y,
double width,
double height)
Constructor. |
|
Rectangle(java.awt.Rectangle r)
Constructor. |
|
Rectangle(Rectangle r)
Constructor. |
Method Summary | |
---|---|
double |
getHeight()
Returns the height. |
double |
getWidth()
Returns the width. |
double |
getX()
Returns the x coordinate. |
double |
getY()
Returns the y coordinate. |
void |
setBounds(double newX,
double newY,
double newWidth,
double newHeight)
Sets everything at once. |
void |
setBounds(Rectangle r)
Sets everything at once. |
void |
setBounds(java.awt.Rectangle r)
Sets everything at once. |
void |
setHeight(double newHeight)
Sets the height. |
void |
setWidth(double newWidth)
Sets the width. |
void |
setX(double newX)
Sets the x coordinate. |
void |
setY(double newY)
Sets the y coordinate. |
java.lang.String |
toString()
Returns a string representation of this rectangle. |
void |
writeXML(XMLWriter out)
Writes this rectangle as an XML tag. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double x
public double y
public double width
public double height
Constructor Detail |
---|
public Rectangle()
public Rectangle(java.awt.Rectangle r)
r
- the other kind of rectanglepublic Rectangle(Rectangle r)
r
- another rectanglepublic Rectangle(double x, double y, double width, double height)
x
- a doubley
- a doublewidth
- a doubleheight
- a doubleMethod Detail |
---|
public double getX()
public void setX(double newX)
newX
- the new x coordinatepublic double getY()
public void setY(double newY)
newY
- the new y coordinatepublic double getWidth()
public void setWidth(double newWidth)
newWidth
- the new widthpublic double getHeight()
public void setHeight(double newHeight)
newHeight
- the new heightpublic void setBounds(double newX, double newY, double newWidth, double newHeight)
newX
- the new x coordinatenewY
- the new y coordinatenewWidth
- the new widthnewHeight
- the new heightpublic void setBounds(Rectangle r)
r
- a jimm.datavision.Rectanglepublic void setBounds(java.awt.Rectangle r)
r
- a java.awt.Rectanglepublic java.lang.String toString()
toString
in class java.lang.Object
public void writeXML(XMLWriter out)
writeXML
in interface Writeable
out
- a writer that knows how to write XML
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |