Package com.luciad.lucy.addons
Class ALcyPreferencesAddOn
java.lang.Object
com.luciad.lucy.addons.ALcyAddOn
com.luciad.lucy.addons.ALcyPreferencesAddOn
- Direct Known Subclasses:
ALcyFormatAddOn,ALcyLspFormatAddOn,TLcyAPSAddOn,TLcyASTERIXDecoderAddOn,TLcyAsynchronousPaintAddOn,TLcyConnectionAddOn,TLcyCopyPasteAddOn,TLcyDebugAddOn,TLcyDefaultDecodersAddOn,TLcyDimensionalFilterAddOn,TLcyDrawingTEAAddOn,TLcyErrorLogAddOn,TLcyFormatBarAddOn,TLcyFusionClientAddOn,TLcyFusionCoreAddOn,TLcyGenericMapAddOn,TLcyHelpAddOn,TLcyLayerControlAddOn,TLcyLspCameraLinkAddOn,TLcyLspHypsometryAddOn,TLcyLspLayerCustomizerAddOn,TLcyLspMapAddOn,TLcyLspMapOverviewAddOn,TLcyLspPreviewAddOn,TLcyLspPrintAddOn,TLcyLspRadarVideoStyleCustomizerAddOn,TLcyLspStyleRepositoryAddOn,TLcyMapEditUnitAddOn,TLcyModelCustomizerAddOn,TLcyNetworkConnectionAddOn,TLcyObjectPropertiesComparisonAddOn,TLcyPIMTrackAddOn,TLcyRecentFilesAddOn,TLcyS57RealtimeAddOn,TLcyWMSEarthClientAddOn,TLcyWMSEcdisAddOn,TLcyWorkspaceAddon
ALcyAddOn that is equipped with a TLcyPreferencesTool to read
its preferences from the set configuration file.
The configured preferences are available through getPreferences().-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedALcyPreferencesAddOn(String aLongPrefix, String aShortPrefix) Creates a newALcyPreferencesAddOn. -
Method Summary
Modifier and TypeMethodDescriptionprotected TLcyPreferencesToolCreates theTLcyPreferencesToolto be used by this add-on.Returns the long prefix of this add-on.Returns the Lucy environment into which this add-on was plugged.Convenience method that returns the composite workspace preferences of this add-on's preferences tool.Returns the preferences tool used by the add-on.Returns the short prefix of this add-on.voidplugInto(ILcyLucyEnv aLucyEnv) Creates and plugs in the add-on's preferences tool.voidunplugFrom(ILcyLucyEnv aLucyEnv) Unplugs the add-on's preferences tool.Methods inherited from class com.luciad.lucy.addons.ALcyAddOn
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
-
Constructor Details
-
ALcyPreferencesAddOn
Creates a newALcyPreferencesAddOn. Typically this constructor is called as follows:
Note that the code above won't work when multiple add-ons are located in the same package as the long prefix won't be unique. In that case, you could use thepublic class MyAddOn extends ALcyPreferencesAddOn{ public MyAddOn(){ super(ALcyTool.getLongPrefix(MyAddOn.class), ALcyTool.getShortPrefix(MyAddOn.class) } //... }ALcyTool.getLongPrefixWithClassName(Class)instead:public class MyAddOn extends ALcyPreferencesAddOn{ public MyAddOn(){ super(ALcyTool.getLongPrefixWithClassName(MyAddOn.class), ALcyTool.getShortPrefix(MyAddOn.class) } //... }- Parameters:
aLongPrefix- The long prefix. This prefix must be globally unique. It is stored in workspace files, so if backward compatibility is a concern (e.g. read an old workspace file), this prefix must never change.aShortPrefix- The short prefix, see alsoTLcyPreferencesTool. It might be stored in workspace files, so if backward compatibility is a concern (e.g. read an old workspace file), this prefix must never change.
-
-
Method Details
-
getLongPrefix
Returns the long prefix of this add-on.- Returns:
- the long prefix of this add-on.
-
getShortPrefix
Returns the short prefix of this add-on.- Returns:
- the short prefix of this add-on.
-
getLucyEnv
Returns the Lucy environment into which this add-on was plugged.- Returns:
- the Lucy environment into which this add-on was plugged
- See Also:
-
getPreferencesTool
Returns the preferences tool used by the add-on. The preferences tool provides access to the add-on's configuration, system, user and workspace preferences.- Returns:
- the add-on's preferences tool
-
getPreferences
Convenience method that returns the composite workspace preferences of this add-on's preferences tool. These preferences include the configured preferences of the add-on.
- Returns:
- the preferences for this add-on
- See Also:
-
plugInto
Creates and plugs in the add-on's preferences tool. -
unplugFrom
Unplugs the add-on's preferences tool.- Specified by:
unplugFromin classALcyAddOn- Parameters:
aLucyEnv- the Lucy environment- See Also:
-
createPreferencesTool
Creates the
TLcyPreferencesToolto be used by this add-on. Overwriting this method for example allows to register additionalILcyPropertyConverters 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 asString,int,double, etc.The default implementation creates a new tool based on the
ALcyAddOn.getConfigSourceName()and the add-on's prefixes.- Returns:
- the created
TLcyPreferencesTool.
-