Class JavaRendererUtilities

java.lang.Object
sec.web.renderer.utilities.JavaRendererUtilities

public class JavaRendererUtilities extends Object
Author:
stephen.pinizzotto
  • Field Details

    • HOSTILE_FILL_COLOR

      public static String HOSTILE_FILL_COLOR
    • FRIENDLY_FILL_COLOR

      public static String FRIENDLY_FILL_COLOR
    • NEUTRAL_FILL_COLOR

      public static String NEUTRAL_FILL_COLOR
    • UNKNOWN_FILL_COLOR

      public static String UNKNOWN_FILL_COLOR
  • Constructor Details

    • JavaRendererUtilities

      public JavaRendererUtilities()
  • Method Details

    • ARGBtoABGR

      public static String ARGBtoABGR(String rgbString)
      Converts ARGB string format to the Google used ABGR string format. Google reverses the blue and red positioning.
      Parameters:
      rgbString - A color string of the format AARRGGBB in hex value.
      Returns:
      the reverse of the input string in hex. The format should now be AABBGGRR
    • normalizeSymbolCode

      public static String normalizeSymbolCode(String symbolCode)
      Returns a symbolId with just the identifiable symbol Id pieces. All variable information is returned as '*'. For example, a boundary, "GFGPGLB----KUSX" returns "G*G*GLB---****X";
      Parameters:
      symbolCode - A 15 character symbol ID.
      Returns:
      The normalized SymbolCode.
    • createParameterMapFromURL

      public static Map<String,String> createParameterMapFromURL(String SymbolInfo)
      Parameters:
      SymbolInfo - something like "SymbolID?LineColor=0x000000invalid input: '&FillColor'=0xFFFFFFinvalid input: '&size'=35"
    • createMilstdSymbol

      public static ArmyC2.C2SD.Utilities.MilStdSymbol createMilstdSymbol(String SymbolInfo)
      Takes a string and parses information to build a MilStdSymbol
      Parameters:
      SymbolInfo - something like "SymbolID?LineColor=0x000000invalid input: '&FillColor'=0xFFFFFFinvalid input: '&size'=35"
      Returns:
    • createMilstdSymbol

      public static ArmyC2.C2SD.Utilities.MilStdSymbol createMilstdSymbol(String symbolID, Map<String,String> params)
      Takes a string and parses information to build a MilStdSymbol
      Parameters:
      params -
      SymbolID -
      Returns:
    • ReconcileSymbolID

      public static String ReconcileSymbolID(String symbolID)
      Deprecated.
      use SymbolUtilties.reconcileSymbolID() 9/5/2013
      Try to turn a bad code into something renderable.
      Parameters:
      SymbolID -
      Returns:
    • is3dSymbol

      public static boolean is3dSymbol(String symbolCode, String modifiers)
      Checks symbolID and if the relevant modifiers are present
      Parameters:
      symbolCode -
      modifiers -
      Returns:
    • isNumber

      public static boolean isNumber(String text)
      Determines if a String represents a valid number
      Parameters:
      text -
      Returns:
      "1.56" == true, "1ab" == false
    • getStackTrace

      public static String getStackTrace(Throwable thrown)
      Takes a throwable and puts it's stacktrace into a string.
      Parameters:
      thrown -
      Returns:
    • getEndPointWithAngle

      public static Point2D getEndPointWithAngle(Point2D ptStart, double angle, double distance)
    • measureDistance

      public static double measureDistance(double latitude1, double longitude1, double latitude2, double longitude2, String unitOfMeasure)
      Parameters:
      latitude1 -
      longitude1 -
      latitude2 -
      longitude2 -
      unitOfMeasure - meters, kilometers, miles, feet, yards, nautical, nautical miles.
      Returns:
    • generateLookAtTag

      public static String generateLookAtTag(ArrayList<Point2D.Double> geoCoords, ArrayList<Double> modsAM)
    • sanitizeSymbolID

      public static String sanitizeSymbolID(String symbolID)
      we only have font lookups for F,H,N,U. But the shapes match one of these four for the remaining affiliations. So we convert the string to a base affiliation before we do the lookup.
      Parameters:
      symbolID -
      Returns:
    • addAltModeToModifiersString

      public static String addAltModeToModifiersString(String modifiers, String altMode)
    • parseIconParameters

      public static Map<String,String> parseIconParameters(String symbolId, Map<String,String> params)