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 Details

    • canGetContent

      boolean canGetContent(ALcdBalloonDescriptor aBalloonDescriptor)
      Checks if it is possible to return a JComponent that should be used as the content. The implementation of this method should be consistent with the implementation of getContent(ALcdBalloonDescriptor), i.e. when this method returns false, getContent(ALcdBalloonDescriptor) should return null and vice versa.
      Parameters:
      aBalloonDescriptor - An object describing a balloon.
      Returns:
      true if a content JComponent can be returned for the given ALcdBalloonDescriptor and false otherwise.
    • getContent

      JComponent getContent(ALcdBalloonDescriptor aBalloonDescriptor)
      Returns the balloon contents of an object. It is allowed to call this method without first calling canGetContent(ALcdBalloonDescriptor). Both implementations should be consistent though, i.e. when canGetContent(ALcdBalloonDescriptor) returns false, this method should return null and vice versa.
      Parameters:
      aBalloonDescriptor - An object describing a balloon.
      Returns:
      a JComponent that should be used as the content of a balloon, or null when this provider cannot provide contents for the given ALcdBalloonDescriptor.