public class MeasureEditingProvider extends AbstractEditingProvider implements EditingProvider
Modifier and Type | Class and Description |
---|---|
static class |
MeasureEditingProvider.PointAndRotation |
Modifier and Type | Field and Description |
---|---|
protected EditingServiceParameter |
alignParameter |
protected EditingServiceParameter |
deleteOriginalGeometriesParameter |
protected FeatureStore |
featureStore |
protected EditingServiceParameter |
geometryBaseParameter |
protected EditingServiceParameter |
insertionPointParameter |
protected MapContext |
mapContext |
protected EditingServiceParameter |
rotateFieldParameter |
protected EditingServiceParameter |
selection |
protected java.util.Map<EditingServiceParameter,java.lang.Object> |
values |
LOGGER
AGGREGATE, ARC, CIRCLE, CIRCUMFERENCE, COMPLEX, CURVE, ELLIPSE, ELLIPTICARC, FILLEDSPLINE, GEOMETRY, LINE, MULTICURVE, MULTILINE, MULTIPOINT, MULTIPOLYGON, MULTISOLID, MULTISURFACE, NULL, PERIELLIPSE, POINT, POLYGON, RING, SOLID, SPLINE, SURFACE, UNKNOWN
Constructor and Description |
---|
MeasureEditingProvider(DynObject parameters,
ProviderServices services)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Geometry |
finish()
Finalizes provider.
|
void |
finishAndStore()
Finalizes provider and stores the result to
FeatureStore of this
provider. |
DrawingStatus |
getDrawingStatus(Point mousePosition)
Gets state of drawing.
|
java.lang.String |
getName()
Gets provider name.
|
java.util.List<EditingServiceParameter> |
getParameters()
Gets a
List with all parameters of provider. |
protected java.util.List<MeasureEditingProvider.PointAndRotation> |
getPointsAndRotations(Line line) |
protected java.util.List<MeasureEditingProvider.PointAndRotation> |
getPointsAndRotations(Line line,
double measure) |
java.lang.Object |
getValue(EditingServiceParameter parameter)
Return parameter's value
|
boolean |
isEnabled(EditingServiceParameter parameter)
Return true if the parameter is enabled
|
protected boolean |
isPointType() |
EditingServiceParameter |
next()
Gets next parameter needed by provider.
|
void |
setValue(EditingServiceParameter parameter,
java.lang.Object value)
Sets value into a paremeter of the provider.The value will be put in the parameter of this provider.
|
void |
setValue(java.lang.Object value)
Sets value to provider.
|
void |
start()
Starts provider.
|
void |
stop()
Stops provider.
|
protected void |
validateAndInsertValue(EditingServiceParameter parameter,
java.lang.Object value) |
activate, getDefaultFeatureValues, getPreviewSymbol, getPreviewSymbol, getProviderServices, getSelectedFeaturesCopy, getValue, initDefaultValues, isShowPreviewSymbol, makeMultiPrimitiveIsNeeded, mustRestartAtFinish, restart, setDefaultFeatureValues, setShowPreviewSymbol
setProviderServices
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, getDefaultFeatureValues, getValue, initDefaultValues, isShowPreviewSymbol, mustRestartAtFinish, restart, setDefaultFeatureValues, setShowPreviewSymbol
setProviderServices
protected final EditingServiceParameter selection
protected final EditingServiceParameter insertionPointParameter
protected final EditingServiceParameter geometryBaseParameter
protected final EditingServiceParameter alignParameter
protected final EditingServiceParameter rotateFieldParameter
protected final EditingServiceParameter deleteOriginalGeometriesParameter
protected final FeatureStore featureStore
protected final MapContext mapContext
protected java.util.Map<EditingServiceParameter,java.lang.Object> values
public MeasureEditingProvider(DynObject parameters, ProviderServices services)
services
- available services for this providerparameters
- of this providerpublic EditingServiceParameter next()
EditingProvider
null
if all
parameters have values.next
in interface EditingProvider
EditingServiceParameter
object that represents the
next parameter.protected boolean isPointType()
public DrawingStatus getDrawingStatus(Point mousePosition) throws DrawServiceException
EditingProvider
DrawingStatus
. List of
geometries of drawing status object can be different from final
geometries. Use this method to get a draft status information while user
is drawing.getDrawingStatus
in interface EditingProvider
mousePosition
- Mouse position to draw geometries.DrawingStatus
object with a list of geometries and
information.DrawServiceException
- if there are some error creating geometries.public void stop() throws StopServiceException
EditingProvider
stop
in interface EditingProvider
StopServiceException
- Stops provider initializing necessary parameters of provider.
This method is called when user cancels provider.public java.util.List<EditingServiceParameter> getParameters()
EditingProvider
List
with all parameters of provider. Each parameter
has name, description and types. See EditingServiceParameter
.getParameters
in interface EditingProvider
EditingServiceParameter
objects.public boolean isEnabled(EditingServiceParameter parameter)
EditingProvider
isEnabled
in interface EditingProvider
isEnabled
in class AbstractEditingProvider
public void setValue(EditingServiceParameter parameter, java.lang.Object value) throws InvalidEntryException
EditingProvider
setValue
in interface EditingProvider
setValue
in class AbstractEditingProvider
parameter
- EditingServiceParameter
value
- Object to be set to EditingServiceParameter
InvalidEntryException
- If the next parameter needed does not accept this value.public void setValue(java.lang.Object value) throws InvalidEntryException
EditingProvider
setValue
in interface EditingProvider
value
- Object to be set to next EditingServiceParameter
InvalidEntryException
- If the next parameter needed does not accept this value.protected void validateAndInsertValue(EditingServiceParameter parameter, java.lang.Object value) throws InvalidEntryException
InvalidEntryException
public Geometry finish() throws FinishServiceException
EditingProvider
FeatureStore
. Make sure that provider has all required
values.finish
in interface EditingProvider
FinishServiceException
- if there are some error getting values,
creating geometries.public void finishAndStore() throws FinishServiceException
EditingProvider
FeatureStore
of this
provider. Use this method to store the result of this service. Make sure
that service has all required values.finishAndStore
in interface EditingProvider
FinishServiceException
- if there are some error getting values,
creating geometries or inserting/updating/removing geometries
from feature store.public void start() throws StartServiceException, InvalidEntryException
EditingProvider
start
in interface EditingProvider
StartServiceException
- if there are some error starting service.InvalidEntryException
- if the entry of provider is not validpublic java.lang.String getName()
EditingProvider
getName
in interface EditingProvider
public java.lang.Object getValue(EditingServiceParameter parameter)
EditingProvider
getValue
in interface EditingProvider
getValue
in class AbstractEditingProvider
protected java.util.List<MeasureEditingProvider.PointAndRotation> getPointsAndRotations(Line line) throws CreateGeometryException, GeometryOperationNotSupportedException, GeometryOperationException, java.lang.CloneNotSupportedException
CreateGeometryException
GeometryOperationNotSupportedException
GeometryOperationException
java.lang.CloneNotSupportedException
protected java.util.List<MeasureEditingProvider.PointAndRotation> getPointsAndRotations(Line line, double measure) throws CreateGeometryException, GeometryOperationNotSupportedException, GeometryOperationException, java.lang.CloneNotSupportedException
CreateGeometryException
GeometryOperationNotSupportedException
GeometryOperationException
java.lang.CloneNotSupportedException