Class TLcyModelReferenceAddOn
Furthermore, it adds a menu item to create a directory.ref file. If such a file is present in a directory, all data files in that directory that don't have a model reference will use that model reference.
The predefined references the user can choose from can be specified in the configuration file, or can be set directly using
setGeodeticReferences and/or setGridReferences.
The add-on also registers default ILcdModelReferenceParser instances on the Lucy back-end.
The registered ILcdModelReferenceParser instances will be used by e.g. the GML model decoder to parse model references.
See ILcyLucyEnv.addService(Object) for more information.
A help ID (see ALcyHelpManager) is registered to
allow to display context sensitive help for the panel that allows to choose
a reference: "com.luciad.lucy.addons.modelreference.TLcyModelReferenceAddOn.ModelReferenceChooser"- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of predefined grid references the user can choose from.booleanDeprecated.This method has been deprecated.voidplugInto(ILcyLucyEnv aLucyEnv) Adds aILcdModelReferenceDecoderto the givenILcyLucyEnvthat pops up a dialog to ask the user to specify the reference.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidsetGeodeticReferences(ILcdGeodeticReference[] aGeodeticReferences) Sets the list of predefined geodetic references.voidsetGridReferences(ILcdGridReference[] aGridReferences) Sets the list of predefined grid references.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.showModelReferenceChooser(Component aParentComponent) Presents a model reference chooser UI to the user in a modal dialog.showModelReferenceChooser(Component aParentComponent, boolean aIncludeGeodeticReferences, boolean aIncludeGridReferences) Presents a model reference chooser UI to the user in a modal dialog.voidunplugFrom(ILcyLucyEnv aLucyEnv) Removes the addedILcdModelReferenceDecoderand menu item.Methods inherited from class com.luciad.lucy.addons.ALcyAddOn
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
-
Field Details
-
MODEL_REFERENCE_GROUP_DESCRIPTOR
-
-
Constructor Details
-
TLcyModelReferenceAddOn
public TLcyModelReferenceAddOn()
-
-
Method Details
-
setClassTraceOn
Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istruethen all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setTraceOn
Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
isTraceOn
Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
plugInto
Adds aILcdModelReferenceDecoderto the givenILcyLucyEnvthat pops up a dialog to ask the user to specify the reference. TheILcdModelReferenceDecodershould be used a last resort, when all other attempts to find a reference have failed.
Furthermore it adds a menu item that allows to create a .ref file on demand. If the file is named directory.ref, all data files in that directory will use that reference. -
unplugFrom
Removes the addedILcdModelReferenceDecoderand menu item.- Specified by:
unplugFromin classALcyAddOn- Parameters:
aLucyEnv- The lucy environment that was passed in plugInto.- See Also:
-
getGeodeticReferences
-
setGeodeticReferences
Sets the list of predefined geodetic references. A geodetic reference can be modfied if it is an instance ofTLcyGeodeticReferenceand its editable property is true.
The geodetic references should be set before the addon is plugged.- Parameters:
aGeodeticReferences- The list of geodetic references.
-
getGridReferences
Returns the set of predefined grid references the user can choose from.- Returns:
- the set of predefined grid references the user can choose from.
-
setGridReferences
Sets the list of predefined grid references. A grid reference can be modified if it is an instance ofTLcyGridReferenceand its editable property is true.
The grid references should be set before the addon is plugged.- Parameters:
aGridReferences- The list of grid references.
-
showModelReferenceChooser
Presents a model reference chooser UI to the user in a modal dialog. The chosen model reference will be returned.
Calling this method is equivalent to calling
showModelReferenceChooser( aParentComponent, true, true ).Note: this method should be called on the Event Dispatch Thread and only when this add-on is plugged in. This method only returns after the user selected a reference or cancelled the dialog.
- Parameters:
aParentComponent- Parent component for the dialog- Returns:
- the chosen model reference, or
nullwhen the user cancelled. - See Also:
-
showModelReferenceChooser
public ILcdGeoReference showModelReferenceChooser(Component aParentComponent, boolean aIncludeGeodeticReferences, boolean aIncludeGridReferences) Presents a model reference chooser UI to the user in a modal dialog. The chosen model reference will be returned.
Calling this method is equivalent to calling
showModelReferenceChooser( aParentComponent, true, true ).Note: this method should be called on the Event Dispatch Thread and only when this add-on is plugged in. This method only returns after the user selected a reference or cancelled the dialog.
- Parameters:
aParentComponent- Parent component for the dialogaIncludeGeodeticReferences- whentrue, geodetic references will be included in the chooser. Whenfalse, geodetic references will not be shown. Note that eitheraIncludeGeodeticReferencesoraIncludeGridReferencesmust betrueaIncludeGridReferences- whentrue, grid references will be included in the chooser. Whenfalse, grid references will not be shown. Note that eitheraIncludeGeodeticReferencesoraIncludeGridReferencesmust betrue- Returns:
- the chosen model reference, or
nullwhen the user cancelled.
-