public final class PatchCreator extends Object implements AutoCloseable, IGeometryCreator
It is a wrapper class, that takes the result of another IGeometryCreator
, and creates a Patch
from Ring
geometries that are created. If the wrapped creator does not create a Ring
, it is left as-is.
This creator doesn't consume any events itself, but it delegates the events to the wrapped creator instance.
Constructor and Description |
---|
PatchCreator(IGeometryCreator delegateCreator)
Creates a new
PatchCreator . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
EventResult |
onEvent(IInputEvent inputEvent,
FeatureCreateContext context)
Handles the given event, and returns if the event was handled or not.
|
void |
start(IGeometryCreateCallback callback,
FeatureCreateContext context)
This method is called to start creation.
|
public PatchCreator(@NotNull IGeometryCreator delegateCreator)
PatchCreator
.delegateCreator
- the delegate creator to usepublic void close()
close
in interface AutoCloseable
public void start(@NotNull IGeometryCreateCallback callback, @NotNull FeatureCreateContext context) throws NullPointerException
After this call, IGeometryCreator#onEvent
can be called.
When a IGeometryCreator
was started, it can not be started again until it has finished
. Implementations of this method are encouraged to throw an exception in that case to signal a programming error by the caller of this method.
start
in interface IGeometryCreator
callback
- the callback to signal geometry changes, and whether creation for the geometry has finished, cannot be null
.context
- the context, cannot be null
NullPointerException
- when null
is passed.@NotNull public EventResult onEvent(@NotNull IInputEvent inputEvent, @NotNull FeatureCreateContext context) throws NullPointerException
onEvent
in interface IGeometryCreator
inputEvent
- an event, cannot be null
context
- the context, cannot be null
NullPointerException
- when null
is passed.