Modifier and Type | Field and Description |
---|---|
double |
height |
double |
width |
double |
x |
double |
y |
Constructor and Description |
---|
Rectangle2d() |
Rectangle2d(double x,
double y,
double width,
double height) |
Rectangle2d(Rectangle2d rect) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
double |
getHeight() |
double |
getWidth() |
double |
getX() |
double |
getY() |
boolean |
isWritable()
Returns
true if this component should in fact be written to
secondary storage. |
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
void |
scan(java.lang.String str) |
void |
set(double x,
double y,
double width,
double height) |
void |
set(Rectangle2d r) |
java.lang.String |
toString() |
java.lang.String |
toString(NumberFormat fmt) |
void |
translate(double dx,
double dy) |
void |
write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Writes a text description of this element to a PrintWriter.
|
public double x
public double y
public double width
public double height
public Rectangle2d()
public Rectangle2d(Rectangle2d rect)
public Rectangle2d(double x, double y, double width, double height)
public void set(Rectangle2d r)
public void translate(double dx, double dy)
public void set(double x, double y, double width, double height)
public double getX()
public double getY()
public double getWidth()
public double getHeight()
public void scan(java.lang.String str)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isWritable()
Scannable
true
if this component should in fact be written to
secondary storage. This gives subclasses control over whether or
not they are actually written out.isWritable
in interface Scannable
true
if this component should be written to
secondary storage.public void write(java.io.PrintWriter pw, NumberFormat fmt, java.lang.Object ref) throws java.io.IOException
Scannable
scan
and complete
enough to allow full reconstruction of the element.public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
Scannable
write
.public java.lang.String toString(NumberFormat fmt)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object