Class QuadDimension
java.lang.Object
dev.prozilla.pine.common.math.dimension.DualDimension
dev.prozilla.pine.common.math.dimension.QuadDimension
- All Implemented Interfaces:
- Cloneable<DualDimension>,- Printable
Represents four dimensions (X, Y, Z and W) for a UI element. Each dimension is defined using a 
DimensionBase.- See Also:
- 
Field SummaryFieldsFields inherited from class dev.prozilla.pine.common.math.dimension.DualDimensionDEFAULT_VALUE, x, y
- 
Constructor SummaryConstructorsConstructorDescriptionCreates four default dimensions with all values set to 0 pixels.QuadDimension(int xyzw) QuadDimension(int xz, int yw) QuadDimension(int x, int y, int z, int w) QuadDimension(DimensionBase xyzw) Creates four dimensions with equal values.QuadDimension(DimensionBase xz, DimensionBase yw) Creates four dimensions with two pairs of equal values.
- 
Method SummaryModifier and TypeMethodDescriptionclone()Returns a new object that is equal to this object.floatComputes the W-dimension for a given element.floatComputes the sum of the X- and Z-dimensions for a given element.floatComputes the sum of the Y- and W-dimensions for a given element.floatComputes the Z-dimension for a given element.booleanChecks whether this pair of dimensions computes to0for a given element.voidset(int xyzw) voidset(int xz, int yw) voidset(int x, int y, int z, int w) voidset(DimensionBase xyzw) voidset(DimensionBase xz, DimensionBase yw) voidset(DimensionBase x, DimensionBase y, DimensionBase z, DimensionBase w) toString()Returns a string representation of this object.Methods inherited from class dev.prozilla.pine.common.math.dimension.DualDimensioncomputeX, computeY, equals, equals, fullscreen, hashCode, parentHeight, parentSize, parentWidth, parse, reset, set, set, zero
- 
Field Details- 
z
- 
w
 
- 
- 
Constructor Details- 
QuadDimensionpublic QuadDimension()Creates four default dimensions with all values set to 0 pixels.
- 
QuadDimensionpublic QuadDimension(int xyzw) 
- 
QuadDimensionCreates four dimensions with equal values.
- 
QuadDimensionpublic QuadDimension(int xz, int yw) 
- 
QuadDimensionCreates four dimensions with two pairs of equal values. The X- and Z-dimensions and the Y- and W-dimensions will respectively be assigned equal values.
- 
QuadDimensionpublic QuadDimension(int x, int y, int z, int w) 
- 
QuadDimension
 
- 
- 
Method Details- 
setpublic void set(int xyzw) - Overrides:
- setin class- DualDimension
 
- 
set- Overrides:
- setin class- DualDimension
 
- 
setpublic void set(int xz, int yw) - Overrides:
- setin class- DualDimension
 
- 
set- Overrides:
- setin class- DualDimension
 
- 
setpublic void set(int x, int y, int z, int w) 
- 
set
- 
computeZComputes the Z-dimension for a given element.
- 
computeWComputes the W-dimension for a given element.
- 
computeXZComputes the sum of the X- and Z-dimensions for a given element.
- 
computeYWComputes the sum of the Y- and W-dimensions for a given element.
- 
isZeroDescription copied from class:DualDimensionChecks whether this pair of dimensions computes to0for a given element.- Overrides:
- isZeroin class- DualDimension
 
- 
cloneDescription copied from interface:CloneableReturns a new object that is equal to this object.- Specified by:
- clonein interface- Cloneable<DualDimension>
- Overrides:
- clonein class- DualDimension
- Returns:
- Clone of this object
 
- 
toStringDescription copied from interface:PrintableReturns a string representation of this object.- Specified by:
- toStringin interface- Printable
- Overrides:
- toStringin class- DualDimension
- Returns:
- String representation of this object.
 
 
-