Class TLcyLspTransformingModelFormatWrapper
An ALcyLspFormatWrapper instance which adds support for transforming the models in the layer factory, for
example to add support for clustering.
This format wrapper can only be used if the ALcyFormat (which normally provides the model decoder and model workspace support for the format)
is wrapped with an TLcyTransformingModelFormatWrapper.
This format wrapper has a layer factory implementation which allows to convert the model
into a ALcdTransformingModel and create a layer for that.
A possible use-case is if you want to cluster the domain objects on the map.
The Lucy clustering sample illustrates a usage of this class.
See samples.lucy.clustering.lightspeed.LspClusteringSHPAddOn#createBaseFormat().
- Since:
- 2017.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTLcyLspTransformingModelFormatWrapper(ALcyLspFormat aFormat, TLcyTransformingModelFormatWrapper aGXYFormatWrapper, ILspLayerFactory aTransformedModelLayerFactory) Creates a newTLcyLspTransformingModelFormatWrapperinstance. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleancanHandleModel(ILcdModel aModel) Returnstrueif and only if the given model can be visualized by this format.final ILspLayerFactoryCreates the layer factory for this format.final booleanisLayerOfFormat(ILspLayer aLayer) Returnstrueif and only if the given layer is a layer of this format.Methods inherited from class com.luciad.lucy.format.lightspeed.ALcyLspFormatWrapper
createAll, createBalloonContentProviders, createFormatBarFactory, createLayerCustomizerPanelFactories, createLayerCustomizerPanelWorkspaceCodecs, createLayerMeasureProviderFactory, createLayerSelectionTransferHandlers, createLayerStyleCodecFileTypeDescriptors, createLayerStyleCodecs, createLayerStyleProviders, createLayerWorkspaceCodecs, getFormat, getLongPrefix, getLucyEnv, getShortPrefixMethods inherited from class com.luciad.lucy.format.lightspeed.ALcyLspFormat
checkInitialized, createLayerContextOfFormatFilter, getBalloonContentProviders, getFormatBarFactory, getLayerCustomizerPanelFactories, getLayerCustomizerPanelWorkspaceCodecs, getLayerFactory, getLayerMeasureProviderFactory, getLayerSelectionTransferHandlers, getLayerStyleCodecFileTypeDescriptors, getLayerStyleCodecs, getLayerStyleProviders, getLayerWorkspaceCodecs, toString
-
Constructor Details
-
TLcyLspTransformingModelFormatWrapper
public TLcyLspTransformingModelFormatWrapper(ALcyLspFormat aFormat, TLcyTransformingModelFormatWrapper aGXYFormatWrapper, ILspLayerFactory aTransformedModelLayerFactory) Creates a newTLcyLspTransformingModelFormatWrapperinstance.- Parameters:
aFormat- The delegate Lightspeed formataGXYFormatWrapper- TheTLcyTransformingModelFormatWrapperinstance which is used to add transforming model support to the GXY format. The actual transforming of the models will be delegated to theTLcyTransformingModelFormatWrapper.transformModel(ILcdModel)method.aTransformedModelLayerFactory- Layer factory responsible for the creation of the layers forALcdTransformingModelinstances.
-
-
Method Details
-
createLayerFactory
Creates the layer factory for this format. The default implementation returns
null.This implementations returns the instance created by the decorated format.
For each incoming model, the layer factory will:
- Try transforming the model by calling the
TLcyTransformingModelFormatWrapper.transformModel(ILcdModel)method. -
If the returned model is a
ALcdTransformingModel, layer creation will be delegated to the layer factory passed in the constructor. If not, layer creation is delegated to the layer factory of the delegate format.
- Overrides:
createLayerFactoryin classALcyLspFormatWrapper- Returns:
- The
ILspLayerFactoryfor this format. May benull - See Also:
- Try transforming the model by calling the
-
canHandleModel
Description copied from class:ALcyLspFormatReturns
trueif and only if the given model can be visualized by this format.- Overrides:
canHandleModelin classALcyLspFormatWrapper- Parameters:
aModel- The model to check- Returns:
trueif and only if the given model can be visualized by this format.
-
isLayerOfFormat
Description copied from class:ALcyLspFormatReturns
trueif and only if the given layer is a layer of this format.The default implementation uses the
ALcyLspFormat.canHandleModel(com.luciad.model.ILcdModel)to determine whetheraLayeris a layer of this format.- Overrides:
isLayerOfFormatin classALcyLspFormatWrapper- Parameters:
aLayer- The layer to check- Returns:
trueif and only if the given layer is a layer of this format
-