Package org.openpnp.model
Class GeometricArea
- java.lang.Object
-
- java.awt.geom.Area
-
- org.openpnp.model.GeometricArea
-
- All Implemented Interfaces:
java.awt.Shape,java.lang.Cloneable
public class GeometricArea extends java.awt.geom.AreaExtends java.awt.geom.Area to be serializable and have length units
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<java.lang.Double>segmentPointsprotected java.util.ArrayList<java.lang.Integer>segmentTypesprotected LengthUnitunitsprotected java.lang.IntegerwindingRule
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit()Restores the area from the serializable elements immediately following their deserializationGeometricAreaconvertToUnits(LengthUnit units)Returns a new GeometricArea converted to the specified unitsLengthUnitgetUnits()voidpersist()Sets the serializable elements from the area just prior to serializationvoidsetUnits(LengthUnit units)Sets the units of this-
Methods inherited from class java.awt.geom.Area
add, clone, contains, contains, contains, contains, createTransformedArea, equals, exclusiveOr, getBounds, getBounds2D, getPathIterator, getPathIterator, intersect, intersects, intersects, isEmpty, isPolygonal, isRectangular, isSingular, reset, subtract, transform
-
-
-
-
Field Detail
-
units
protected LengthUnit units
-
windingRule
protected java.lang.Integer windingRule
-
segmentTypes
protected java.util.ArrayList<java.lang.Integer> segmentTypes
-
segmentPoints
protected java.util.ArrayList<java.lang.Double> segmentPoints
-
-
Method Detail
-
commit
public void commit()
Restores the area from the serializable elements immediately following their deserialization
-
persist
public void persist()
Sets the serializable elements from the area just prior to serialization
-
getUnits
public LengthUnit getUnits()
- Returns:
- the units of this
-
setUnits
public void setUnits(LengthUnit units)
Sets the units of this- Parameters:
units- - the units to set
-
convertToUnits
public GeometricArea convertToUnits(LengthUnit units)
Returns a new GeometricArea converted to the specified units- Parameters:
units- - the units of the new path- Returns:
- the new GeometricArea
-
-