Class TLcdKML22BalloonContentProvider
java.lang.Object
com.luciad.format.kml22.view.swing.TLcdKML22BalloonContentProvider
- All Implemented Interfaces:
ILcdBalloonContentProvider
@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.
- Since:
- 10.0
-
Constructor Summary
ConstructorDescriptionCreates 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHyperLinkListener
(HyperlinkListener aHyperlinkListener) Adds a hyperlinklistener to the generated balloon panelsboolean
canGetContent
(ALcdBalloonDescriptor aBalloonDescriptor) Checks if it is possible to return aJComponent
that should be used as the content.getContent
(ALcdBalloonDescriptor aBalloonDescriptor) A method that creates balloon content panels for KML features.Gets the resource provider used by this balloon content providervoid
removeHyperLinkListener
(HyperlinkListener aHyperlinkListener) Removes a hyperlinklistener from the generate balloon content panelsvoid
setResourceProvider
(TLcdKML22ResourceProvider aResourceProvider) Sets the resource provider this balloon content provider should use to retrieve its resources.
-
Constructor Details
-
TLcdKML22BalloonContentProvider
public TLcdKML22BalloonContentProvider()Creates a balloon content provider for KML features, using a default resource provider. -
TLcdKML22BalloonContentProvider
Creates a balloon content provider for KML features, given a resource provider- Parameters:
aResourceProvider
- A valid resource provider,NullPointerException
is thrown if the resource provider is null.
-
-
Method Details
-
canGetContent
Description copied from interface:ILcdBalloonContentProvider
Checks if it is possible to return aJComponent
that should be used as the content. The implementation of this method should be consistent with the implementation ofILcdBalloonContentProvider.getContent(ALcdBalloonDescriptor)
, i.e. when this method returnsfalse
,ILcdBalloonContentProvider.getContent(ALcdBalloonDescriptor)
should returnnull
and vice versa.- Specified by:
canGetContent
in interfaceILcdBalloonContentProvider
- Parameters:
aBalloonDescriptor
- An object describing a balloon.- Returns:
- true if a content
JComponent
can be returned for the givenALcdBalloonDescriptor
and false otherwise.
-
getContent
A method that creates balloon content panels for KML features.
- Specified by:
getContent
in interfaceILcdBalloonContentProvider
- Parameters:
aBalloonDescriptor
- an object that represents a balloon. It can contain one of aTLcdKML22DynamicModel
, aTLcdKML22PaintableGroundOverlay
or aTLcdKML22AbstractFeature
.- Returns:
- A
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.
-
getResourceProvider
Gets the resource provider used by this balloon content provider- Returns:
- a
TLcdKML22ResourceProvider
-
setResourceProvider
Sets the resource provider this balloon content provider should use to retrieve its resources.- Parameters:
aResourceProvider
- aTLcdKML22ResourceProvider
-
addHyperLinkListener
Adds a hyperlinklistener to the generated balloon panels- Parameters:
aHyperlinkListener
- a hyperlink listener
-
removeHyperLinkListener
Removes a hyperlinklistener from the generate balloon content panels- Parameters:
aHyperlinkListener
- a hyperlink listener
-