Package com.iizix.prop
Class GSize
java.lang.Object
com.iizix.prop.GSize
- All Implemented Interfaces:
- Serializable,- Cloneable
Simple immutable size class for multiple use accepting negative width and height.
- Author:
- Christopher Mindus
- See Also:
- Field SummaryFields
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- void- append- (SendTransaction trans) Appends the size to a transaction.- clone()Clones this instance.- booleanChecks if two sizes are equal.- int- getCX()Gets the width.- int- getCY()Gets the height.- intGets the height.- int- getWidth()Gets the width.- int- hashCode()Hash code.- toString()Formats to a string as "cx,cy".
- Field Details- EMPTY_ARRAYEmpty array of Rect's.
- ZEROZero size.
 
- Constructor Details- GSizepublic GSize()Constructor for cx=cy=0.
- GSizeConstructor from a String formatted as "cx,cy".- Parameters:
- string- The string.
- Throws:
- IllegalArgumentException- If the string is not well formatted.
 
- GSizeConstructor from a Transaction.- Parameters:
- trans- The transaction.
 
- GSizepublic GSize- (int cx, int cy) Constructor.- Parameters:
- cx- Width.
- cy- Height.
 
 
- Method Details- equalsChecks if two sizes are equal. Supports comparison with- Size.
- cloneClones this instance.
- hashCodepublic int hashCode()Hash code.
- toStringFormats to a string as "cx,cy".
- appendAppends the size to a transaction.- Parameters:
- trans- Transaction to append to.
 
- getCXpublic int getCX()Gets the width.- Returns:
- The width.
 
- getCYpublic int getCY()Gets the height.- Returns:
- The height.
 
- getWidthpublic int getWidth()Gets the width.- Returns:
- The width.
 
- getHeightpublic int getHeight()Gets the height.- Returns:
- The height.