public abstract class AbstractGeometryMeasurementExtension extends Extension
Constructor and Description |
---|
AbstractGeometryMeasurementExtension() |
Modifier and Type | Method and Description |
---|---|
void |
execute(String actionCommand)
This method is executed when the user clicks on any of the
controls associated with this extension (menus, tools, etc).
|
protected abstract void |
execute(String actionCommand,
FeatureStore featureStore)
Executes a command for the given
FeatureStore . |
protected TableDocument |
getActiveTableDocument()
Returns the active table document.
|
void |
initialize()
Extension's initialization code should be here.
|
boolean |
isEnabled()
This method is invoked by Andami to check whether the extension
(and its associated controls) is enabled or disabled.
|
protected boolean |
isStoreOfAnyType(TableDocument tableDocument,
int[] geomTypes) |
boolean |
isVisible()
This method is invoked by Andami to check whether the extension
(and its associated controls) is visible or hidden.
|
protected abstract boolean |
isVisibleForTable(TableDocument tableDocument)
Returns if the current extension is visible for the provided
table.
|
public AbstractGeometryMeasurementExtension()
public void initialize()
IExtension
public boolean isEnabled()
IExtension
public final boolean isVisible()
IExtension
protected abstract boolean isVisibleForTable(TableDocument tableDocument)
layer
- the active tableprotected TableDocument getActiveTableDocument() throws DataException
DataException
protected boolean isStoreOfAnyType(TableDocument tableDocument, int[] geomTypes)
public void execute(String actionCommand)
IExtension
actionCommand
- An String specifying the action to
execute. This is useful when there are different
controls associated with the same extension.protected abstract void execute(String actionCommand, FeatureStore featureStore) throws Exception
FeatureStore
.actionCommand
- to executefeatureStore
- to useException
- if there is an error while executing