Interface Balloon

    • Method Detail

      • isAlwaysOnTop

        boolean isAlwaysOnTop()
        Is the balloon always on top?
        Returns:
        True if the balloon will always render above other items.
      • setAlwaysOnTop

        void setAlwaysOnTop​(boolean alwaysOnTop)
        Set the balloon to always on top or not.
        Parameters:
        alwaysOnTop - True if the balloon should always render above other objects.
      • isPickEnabled

        boolean isPickEnabled()
        Is the balloon enabled for picking?
        Returns:
        True if the balloon can be picked, false if not.
      • setPickEnabled

        void setPickEnabled​(boolean enable)
        Set the balloon to be pick enabled or not.
        Parameters:
        enable - True if the balloon can be picked, false if not.
      • setText

        void setText​(java.lang.String text)
        Set the balloon text.
        Parameters:
        text - New balloon text.
      • getAttributes

        BalloonAttributes getAttributes()
        Get the "normal" balloon attributes.
        Returns:
        Balloon attributes.
      • setAttributes

        void setAttributes​(BalloonAttributes attrs)
        Set the "normal" balloon attributes.
        Parameters:
        attrs - New attributes
      • getHighlightAttributes

        BalloonAttributes getHighlightAttributes()
        Get the highlight attributes.
        Returns:
        Balloon's highlight attributes.
      • setHighlightAttributes

        void setHighlightAttributes​(BalloonAttributes attrs)
        Set the highlight attributes.
        Parameters:
        attrs - Attributes to use when the balloon is highlighted.
      • getTextDecoder

        TextDecoder getTextDecoder()
        Get the text decoder that will process the balloon text.
        Returns:
        Active text decoder.
      • setTextDecoder

        void setTextDecoder​(TextDecoder decoder)
        Set a text decoder to process the balloon text.
        Parameters:
        decoder - New decoder.
      • getDelegateOwner

        java.lang.Object getDelegateOwner()
        Returns the delegate owner of the balloon. If non-null, the returned object replaces the balloon as the pickable object returned during picking. If null, the balloon itself is the pickable object returned during picking.
        Returns:
        the object used as the pickable object returned during picking, or null to indicate the the balloon is returned during picking.
      • setDelegateOwner

        void setDelegateOwner​(java.lang.Object owner)
        Specifies the delegate owner of the balloon. If non-null, the delegate owner replaces the balloon as the pickable object returned during picking. If null, the balloon itself is the pickable object returned during picking.
        Parameters:
        owner - the object to use as the pickable object returned during picking, or null to return the balloon.
      • isVisible

        boolean isVisible()
        Get whether the annotation is visible and should be rendered.
        Returns:
        true if the annotation is visible and should be rendered.
      • setVisible

        void setVisible​(boolean visible)
        Set whether the balloon is visible and should be rendered.
        Parameters:
        visible - true if the balloon is visible and should be rendered.
      • getBounds

        java.awt.Rectangle getBounds​(DrawContext dc)
        Get the balloon bounding Rectangle using OGL coordinates - bottom-left corner x and y relative to the WorldWindow bottom-left corner, and the balloon callout width and height.

        The balloon offset from it's reference point is factored in such that the callout leader shape and reference point are included in the bounding rectangle.

        Parameters:
        dc - the current DrawContext.
        Returns:
        the balloon bounding Rectangle using OGL viewport coordinates.
        Throws:
        java.lang.IllegalArgumentException - if dc is null.
      • getMinActiveAltitude

        double getMinActiveAltitude()
        Returns the minimum eye altitude, in meters, for which the balloon is displayed.
        Returns:
        the minimum altitude, in meters, for which the balloon is displayed.
        See Also:
        setMinActiveAltitude(double), getMaxActiveAltitude()
      • setMinActiveAltitude

        void setMinActiveAltitude​(double minActiveAltitude)
        Specifies the minimum eye altitude, in meters, for which the balloon is displayed.
        Parameters:
        minActiveAltitude - the minimum altitude, in meters, for which the balloon is displayed.
        See Also:
        getMinActiveAltitude(), setMaxActiveAltitude(double)
      • getMaxActiveAltitude

        double getMaxActiveAltitude()
        Returns the maximum eye altitude, in meters, for which the balloon is displayed.
        Returns:
        the maximum altitude, in meters, for which the balloon is displayed.
        See Also:
        setMaxActiveAltitude(double), getMinActiveAltitude()
      • setMaxActiveAltitude

        void setMaxActiveAltitude​(double maxActiveAltitude)
        Specifies the maximum eye altitude, in meters, for which the balloon is displayed.
        Parameters:
        maxActiveAltitude - the maximum altitude, in meters, for which the balloon is displayed.
        See Also:
        getMaxActiveAltitude(), setMinActiveAltitude(double)