public class TLcyHypsometryAddon extends ALcyFormatAddOn
The GUI's application pane is built by a ALcyApplicationPaneTool
, using the add-on's GUI factory
.
By default, this GUI uses the composite workspace preferences of the add-on's preferences tool
.
The add-on's functionality can be changed by extending the back-end, or by extending the GUI builder and tapping into the latter preferences object. See the TEA developer's guide for more information on using and extending TEA add-ons.
Note that this add-on depends on the LuciadLightspeed TEA Industry Specific Component.
Modifier and Type | Field and Description |
---|---|
static int |
LAYER_ACTION_ID
Creation of a hypsometry layer based on the selected layer.
|
static String |
SELECTED_ACTION_KEY
Property name defining how the hypsometry should be created.
|
static int |
SELECTED_ACTION_VALUE_DEFAULT
Default value for the
SELECTED_ACTION_KEY property. |
static String |
SELECTED_VALUE_PROVIDER_KEY
Property name for the hypsometric value provider to use in the hypsometry calculations.
|
static String |
SELECTED_VALUE_PROVIDER_VALUE_DEFAULT
Default hypsometric value provider to use in the hypsometry calculations.
|
static int |
SHAPE_ACTION_ID
Creation of a hypsometry layer based on all visible layers, inside the bounds of the selected shape.
|
static String |
VALUE_PROVIDER_LIST_KEY
Property name defining the hypsometric value providers that can be chosen from.
|
static String[] |
VALUE_PROVIDER_LIST_VALUE_DEFAULT
Default hypsometric value providers that can be chosen from.
|
Constructor and Description |
---|
TLcyHypsometryAddon()
Default constructor for the hypsometry add-on.
|
Modifier and Type | Method and Description |
---|---|
protected ALcyApplicationPaneTool |
createApplicationPaneTool()
Returns the add-on's application pane tool.
|
protected ALcyFormat |
createBaseFormat()
Returns a new data format for this add-on.
|
TLcyFormatTool |
createFormatTool(ALcyFormat aFormat)
Creates a new format tool for the given format.
|
ALcyFormat |
createFormatWrapper(ALcyFormat aBaseFormat)
Returns a new data format wrapper for this add-on.
|
protected ALcyGUIFactory<Component> |
createGUIFactory()
Returns a new GUI factory for this add-on.
|
protected TLcyHypsometryBackEnd |
createHypsometryBackEnd()
Returns a new back-end for hypsometry calculations.
|
protected ALcyFormat |
createHypsometryGeoTIFFBaseFormat()
Returns a new file format for the snapshots taken of all visible elevation layers.
|
protected ALcyFormat |
createHypsometryGeoTIFFBaseFormatWrapper(ALcyFormat aBaseFormat)
Returns a new file format wrapper for this format's snapshot format.
|
protected TLcyPreferencesTool |
createPreferencesTool()
Creates the
TLcyPreferencesTool to be used by this add-on. |
ALcyApplicationPaneTool |
getApplicationPaneTool()
Returns the tool that creates the add-on's application pane.
|
ALcyGUIFactory<T> |
getGUIFactory()
Returns the GUI factory to create the add-on's application pane.
|
TLcyHypsometryBackEnd |
getHypsometryBackEnd()
The back-end that the GUI can use for performing hypsometry calculations.
|
ALcyFormat |
getHypsometryGeoTIFFFormat()
Returns the ALcyFormat class that encapsulates a data format for the snapshots taken of all visible elevation layers.
|
void |
plugInto(ILcyLucyEnv aLucyEnv)
Builds a GUI, back-end and file formats for hypsometry calculations and plugs in the GUI and file format.
|
void |
unplugFrom(ILcyLucyEnv aLucyEnv)
Unplugs the add-on's format, preferences tool and application pane tool.
|
getFormat
getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
public static final String SELECTED_VALUE_PROVIDER_KEY
TLcyHypsometryBackEnd
for the supported value providers.
The property value is used to define additional sub-properties for the value provider. For example, the azimuth of the slope value provider can be found in the following property:
TLcyHypsometryBackEnd.HYPSOMETRIC_VALUE_PROVIDER_SLOPE_ID
+ "." +TLcyHypsometryBackEnd.AZIMUTH_KEY
.
TLcyHypsometryBackEnd.createHypsometricValueProvider(com.luciad.lucy.util.properties.ALcyProperties)
is used to construct the actual provider.
public static final String SELECTED_VALUE_PROVIDER_VALUE_DEFAULT
public static final String VALUE_PROVIDER_LIST_KEY
TLcyHypsometryBackEnd
for a list of supported value providers.
The associated value is an array of String objects.public static final String[] VALUE_PROVIDER_LIST_VALUE_DEFAULT
public static final int LAYER_ACTION_ID
public static final int SHAPE_ACTION_ID
public static final String SELECTED_ACTION_KEY
SHAPE_ACTION_ID
or LAYER_ACTION_ID
.public static final int SELECTED_ACTION_VALUE_DEFAULT
SELECTED_ACTION_KEY
property.public TLcyHypsometryAddon()
public void plugInto(ILcyLucyEnv aLucyEnv)
aLucyEnv
- the Lucy instance to plug intoALcyAddOn.unplugFrom(com.luciad.lucy.ILcyLucyEnv)
public void unplugFrom(ILcyLucyEnv aLucyEnv)
aLucyEnv
- the Lucy environmentALcyAddOn.plugInto(com.luciad.lucy.ILcyLucyEnv)
protected TLcyHypsometryBackEnd createHypsometryBackEnd()
public TLcyHypsometryBackEnd getHypsometryBackEnd()
Override createHypsometryBackEnd()
to extend the back-end.
TLcyHypsometryBackEnd
object for performing contour calculationscreateHypsometryBackEnd()
,
TLcyHypsometryBackEnd
public ALcyFormat getHypsometryGeoTIFFFormat()
ALcyFormatAddOn.getFormat()
protected ALcyFormat createHypsometryGeoTIFFBaseFormat()
protected ALcyFormat createHypsometryGeoTIFFBaseFormatWrapper(ALcyFormat aBaseFormat)
aBaseFormat
- the base file format to wrapALcyFormatWrapper
protected ALcyFormat createBaseFormat()
Returns a new data format for this add-on. Override this method to extend the default format with new functionality.
For example, to alter the icon of the layers of this format, you can decorate the layer factory created in the format:
@Override
protected ALcyFormat createBaseFormat() {
return new ALcyFormatWrapper(super.createBaseFormat()){
@Override
protected ILcdGXYLayerFactory createGXYLayerFactory(){
final ILcdGXYLayerFactory delegate = super.createGXYLayerFactory();
return new ILcdGXYLayerFactory(){
@Override
public ILcdGXYLayer createGXYLayer(ILcdModel aModel){
ILcdGXYLayer layer = delegate.createGXYLayer(aModel);
if (layer != null){
ILcdIcon icon = ...;
layer.setIcon(icon);
}
return layer;
}
}
}
}
}
Note that the created format is at least wrapped by a
TLcySafeGuardFormatWrapper
(or equivalent) before it is plugged in ILcyLucyEnv
(using e.g. TLcyFormatTool).
So it is safe to rely on the safety checks performed by that wrapper.
public TLcyFormatTool createFormatTool(ALcyFormat aFormat)
ALcyFormatAddOn
Creates a new format tool for the given format. It is used to plug all parts of the format (
e.g. ILcdGXYLayerFactory
, ILcdModelDecoder
, etc.) into
ILcyLucyEnv
.
createFormatTool
in class ALcyFormatAddOn
aFormat
- the format for which to create a toolTLcyFormatTool
public final ALcyFormat createFormatWrapper(ALcyFormat aBaseFormat)
ALcyFormatAddOn
Returns a new data format wrapper for this add-on. A format wrapper extends the base format with aspects such as asynchronous painting, mutable file behavior, safe guarding, etc.
Overriding this method of an existing add-on should be done with extreme care as add-ons typically rely on the wrappers that should be present (e.g. a safe guard).
createFormatWrapper
in class ALcyFormatAddOn
aBaseFormat
- the base format to wrapALcyFormatWrapper
protected ALcyGUIFactory<Component> createGUIFactory()
For example, this add-on could return a new instance of TLcyHypsometryGUIFactory
protected ALcyApplicationPaneTool createApplicationPaneTool()
This add-on's application pane tool initializes the GUI factory with the add-on's composite workspace preferences.
public ALcyGUIFactory<T> getGUIFactory()
createGUIFactory()
if you want to override or extend the add-on's factory.public ALcyApplicationPaneTool getApplicationPaneTool()
createApplicationPaneTool()
if you want to override or extend the add-on's application pane tool.protected TLcyPreferencesTool createPreferencesTool()
TLcyPreferencesTool
to be used by this add-on. Overwriting this method
for example allows to register additional ILcyPropertyConverter
s for (complex)
custom properties, to make sure they are correctly decoded from the add-on's configuration file
and/or saved to the workspace. Note that this isn't required for simple properties such as
String
, int
, double
, etc.createPreferencesTool
in class ALcyPreferencesAddOn
TLcyPreferencesTool
.