@LcdService(service=ILcdBalloonContentProvider.class, priority=20000) public class TLcdKML22BalloonContentProvider extends Object implements ILcdBalloonContentProvider
A 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 |
---|
TLcdKML22BalloonContentProvider()
Creates a balloon content provider for KML features, using a default resource provider.
|
TLcdKML22BalloonContentProvider(TLcdKML22ResourceProvider aResourceProvider)
Creates a balloon content provider for KML features, given a resource provider
|
Modifier and Type | Method and Description |
---|---|
void |
addHyperLinkListener(HyperlinkListener aHyperlinkListener)
Adds a hyperlinklistener to the generated balloon panels
|
boolean |
canGetContent(ALcdBalloonDescriptor aBalloonDescriptor)
Checks if it is possible to return a
JComponent that should be used as the content. |
JComponent |
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 |
removeHyperLinkListener(HyperlinkListener aHyperlinkListener)
Removes a hyperlinklistener from the generate balloon content panels
|
void |
setResourceProvider(TLcdKML22ResourceProvider aResourceProvider)
Sets the resource provider this balloon content provider should use to retrieve
its resources.
|
public TLcdKML22BalloonContentProvider()
public TLcdKML22BalloonContentProvider(TLcdKML22ResourceProvider aResourceProvider)
aResourceProvider
- A valid resource provider,
NullPointerException
is thrown if the resource provider is null.public boolean canGetContent(ALcdBalloonDescriptor aBalloonDescriptor)
ILcdBalloonContentProvider
JComponent
that should be used as the content.
The implementation of this method should be consistent with the implementation of
ILcdBalloonContentProvider.getContent(ALcdBalloonDescriptor)
, i.e. when this method returns false
,
ILcdBalloonContentProvider.getContent(ALcdBalloonDescriptor)
should return
null
and vice versa.canGetContent
in interface ILcdBalloonContentProvider
aBalloonDescriptor
- An object describing a balloon.JComponent
can be returned for the given
ALcdBalloonDescriptor
and false otherwise.public JComponent getContent(ALcdBalloonDescriptor aBalloonDescriptor)
A method that creates balloon content panels for KML features.
getContent
in interface ILcdBalloonContentProvider
aBalloonDescriptor
- an object that represents a balloon. It can contain one of a
TLcdKML22DynamicModel
, a TLcdKML22PaintableGroundOverlay
or a TLcdKML22AbstractFeature
.JEditorPane
that is capable of rendering HTML and resolving
images using the standard KML resource provider.
null
if the type of the aBalloonDescriptor parameter is not a valid type.public TLcdKML22ResourceProvider getResourceProvider()
TLcdKML22ResourceProvider
public void setResourceProvider(TLcdKML22ResourceProvider aResourceProvider)
aResourceProvider
- a TLcdKML22ResourceProvider
public void addHyperLinkListener(HyperlinkListener aHyperlinkListener)
aHyperlinkListener
- a hyperlink listenerpublic void removeHyperLinkListener(HyperlinkListener aHyperlinkListener)
aHyperlinkListener
- a hyperlink listener