Package com.luciad.create
Class Creator
java.lang.Object
com.luciad.create.Creator
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addObserver
(ICreatorObserver observer) Adds an observer that is called when aFeature
was created and added to the model, or when feature creation failed.void
close()
protected void
finalize()
Returns the layer that can paint a preview of theFeature
that is being created.static Creator.Builder
Returns a new builder for creating aCreator
.onEvent
(IInputEvent inputEvent) Handles the given event, and returns if the event was handled or not.void
removeObserver
(ICreatorObserver observer) Removes the given observer.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
newBuilder
Returns a new builder for creating aCreator
.- Returns:
- a new builder for creating a
Creator
.
-
onEvent
Handles the given event, and returns if the event was handled or not.- Parameters:
inputEvent
- an event, cannot benull
.- Returns:
- if the event was consumed or not
- Throws:
NullPointerException
- when the input event isnull
.
-
getPreviewLayer
Returns the layer that can paint a preview of theFeature
that is being created.- Returns:
- the layer that can paint a preview of the
Feature
that is being created.
-
addObserver
public void addObserver(@NotNull ICreatorObserver observer) throws NullPointerException, IllegalArgumentException Adds an observer that is called when aFeature
was created and added to the model, or when feature creation failed.- Parameters:
observer
- an observer- Throws:
IllegalArgumentException
- when the observer was already added.NullPointerException
- when the observer isnull
.
-
removeObserver
public void removeObserver(@NotNull ICreatorObserver observer) throws NullPointerException, IllegalArgumentException Removes the given observer.If the given callback was never added, an exception is thrown.
- Parameters:
observer
- an observer.- Throws:
IllegalArgumentException
- when the observer is not known.NullPointerException
- when the observer isnull
.
-