Class RendererSettings

java.lang.Object
armyc2.c5isr.renderer.utilities.RendererSettings

public class RendererSettings extends Object
Static class that holds the setting for the JavaRenderer. Allows different parts of the renderer to know what values are being used.
  • Field Details

  • Method Details

    • getInstance

      public static RendererSettings getInstance()
    • addEventListener

    • setTextBackgroundMethod

      public void setTextBackgroundMethod(int textBackgroundMethod)
      None, outline (default), or filled background. If set to OUTLINE, TextOutlineWidth changed to default of 4. If set to OUTLINE_QUICK, TextOutlineWidth changed to default of 2. Use setTextOutlineWidth if you'd like a different value.
      Parameters:
      textBackgroundMethod -
    • getTextBackgroundMethod

      None, outline (default), or filled background.
      Returns:
      method like RenderSettings.TextBackgroundMethod_NONE
    • getUnitFontSize

      public float getUnitFontSize()
      Deprecated.
      Returns:
    • getSPFontSize

      public float getSPFontSize()
      Deprecated.
      Returns:
    • setDefaultPixelSize

      public void setDefaultPixelSize(int size)
    • getDefaultPixelSize

      public int getDefaultPixelSize()
    • getDeviceDPI

      public int getDeviceDPI()
    • setDeviceDPI

      public void setDeviceDPI(int size)
    • getDeviceHeight

      public int getDeviceHeight()
    • setDeviceHeight

      public void setDeviceHeight(int height)
    • getDeviceWidth

      public int getDeviceWidth()
    • setDeviceWidth

      public void setDeviceWidth(int width)
    • setOperationalConditionModifierType

      public void setOperationalConditionModifierType(int value)
      Set the operational condition modifier to be slashes or bars
      Parameters:
      value - like RendererSettings.OperationalConditionModifierType_SLASH
    • setSeaMineRenderMethod

      public void setSeaMineRenderMethod(int method)
    • getSeaMineRenderMethod

      public int getSeaMineRenderMethod()
    • getOperationalConditionModifierType

    • setUseLineInterpolation

      public void setUseLineInterpolation(boolean value)
      For lines symbols with "decorations" like FLOT or LOC, when points are too close together, we will start dropping points until we get enough space between 2 points to draw the decoration. Without this, when points are too close together, you run the chance that the decorated line will look like a plain line because there was no room between points to draw the decoration.
      Parameters:
      value -
    • getUseLineInterpolation

      public boolean getUseLineInterpolation()
      Returns the current setting for Line Interpolation.
      Returns:
    • setAutoCollapseModifiers

      public void setAutoCollapseModifiers(boolean value)
      Collapse Modifiers for fire support areas when the symbol isn't large enough to show all the labels. Identifying label will always be visible. Zooming in, to make the symbol larger, will make more modifiers visible. Resizing the symbol can also make more modifiers visible.
      Parameters:
      value -
    • getAutoCollapseModifiers

      public boolean getAutoCollapseModifiers()
    • getTextOutlineWidth

      public int getTextOutlineWidth()
      Deprecated.
      if RenderSettings.TextBackgroundMethod_OUTLINE is used, the outline will be this many pixels wide.
      Returns:
    • setTextBackgroundAutoColorThreshold

      public void setTextBackgroundAutoColorThreshold(int value)
      Value from 0 to 255. The closer to 0 the lighter the text color has to be to have the outline be black. Default value is 160.
      Parameters:
      value -
    • getTextBackgroundAutoColorThreshold

      Value from 0 to 255. The closer to 0 the lighter the text color has to be to have the outline be black. Default value is 160.
      Returns:
    • getSinglePointSymbolOutlineWidth

      Deprecated.
      This applies to Single Point Tactical Graphics.
      Returns:
    • setOutlineSPControlMeasures

      public void setOutlineSPControlMeasures(boolean value)
    • getOutlineSPControlMeasures

      public boolean getOutlineSPControlMeasures()
    • setActionPointDefaultFill

      public void setActionPointDefaultFill(boolean value)
      If true, set fill based on affiliation color for Action Points, Sonobuoys, ACP, CCP, PUP. False means there is no fill.
      Parameters:
      value -
    • getActionPointDefaultFill

      public boolean getActionPointDefaultFill()
    • setDrawAffiliationModifierAsLabel

      public void setDrawAffiliationModifierAsLabel(boolean value)
      Determines how to draw the Affiliation modifier. True to draw as modifier label in the "E/F" location. False to draw at the top right corner of the symbol
    • getDrawAffiliationModifierAsLabel

      True to draw as modifier label in the "E/F" location. False to draw at the top right corner of the symbol
    • setModifierFont

      public void setModifierFont(String name, int type, int size, Boolean kerning, float tracking)
      Deprecated.
      Parameters:
      name - Like "arial"
      type - Like Font.BOLD
      size - Like 12
      kerning - - default false. The default advances of single characters are not appropriate for some character sequences, for example "To" or "AWAY". Without kerning the adjacent characters appear to be separated by too much space. Kerning causes selected sequences of characters to be spaced differently for a more pleasing visual appearance.
      tracking - - default 0.04 (TextAttribute.TRACKING_LOOSE). The tracking value is multiplied by the font point size and passed through the font transform to determine an additional amount to add to the advance of each glyph cluster. Positive tracking values will inhibit formation of optional ligatures. Tracking values are typically between -0.1 and 0.3; values outside this range are generally not desireable.
    • setModifierFont

      public void setModifierFont(String name, int type, int size)
      Parameters:
      name -
      type - Typeface
      size -
    • setMPLabelFont

      public void setMPLabelFont(String name, int type, int size)
      Sets the font to be used for multipoint modifier labels
      Parameters:
      name - Like "arial"
      type - Like Font.TRUETYPE_FONT
      size - Like 12
    • setMPLabelFont

      public void setMPLabelFont(String name, int type, int size, float kmlScale)
      Sets the font to be used for multipoint modifier labels
      Parameters:
      name - Like "arial"
      type - Like Font.TRUETYPE_FONT
      size - Like 12
      kmlScale - only set if you're rendering in KML (default 1.0)
    • getModiferFontProps

    • getModiferFont

      get font object used for labels
      Returns:
      Font object
    • getMPLabelFont

      get font object used for labels
      Returns:
      Font object
    • getMPLabelFontName

      the font name to be used for modifier labels
      Returns:
      name of the label font
    • getMPLabelFontType

      public int getMPLabelFontType()
      Like Font.BOLD
      Returns:
      type of the label font
    • getMPLabelFontSize

      public int getMPLabelFontSize()
      get font point size
      Returns:
      size of the label font
    • setMPModifierFont

      public void setMPModifierFont(String name, int type, int size)
    • setMPModifierFont

      public void setMPModifierFont(String name, int type, int size, float kmlScale)
    • getMPModifierFont

      Deprecated.
    • getMPModifierFontName

      Deprecated.
    • getMPModifierFontType

      public int getMPModifierFontType()
      Deprecated.
    • getMPModifierFontSize

      public int getMPModifierFontSize()
      Deprecated.
    • getKMLLabelScale

      public float getKMLLabelScale()
    • setCacheSize

      public void setCacheSize(float percentage)
      Set the cache size as a percentage of VM memory available to the app. Default is 3%. Renderer won't let you set a value greater than 10% of the available VM memory.
      Parameters:
      percentage -
    • setCacheSize

      public void setCacheSize(int bytes)
      Set the cache size in bytes. Renderer won't let you set a value greater than 10% of the available VM memory.
      Parameters:
      bytes -
    • getCacheSize

      public int getCacheSize()
      Returns:
      Cache size in bytes
    • setCacheEnabled

      public void setCacheEnabled(boolean active)
    • getCacheEnabled

      public boolean getCacheEnabled()
    • getTwoLabelOnly

      public boolean getTwoLabelOnly()
      Get a boolean indicating between the use of ENY labels in all segments (false) or to only set 2 labels one at the north and the other one at the south of the graphic (true).
      Returns:
      {boolean}
    • setTwoLabelOnly

      public void setTwoLabelOnly(boolean TwoLabelOnly)
      Set a boolean indicating between the use of ENY labels in all segments (false) or to only set 2 labels one at the north and the other one at the south of the graphic (true).
      Parameters:
      TwoLabelOnly -
    • setScaleMainIcon

      public void setScaleMainIcon(boolean scaleMainIcon)
      When true, if the main icon is normally small to allow room for sector modifiers, make it larger when no sector modifiers are present for better visibility.
      Parameters:
      scaleMainIcon -
    • getScaleMainIcon

      public boolean getScaleMainIcon()
      When true, if the main icon is normally small to allow room for sector modifiers, main icon is made larger when no sector modifiers are present for better visibility.