@LcdService(service=ILcdGXYLayerFactory.class, priority=20000) public class TLcdS52GXYLayerFactory extends Object implements ILcdGXYLayerFactory
ILcdGXYLayerFactory
implementation which can create layers for S-57 models. Both
AML and ENC models are supported. The returned layer is an ILcdGXYEditableLabelsLayer
.
Example usage:
String source = ...;//can be a S-57 cell or catalogue file
TLcdS57UnifiedModelDecoder decoder = new TLcdS57UnifiedModelDecoder();
ILcdModel model = decoder.decode( source );
TLcdS52GXYLayerFactory layerFactory = new TLcdS52GXYLayerFactory();
ILcdGXYLayer layer = layerFactory.createGXYLayer( model );
TLspS52LayerBuilder to create layers in Lightspeed view.
Constructor and Description |
---|
TLcdS52GXYLayerFactory()
Default constructor.
|
TLcdS52GXYLayerFactory(TLcdS52DisplaySettings aDisplaySettings)
Creates a layer factory which will use the specified display settings for all of the layers
its
creates.
|
Modifier and Type | Method and Description |
---|---|
ILcdGXYEditableLabelsLayer |
createGXYLayer(ILcdModel aModel)
Creates an
ILcdGXYLayer for representing
an ILcdModel on an ILcdGXYView . |
TLcdS52DisplaySettings |
getDisplaySettings()
Returns the display settings used by this layer factory.
|
double |
getScaleFactor()
Gets the scale factor for the S-52 symbols rendered by this layer factory, in pixels per
millimeter.
|
boolean |
isAntiAliasing()
Indicates whether the S-52 symbologies used by this layer factory use anti-aliasing or not.
|
void |
setAntiAliasing(boolean aAntiAliasing)
Indicates whether the S-52 symbologies used by this layer factory should use anti-aliasing
or not.
|
void |
setScaleFactor(double aScaleFactor)
Sets the scale factor for the S-52 symbols rendered by this layer factory, in pixels per
millimeter.
|
public TLcdS52GXYLayerFactory()
TLcdS52GXYLayerFactory(com.luciad.format.s52.TLcdS52DisplaySettings)
constructor.getDisplaySettings()
public TLcdS52GXYLayerFactory(TLcdS52DisplaySettings aDisplaySettings)
aDisplaySettings
- The display settings. Must not be null
getDisplaySettings()
public final TLcdS52DisplaySettings getDisplaySettings()
public void setAntiAliasing(boolean aAntiAliasing)
Indicates whether the S-52 symbologies used by this layer factory should use anti-aliasing or not. Anti-aliasing results in smoother icons and lines but may be slightly slower in rendering.
Changing this setting will only affect layers which are created after this setting has been changed. Layers which have been created earlier remain unaffected.
aAntiAliasing
- true
when anti-aliasing should be turned onpublic boolean isAntiAliasing()
Indicates whether the S-52 symbologies used by this layer factory use anti-aliasing or not. Anti-aliasing results in smoother icons and lines but may be slightly slower in rendering.
true
when anti-aliasing is turned on; false
otherwisepublic void setScaleFactor(double aScaleFactor)
aScaleFactor
- a scale factor, in pixels per millimeterpublic double getScaleFactor()
public ILcdGXYEditableLabelsLayer createGXYLayer(ILcdModel aModel)
ILcdGXYLayerFactory
ILcdGXYLayer
for representing
an ILcdModel
on an ILcdGXYView
.createGXYLayer
in interface ILcdGXYLayerFactory
aModel
- a model that needs to be visualized in an ILcdGXYView
null
if such a layer cannot be createdTLcdGXYViewJPanel.setGXYLayerFactory(com.luciad.view.gxy.ILcdGXYLayerFactory)