Package com.luciad.view.swing
Interface ILcdBalloonContentProvider
- All Known Implementing Classes:
TLcdKML22BalloonContentProvider
public interface ILcdBalloonContentProvider
This interface provides a method that can return contents for a balloon. It returns
a
JComponent
that should be used as the content.
You can register your own instances to the service loader to have it picked up by a balloon manager, see
LcdService
and the
Working with the services mechanism article.
- Since:
- 10.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canGetContent
(ALcdBalloonDescriptor aBalloonDescriptor) Checks if it is possible to return aJComponent
that should be used as the content.getContent
(ALcdBalloonDescriptor aBalloonDescriptor) Returns the balloon contents of an object.
-
Method Details
-
canGetContent
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 ofgetContent(ALcdBalloonDescriptor)
, i.e. when this method returnsfalse
,getContent(ALcdBalloonDescriptor)
should returnnull
and vice versa.- Parameters:
aBalloonDescriptor
- An object describing a balloon.- Returns:
- true if a content
JComponent
can be returned for the givenALcdBalloonDescriptor
and false otherwise.
-
getContent
Returns the balloon contents of an object. It is allowed to call this method without first callingcanGetContent(ALcdBalloonDescriptor)
. Both implementations should be consistent though, i.e. whencanGetContent(ALcdBalloonDescriptor)
returnsfalse
, this method should returnnull
and vice versa.- Parameters:
aBalloonDescriptor
- An object describing a balloon.- Returns:
- a
JComponent
that should be used as the content of a balloon, ornull
when this provider cannot provide contents for the givenALcdBalloonDescriptor
.
-