public class SymbolUtilities
extends java.lang.Object
SymbolID for additional functions related to parsing the symbol code.| Constructor and Description |
|---|
SymbolUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Boolean |
canSymbolHaveModifier(java.lang.String symbolID,
java.lang.String modifier)
Deprecated.
|
static java.lang.String |
getBasicSymbolID(java.lang.String id)
Gets Basic Symbol ID which is the Symbol Set + Entity Code
|
static java.lang.String |
getBasicSymbolID2525C(java.lang.String strSymbolID)
Deprecated.
function will be removed
|
static java.awt.Point |
getCMSymbolAnchorPoint(java.lang.String symbolID,
java.awt.geom.Rectangle2D bounds)
Gets the anchor point for single point Control Measure as the anchor point isn't always they center of the symbol.
|
static java.lang.String |
getDateLabel(java.util.Date time)
Converts a Java Date object into a properly formatted String for W or W1.
|
static java.awt.Color |
getDefaultLineColor(java.lang.String symbolID)
For Control Measures, returns the default color for a symbol when it differs from the
affiliation line color.
|
static java.lang.String |
getEchelonText(int echelon)
Reads the Symbol ID string and returns the text that represents the echelon
code.
|
static java.awt.Color |
getFillColorOfAffiliation(java.lang.String symbolID)
Returns the fill color for the symbol based on its affiliation
|
static java.awt.Color |
getLineColorOfAffiliation(java.lang.String symbolID)
Gets line color used if no line color has been set.
|
static java.lang.String |
getStandardIdentityModifier(java.lang.String symbolID)
Returns the Standard Identity Modifier based on the Symbol ID
|
static float |
getUnitRatioHeight(java.lang.String symbolID)
Returns the height ratio for the unit specified by the symbol ID
Based on Figure 4 in 2525E.
|
static float |
getUnitRatioWidth(java.lang.String symbolID)
Returns the width ratio for the unit specified by the symbol ID
Based on Figure 4 in 2525E.
|
static boolean |
hasDefaultFill(java.lang.String strSymbolID)
Checks if a symbol should be filled by default
|
static java.lang.Boolean |
hasFDI(java.lang.String symbolID)
Checks if the Symbol Code has FDI set.
|
static java.lang.Boolean |
hasModifier(java.lang.String symbolID,
java.lang.String modifier)
Determines if a symbol, based on it's symbol ID, can have the specified modifier/amplifier.
|
static boolean |
hasRectangleFrame(java.lang.String symbolID)
Returens true if the unit has a rectangle frame
|
static boolean |
isActionPoint(java.lang.String symbolID) |
static java.lang.Boolean |
isAir(java.lang.String symbolID)
Returns true if the symbol is from an air based symbol set
|
static boolean |
isCBRNEvent(java.lang.String symbolID)
Returns true if Symbol ID represents a chemical, biological, radiological or nuclear incident.
|
static java.lang.Boolean |
isExercise(java.lang.String symbolID)
Returns true if the symbol ID indicates the context is Exercise
|
static boolean |
isGreenProtectionGraphic(int entity,
int entityType,
int entitySubtype)
Returns true if graphic is protection graphic (obstacles which render green)
Assumes control measure symbol code where SS == 25
|
static boolean |
isGreenProtectionGraphic(java.lang.String symbolID)
Returns true if graphic is protection graphic (obstacles which render green)
|
static boolean |
isHQ(java.lang.String symbolID)
Returns true if the symbol has the HQ staff indicated by the symbol ID
|
static java.lang.Boolean |
isInstallation(java.lang.String symbolID)
Returns true if the symbol is an installation
|
static java.lang.Boolean |
isLand(java.lang.String symbolID)
Returns true if the symbol is from a land based symbol set
|
static boolean |
isMultiPoint(java.lang.String symbolID)
Determines if the Symbol can be rendered as a multipoint graphic and not just as an icon
|
static boolean |
isNumber(java.lang.String text)
Determines if a String represents a valid number
|
static boolean |
isObstacle(java.lang.String symbolID)
Deprecated.
|
static java.lang.Boolean |
isReality(java.lang.String symbolID)
Returns true if the symbol ID indicates the context is Reality
|
static java.lang.Boolean |
isSimulation(java.lang.String symbolID)
Returns true if the symbol ID indicates the context is Simulation
|
static boolean |
isSonobuoy(java.lang.String symbolID)
Returns true if Symbol ID represents a Sonobuoy.
|
static java.lang.Boolean |
isSpace(java.lang.String symbolID)
Returns true if the symbol is from a space based symbol set
|
static boolean |
isSPWithSpecialModifierLayout(java.lang.String symbolID)
Checks if this is a single point control measure or meteorological graphic with a unique layout.
|
static boolean |
isTacticalGraphic(java.lang.String strSymbolID)
Determines if the symbol is a tactical graphic
|
static java.lang.Boolean |
isTaskForce(java.lang.String symbolID)
Returns true if the symbol ID has the task for indicator
|
static boolean |
isTGSPWithSpecialModifierLayout(java.lang.String strSymbolID)
Deprecated.
|
static boolean |
isWeather(java.lang.String symbolID)
Return true if symbol is from the Atmospheric, Oceanographic or Meteorological Space Symbol Sets.
|
static java.lang.String |
reconcileSymbolID(java.lang.String symbolID)
Attempts to resolve a bad symbol ID into a value that can be found in
MSLookup. |
public static boolean isNumber(java.lang.String text)
text - Stringpublic static java.lang.String getDateLabel(java.util.Date time)
time - DateStringpublic static java.lang.Boolean hasModifier(java.lang.String symbolID,
java.lang.String modifier)
symbolID - 30 Character Stringmodifier - ModifiersBooleanpublic static java.lang.String getBasicSymbolID(java.lang.String id)
id - 30 Character StringString (Symbol Set + Entity Code)public static java.lang.String getBasicSymbolID2525C(java.lang.String strSymbolID)
strSymbolID - 15 Character StringStringpublic static java.lang.String reconcileSymbolID(java.lang.String symbolID)
MSLookup.
If it fails, it will return the symbol code for a invalid symbol which is displayed as
an inverted question mark (110098000010000000000000000000)symbolID - 30 character StringString representing the resolved symbol ID.public static java.awt.Color getLineColorOfAffiliation(java.lang.String symbolID)
symbolID - 30 character StringColorpublic static java.awt.Color getDefaultLineColor(java.lang.String symbolID)
getLineColorOfAffiliation(String)symbolID - 30 Character StringColorpublic static boolean hasDefaultFill(java.lang.String strSymbolID)
strSymbolID - The 20 digit representation of the 2525D symbolpublic static boolean isTacticalGraphic(java.lang.String strSymbolID)
strSymbolID - 30 Character Stringpublic static boolean isMultiPoint(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static boolean isActionPoint(java.lang.String symbolID)
public static boolean isTGSPWithSpecialModifierLayout(java.lang.String strSymbolID)
isSPWithSpecialModifierLayout(String)strSymbolID - 30 Character StringBooleanpublic static java.awt.Color getFillColorOfAffiliation(java.lang.String symbolID)
symbolID - 30 Character StringColorpublic static java.lang.Boolean canSymbolHaveModifier(java.lang.String symbolID,
java.lang.String modifier)
hasModifier(String, String)symbolID - 30 Character Stringmodifier - ModifiersBooleanpublic static java.lang.Boolean hasFDI(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static boolean isGreenProtectionGraphic(int entity,
int entityType,
int entitySubtype)
entity - IntegerentityType - IntegerentitySubtype - IntegerBooleanpublic static boolean isGreenProtectionGraphic(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static boolean isCBRNEvent(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static boolean isSonobuoy(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static boolean isObstacle(java.lang.String symbolID)
isGreenProtectionGraphic(String)symbolID - 30 Character StringBooleanpublic static boolean isWeather(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static boolean isHQ(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static boolean isSPWithSpecialModifierLayout(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.awt.Point getCMSymbolAnchorPoint(java.lang.String symbolID,
java.awt.geom.Rectangle2D bounds)
symbolID - 30 Character Stringbounds - Rectangle2D representing the bound of the core symbol in the image.Point representing the point in the image that is the anchor point of the symbol.public static java.lang.Boolean isInstallation(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.lang.Boolean isAir(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.lang.Boolean isSpace(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.lang.Boolean isLand(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.lang.Boolean isTaskForce(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.lang.Boolean isReality(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.lang.Boolean isExercise(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.lang.Boolean isSimulation(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static java.lang.String getEchelonText(int echelon)
echelon - Integer from positions 9-10 in the symbol ID
See SymbolID.getAmplifierDescriptor(String)String (23 (Army) would be "XXXX")public static java.lang.String getStandardIdentityModifier(java.lang.String symbolID)
symbolID - 30 Character StringStringpublic static boolean hasRectangleFrame(java.lang.String symbolID)
symbolID - 30 Character StringBooleanpublic static float getUnitRatioHeight(java.lang.String symbolID)
symbolID - 30 Character StringFloatpublic static float getUnitRatioWidth(java.lang.String symbolID)
symbolID - 30 Character StringFloat