|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.geometry.Dimensions
public class Dimensions
A measurement of an object's width, height, and depth along the X, Y, and Z dimensions, respectively.
| Field Summary | |
|---|---|
static Dimensions |
ZERO_DIMENSIONS
A convenience dimensions of zero pixel size. |
| Constructor Summary | |
|---|---|
Dimensions(double width,
double height,
double depth,
Unit unit)
Width, height, and depth unit constructor. |
|
Dimensions(double width,
double height,
Unit unit)
Width and height unit constructor with a depth of one. |
|
Dimensions(double width,
Unit widthUnit,
double height,
Unit heightUnit)
Width unit and height unit constructor with a depth of one. |
|
Dimensions(Extent width,
Extent height)
Width and height extent constructor with a default depth of zero pixels. |
|
Dimensions(Extent width,
Extent height,
Extent depth)
Width, height, and depth extent constructor. |
|
| Method Summary | |
|---|---|
Dimensions |
constrain(Dimensions constrainingDimensions)
Constrains these inner dimensions within the given outer dimensions by scaling these dimensions so that no part lies outside the given outer dimensiona. |
boolean |
equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. |
Extent |
getDepth()
|
Extent |
getHeight()
|
Extent |
getWidth()
|
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Dimensions ZERO_DIMENSIONS
| Constructor Detail |
|---|
public Dimensions(double width,
double height,
Unit unit)
width - The width.height - The height.unit - The unit with which the extent is measured.
java.lang.NullPointerException - if the given unit is null.
public Dimensions(double width,
Unit widthUnit,
double height,
Unit heightUnit)
width - The width.widthUnit - The unit with which the width is measured.height - The height.heightUnit - The unit with which the height is measured.
java.lang.NullPointerException - if the given width unit and/or height unit is null.
public Dimensions(double width,
double height,
double depth,
Unit unit)
width - The width.height - The height.depth - The depth.unit - The unit with which the extent is measured.
java.lang.NullPointerException - if the given unit is null.
public Dimensions(Extent width,
Extent height)
width - The width extent.height - The height extent.
java.lang.NullPointerException - if the given width, and/or height is null.
java.lang.IllegalArgumentException - if the degree of any extent is not 1.
public Dimensions(Extent width,
Extent height,
Extent depth)
width - The width extent.height - The height extent.depth - The depth extent.
java.lang.NullPointerException - if the given width, height, and/or depth is null.
java.lang.IllegalArgumentException - if the degree of any extent is not 1.| Method Detail |
|---|
public Extent getWidth()
public Extent getHeight()
public Extent getDepth()
public Dimensions constrain(Dimensions constrainingDimensions)
constrainingDimensions - The outer constraining dimensions.
java.lang.NullPointerException - if the given constraining dimensions is null.
java.lang.IllegalArgumentException - if the given constraining dimensions use different units than these dimensions.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The reference object with which to compare.
true if this object is equivalent to the given object.public final 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 | ||||||||