public class TLcyAIXMAddOn extends ALcyFormatAddOn
Constructor and Description |
---|
TLcyAIXMAddOn()
Creates a new
TLcyAIXMAddOn . |
Modifier and Type | Method and Description |
---|---|
protected ALcyFormat |
createBaseFormat()
Returns a new data format for this add-on.
|
protected ALcyFormat |
createFormatWrapper(ALcyFormat aBaseFormat)
Returns a new data format wrapper for this add-on.
|
protected TLcyPreferencesTool |
createPreferencesTool()
Creates the
TLcyPreferencesTool to be used by this add-on. |
static boolean |
isClassTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
plugInto(ILcyLucyEnv aLucyEnv)
Creates and plugs in the add-on's format.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
createFormatTool, getFormat, unplugFrom
getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
protected ALcyFormat createBaseFormat()
ALcyFormatAddOn
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;
}
}
}
}
}
createBaseFormat
in class ALcyFormatAddOn
protected 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
public void plugInto(ILcyLucyEnv aLucyEnv)
ALcyFormatAddOn
Creates and plugs in the add-on's format.
plugInto
in class ALcyFormatAddOn
aLucyEnv
- the Lucy environment to plug intoALcyAddOn.unplugFrom(com.luciad.lucy.ILcyLucyEnv)
@Deprecated public static boolean isClassTraceOn()
true
if tracing is enabled for this class.@Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.protected TLcyPreferencesTool createPreferencesTool()
ALcyPreferencesAddOn
Creates the 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.
The default implementation creates a new tool based on the ALcyAddOn.getConfigSourceName()
and
the add-on's prefixes.
createPreferencesTool
in class ALcyPreferencesAddOn
TLcyPreferencesTool
.