|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.Dimension2D
att.grappa.GrappaSize
public class GrappaSize
This class extends java.awt.geom.Dimension2D and provides built-in string-to-Dimension2D and Dimension2D-to-string conversions suitable for Grappa.
Field Summary | |
---|---|
double |
height
The height of the Dimension. |
double |
width
The width of the Dimension. |
Constructor Summary | |
---|---|
GrappaSize()
Constructs and initializes a GrappaSize with
coordinates (0, 0). |
|
GrappaSize(double width,
double height)
Constructs and initializes a GrappaSize with the
specified coordinates. |
|
GrappaSize(java.lang.String dimenString)
Constructs and initializes a GrappaSize with the
coordinates derived from the specified String representation. |
Method Summary | |
---|---|
double |
getHeight()
Returns the height. |
double |
getWidth()
Returns the width. |
void |
setSize(java.awt.geom.Dimension2D d)
Sets the width and height. |
void |
setSize(double width,
double height)
Sets the width and height. |
java.lang.String |
toAttributeString()
Provides a string representation of this object consistent with Grappa attributes. |
java.lang.String |
toFormattedString(java.lang.String format)
Provides a formatted string representation of this object. |
java.lang.String |
toString()
Provides a generic string representation of this object. |
Methods inherited from class java.awt.geom.Dimension2D |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double width
public double height
Constructor Detail |
---|
public GrappaSize()
GrappaSize
with
coordinates (0, 0).
public GrappaSize(double width, double height)
GrappaSize
with the
specified coordinates.
width, height
- the coordinates to which to set the newly
constructed GrappaSize
public GrappaSize(java.lang.String dimenString)
GrappaSize
with the
coordinates derived from the specified String representation.
The String format should be: "width,height"
dimenString
- String representing the dimensions to which to
set the newly constructed GrappaSize
Method Detail |
---|
public double getWidth()
getWidth
in class java.awt.geom.Dimension2D
public double getHeight()
getHeight
in class java.awt.geom.Dimension2D
public void setSize(java.awt.geom.Dimension2D d)
setSize
in class java.awt.geom.Dimension2D
public void setSize(double width, double height)
setSize
in class java.awt.geom.Dimension2D
public java.lang.String toAttributeString()
public java.lang.String toFormattedString(java.lang.String format)
format
- the format used to build the string (%p is the base directive suitable for a GrappaSize).
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |