Class TLcdMilitarySymbolStyle

java.lang.Object
com.luciad.symbology.view.common.TLcdMilitarySymbolStyle
All Implemented Interfaces:
ILcdCloneable, Serializable, Cloneable

public final class TLcdMilitarySymbolStyle extends Object implements ILcdCloneable, Serializable
This class configures the styling of military symbols. The TLcdMilitarySymbolStyle can be configured on ILcdAPP6AShape and ILcdMS2525bShape implementations by making them also implement ILcdStyledMilitarySymbol. See the sample classes samples.symbology.common.app6.StyledEditableAPP6Object and samples.symbology.common.ms2525.StyledEditableMS2525Object for an example. Alternatively a default TLcdMilitarySymbolStyle can be applied to symbols that do not implement ILcdStyledMilitarySymbol by configuring it an a TLcdAPP6AGXYPainterProvider/TLcdMS2525bGXYPainterProvider or a TLspMilitarySymbologyLayerBuilder.
Since:
2024.0
See Also:
  • Field Details

    • LABEL_POSITIONS

      public static final String[] LABEL_POSITIONS
      Label positions.
    • EAST

      public static final int EAST
      Index for label position east.
      See Also:
    • WEST

      public static final int WEST
      Index for label position west.
      See Also:
    • NORTH

      public static final int NORTH
      Index for label position north.
      See Also:
    • SOUTH

      public static final int SOUTH
      Index for label position south.
      See Also:
    • SOUTHEAST

      public static final int SOUTHEAST
      Index for label position south-east.
      See Also:
    • NORTHEAST

      public static final int NORTHEAST
      Index for label position north-east.
      See Also:
    • SOUTHWEST

      public static final int SOUTHWEST
      Index for label position south-west.
      See Also:
    • NORTHWEST

      public static final int NORTHWEST
      Index for label position north-west.
      See Also:
    • CENTER

      public static final int CENTER
      Index for centered label position.
      See Also:
    • PLAIN

      public static final int PLAIN
      Line style: plain.
      See Also:
    • SMALL_DASH

      public static final int SMALL_DASH
      Line style: small dashing pattern.
      See Also:
    • LARGE_DASH

      public static final int LARGE_DASH
      Line style: large dashing pattern.
      See Also:
    • ALTERNATE_DASH

      public static final int ALTERNATE_DASH
      Line style: alternate (small and large) dashing pattern.
      See Also:
    • BLACK_AND_WHITE_DOTTED

      public static final int BLACK_AND_WHITE_DOTTED
      Line style: alternating black and white dots.
      See Also:
    • BLACK_AND_WHITE_DASHES

      public static final int BLACK_AND_WHITE_DASHES
      Line style: alternating black and white dashes.
      See Also:
    • AFFILIATION_PENDING

      public static final int AFFILIATION_PENDING
      Affiliation PENDING.
      See Also:
    • AFFILIATION_UNKNOWN

      public static final int AFFILIATION_UNKNOWN
      Affiliation UNKNOWN.
      See Also:
    • AFFILIATION_ASSUMED_FRIEND

      public static final int AFFILIATION_ASSUMED_FRIEND
      Affiliation ASSUMED FRIEND.
      See Also:
    • AFFILIATION_FRIEND

      public static final int AFFILIATION_FRIEND
      Affiliation FRIEND.
      See Also:
    • AFFILIATION_ASSUMED_NEUTRAL

      public static final int AFFILIATION_ASSUMED_NEUTRAL
      Affiliation ASSUMED NEUTRAL.
      See Also:
    • AFFILIATION_NEUTRAL

      public static final int AFFILIATION_NEUTRAL
      Affiliation NEUTRAL.
      See Also:
    • AFFILIATION_SUSPECT

      public static final int AFFILIATION_SUSPECT
      Affiliation SUSPECT.
      See Also:
    • AFFILIATION_HOSTILE

      public static final int AFFILIATION_HOSTILE
      Affiliation HOSTILE.
      See Also:
    • AFFILIATION_EXERCISE_PENDING

      public static final int AFFILIATION_EXERCISE_PENDING
      Affiliation EXERCISE PENDING.
      See Also:
    • AFFILIATION_EXERCISE_UNKNOWN

      public static final int AFFILIATION_EXERCISE_UNKNOWN
      Affiliation EXERCISE UNKNOWN.
      See Also:
    • AFFILIATION_EXERCISE_ASSUMED_FRIEND

      public static final int AFFILIATION_EXERCISE_ASSUMED_FRIEND
      Affiliation EXERCISE ASSUMED FRIEND.
      See Also:
    • AFFILIATION_EXERCISE_FRIEND

      public static final int AFFILIATION_EXERCISE_FRIEND
      Affiliation EXERCISE FRIEND.
      See Also:
    • AFFILIATION_EXERCISE_ASSUMED_NEUTRAL

      public static final int AFFILIATION_EXERCISE_ASSUMED_NEUTRAL
      Affiliation EXERCISE ASSUMED NEUTRAL.
      See Also:
    • AFFILIATION_EXERCISE_NEUTRAL

      public static final int AFFILIATION_EXERCISE_NEUTRAL
      Affiliation EXERCISE NEUTRAL.
      See Also:
    • AFFILIATION_JOKER

      public static final int AFFILIATION_JOKER
      Affiliation JOKER.
      See Also:
    • AFFILIATION_FAKER

      public static final int AFFILIATION_FAKER
      Affiliation FAKER.
      See Also:
  • Constructor Details

    • TLcdMilitarySymbolStyle

      public TLcdMilitarySymbolStyle(Color aColor, Color aSelectionColor, int aLineWidth, int aLineStyle, boolean aIsSymbolFrameEnabled, boolean aIsSymbolFillEnabled, boolean aIsSymbolIconEnabled, String[] aLabel, Color aLabelColor, Font aLabelFont, Color aLabelFilledColor, boolean aIsLabelFramed, boolean aIsLabelFilled, boolean aIsLabelPinned, boolean aIsLabelAnchored, int aLabelPosition, int aSize)
      Constructs a new TLcdMilitarySymbolStyle object with the given settings.
      Parameters:
      aColor - The line color for line symbols and off-set lines of icon symbols.
      aSelectionColor - The selection color for the construction line of line symbols and for the offset-line and bounding box of icon symbols.
      aLineWidth - The line width to use for all line symbols and off-set lines of icon symbols.
      aLineStyle - The style to use for the offset-line of an icon symbol. The options are TLcdMilitarySymbolStyle.PLAIN, TLcdMilitarySymbolStyle.SMALL_DASH, TLcdMilitarySymbolStyle.LARGE_DASH and TLcdMilitarySymbolStyle.ALTERNATE_DASH.
      aIsSymbolFrameEnabled - Whether the frame of an icon symbol should be painted.
      aIsSymbolFillEnabled - Whether an icon symbol should be painted filled.
      aIsSymbolIconEnabled - Whether the internal icon in the frame of an icon symbol should be painted.
      aLabel - The labels to use for labeling. These labels are only used when the particular symbols that use this style don't make use of the text modifiers as labels. This is the case for most of the line symbols.
      aLabelColor - The color to use for labels.
      aLabelFont - The font to use for labels.
      aLabelFilledColor - The fill color of the labels. This has only effect when the argument aIsLabelFilled == true.
      aIsLabelFramed - Whether the labels should be surrounded by a border.
      aIsLabelFilled - Whether the labels should be displayed in a filled rectangle.
      aIsLabelPinned - Whether the labels should be displayed with a pin to the object. This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.
      aIsLabelAnchored - Whether the labels should be displayed with a point on the object. This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.
      aLabelPosition - The position of this label from its anchor point. This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.
      aSize - The size of the symbol.
  • Method Details

    • getInstance

      public static TLcdMilitarySymbolStyle getInstance()
      Returns a shared TLcdMilitarySymbolStyle instance.
      Returns:
      a shared TLcdMilitarySymbolStyle instance.
    • newInstance

      public static TLcdMilitarySymbolStyle newInstance()
      Returns a new TLcdMilitarySymbolStyle instance.
      Returns:
      a new TLcdMilitarySymbolStyle instance.
    • setInstance

      public static void setInstance(TLcdMilitarySymbolStyle aInstance)
      Sets the shared TLcdMilitarySymbolStyle instance to be used.
      Parameters:
      aInstance - the shared TLcdMilitarySymbolStyle instance to be used.
    • getColor

      public Color getColor()
      Returns the line color for unframed icon symbols, line symbols and off-set lines of icon symbols.

      The default value is Color.BLUE.

      Returns:
      the line color for unframed icon symbols, line symbols and off-set lines of icon symbols.
    • isAffiliationColorEnabled

      public boolean isAffiliationColorEnabled()
      Returns whether the affiliation color mode is enabled. When this mode is enabled, the color for unframed icon symbols, line symbols and off-set lines of icon symbols will automatically be adapted to the affiliation of a symbol. If the affiliation is not determined, the color returned by getColor() will be used; otherwise, the affiliation color has precedence.

      The default value is false.

      Returns:
      True if the affiliation color mode is enabled.
    • getAffiliationColor

      public Color getAffiliationColor(int aAffiliation)
      Returns the color that is currently used for the given affiliation.

      The default values are the ones defined in the Military Symbology specifications. The specifications define four different colors in the RGB space, namely yellow (255,255,128), blue (128,224,255), green (171,255,171) and red (255,128,128). These colors are used for all affiliations:

      Parameters:
      aAffiliation - The affiliation for which the current color must be returned.
      Returns:
      The color that is currently used for the given affiliation.
    • getAffiliationColor

      public Color getAffiliationColor(String aAffiliationValue)
      Returns the color that is currently used for the given affiliation.

      The default values are the ones defined in the MIL-STD 2525 specification. The specification defines four different colors in the RGB space, namely yellow (255,255,128), blue (128,224,255), green (171,255,171) and red (255,128,128). The affiliation value can be obtained by calling TLcdEditableAPP6AObject.getAffiliationValue() or TLcdEditableMS2525bObject.getAffiliationValue()

      Parameters:
      aAffiliationValue - The affiliation value for which the current color must be returned.
    • getAlternateAffiliationColor

      public Color getAlternateAffiliationColor(int aAffiliation)
      Returns the alternate color that is currently used for the given affiliation. If no alternate color was configured, this call will be equivalent as the call getAffiliationColor(aAffiliation)
      Parameters:
      aAffiliation - The affiliation for which the alternate color must be returned.
      Returns:
      The alternate color that is currently used for the given affiliation or the affiliation color if no alternate color was configured.
    • getFillPercentage

      public double getFillPercentage()
      Returns the fill percentage of the frame of icon symbols. This factor is a value in the interval [0.0, 1.0].
      Returns:
      the fill percentage to of the frame of icon symbols.
      See Also:
    • getAlternateFillColor

      public Color getAlternateFillColor()
      Returns the color used to fill the part of the frame that is not covered by the fill percentage.

      By default, null is returned.
      Returns:
      the color used to fill the part of the frame that is not covered by the fill percentage.
      See Also:
    • getForcedColor

      public Color getForcedColor()
      Returns the color that currently overrides the normal colors of the icon symbol.

      The value is null, indicating that the normal colors of an icon symbol will be used.

      Returns:
      the color that currently overrides the normal colors of the icon symbol.
    • getSelectionColor

      public Color getSelectionColor()
      Returns the selection color for the construction line of line symbols and for the offset-line and bounding box of icon symbols.

      The default value is Color.red.

      Returns:
      the color for line and icon symbols in selection mode.
    • getLineWidth

      public int getLineWidth()
      Returns the line width to use for all line symbols, off-set lines and vertical lines of icon symbols.

      The default value is 1.

      Returns:
      the line width to use for all line symbols, off-set lines and vertical lines of icon symbols.
    • getSymbolFrameLineWidth

      public int getSymbolFrameLineWidth()
      Returns the frame line width of the icon symbols.
      Returns:
      the frame line width of the icon symbols.
    • getLineStyle

      public int getLineStyle()
      Returns the style to use for the offset-line of an icon symbol.

      The default value is PLAIN.

      Returns:
      the style to use for the offset-line of an icon symbol.
      See Also:
    • getLabelColor

      public Color getLabelColor()
      Returns the color to use for labels.

      The default value is Color.blue.

      Returns:
      the color to use for labels.
    • getLabelFont

      public Font getLabelFont()
      Returns the font to use for labels.

      The default value is null, which results in the use of an internally defined default font: the 'Dialog' font with style Font.PLAIN. The size may vary depending on the symbol's size (see isLabelFontScalingEnabled()).

      Returns:
      the font to use for labels.
      See Also:
    • isLabelFontScalingEnabled

      public boolean isLabelFontScalingEnabled()
      Returns whether the label font size of the label is automatically scaled.

      If enabled, the font size for labels will be scaled according to the size of the symbol. If disabled, the original label font size of the font configured with setLabelFont(Font) will be used.

      The default value is true.

      Returns:
      True if the label font size of the label is automatically scaled.
      See Also:
    • getLabelFilledColor

      public Color getLabelFilledColor()
      Returns the color to use for the labels background.

      This option is only used when isLabelFilled() returns "true".

      The default value is Color.blue.

      Returns:
      the color to use for the labels background.
    • isLabelWithPin

      public boolean isLabelWithPin()
      Returns whether the label should be displayed with a pin to the object.

      This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.

      The default value is false.

      Returns:
      true if the label should be displayed with a pin to the object.
    • isLabelWithAnchor

      public boolean isLabelWithAnchor()
      Returns whether the label should be displayed with a point on the object.

      This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.

      The default value is false.

      Returns:
      true if the label should be displayed with a point on the object.
    • isLabelWithFrame

      public boolean isLabelWithFrame()
      Returns whether the label should be displayed in a frame.

      This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.

      The default value is false.

      Returns:
      true if the label should be displayed in a frame.
    • isLabelFilled

      public boolean isLabelFilled()
      Returns whether the label should be displayed in a filled rectangle.

      This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.

      The default value is false.

      Returns:
      true if the label should be displayed in a filled rectangle.
    • getLabelPosition

      public int getLabelPosition()
      Returns the relative position of the label with respect to the object. This option is used for symbols that use the labels getLabels() and for line symbols that are represented by a point list.

      The default value is EAST.

      Returns:
      the relative position of the label with respect to the object.
    • getShiftLabelPosition

      public int getShiftLabelPosition()
      Return the shift to apply to the label position.

      This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.

      The default value is the result of (getSizeSymbol() / 2) + 10.

      Returns:
      the shift to apply to the label position.
    • getSizeSymbol

      public int getSizeSymbol()
      Returns the size of the icon symbol that uses this style.

      The default value is 64.

      Returns:
      The size of the icon symbol.
    • anchorPointSFCT

      public void anchorPointSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Point aPointSFCT, TLcdXYBounds aBounds, ILcdGXYPainter aGXYPainter) throws TLcdNoBoundsException
      Correction of the anchor point of the label.
      Parameters:
      aPointSFCT - the corrected anchor point of the label.
      aBounds - the bounds of the object.
      Throws:
      TLcdNoBoundsException
    • setLineWidth

      public void setLineWidth(int aWidth)
      Sets the line width to use for all line symbols, off-set lines and vertical lines of icon symbols.
      Parameters:
      aWidth - the new line width to use for all line symbols, off-set lines and vertical lines of icon symbols.
    • setSymbolFrameLineWidth

      public void setSymbolFrameLineWidth(int aWidth)
      Sets the frame line width of the icon symbols in pixels. The frame line width is only used when isSymbolFrameEnabled() returns true.
      Parameters:
      aWidth - the new frame line width for icon symbols.
    • setSizeSymbol

      public void setSizeSymbol(int aSize)
      Sets the size of the icon symbol that uses this style.
      Parameters:
      aSize - - The size of the icon symbol.
    • setOffset

      public void setOffset(int aX, int aY)
      Sets the X and Y offset of the icon with respect to the location of the icon symbol. These values must be given in pixels.
      Parameters:
      aX - - The X offset.
      aY - - The Y offset.
    • getOffsetX

      public int getOffsetX()
      Returns the X offset of the icon with respect to the location of the icon symbol. The offset is given in pixels.

      The default value is 0.

      Returns:
      the X offset of the icon with respect to the location of the icon symbol.
    • getOffsetY

      public int getOffsetY()
      Returns the Y offset of the icon with respect to the location of the icon symbol. The offset is given in pixels.

      The default value is 0.

      Returns:
      the Y offset of the icon with respect to the location of the icon symbol.
    • setAnchorSymbol

      public void setAnchorSymbol(ILcdIcon aSymbol)
      Sets the icon which is displayed as an anchor icon for the icon symbol. The anchor icon is only displayed in 3D projection, and it is placed above terrain. If set to null, no anchor icon will be displayed.

      The default anchor icon is a filled circle, colored with getColor(). If you override the default, the color of the anchor icon will be picked from itself instead of this style.

      Parameters:
      aSymbol - a ILcdIcon implementation to be displayed as the anchor icon
    • getAnchorSymbol

      public ILcdIcon getAnchorSymbol()
      Returns the icon used as an anchor icon for the icon symbol.
      Returns:
      the icon used as an anchor icon for the icon symbol.
    • setSelectionRectangleWidth

      public void setSelectionRectangleWidth(int aWidth)
      Sets the line width of the rectangle in pixels which is displayed when the icon symbol is selected.

      The default width value is 1 pixel.
      Parameters:
      aWidth - line width of the selection rectangle in pixels.
    • getSelectionRectangleWidth

      public int getSelectionRectangleWidth()
      Returns the line width of the rectangle in pixels which is displayed when the icon symbol is selected.
      Returns:
      the line width of the rectangle in pixels which is displayed when the icon symbol is selected.
    • setSelectionRectangleHaloColor

      public void setSelectionRectangleHaloColor(Color aColor)
      Sets the halo color for the selection rectangle of icon symbols.
      Parameters:
      aColor - the selection halo color for the selection rectangle of icon symbols.
    • getSelectionRectangleHaloColor

      public Color getSelectionRectangleHaloColor()
      Returns the selection color for the halo of the selection rectangle of icon symbols.

      The default value is Color.BLUE
      Returns:
      the color for halo of the selection rectangle of icon symbols.
    • setSelectionRectangleHaloWidth

      public void setSelectionRectangleHaloWidth(int aWidth)
      Sets the line width in pixels of the halo of the selection rectangle of icon symbols.
      Parameters:
      aWidth - line width in pixels of the halo of the selection rectangle of icon symbols.
    • getSelectionRectangleHaloWidth

      public int getSelectionRectangleHaloWidth()
      Returns the line width in pixels of the halo of the selection rectangle of icon symbols.
      Returns:
      the line width in pixels of the halo of the selection rectangle of icon symbols.

      The default width value is 0 pixels.

    • setAltitudeFormat

      public void setAltitudeFormat(Format aFormat)

      Sets a new Format to format altitudes in labels.

      This property is currently used to format altitude labels in the following symbols:

      • Weapon/Sensor Range Fan Circular
      • Weapon/Sensor Range Fan Sector

      The format needs to accept Double objects in its format method. All Double instances passed to this method are altitudes expressed in meters.

      Parameters:
      aFormat - The new Format to format an altitude
      See Also:
    • getAltitudeFormat

      public Format getAltitudeFormat()
      Returns the Format to format altitudes in labels.
      Returns:
      the Format to format altitudes in labels.
      See Also:
    • setDistanceFormat

      public void setDistanceFormat(Format aDistanceFormat)

      Sets a new Format to format distances in labels.

      This property is currently used to format distance labels in the following symbols:

      • Weapon/Sensor Range Fan Circular
      • Weapon/Sensor Range Fan Sector

      The format needs to accept Double objects in its format method. All Double instances passed to this method are distances expressed in meters.

      Parameters:
      aDistanceFormat - The new Format to format a distance
      See Also:
    • getDistanceFormat

      public Format getDistanceFormat()
      Returns the Format to format distances in labels.
      Returns:
      the Format to format distances in labels.
      See Also:
    • setAngleFormat

      public void setAngleFormat(Format aAngleFormat)

      Sets a new Format to format angles in labels.

      This property is currently used to format angle labels in the following symbols:

      • Weapon/Sensor Range Fan Circular
      • Weapon/Sensor Range Fan Sector

      The format needs to accept Double objects in its format method. All Double instances passed to this method are angles expressed in degrees.

      Parameters:
      aAngleFormat - The new Format to format an angle
      See Also:
    • getAngleFormat

      public Format getAngleFormat()
      Returns the Format to format angles in labels.
      Returns:
      the Format to format angles in labels.
      See Also:
    • setOffsetEditingEnabled

      public void setOffsetEditingEnabled(boolean aOffsetEditingEnabled)
      Sets if the offset of the icon symbol is editable via CTRL+Drag operation.

      The default value is true.

      Parameters:
      aOffsetEditingEnabled - the offset is editable if this is true
    • isOffsetEditingEnabled

      public boolean isOffsetEditingEnabled()
      Returns true if the offset of the icon symbol is editable via CTRL+Drag operation.
      Returns:
      true if the offset of the icon symbol is editable via CTRL+Drag operation.
    • setLineStyle

      public void setLineStyle(int aLineStyle)
      Sets the style to use for the offset-line of an icon symbol.

      Possible values are:

      • TLcdMilitarySymbolStyle.PLAIN : plain.
      • TLcdMilitarySymbolStyle.SMALL_DASH : small dashing pattern.
      • TLcdMilitarySymbolStyle.LARGE_DASH : large dashing pattern.
      • TLcdMilitarySymbolStyle.ALTERNATE_DASH : alternate (small and large) dashing pattern.
      Parameters:
      aLineStyle - the new style to use for the offset-line of an icon symbol.
    • setSymbolFrameEnabled

      public void setSymbolFrameEnabled(boolean aSymbolFrameEnabled)
      Sets whether the frame of an icon symbol should be painted.
      Parameters:
      aSymbolFrameEnabled - Whether the frame of an icon symbol should be painted.
    • isSymbolFrameEnabled

      public boolean isSymbolFrameEnabled()
      Returns whether the frame of an icon symbol should be painted.

      The default value is true.

      Returns:
      True if the frame of an icon symbol should be painted.
    • setSymbolFillEnabled

      public void setSymbolFillEnabled(boolean aSymbolFillEnabled)
      Sets whether an icon symbol should be painted filled.
      Parameters:
      aSymbolFillEnabled - Whether an icon symbol should be painted filled.
    • isSymbolFillEnabled

      public boolean isSymbolFillEnabled()
      Returns whether an icon symbol should be painted filled.

      The default value is true.

      Returns:
      True if an icon symbol should be painted filled.
    • setSymbolIconEnabled

      public void setSymbolIconEnabled(boolean aSymbolIconEnabled)
      Sets whether the internal icon in the frame of an icon symbol should be painted.
      Parameters:
      aSymbolIconEnabled - Whether the internal icon in the frame of an icon symbol should be painted.
    • isSymbolIconEnabled

      public boolean isSymbolIconEnabled()
      Returns whether the internal icon in the frame of an icon symbol should be painted.

      The default value is true.

      Returns:
      True if the internal icon in the frame of an icon symbol should be painted.
    • getForcedFrameLineStyle

      public Integer getForcedFrameLineStyle()
      Returns the style that currently overrides the normal symbol frame outline line style of the icon symbol. By default, null is returned, indicating that the line style of the icon determined by the affiliation and status are used as defined in the standard.
      Returns:
      an Integer representing the currently forced line style of the icon symbol frame, or null if the default line style is used.
    • setForcedFrameLineStyle

      public void setForcedFrameLineStyle(Integer aForcedFrameLineStyle)
      Sets the line style to be used for the frame of an icon symbol: this will override the default line style for the outline of the symbol frame as defined by the standard. To revert to the default behavior, null must be supplied.

      Possible values are:
      Parameters:
      aForcedFrameLineStyle - an Integer representing the line style to be used.
      Since:
      2022.0
    • getLabels

      public String[] getLabels()
      Returns the labels to use for labeling. These labels are only used when the particular symbols that use this style don't make use of the text modifiers as labels. This is the case for most of the line symbols.
      Returns:
      the labels to use for labeling.
    • setLabels

      public void setLabels(String[] aLabels)
      Sets the labels to use for labeling. These labels are only used when the particular symbols that use this style don't make use of the text modifiers as labels. This is the case for most of the line symbols.
      Parameters:
      aLabels - the labels to use for labeling.
    • setLabelColor

      public void setLabelColor(Color aColor)
      Sets the color to use for labels.
      Parameters:
      aColor - the color to use for labels.
    • setLabelFont

      public void setLabelFont(Font aFont)
      Sets the font to use for labels.
      Parameters:
      aFont - the font to use for labels.
    • setLabelFontScalingEnabled

      public void setLabelFontScalingEnabled(boolean aLabelFontScalingMode)
      Sets whether the font size of the label should be automatically scaled for icon symbols.

      If enabled, the font size for labels around icon symbols will be scaled according to the size of the symbol. If disabled, the original font size of the font returned by getLabelFont() will be used.

      Parameters:
      aLabelFontScalingMode - The font size scaling mode.
    • setColor

      public void setColor(Color aColor)
      Sets the color for unframed icon symbols, line symbols and off-set lines of icon symbols.
      Parameters:
      aColor - the line color for unframed icon symbols, line symbols and off-set lines of icon symbols.
    • setAffiliationColorEnabled

      public void setAffiliationColorEnabled(boolean aAffiliationColorEnabled)
      Sets the affiliation color mode. When this mode is enabled, the color for unframed icon symbols, line symbols and off-set lines of icon symbols will automatically be adapted to the affiliation of a symbol. If the affiliation is not determined, the color returned by getColor() will be used; otherwise, the affiliation color has precedence.
      Parameters:
      aAffiliationColorEnabled - The affiliation color mode.
    • setAffiliationColor

      public void setAffiliationColor(int aAffiliation, Color aColor)
      Sets the color for the given affiliation. These colors will be used for all framed icon symbols; for unframed icon symbols and line symbols, affiliation colors are only used when the affiliation color mode has been enabled - see isAffiliationColorEnabled().
      Parameters:
      aAffiliation - The affiliation for which a color is set.
      aColor - The color to be used for the given affiliation.
    • setAlternateAffiliationColor

      public void setAlternateAffiliationColor(int aAffiliation, Color aColor)
      Sets the alternate color for the given affiliation. This alternate color is in used by some tactical graphics that can be painted in multiple colors. An example of such a symbol is MIL-STD-2525c symbol 2.X.2.1.2.3 'Line of contact', for which each side of the line of contact can have a different color.
      Parameters:
      aAffiliation - The affiliation for which an alternate color is set.
      aColor - The alternate color to be used for the given affiliation.
    • setFillPercentage

      public void setFillPercentage(double aFillPercentage)
      Sets the fill percentage of the frame of icon symbols. This factor must be a value in the interval [0.0, 1.0], with 0.0 indicating no fill and 1.0 indicating a complete fill, starting from the bottom of the frame.

      This property is only taken into account when the symbol frame is enabled, i.e. when isSymbolFrameEnabled() returns true.

      Parameters:
      aFillPercentage - the fill percentage of the frame of icon symbols.
      See Also:
    • setAlternateFillColor

      public void setAlternateFillColor(Color aAlternateFillColor)
      Sets the color to fill the part of the frame that is not covered by the fill percentage. If null is supplied, the uncovered part of the frame is not filled.

      This property is only taken into account when the symbol frame is enabled, i.e. when isSymbolFrameEnabled() returns true.

      Parameters:
      aAlternateFillColor - the color to fill the part of the frame that is not covered by the fill percentage.
      See Also:
    • setForcedColor

      public void setForcedColor(Color aColor)
      Sets the color to be used for the icon symbol: this will override the normal colors for the different elements of the symbol. To revert to the normal colors of the military symbol, null must be supplied.

      Note that a selected symbol will always be displayed using the selection colors, even if a forced color is configured.
      Parameters:
      aColor - the color to be used for the military symbol.
    • setSelectionColor

      public void setSelectionColor(Color aColor)
      Sets the selection color for the construction line of line symbols and for the offset-line and bounding box of icon symbols.
      Parameters:
      aColor - the selection color for the construction line of line symbols and for the offset-line and bounding box of icon symbols.
    • setLabelFilledColor

      public void setLabelFilledColor(Color aColor)
      Sets the color to use for the labels background. This option is only used when isLabelFilled() returns "true".
      Parameters:
      aColor - the color to use for the labels background.
    • setLabelWithPin

      public void setLabelWithPin(boolean aLabelWithPin)
      Sets whether the label should be displayed with a pin to the object.

      This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.

      Parameters:
      aLabelWithPin - whether the label should be displayed with a pin to the object.
    • setLabelWithAnchor

      public void setLabelWithAnchor(boolean aLabelWithAnchor)
      Sets whether the label should be displayed with a point on the object.

      This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.

      Parameters:
      aLabelWithAnchor - whether the label should be displayed with a point on the object.
    • setLabelWithFrame

      public void setLabelWithFrame(boolean aLabelWithFrame)
      Sets whether the label should be displayed in a frame.

      This option is only used for symbols that use the labels getLabels(). Symbols which use the text modifiers as labels don't make use of this option, because the label layout is predefined by the Military Symbology standards.

      Parameters:
      aLabelWithFrame - whether the label should be displayed in a frame.
    • getLabelFrameColor

      public Color getLabelFrameColor()
      Returns the color to use for the label frame.

      This option is only used when isLabelWithFrame() returns true.

      A null value indicates that the getLabelColor() should be used instead. This is also the default.

      Returns:
      the color to use for the label frame or null
    • setLabelFrameColor

      public void setLabelFrameColor(Color aColor)
      Sets the color to use for the label frame.
      Parameters:
      aColor - the color to use for the label frame or null
      See Also:
    • getLabelFramePadding

      public int getLabelFramePadding()
      Returns the padding between the label text and the label frame.

      This option is only used when isLabelWithFrame() returns true.

      The default value is 1.

      Returns:
      the number of pixels between the label text and label frame
    • setLabelFramePadding

      public void setLabelFramePadding(int aPadding)
      Sets the padding between the label text and the label frame.
      Parameters:
      aPadding - the number of pixels between the label text and label frame
      See Also:
    • setLabelFilled

      public void setLabelFilled(boolean aLabelFilled)
      Sets whether the label should be displayed in a filled rectangle.
      Parameters:
      aLabelFilled - whether the label should be displayed in a filled rectangle.
    • setLabelPosition

      public void setLabelPosition(int aLabelPosition)
      Sets the relative position of the label with respect to the object. This option is used for symbols that use the labels getLabels() and for line symbols that are represented by a point list.
      Parameters:
      aLabelPosition - the relative position of the label with respect to the object.
    • setLabelEnabled

      public void setLabelEnabled(String aLabel, boolean aEnabled)
      Sets whether the given label should be displayed.
      Parameters:
      aLabel - A label.
      aEnabled - whether the label should be displayed.
    • isLabelEnabled

      public boolean isLabelEnabled(String aLabel)
      Returns whether the given label should be displayed. The possible labels are the text modifiers defined by the static members of ILcdAPP6ACoded and ILcdMS2525bCoded.

      Parameters:
      aLabel - A label as defined by the static members of ILcdAPP6ACoded and ILcdMS2525bCoded>.
      Returns:
      True if the given label should be displayed. False otherwise or for unknown labels.
    • getCornerSmoothness

      public double getCornerSmoothness()
      Returns the smoothness (or rounding) factor that is used to render corners of polygons. This factor is a value in the interval [0.0, 1.0].
      Returns:
      the smoothness (or rounding) factor for polygon corners.
      See Also:
    • setCornerSmoothness

      public void setCornerSmoothness(double aSmoothnessFactor)
      Sets the smoothness (or rounding) factor that should be used to render corners of polygons. This factor must be a value in the interval [0.0, 1.0], with 0.0 indicating no rounding and 1.0 indicating a maximum rounding, which results in a very smooth corner.
      Parameters:
      aSmoothnessFactor - the smoothness (or rounding) factor for polygon corners.
    • isHaloEnabled

      public boolean isHaloEnabled()
      Returns whether a halo is enabled for symbols (both icon and line symbols).

      By default, false is returned.

      Returns:
      if a halo is enabled for icon and line symbols.
    • setHaloEnabled

      public void setHaloEnabled(boolean aEnabled)
      Sets whether a halo should be enabled for symbols (both icon and line symbols).

      The halo color and thickness can be configured respectively through setHaloColor(java.awt.Color) and setHaloThickness(int).

      Parameters:
      aEnabled - whether a halo should be enabled for symbols (both icon and line symbols).
      See Also:
    • getHaloColor

      public Color getHaloColor()
      Returns the color that is used for icon and line symbol halos, if enabled (i.e., if isHaloEnabled() returns true).

      By default, Color.WHITE is returned.

      Returns:
      the color that is used for icon and line symbol halos, if enabled.
    • setHaloColor

      public void setHaloColor(Color aColor)
      Sets the color to be used for icon and line symbol halos, if enabled (i.e., if isHaloEnabled() returns true).
      Parameters:
      aColor - the color to be used for icon and line symbol halos, if enabled.
    • getHaloThickness

      public int getHaloThickness()
      Returns the thickness that is used for icon and line symbol halos, if enabled (i.e., if isHaloEnabled() returns true).

      By default, 1 is returned.

      Returns:
      the thickness that is used for icon and line symbol halos, if enabled.
    • setHaloThickness

      public void setHaloThickness(int aThickness)
      Sets the thickness to be used for icon and line symbol halos, if enabled (i.e., if isHaloEnabled() returns true).
      Parameters:
      aThickness - the thickness to be used for icon and line symbol halos, if enabled.
    • isLabelHaloEnabled

      public boolean isLabelHaloEnabled()
      Returns whether a halo is enabled for labels of icon and line symbols.

      By default, false is returned.

      Returns:
      if a halo is enabled for labels of icon and line symbols.
    • setLabelHaloEnabled

      public void setLabelHaloEnabled(boolean aEnabled)
      Sets whether a halo should be enabled for labels of icon and line symbols.

      The label halo color and thickness can be configured respectively through setLabelHaloColor(java.awt.Color) and setLabelHaloThickness(int).

      Parameters:
      aEnabled - whether a halo should be enabled for labels of icon and line symbols.
      See Also:
    • getLabelHaloColor

      public Color getLabelHaloColor()
      Returns the color that is used for the label halo of icon and line symbols, if enabled (i.e., if isLabelHaloEnabled() returns true).

      By default, Color.GRAY is returned.

      Returns:
      the color that is used for the label halo of icon and line symbols, if enabled.
    • setLabelHaloColor

      public void setLabelHaloColor(Color aColor)
      Sets the color to be used for the label halo of icon and line symbols, if enabled (i.e., if isLabelHaloEnabled() returns true).
      Parameters:
      aColor - the color to be used for the label halo of icon and line symbols, if enabled.
    • getLabelHaloThickness

      public int getLabelHaloThickness()
      Returns the thickness that is used for the label halo of icon and line symbols, if enabled (i.e., if isLabelHaloEnabled() returns true).

      By default, 1 is returned.

      Returns:
      the thickness that is used for the label halo of icon and line symbols, if enabled.
    • setLabelHaloThickness

      public void setLabelHaloThickness(int aThickness)
      Sets the thickness to be used for the label halo of icon and line symbols, if enabled (i.e., if isLabelHaloEnabled() returns true).
      Parameters:
      aThickness - the thickness to be used for the label halo of icon and line symbols, if enabled.
    • isVerticalLineEnabled

      public boolean isVerticalLineEnabled()
      Returns whether a perpendicular line from the center point of the icon symbols to the earth surface is enabled. This visualizes the projection of the icon symbols onto a terrain.

      Vertical lines are only applicable for icon symbols with an altitude value bigger than 0 in a 3D view.

      • The vertical line width can be set by calling setLineWidth(int).
      • The color of the vertical line depends on isAffiliationColorEnabled(). If affiliation color is enabled, it's determined by affiliation of the symbol's affiliation otherwise it's determined by getColor().

      By default, this method returns true.
      Returns:
      if a perpendicular line from the center point of the icon symbols to the earth surface is enabled.
      See Also:
    • setVerticalLineEnabled

      public void setVerticalLineEnabled(boolean aEnabled)
      Sets whether a perpendicular line from the center point of the icon symbols to the earth surface is enabled. If enabled, it visualizes the projection of the icon symbols onto a terrain.

      Vertical lines are only applicable for the icon symbols with an altitude value bigger than 0 in a 3D view.

      Parameters:
      aEnabled - whether a perpendicular line from the center point of the icon symbols to the earth surface is enabled.
      See Also:
    • setSpeedLeaderLengthRatio

      public void setSpeedLeaderLengthRatio(double aRatio)
      Sets the length ratio of the speed leader to the symbol size against the speed value of 1m/s.
      See setSpeedLeaderLength(double, ILcdISO19103Measure) for a convenience setter using a speed measure.
      Parameters:
      aRatio - the length ratio of speed leader to the symbol size against the speed value of 1m/s.
      See Also:
    • getSpeedLeaderLengthRatio

      public double getSpeedLeaderLengthRatio()
      Returns the length ratio of the speed leader to the symbol size against the speed value of 1m/s.
      • If aRatio is 1, 1m/s of speed value will be visualized with the speed leader having the length of 1 x getSizeSymbol()
      • If aRatio is 10, 1m/s of speed value will be visualized with the speed leader having the length of 10 x getSizeSymbol()

      Speed leaders are only applicable to APP-6C/D and MIL-STD 2525C/D.

      The default value for the length ratio is 0.05
      Returns:
      the length ratio of the speed leader to the symbol size against the speed value of 1m/s.
      See Also:
    • setSpeedLeaderLength

      public void setSpeedLeaderLength(double aTimesSymbolSize, ILcdISO19103Measure aSpeed)
      A convenience method that changes the speed leader length ratio so that the speed leader length is equal to the symbol size times aTimesSymbolSize if the symbol has the given speed. For example, if the symbol size is 64 pixels and the method is called with aTimesSymbolSize == 3 and a speed of Mach 1, the symbol's speed leader will be 3*64=192 pixels long travelling at Mach 1, and 3*64*2=384 pixels at Mach 2.
      Parameters:
      aTimesSymbolSize - the length ratio of speed leader to the symbol size against the speed value of 1m/s.
      aSpeed - A speed measure which will be the reference for calculating length ratio of the speed leader.
      Throws:
      IllegalArgumentException - if the unit measure type code of aSpeed is not equals to TLcdISO19103MeasureTypeCode.VELOCITY
      See Also:
    • isEngagementBarEnabled

      public boolean isEngagementBarEnabled()
      Returns a boolean indicating whether the engagement bar graphic amplifier is enabled.
      Returns:
      boolean indicating whether the engagement bar graphic amplifier is enabled.
      See Also:
    • setEngagementBarEnabled

      public void setEngagementBarEnabled(boolean aEngagementBarEnabled)
      Sets whether the engagement bar graphic amplifier is enabled.
      See Also:
    • getEngagementBarStyle

      public TLcdEngagementBarStyle getEngagementBarStyle()
      Returns the engagement bar graphic amplifier's styling options.
      Returns:
      The engagement bar graphic amplifier's styling options.
      See Also:
    • setEngagementBarStyle

      public void setEngagementBarStyle(TLcdEngagementBarStyle aEngagementBarStyle)
      Sets the engagement bar graphic amplifier's styling options.
      See Also:
    • isStrictSegmentationEnabled

      public boolean isStrictSegmentationEnabled()

      This property indicates whether strict segmentation is enabled. Strictly speaking, the standard defines that some symbols need to repeat all information for each segment of 2 consecutive anchor points. This can cause issues in realistic situations.

      For example, if you create a "Main Supply Route" that matches an actual route, in the real world. It would be constructed out of many thousands of anchor points, forming very small segments. Having to repeat the information thousands of times is not desired as labels will overlap each other and can cause performance issues when zooming out far enough where you are able to see the whole symbol.

      If this property returns false, the information of the symbol will be repeated across the symbols in segments that are larger than 2 anchor points, if the information is repeated often enough.

      Strict segmentation is disabled by default.

      Returns:
      a boolean indicating whether strict segmentation is enabled
    • setStrictSegmentationEnabled

      public void setStrictSegmentationEnabled(boolean aStrictSegmentationEnabled)

      Enables or disables strict segmentation. This property can be used to limit the amount of times information is repeated across a symbol. Strictly speaking, the standard defines that some symbols need to repeat all information for each segment of 2 consecutive anchor points. This can cause issues in realistic situations.

      For example, if you create a "Main Supply Route" that matches an actual route, in the real world. It would be constructed out of many thousands of anchor points, forming very small segments. Having to repeat the information thousands of times is not desired as labels will overlap each other and can cause performance issues when zooming out far enough where you are able to see the whole symbol.

      If this property is set to false, the information of the symbol will be repeated across the symbols in segments that are larger than 2 anchor points, if the information is repeated often enough.

      Strict segmentation is disabled by default.

      Parameters:
      aStrictSegmentationEnabled - a boolean indicating whether strict segmentation is enabled
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Adds the given listener that is notified when a property of this style is changed.
      Parameters:
      aPropertyChangeListener - the object to notify when a property of this style is changed.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Removes the given listener from the list so that it is no longer notified when a property of this style is changed.
      Parameters:
      aPropertyChangeListener - the listener that should no longer be notified when a property of this style is changed.
    • equals

      public boolean equals(Object aO)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Object clone()
      Description copied from interface: ILcdCloneable

      Makes Object.clone() public.

      When for example extending from java.lang.Object, it can be implemented like this:
      
       public Object clone() {
         try {
           return super.clone();
         } catch ( CloneNotSupportedException e ) {
           // Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
           throw new RuntimeException( e );
         }
       }
       
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class Object
      See Also: