public class Dimension
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
double |
height
Area height.
|
double |
width
Area width.
|
Constructor and Description |
---|
Dimension(double width,
double height)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Dimension |
copy()
Create a copy of this dimension object.
|
Dimension |
enlargedBy(Insets insets)
Increase dimension by width and height deltas from provided
Insets instance. |
double |
height()
Get dimension height.
|
Dimension |
reducedBy(Insets insets)
Reduce dimension by width and height deltas from provided
Insets instance. |
java.lang.String |
toString()
Returns a string representation of the object.
|
double |
width()
Get dimension width.
|
public Dimension(double width, double height)
width
- Area width.height
- Area height.public Dimension copy()
public Dimension enlargedBy(Insets insets)
Insets
instance.insets
- Source insets.public Dimension reducedBy(Insets insets)
Insets
instance.insets
- Source insets.public double height()
public double width()
public java.lang.String toString()
toString
in class java.lang.Object