Class JavaRendererUtilities

java.lang.Object
armyc2.c5isr.web.render.utilities.JavaRendererUtilities

public class JavaRendererUtilities extends Object
  • Field Details

  • Constructor Details

  • 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)
      Deprecated.
      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.
    • addAltModeToModifiersString

      public static void addAltModeToModifiersString(Map<String,String> attributes, String altMode)
    • createParameterMapFromURL

      public static Map<String,String> createParameterMapFromURL(String SymbolInfo)
      Parameters:
      SymbolInfo - something like "SymbolID?LineColor=0x000000&FillColor=0xFFFFFF&size=35"
    • is3dSymbol

      public static boolean is3dSymbol(String symbolCode, Map<String,String> modifiers)
      Deprecated.
      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: