Package armyc2.c5isr.renderer.utilities
Class MilStdSymbol
java.lang.Object
armyc2.c5isr.renderer.utilities.MilStdSymbol
Object that holds information on how to draw a multipoint symbol after
WebRenderer.RenderMultiPointAsMilStdSymbol(String, String, String, String, String, String, double, String, Map, Map) is called.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSymbol has arrow heads that are affected by scale changestatic final intSymbol has lines details that are affected by scale change (like FLOT)static final intSymbol is not affected by scale changesstatic final intSymbol has pattern fills that are affected by scale if you're not using the fill pattern image ShapeInfo.getShader() or ShapeInfo.getPatternFillImage()static final intText is not affected by scale changesstatic final intText is affected only by significant scale changesstatic final intText is affected by zoom in scale changesstatic final intText is affected by any scale changes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.booleanDeprecated.booleanbooleanintgetModifier(String modifier) getModifier(String modifier, int index) getModifier_AM_AN_X(String modifier, int index) getModifiers_AM_AN_X(String modifier) Shapes that represent the symbol modifiersintDeprecated.doubleThe Symbol Id of the MilStdSymbol.the java shapes that make up the symbolgetTag()Deprecated.intbooleanbooleanbooleangetUUID()Unique ID of the Symbol.booleanintChecks if the symbol has features that make it scale aware and would require a refresh on zooming in or out.intDetermines if the symbol has integral or modifier/amplifier text that would be impacted if the maps is zoomed in or out after initial draw.voidset_WasClipped(boolean value) Deprecated.voidsetAltitudeMode(String value) voidsetAltitudeUnit(DistanceUnit unit) voidsetCoordinates(ArrayList<Point2D> value) voidsetDistanceUnit(DistanceUnit unit) voidsetDrawAffiliationModifierAsLabel(boolean value) Deprecated.voidsetFillColor(Color value) voidsetFillStyle(TexturePaint value) voidsetHideOptionalLabels(boolean value) voidsetKeepUnitRatio(boolean value) voidsetLineColor(Color value) If value is null or SymbolUtilities.isGreenProtectionGraphic() is true then value is ignoredvoidsetLineWidth(int value) voidsetModifier(String modifier, String value) voidsetModifier(String modifier, String value, int index) Modifiers must be added in order.voidsetModifier_AM_AN_X(String modifier, Double value, int index) voidsetModifierMap(Map<String, String> modifiers) voidsetModifiers_AM_AN_X(String modifier, ArrayList<Double> modifiers) voidsetModifierShapes(ArrayList<ShapeInfo> value) Shapes that represent the symbol modifiersvoidsetOutlineColor(Color value) if null, renderer will use white or black for the outline based on the color of the symbol.voidsetPatternFillType(int value) Deprecated.voidsetPatternScale(double scale) Multipoint features and patterns scale with line width (getLineWidth()).voidsetSymbolID(String value) Sets the Symbol ID for the symbol.voidsetSymbolShapes(ArrayList<ShapeInfo> value) the java shapes that make up the symbolvoidDeprecated.voidsetTextBackgroundColor(Color value) voidsetTextColor(Color value) voidsetUnitSize(int pixelSize) voidsetUseDashArray(boolean value) voidsetUseFillPattern(boolean value) voidsetUseLineInterpolation(boolean value) voidUnique ID of the Symbol.voidsetWasClipped(boolean value)
-
Field Details
-
TextScaleSensitive_No
Text is not affected by scale changes- See Also:
-
TextScaleSensitive_OnSlightZoomIn
Text is affected only by significant scale changes- See Also:
-
TextScaleSensitive_OnZoomIn
Text is affected by zoom in scale changes- See Also:
-
TextScaleSensitive_OnZoomInOut
Text is affected by any scale changes- See Also:
-
SymbolScaleSensitive_No
Symbol is not affected by scale changes- See Also:
-
SymbolScaleSensitive_ArrowHeads
Symbol has arrow heads that are affected by scale change- See Also:
-
SymbolScaleSensitive_DecoratedLines
Symbol has lines details that are affected by scale change (like FLOT)- See Also:
-
SymbolScaleSensitive_PatternFills
Symbol has pattern fills that are affected by scale if you're not using the fill pattern image ShapeInfo.getShader() or ShapeInfo.getPatternFillImage()- See Also:
-
-
Constructor Details
-
MilStdSymbol
public MilStdSymbol(String symbolID, String uniqueID, ArrayList<Point2D> Coordinates, Map<String, String> modifiers) Creates a new MilStdSymbol.- Parameters:
symbolID- code, 20-30 digits long that represents the symboluniqueID- for the client's useCoordinates- modifiersmodifiers- use keys from Modifiers.
-
MilStdSymbol
public MilStdSymbol(String symbolID, String uniqueID, ArrayList<Point2D> Coordinates, Map<String, String> modifiers, Boolean keepUnitRatio) - Parameters:
symbolID- code, 20-30 digits long that represents the symboluniqueID- for the client's useCoordinates-modifiers- use keys from Modifiers.keepUnitRatio- - default TRUE modifiers
-
-
Method Details
-
getFillStyle
-
setFillStyle
-
getUseFillPattern
-
setUseFillPattern
-
getPatternFillType
Deprecated. -
setPatternFillType
Deprecated.0=Solid, 2=ForwardHatch, 3=BackwardHatch, 4=verticalHatch, 5=horizonalHatch, 8=CrossHatch Only affects Basic Shapes. Will not apply to MilStd Symbology so as to not confuse some symbols with others.- Parameters:
value-
-
getAltitudeMode
-
setAltitudeMode
-
getAltitudeUnit
-
setAltitudeUnit
-
getDistanceUnit
-
setDistanceUnit
-
getUseDashArray
-
setUseDashArray
-
getHideOptionalLabels
-
setHideOptionalLabels
-
setUseLineInterpolation
-
getUseLineInterpolation
-
setUnitSize
-
getUnitSize
-
setKeepUnitRatio
-
getKeepUnitRatio
-
setDrawAffiliationModifierAsLabel
Deprecated.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
Deprecated.True to draw as modifier label in the "E/F" location. False to draw at the top right corner of the symbol -
getModifierMap
- Returns:
-
setModifierMap
- Parameters:
modifiers-
-
getModifier
- Parameters:
modifier-- Returns:
-
setModifier
- Parameters:
modifier-value-
-
getModifier
- Parameters:
modifier-index-- Returns:
-
getModifier_AM_AN_X
- Parameters:
modifier-index-- Returns:
-
setModifier
Modifiers must be added in order. No setting index 2 without first setting index 0 and 1. If setting out of order is attempted, the value will just be added to the end of the list.- Parameters:
modifier-value-index-
-
setModifier_AM_AN_X
-
getModifiers_AM_AN_X
-
setModifiers_AM_AN_X
-
setFillColor
- Parameters:
value-
-
getFillColor
- Returns:
-
setTextColor
- Parameters:
value-
-
getTextColor
- Returns:
-
setTextBackgroundColor
- Parameters:
value-
-
getTextBackgroundColor
- Returns:
-
setLineWidth
- Parameters:
value-
-
getLineWidth
- Returns:
-
setLineColor
If value is null or SymbolUtilities.isGreenProtectionGraphic() is true then value is ignored- Parameters:
value-
-
getLineColor
- Returns:
-
setOutlineColor
if null, renderer will use white or black for the outline based on the color of the symbol. Otherwise, it will used the passed color value.- Parameters:
value-
-
getOutlineColor
-
setTag
Deprecated.Extra value for client. defaults to null. Not used for rendering by JavaRenderer- Parameters:
value-
-
getTag
Deprecated.Extra value for client. defaults to null. Not used for rendering by JavaRenderer- Returns:
-
setCoordinates
- Parameters:
value-
-
getCoordinates
- Returns:
-
setModifierShapes
Shapes that represent the symbol modifiers- Parameters:
value- ArrayList<Shape>
-
getModifierShapes
Shapes that represent the symbol modifiers- Returns:
-
setSymbolShapes
the java shapes that make up the symbol- Parameters:
value- ArrayList<ShapeInfo>
-
getSymbolShapes
the java shapes that make up the symbol- Returns:
-
getSymbolID
The Symbol Id of the MilStdSymbol.- Returns:
-
getUUID
Unique ID of the Symbol. For client use.- Returns:
-
setUUID
Unique ID of the Symbol. For client use.- Parameters:
ID-
-
setSymbolID
Sets the Symbol ID for the symbol. Should be a 20-30 digit string from the milstd.- Parameters:
value-
-
set_WasClipped
Deprecated.- Parameters:
value-
-
get_WasClipped
Deprecated.seegetWasClipped()- Returns:
- boolean
-
setWasClipped
-
getWasClipped
-
isTextScaleSensitive
Determines if the symbol has integral or modifier/amplifier text that would be impacted if the maps is zoomed in or out after initial draw.- Returns:
- 0=not sensitive, 1=slightly little zoom in sensitive, 2=zoom in sensitive, 3=zoom in/out sensitive
-
isSymbolScaleSensitive
Checks if the symbol has features that make it scale aware and would require a refresh on zooming in or out.- Returns:
- 0=No,1=arrowheads,2=decoratedLines,3=patternFills
-
setPatternScale
Multipoint features and patterns scale with line width (getLineWidth()).patternScaleis the ratio of how much to increase features and patterns by with line width. default value is 1.0. Can be set withRendererSettings.setPatternScale(double)andMilStdAttributes.PatternScale- Parameters:
scale-
-
getPatternScale
-
getWasClipped()