Class GeometryEditModel
java.lang.Object
org.locationtech.jtstest.testbuilder.model.GeometryEditModel
Holds the current
TestCaseEdit.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Vectorprivate intprivate booleanprivate TestCaseEditprivate static WKTWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(List coordList) Adds a geometry component of the currently selected type, to the currently selected geometry.voidvoidclear()voidclear(int i) findAdjacentVertices(Coordinate vertex) voidvoidgetGeometry(int i) intintprivate static Coordinate[]getText(int textType) static StringbooleanlocateNonVertexPoint(Coordinate testPt, double tolerance) Locates a non-vertex point on a line segment of the current geometry within the given tolerance, if any.locateVertex(Coordinate testPt, double tolerance) Locates a vertex of the current geometry within the given tolerance, if any.locateVertexPt(Coordinate testPt, double tolerance) voidmoveVertex(Coordinate fromLoc, Coordinate toLoc) voidvoidsetEditGeomIndex(int index) voidsetGeometry(int i, Geometry g) voidvoidsetGeometryType(int geomType) voidsetReadOnly(boolean readOnly) voidsetTestCase(TestCaseEdit testCase) static String
-
Field Details
-
wktWriter
-
readOnly
private boolean readOnly -
editGeomIndex
private int editGeomIndex -
geomType
private int geomType -
testCase
-
geometryListeners
-
-
Constructor Details
-
GeometryEditModel
public GeometryEditModel()
-
-
Method Details
-
getEnvelope
-
getEnvelopeAll
-
getEnvelopeResult
-
getGeomIndex
public int getGeomIndex() -
setEditGeomIndex
public void setEditGeomIndex(int index) -
isReadOnly
public boolean isReadOnly() -
clear
public void clear() -
getGeometryType
public int getGeometryType() -
setGeometryType
public void setGeometryType(int geomType) -
setReadOnly
public void setReadOnly(boolean readOnly) -
getText
-
getText
-
toStringVeryLarge
-
getResult
-
getGeometry
-
getGeometry
-
setTestCase
-
setGeometry
-
setGeometry
-
clear
public void clear(int i) -
addComponent
Adds a geometry component of the currently selected type, to the currently selected geometry.- Parameters:
coordList-
-
getRing
-
findAdjacentVertices
-
locateNonVertexPoint
Locates a non-vertex point on a line segment of the current geometry within the given tolerance, if any. Returns the closest point on the segment.- Parameters:
testPt-tolerance-- Returns:
- the location found, or null if no non-vertex point was within tolerance
-
locateVertex
Locates a vertex of the current geometry within the given tolerance, if any. Returns the closest point on the segment.- Parameters:
testPt-tolerance-- Returns:
- the location of the vertex found, or null if no vertex was within tolerance
-
locateVertexPt
-
moveVertex
-
geomChanged
public void geomChanged() -
removeGeometryListener
-
addGeometryListener
-
fireGeometryChanged
-