Interface TacticalSymbolAttributes

  • All Known Implementing Classes:
    BasicTacticalSymbolAttributes

    public interface TacticalSymbolAttributes
    Holds attributes for a TacticalSymbol. Changes made to the attributes are applied to the symbol when the WorldWindow renders the next frame. Instances of TacticalSymbolAttributes may be shared by many symbols, thereby reducing the memory normally required to store attributes for each symbol.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void copy​(TacticalSymbolAttributes attributes)
      Copies the specified TacticalSymbolAttributes' properties into this object's properties.
      Material getInteriorMaterial()
      Indicates the material properties of the symbols's interior.
      java.lang.Double getOpacity()
      Indicates the symbol opacity as a floating point number between 0.0 and 1.0 (inclusive).
      java.lang.Double getScale()
      Indicates the symbol scale as a ratio of the symbol's original size.
      java.awt.Font getTextModifierFont()
      Indicates the font used to draw text modifiers.
      Material getTextModifierMaterial()
      Indicates the material used to draw text modifiers.
      void setInteriorMaterial​(Material material)
      Specifies the material properties of the symbols's interior.
      void setOpacity​(java.lang.Double opacity)
      Specifies the symbol opacity as a floating point number between 0.0 and 1.0 (inclusive).
      void setScale​(java.lang.Double scale)
      Specifies the symbol scale as a ratio of the symbol's original size.
      void setTextModifierFont​(java.awt.Font font)
      Specifies the font to use when drawing text modifiers.
      void setTextModifierMaterial​(Material material)
      Specifies the material to use when drawing text modifiers.
    • Method Detail

      • copy

        void copy​(TacticalSymbolAttributes attributes)
        Copies the specified TacticalSymbolAttributes' properties into this object's properties. This does nothing if the specified attributes is null.
        Parameters:
        attributes - the attributes to copy.
      • getScale

        java.lang.Double getScale()
        Indicates the symbol scale as a ratio of the symbol's original size. See setScale(Double) for a description of how scale is used.
        Returns:
        the symbol's scale. May be null, indicating that the default scale is used.
      • setScale

        void setScale​(java.lang.Double scale)
        Specifies the symbol scale as a ratio of the symbol's original size. The specified scale is a floating point number greater than 0.0: values less than 1.0 make the symbol smaller, while values greater than 1.0 make the symbol larger. The scale applies to both the symbol graphic and the symbol modifiers. The specified scale must be either null or greater than or equal to 0.0.
        Parameters:
        scale - the symbol's scale. May be null, indicating that the default scale should be used.
        Throws:
        java.lang.IllegalArgumentException - if the scale is less than 0.0.
      • getInteriorMaterial

        Material getInteriorMaterial()
        Indicates the material properties of the symbols's interior. See setInteriorMaterial for more information on how this material is interpreted.
        Returns:
        the material applied to the symbols's interior.
        See Also:
        setInteriorMaterial(Material)
      • setInteriorMaterial

        void setInteriorMaterial​(Material material)
        Specifies the material properties of the symbols's interior. If lighting is applied to the graphic, this indicates the interior's ambient, diffuse, and specular colors, its shininess, and the color of any emitted light. Otherwise, the material's diffuse color indicates the symbols's constant interior color.
        Parameters:
        material - the material to apply to the symbol's interior.
        See Also:
        getInteriorMaterial()
      • getOpacity

        java.lang.Double getOpacity()
        Indicates the symbol opacity as a floating point number between 0.0 and 1.0 (inclusive). See setOpacity(Double) for a description of how opacity is used.
        Returns:
        the symbol's opacity. May be null, indicating that the default opacity is used.
      • setOpacity

        void setOpacity​(java.lang.Double opacity)
        Specifies the symbol opacity as a floating point number between 0.0 and 1.0 (inclusive). An opacity of 0.0 is completely transparent and an opacity of 1.0 is completely opaque. The opacity applies to both the symbol graphic and the symbol modifiers. The specified opacity must either null or a value between 0.0 and 1.0 (inclusive).
        Parameters:
        opacity - the symbol opacity. May be null, indicating that the default opacity should be used.
        Throws:
        java.lang.IllegalArgumentException - if the opacity is less than 0.0 or greater than 1.0.
      • getTextModifierFont

        java.awt.Font getTextModifierFont()
        Indicates the font used to draw text modifiers. See setTextModifierFont(java.awt.Font) for a description of how the text modifier font is used.
        Returns:
        the text modifier font. May be null, indicating that the default font is used.
      • setTextModifierFont

        void setTextModifierFont​(java.awt.Font font)
        Specifies the font to use when drawing text modifiers. If the specified font is null, the symbol implementation determines an default font appropriate for the symbol's size and scale. MIL-STD-2525 tactical symbols determine a default font that who's height is approximately 0.3*H, where H is the symbol's scaled frame height.
        Parameters:
        font - the text modifier font. May be null, indicating that the default font should be used.
      • setTextModifierMaterial

        void setTextModifierMaterial​(Material material)
        Specifies the material to use when drawing text modifiers. How the material is used depends on the symbol implementation. For example, symbols may draw 3D text that uses all of the specified material components, or draw 2D text that uses only the diffuse component. MIL-STD-2525 tactical symbols use the diffuse component to specify the color of 2D text.
        Parameters:
        material - the text modifier material. May be null, indicating that the default material should be used.