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 TypeMethodDescriptionbooleancanGetContent(ALcdBalloonDescriptor aBalloonDescriptor) Checks if it is possible to return aJComponentthat 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 aJComponentthat 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 returnnulland vice versa.- Parameters:
aBalloonDescriptor- An object describing a balloon.- Returns:
- true if a content
JComponentcan be returned for the givenALcdBalloonDescriptorand 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 returnnulland vice versa.- Parameters:
aBalloonDescriptor- An object describing a balloon.- Returns:
- a
JComponentthat should be used as the content of a balloon, ornullwhen this provider cannot provide contents for the givenALcdBalloonDescriptor.
-