@LcdService(service=ILcdFXBalloonContentProvider.class, priority=20000) public class TLcdKML22FXBalloonContentProvider extends Object implements ILcdFXBalloonContentProvider
A JavaFX compatible balloon content provider for KML objects.
An instance of this object can create balloon content for every KML feature with a description, a balloon style with a text, or a combination of both.
Constructor and Description |
---|
TLcdKML22FXBalloonContentProvider()
Creates a balloon content provider for KML features, using a default resource provider.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canGetContent(ALcdBalloonDescriptor aBalloonDescriptor)
Checks if it is possible to return a
Node that should be used as the content. |
javafx.scene.Node |
getContent(ALcdBalloonDescriptor aBalloonDescriptor)
A method that creates balloon content panels for KML features.
|
TLcdKML22ResourceProvider |
getResourceProvider()
Gets the resource provider used by this balloon content provider
|
void |
setResourceProvider(TLcdKML22ResourceProvider aResourceProvider)
Sets the resource provider this balloon content provider should use to retrieve
its resources.
|
public TLcdKML22FXBalloonContentProvider()
public boolean canGetContent(ALcdBalloonDescriptor aBalloonDescriptor)
ILcdFXBalloonContentProvider
Node
that should be used as the content.
The implementation of this method should be consistent with the implementation of
ILcdFXBalloonContentProvider.getContent(ALcdBalloonDescriptor)
, i.e. when this method returns false
,
ILcdFXBalloonContentProvider.getContent(ALcdBalloonDescriptor)
should return
null
and vice versa.canGetContent
in interface ILcdFXBalloonContentProvider
aBalloonDescriptor
- An object describing a balloon.Node
can be returned for the given
ALcdBalloonDescriptor
and false otherwise.public javafx.scene.Node getContent(ALcdBalloonDescriptor aBalloonDescriptor)
A method that creates balloon content panels for KML features.
getContent
in interface ILcdFXBalloonContentProvider
aBalloonDescriptor
- an object that represents a balloon. It can contain one of a
TLcdKML22DynamicModel
, a TLcdKML22PaintableGroundOverlay
or a TLcdKML22AbstractFeature
.Node
that is capable of rendering HTML using the standard KML resource provider.
null
if aBalloonDescriptor
does not provide access to a KML feature.public TLcdKML22ResourceProvider getResourceProvider()
TLcdKML22ResourceProvider
public void setResourceProvider(TLcdKML22ResourceProvider aResourceProvider)
aResourceProvider
- a TLcdKML22ResourceProvider