Package sec.web.renderer.utilities
Class JavaRendererUtilities
java.lang.Object
sec.web.renderer.utilities.JavaRendererUtilities
- Author:
- stephen.pinizzotto
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddAltModeToModifiersString(String modifiers, String altMode) static StringARGBtoABGR(String rgbString) Converts ARGB string format to the Google used ABGR string format.static ArmyC2.C2SD.Utilities.MilStdSymbolcreateMilstdSymbol(String SymbolInfo) Takes a string and parses information to build a MilStdSymbolstatic ArmyC2.C2SD.Utilities.MilStdSymbolcreateMilstdSymbol(String symbolID, Map<String, String> params) Takes a string and parses information to build a MilStdSymbolcreateParameterMapFromURL(String SymbolInfo) static StringgenerateLookAtTag(ArrayList<Point2D.Double> geoCoords, ArrayList<Double> modsAM) static Point2DgetEndPointWithAngle(Point2D ptStart, double angle, double distance) static StringgetStackTrace(Throwable thrown) Takes a throwable and puts it's stacktrace into a string.static booleanis3dSymbol(String symbolCode, String modifiers) Checks symbolID and if the relevant modifiers are presentstatic booleanDetermines if a String represents a valid numberstatic doublemeasureDistance(double latitude1, double longitude1, double latitude2, double longitude2, String unitOfMeasure) static StringnormalizeSymbolCode(String symbolCode) Returns a symbolId with just the identifiable symbol Id pieces.parseIconParameters(String symbolId, Map<String, String> params) static StringReconcileSymbolID(String symbolID) Deprecated.use SymbolUtilties.reconcileSymbolID() 9/5/2013static StringsanitizeSymbolID(String symbolID) we only have font lookups for F,H,N,U.
-
Field Details
-
HOSTILE_FILL_COLOR
-
FRIENDLY_FILL_COLOR
-
NEUTRAL_FILL_COLOR
-
UNKNOWN_FILL_COLOR
-
-
Constructor Details
-
JavaRendererUtilities
public JavaRendererUtilities()
-
-
Method Details
-
ARGBtoABGR
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
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
- Parameters:
SymbolInfo- something like "SymbolID?LineColor=0x000000invalid input: '&FillColor'=0xFFFFFFinvalid input: '&size'=35"
-
createMilstdSymbol
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
Deprecated.use SymbolUtilties.reconcileSymbolID() 9/5/2013Try to turn a bad code into something renderable.- Parameters:
SymbolID-- Returns:
-
is3dSymbol
Checks symbolID and if the relevant modifiers are present- Parameters:
symbolCode-modifiers-- Returns:
-
isNumber
Determines if a String represents a valid number- Parameters:
text-- Returns:
- "1.56" == true, "1ab" == false
-
getStackTrace
Takes a throwable and puts it's stacktrace into a string.- Parameters:
thrown-- Returns:
-
getEndPointWithAngle
-
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
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
-
parseIconParameters
-