Class TLfnGXYVectorLayer
- All Implemented Interfaces:
ILcdPropertyChangeSource
,ILcdSelection<Object>
,ILcdGXYEditableLabelsLayer
,ILcdGXYLayer
,ILcdLayer
,Serializable
An ILcdGXYLayer
for the visualization of LuciadFusion vector data in a 2D view.
A layer, ready to be added to the view, can be created as follows;
ILcdModel model = ...;
ILcdGXYLayer layer = new TLfnGXYVectorLayer( model, "MyLabel" );
The above snippet creates a layer with default visualization setting. If you want to customize this visualization, it is important to understand how the default visualization works, and what hooks are provided to customize this. This is explained in the next sections.
Default visualization
The layer is configured with default painters and label painters. These default painters and label painters will ensure that:
-
The SLD styling is respected when it is available on the coverage (see
ALfnCoverageMetadata.getFeatureTypeStyles()
). - GeoSym styling is used for VPF data, if the Defense Standards component is available (i.e., if it is defined in the license and if the corresponding Java library is found in the classpath). If not available, it will fallback to default styling instead.
- Default colors and styles are used in other cases.
-
When
filters
are defined on the coverage, they will be respected by this layer. This means domain objects will only remain visible until the scale is reached for which the filter which accepts that domain object is defined. The domain object will then remain visible when zooming in further. - Anti-aliasing is used.
Customize the visualization
It is perfectly possible to customize the visualization of the data on the client side by using the available API of this layer.
However, if the custom visualization can be defined in SLD, it is highly recommended to fuse your vector data using an SLD file containing all the styling information.
This SLD information will be picked up by this layer automatically.
Consult the javadoc of TLfnVectorCoverageMetadata
for more information.
To customize the visualization, you can
-
Pass
ILfnVectorGXYStyleProviderFactory
instances to the constructor. When the coverage does not contain VPF data or SLD styling information, theseILfnVectorGXYStyleProviderFactory
instances will be used to determine the styling. -
Use the
setGXYPainterProvider(com.luciad.view.gxy.ILcdGXYPainterProvider)
orsetGXYLabelPainterProvider(com.luciad.view.gxy.ILcdGXYLabelPainterProvider)
to override the (label) painter provider.
Working with Fusion vector domain objects
Fusion vector domain objects implement ILcdDataObject
and ILcdShapeList
.
While you can safely access all the ILcdDataObject
methods, you should take care when using the ILcdShapeList
API.
Fusion vector features often have multiple geospatial representations:
a same feature may for example be represented by a point at world-scale and a polygon at a more detailed zoom level.
The ILcdShapeList
interface of these features only provide access to the geometry of the feature at the most detailed level.
This most detailed level geometry is typically not loaded yet, and must be retrieved on-demand when you access the ILcdShapeList
API.
If you need access to the geometry of a LuciadFusion domain object (for example when writing an ILcdGXYLabelingPathProvider
)
you must make sure you use the geometry associated with the tiles loaded for the level and bounds associated with the view.
This geometry is obtained by calling the getTiledGeometry(Object)
method.
Failing to do this will load the original untiled geometry, which will have to be retrieved at that moment and may be very costly.
No extra steps need to be taken for painters, label painters and label editors set on this layer. Those will automatically be decorated such that they receive the geometry associated with the tiles loaded for level and bounds associated with the view.
Consult the javadoc of the getTiledGeometry(Object)
method for more information about the kind of geometries that will be returned.
- Since:
- 11.0
- See Also:
-
Field Summary
Fields inherited from interface com.luciad.view.gxy.ILcdGXYEditableLabelsLayer
PLACED_LABELS
-
Constructor Summary
ConstructorDescriptionTLfnGXYVectorLayer
(ILcdModel aModel, String aLabel) Deprecated.Creates a new GXY layer for fusion vector data with default styling.TLfnGXYVectorLayer
(ILcdModel aModel, String aLabel, ILfnVectorGXYStyleProviderFactory... aStyleProviderFactories) Deprecated.Creates a new GXY layer for fusion vector data. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
applyOnInteract
(ILcdFunction aFunction, Graphics aGraphics, int aPaintMode, ILcdModel aModel, ILcdGXYView aGXYView) Deprecated.Applies the function to (at the least) all objects from the given model that are contained (partially or completely) in the bounds of the view.int
applyOnInteract
(ILcdFunction aFunction, Graphics aGraphics, int aPaintMode, ILcdGXYView aGXYView) Deprecated.Applies the function to (at the least) all objects that are contained (partially or completely) in the bounds of the view.int
applyOnInteract
(ILcdFunction aFunction, Rectangle aBounds, boolean aStrictInteract, ILcdGXYView aGXYView) Deprecated.Applies the function to (at the least) all objects that are contained (partially or completely) in the bounds of the view.int
applyOnInteractLabels
(ILcdFunction aLabelFunction, Graphics aGraphics, int aPaintMode, ILcdGXYView aGXYView) Deprecated.Applies the function to (at the least) all labels that are contained (partially or completely) in the bounds of the view.getBounds
(int aMode, ILcdGXYView aGXYView) Deprecated.Returns the view bounds of thisILcdGXYLayer
content, the bounds of all the drawings (for the supplied mode) that represent the Objects contained in theILcdModel
of thisILcdGXYLayer
.getTiledGeometry
(Object aObject) Deprecated.Extract the geometry associated with the element at the current level for the tiles that are currently available.boolean
Deprecated.Returns whether the tiles can be requested asynchronously.boolean
Deprecated.Indicates if the view is repainted when a tile becomes available.boolean
Deprecated.It is recommended to fuse the data using SLD for filtering, and rely on the styling information in SLD for visualization.void
paint
(Graphics aGraphics, int aMode, ILcdGXYView aGXYView) Deprecated.Paints the combined representation of the layer's objects for a view, taking into account the mode.void
setAsynchronousTileRequestAllowed
(boolean aAsynchronousTileRequestAllowed) Deprecated.Sets whether the tiles can be requested asynchronously.void
setGXYEditorProvider
(ILcdGXYEditorProvider aGXYEditorProvider) Deprecated.Sets anILcdGXYEditorProvider
to thisTLcdGXYLayer
.void
setGXYLabelEditorProvider
(ILcdGXYLabelEditorProvider aGXYLabelEditorProvider) Deprecated.Sets anILcdGXYLabelEditorProvider
to thisTLcdGXYLayer
.void
setGXYLabelPainterProvider
(ILcdGXYLabelPainterProvider aGXYLabelPainterProvider) Deprecated.Sets anILcdGXYLabelPainterProvider
to thisTLcdGXYLayer
.void
setGXYPainterProvider
(ILcdGXYPainterProvider aGXYPainterProvider) Deprecated.Sets anILcdGXYPainterProvider
to thisTLcdGXYLayer
.void
setGXYPainterProviderArray
(ILcdGXYPainterProvider[] aGXYPainterProviderArray) Deprecated.Like,TLcdGXYLayer.setGXYPainterProvider(com.luciad.view.gxy.ILcdGXYPainterProvider)
, but sets an array ofILcdGXYPainterProvider
to thisTLcdGXYLayer
.void
Deprecated.Sets theILcdModel
to thisILcdLayer
.void
setRepaintViewWhenTileAvailable
(boolean aRepaintViewWhenTileAvailable) Deprecated.Sets whether the view is repainted when a tile becomes available.void
setUseCoverageScalesAsLevelScales
(boolean aUseCoverageScalesAsLevelScales) Deprecated.It is recommended to fuse the data using SLD for filtering, and rely on the styling information in SLD for visualization.Methods inherited from class com.luciad.view.gxy.TLcdGXYLayer
asFactory, create, getGXYEditor, getGXYEditorProvider, getGXYLabelEditor, getGXYLabelEditorProvider, getGXYLabelingAlgorithm, getGXYLabelingAlgorithmProvider, getGXYLabelPainter, getGXYLabelPainterProvider, getGXYLayerLabelPainter, getGXYPainter, getGXYPainterProvider, getGXYPainterProviderArray, getGXYPainters, getGXYPen, getIcon, getInteractMargin, getLabelLocations, getLabelMapScaleRange, getLabelScaleRange, getMapScaleRange, getMinimumObjectSizeForPainting, getModelElementComparator, getModelQueryConfiguration, getModelXYWorldTransfoClass, getPaintLabelsScaleRatioInterval, getScaleRange, isEditableSupported, isLabeled, isLabeledSupported, isLabelsEditable, isLabelsEditableSupported, isPaintFromOverlaps, isSelectionLabeled, isStopPainting, isTraceOn, modeToString, paintFromModel, paintFromOverlaps, setClassTraceOn, setFilter, setGXYLabelingAlgorithmProvider, setGXYLayerLabelPainter, setGXYPen, setIcon, setInteractMargin, setLabeled, setLabelLocations, setLabelMapScaleRange, setLabelScaleRange, setLabelsEditable, setMapScaleRange, setMinimumObjectSizeForPainting, setModelElementComparator, setModelQueryConfiguration, setModelXYWorldTransfoClass, setPaintFromOverlaps, setPaintLabelsScaleRatioInterval, setScaleRange, setSelectionLabeled, setTraceOn, setVisible, startPainting, stopPainting
Methods inherited from class com.luciad.view.TLcdLayer
addPropertyChangeListener, addSelectionListener, clearSelection, fireCollectedSelectionChanges, firePropertyChangeEvent, getFilter, getLabel, getModel, getSelectionCount, invalidate, isEditable, isSelectable, isSelectableSupported, isSelected, isVisible, removePropertyChangeListener, removeSelectionListener, selectedObjects, selectObject, selectObjects, setEditable, setLabel, setSelectable, setSelectableSupported, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.view.ILcdLayer
clearSelection, fireCollectedSelectionChanges, getLabel, getModel, isEditable, isSelectable, isSelectableSupported, isVisible, selectObject, setEditable, setLabel, setSelectable
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.luciad.util.ILcdSelection
addSelectionListener, getSelectedObjects, getSelectionCount, isSelected, removeSelectionListener, selectedObjects
-
Constructor Details
-
TLfnGXYVectorLayer
Deprecated.Creates a new GXY layer for fusion vector data with default styling.
This method delegates to
TLfnGXYVectorLayer(com.luciad.model.ILcdModel, String, ILfnVectorGXYStyleProviderFactory...)
with an empty array ofILfnVectorGXYStyleProviderFactory
instances. The styling for a layer created with this constructor follows the same rules as explained there.- Parameters:
aModel
- The modelaLabel
- The label- See Also:
-
TLfnGXYVectorLayer
public TLfnGXYVectorLayer(ILcdModel aModel, String aLabel, ILfnVectorGXYStyleProviderFactory... aStyleProviderFactories) Deprecated.Creates a new GXY layer for fusion vector data.
The default styling of the layer is done using the following rules:
- When the vector coverage for which this layer is created contains SLD style information, this style information will be used for the visualization.
- When the vector coverage for which this layer is created contains VPF data, the default styling is GeoSym.
-
When no SLD info is available and the coverage does not contain VPF data, the
aStyleProviderFactories
will be asked to create a style provider. The first style provider which can be created will be used. -
If none of the
ILfnVectorGXYStyleProviderFactory
instances passed to this constructor can create a style provider, a default style will be used.
By default, a label painter will be set when the datamodel contains string properties.
If you want to have more control over the styling, you can replace the (label) painter provider instances by calling the corresponding setter on this layer.
- Parameters:
aModel
- The modelaLabel
- The labelaStyleProviderFactories
- The style provider factories.
-
-
Method Details
-
setUseCoverageScalesAsLevelScales
public void setUseCoverageScalesAsLevelScales(boolean aUseCoverageScalesAsLevelScales) Deprecated.It is recommended to fuse the data using SLD for filtering, and rely on the styling information in SLD for visualization. Doing this will ensure that all features appear at the scales exactly as defined in the SLD, both in GXY as in Lightspeed.Configures whether to use the scales from the coverage metadata as level scales. Iftrue
the coverage metadata scales will be used to choose the right level for a given precision. The scale at index i will be used as the minimum scale for displaying level i in the tile pyramid. Iffalse
, the layer will use its own logic to determine the most appropriate level. The default value isfalse
.- Parameters:
aUseCoverageScalesAsLevelScales
- boolean indicating whether to use the coverage metadata scales as level scales.
-
isUseCoverageScalesAsLevelScales
public boolean isUseCoverageScalesAsLevelScales()Deprecated.It is recommended to fuse the data using SLD for filtering, and rely on the styling information in SLD for visualization. Doing this will ensure that all features appear at the scales exactly as defined in the SLD, both in GXY as in Lightspeed.Returns whether to use the scales from the coverage metadata as level scales.- Returns:
true
if the coverage metadata scales are used as level scales,false
otherwise.
-
setModel
Deprecated.Description copied from class:TLcdLayer
Sets theILcdModel
to thisILcdLayer
.- Overrides:
setModel
in classTLcdGXYLayer
- Parameters:
aModel
- the model that contains the objects that should be displayed in this layer.
-
getTiledGeometry
Deprecated.Extract the geometry associated with the element at the current level for the tiles that are currently available.
Returned shapes
AnILcdShapeList
containing a shape for each visible element of the feature:-
ILcdPoint
: for point elements. -
ILcdShapeList
: for line elements. It containsILcdPolyline
shapes that describe the available parts of the line feature. -
ILfnTiledSurface
: for area elements. SeeILfnTiledSurface.getOutlines()
andILfnTiledSurface.getFills()
for details. -
ILcdText
: for text elements.
ILcdDataObject
.Restrictions
- It is possible that you only get a part of the original geometry: if not all tiles geometry were visible, or if some tiles have not yet been loaded.
- It is possible that the geometry is presented in separate parts, e.g. if a tile in the middle is not yet loaded.
- Parts of adjacent tiles will always be merged together into one part.
- It is possible that extra points will be present that were not present in the original geometry. These points are interpolated points and will not be visible.
- Parameters:
aObject
- A domain object as received from an applyOnInteract(com.luciad.util.ILcdFunction, java.awt.Rectangle, boolean, com.luciad.view.gxy.ILcdGXYView) call.- Returns:
- An object that contains the available tiled geometry.
-
-
isAsynchronousTileRequestAllowed
public boolean isAsynchronousTileRequestAllowed()Deprecated.Returns whether the tiles can be requested asynchronously. When allowed, tiles may be requested asynchronously to improve performance but this is not guaranteed. When not allowed, it is guaranteed that no tiles will be requested asynchronously. This can result in lower performance but guarantees that all visible data is painted.- Returns:
true
if the tiles can be requested asynchronously,false
otherwise
-
setAsynchronousTileRequestAllowed
public void setAsynchronousTileRequestAllowed(boolean aAsynchronousTileRequestAllowed) Deprecated.Sets whether the tiles can be requested asynchronously.- Parameters:
aAsynchronousTileRequestAllowed
- whether the tiles can be requested asynchronously- See Also:
-
isRepaintViewWhenTileAvailable
public boolean isRepaintViewWhenTileAvailable()Deprecated.Indicates if the view is repainted when a tile becomes available.- Returns:
- whether the view is repainted when a tile becomes available
-
setRepaintViewWhenTileAvailable
public void setRepaintViewWhenTileAvailable(boolean aRepaintViewWhenTileAvailable) Deprecated.Sets whether the view is repainted when a tile becomes available.- Parameters:
aRepaintViewWhenTileAvailable
- whether the view should repainted when a tile becomes available
-
getBounds
Deprecated.Description copied from class:TLcdGXYLayer
Returns the view bounds of thisILcdGXYLayer
content, the bounds of all the drawings (for the supplied mode) that represent the Objects contained in theILcdModel
of thisILcdGXYLayer
. For this operation, thisILcdGXYLayer
is to be considered as part ofaGXYView
.Outside of the layers bounds no interaction with any object of the layer via its representation is possible. Note that these bounds do not necessarily encompass the representation of all objects in the model, only the objects for which there is a representation in the view.
- Specified by:
getBounds
in interfaceILcdGXYLayer
- Overrides:
getBounds
in classTLcdGXYLayer
- Parameters:
aMode
- a bitwise combination of ALL or SELECTION and one or more of BODIES and HANDLES. TheILcdGXYLayer.LABELS
mode is not supported.aGXYView
- the view in which the layer could be placed. This enables taking into account the views settings, for example the scale.- Returns:
- a bounds (in view coordinates, pixels) that encompasses the representation of all objects that are rendered in a view.
- Throws:
TLcdNoBoundsException
- if the layer doesn't have any valid bounds, for example when none of the elements have a representation for the views current settings.
-
applyOnInteract
public int applyOnInteract(ILcdFunction aFunction, Rectangle aBounds, boolean aStrictInteract, ILcdGXYView aGXYView) Deprecated.Description copied from class:TLcdGXYLayer
Applies the function to (at the least) all objects that are contained (partially or completely) in the bounds of the view.The function shall be applied successively to all objects in the bounds as long as the function returns
true
for an object. This allows developers to indicate a stop condition. Note that the order in which the objects are passed to the function is not specified.When strict interaction is required, only objects whose representation lies within the given bounds, completely or partially, are candidates to be passed to the function. An object whose representation does not interact with the bounds should not be passed to the function. Applying non strict interaction can be useful to avoid heavy computations to determine whether an objects representation lies within the bounds.
This method behaves similar to the paint method, and as such is allowed to omit small or invisible objects for performance reasons.
Objects smaller than the set minimum object size may be omitted.
- Specified by:
applyOnInteract
in interfaceILcdGXYLayer
- Overrides:
applyOnInteract
in classTLcdGXYLayer
- Parameters:
aFunction
- the function to apply. When the function returns false, no more objects should be passed to the function.aBounds
- all objects who lie partially or completely in this area in the view are candidates to be passed to the function.aStrictInteract
- iftrue
, theILcdFunction
shall be applied only to the objects interacting with the given bounds. When false is passed, other objects may be taken into account too. When applying the function to an object consumes less time than checking whether an objects representation interacts with the bounds, non-strict interaction is generally faster.aGXYView
- the view in whose bounds the objects representations should be in order to be passed to the function.- Returns:
- the number of objects the function was applied on.
-
paint
Deprecated.Description copied from class:TLcdGXYLayer
Paints the combined representation of the layer's objects for a view, taking into account the mode.The mode indicates what objects of the model should be taken into account and what representation should be provided. The objects to be taken into account shall be one of:
- ALL: all the objects in the layer's model, or
- SELECTION: all the objects in the layer's selection.
Note that the combined representation may contain less than the representation of all objects that were taken into account, as some objects may be disregarded for various reasons (filters, scale, ... ). When the views scale is outside the scale range (BODIES or HANDLES mode) or the label scale range (LABELS mode) nothing shall be painted.
The representations provided shall be one or more of:
- BODIES: the combination of geometric representations of the objects,
- HANDLES: the handles for the objects. These are the parts of the objects representation on which user interaction can be applied. For example, for a circle this can be the center point, allowing to move the circle.
- LABELS: the combination of the textual representations of the objects.
The mode supplied shall be a bitwise or combination of a constant of the first group and one or more of the second group. When painting in BODIES or HANDLES mode, painting of an object shall be delegated to the
painter
for that object, when the LABELS mode is passed, painting shall be delegated to thelabelpainter
for that object.The view is passed to provide contextual information: some of the objects may have a different representation depending on the view, or depending on a property of the view, for example, the scale of the view.
The combined representation of the objects has to be painted on the Graphics supplied, as these may be different from the Graphics provided by the view (due to double buffering, for example).
When
stopPainting
is called, the current painting operation should be aborted.If this layer is asked to paint its labels, it must inform its
ALcdLabelLocations
instance as to which labels have been painted and which haven't been.The paint mode may contain
ILcdGXYEditableLabelsLayer.PLACED_LABELS
. This is a paint mode to indicate that only labels that are already placed should be painted. The already placed labels can be retrieved from theALcdLabelLocations
retrieved usingILcdGXYEditableLabelsLayer.getLabelLocations()
.This implementation calls
paintFromOverlaps
orpaintFromModel
, depending on whetherTLcdGXYLayer.isPaintFromOverlaps()
returnstrue
orfalse
.This method also calls
TLcdGXYLayer.applyOnInteract(com.luciad.util.ILcdFunction, java.awt.Graphics, int, ILcdGXYView)
andTLcdGXYLayer.applyOnInteractLabels(com.luciad.util.ILcdFunction, java.awt.Graphics, int, ILcdGXYView)
to determine which objects or labels should be painted. Customizing these methods will also customize the painting behavior.Objects smaller than the set minimum object size may be omitted.
- Specified by:
paint
in interfaceILcdGXYEditableLabelsLayer
- Specified by:
paint
in interfaceILcdGXYLayer
- Overrides:
paint
in classTLcdGXYLayer
- Parameters:
aGraphics
- the Graphics to paint on.aMode
- indicates what should be painted and how it should be painted.aGXYView
- the view to paint for.- See Also:
-
applyOnInteract
public int applyOnInteract(ILcdFunction aFunction, Graphics aGraphics, int aPaintMode, ILcdGXYView aGXYView) Deprecated.Description copied from interface:ILcdGXYEditableLabelsLayer
Applies the function to (at the least) all objects that are contained (partially or completely) in the bounds of the view. This method behaves similar to the paint method, and as such is allowed to omit small or invisible objects for performance reasons. For example, it can disregard objects that are outside the scale range.The function shall be applied successively to all objects in the bounds as long as the function returns
true
for an object. This allows developers to indicate a stop condition. Note that the order in which the objects are passed to the function is not specified.The mode indicates what objects of the model should be taken into account. The objects to be taken into account shall be one of:
- ALL: all the objects in the layer's model, or
- SELECTION: all the objects in the layer's selection.
The representations provided shall be a combination of one or more of:
- BODIES: the combination of geometric representations of the objects,
- HANDLES: the handles for the objects,
- LABELS: the combination of the textual representations of the objects.
The mode supplied shall be a bitwise 'or' combination of a constant of the first group and a combination of constants of the second group.
- Specified by:
applyOnInteract
in interfaceILcdGXYEditableLabelsLayer
- Overrides:
applyOnInteract
in classTLcdGXYLayer
- Parameters:
aFunction
- the function to apply. When the function returnsfalse
, no more objects should be passed to the function.aGraphics
- the graphicsaPaintMode
- the paint mode.aGXYView
- the view in whose bounds the objects representations should be in order to be passed to the function. Note that for efficiency reasons (e.g. to avoid expensive bounds calculations) objects may be passed that are not inside the view bounds.- Returns:
- the number of objects the function was applied on.
-
applyOnInteractLabels
public int applyOnInteractLabels(ILcdFunction aLabelFunction, Graphics aGraphics, int aPaintMode, ILcdGXYView aGXYView) Deprecated.Description copied from interface:ILcdGXYEditableLabelsLayer
Applies the function to (at the least) all labels that are contained (partially or completely) in the bounds of the view. This method behaves similar to the paint method, and as such is allowed to omit labels for small or invisible objects for performance reasons. For example, it can disregard labels for objects outside the scale range, or labels outside the label scale range.The function shall be applied successively to all labels in the bounds as long as the function returns
true
for a label. This allows developers to indicate a stop condition. Note that the order in which the labels are passed to the function is not specified.The mode indicates what labels should be taken into account. The labels to be taken into account shall be one of:
- ALL: all the labels in the layer's model, or
- SELECTION: all the labels in the layer's selection.
The representations provided shall be a combination of one or more of:
- BODIES: the combination of label representations of the objects,
- HANDLES: the handles for the labeled objects,
- LABELS: the combination of the textual labels representations of the objects.
The mode supplied shall be a bitwise 'or' combination of a constant of the first group and a combination of constants of the second group.
- Specified by:
applyOnInteractLabels
in interfaceILcdGXYEditableLabelsLayer
- Overrides:
applyOnInteractLabels
in classTLcdGXYLayer
- Parameters:
aLabelFunction
- the function to apply. When the function returnsfalse
, no more labels should be passed to the function. The Object passed to this function is always aTLcdLabelIdentifier
.aGraphics
- the graphicsaPaintMode
- the paint mode.aGXYView
- the view in whose bounds the objects representations should be in order passed to the function. Note that for efficiency reasons (e.g. to avoid expensive bounds calculations) objects may be passed that are not inside the view bounds.- Returns:
- the number of objects the function was applied on.
-
applyOnInteract
protected int applyOnInteract(ILcdFunction aFunction, Graphics aGraphics, int aPaintMode, ILcdModel aModel, ILcdGXYView aGXYView) Deprecated.Description copied from class:TLcdGXYLayer
Applies the function to (at the least) all objects from the given model that are contained (partially or completely) in the bounds of the view. This method behaves similar to the paint method, and as such is allowed to omit small or invisible objects for performance reasons. For example, it can disregard objects that are outside the scale range.For more information on this method, see the javadoc of
applyOnInteract
.This method is called by
So it is possible to customise these methods by overriding this method. This can be used to e.g. customize the model content for painting of customise the model content for label placement.- Overrides:
applyOnInteract
in classTLcdGXYLayer
- Parameters:
aFunction
- the function to apply. When the function returnsfalse
, no more objects should be passed to the function.aGraphics
- the graphicsaPaintMode
- the paint mode.aModel
- the model for whose objects the given function is applied.aGXYView
- the view in whose bounds the objects representations should be in order to be passed to the function. Note that for efficiency reasons (e.g. to avoid expensive bounds calculations) objects may be passed that are not inside the view bounds.- Returns:
- the number of objects the function was applied on.
-
setGXYEditorProvider
Deprecated.Sets anILcdGXYEditorProvider
to thisTLcdGXYLayer
. This allows an eternal entity (for example, anILcdGXYController
to edit the domain objects of this layer by retrieving an editor for it. Editing of objects in the model through the layer is only possible for objects for which the editor provider returns anILcdGXYEditor
. By default the editor provider is null and no editing is possible.Note that no property change listeners can be added to the editor provider, so the layer is not automatically notified when a property on the editor provider has changed. To notify the layer and its listeners, a property change event has to be fired, using the method
TLcdLayer.firePropertyChangeEvent(java.beans.PropertyChangeEvent)
.Warning: editing fusion vector data is not supported. Calling this method will throw an exception.
- Overrides:
setGXYEditorProvider
in classTLcdGXYLayer
- Parameters:
aGXYEditorProvider
- the new editor provider- See Also:
-
setGXYPainterProvider
Deprecated.Sets anILcdGXYPainterProvider
to thisTLcdGXYLayer
. During painting, the provider will be queried to return a painter for the relevant domain objects. If no painter provider is set to this layer, nothing will be rendered. This call overwrites the painter provider array with a new one containing the given provider. Note that no property change listeners can be added to the painter provider, so the layer is not automatically notified when a property on the painter provider has changed. To notify the layer and its listeners, a property change event has to be fired, using the methodTLcdLayer.firePropertyChangeEvent(java.beans.PropertyChangeEvent)
.aGXYPainterProvider
will be decorated to ensure that it receives the geometry associated with the tiles loaded for level and bounds associated with the view. ConsultgetTiledGeometry(Object)
for more information.Warning: calling this method will replace the default styling. As a result, the
ILfnVectorGXYStyleProviderFactory
instances passed in the constructor will no longer be used.- Overrides:
setGXYPainterProvider
in classTLcdGXYLayer
- Parameters:
aGXYPainterProvider
- the new painter provider- See Also:
-
setGXYPainterProviderArray
Deprecated.Like,TLcdGXYLayer.setGXYPainterProvider(com.luciad.view.gxy.ILcdGXYPainterProvider)
, but sets an array ofILcdGXYPainterProvider
to thisTLcdGXYLayer
. Painting is done for each of the providers (in the order of the array), each time for the whole set of elements. This can be useful to perform multiple painting passes.All the painter providers in
aGXYPainterProviderArray
will be decorated to ensure that they receive the geometry associated with the tiles loaded for level and bounds associated with the view. ConsultgetTiledGeometry(Object)
for more information.Warning: calling this method will replace the default styling. As a result, the
ILfnVectorGXYStyleProviderFactory
instances passed in the constructor will no longer be used.- Overrides:
setGXYPainterProviderArray
in classTLcdGXYLayer
- Parameters:
aGXYPainterProviderArray
- a sequence of painter providers- See Also:
-
setGXYLabelPainterProvider
Deprecated.Sets anILcdGXYLabelPainterProvider
to thisTLcdGXYLayer
. During painting, the provider will be queried to return a label painter for the relevant domain objects. If no label painter provider is set to this layer, no labels will be rendered.Note that no property change listeners can be added to the label painter provider, so the layer is not automatically notified when a property on the label painter provider has changed. To notify the layer and its listeners, a property change event has to be fired, using the method
TLcdLayer.firePropertyChangeEvent(java.beans.PropertyChangeEvent)
.aGXYLabelPainterProvider
will be decorated to ensure that it receives the geometry associated with the tiles loaded for level and bounds associated with the view. ConsultgetTiledGeometry(Object)
for more information.- Overrides:
setGXYLabelPainterProvider
in classTLcdGXYLayer
- Parameters:
aGXYLabelPainterProvider
- the new label painter provider- See Also:
-
setGXYLabelEditorProvider
Deprecated.Sets anILcdGXYLabelEditorProvider
to thisTLcdGXYLayer
. This allows an eternal entity (for example, anILcdGXYController
to edit the labels of domain objects of this layer by retrieving a label editor for it. If no label editor provider is set, no labels can be edited for any object in the model. The default value is null.Note that no property change listeners can be added to the label editor provider, so the layer is not automatically notified when a property on the label editor provider has changed. To notify the layer and its listeners, a property change event has to be fired, using the method
TLcdLayer.firePropertyChangeEvent(java.beans.PropertyChangeEvent)
.aGXYLabelEditorProvider
will be decorated to ensure that it receives the geometry associated with the tiles loaded for level and bounds associated with the view. ConsultgetTiledGeometry(Object)
for more information.- Overrides:
setGXYLabelEditorProvider
in classTLcdGXYLayer
- Parameters:
aGXYLabelEditorProvider
- the new label editor provider- See Also:
-