Class MilStd2525ModifierRetriever
- java.lang.Object
-
- gov.nasa.worldwind.symbology.AbstractIconRetriever
-
- gov.nasa.worldwind.symbology.milstd2525.MilStd2525ModifierRetriever
-
- All Implemented Interfaces:
IconRetriever
public class MilStd2525ModifierRetriever extends AbstractIconRetriever
Icon retriever to retriever modifiers (for example, the Feint/Dummy indicator) for the symbols in the MIL-STD-2525C symbol set.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.awt.Color
DEFAULT_COLOR
protected static java.lang.String
PATH_PREFIX
protected static java.lang.String
PATH_SUFFIX
protected static int[]
variableWidths
-
Fields inherited from class gov.nasa.worldwind.symbology.AbstractIconRetriever
retrieverPath
-
-
Constructor Summary
Constructors Constructor Description MilStd2525ModifierRetriever(java.lang.String retrieverPath)
Create a new retriever that will retrieve icons from the specified location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Integer
chooseBestFittingWidth(AVList params)
protected java.lang.String
composePath(java.lang.String symbolModifierCode, AVList params)
java.awt.image.BufferedImage
createIcon(java.lang.String symbolId, AVList params)
Create an icon for a symbol modifier.protected java.awt.Color
getColorFromParams(AVList params)
Retrieves the value of the AVKey.COLOR parameter.protected boolean
isVariableWidth(AVList params)
protected boolean
mustApplyColor(java.lang.String symbolId)
Indicates whether or not color must be applied to the modifier.-
Methods inherited from class gov.nasa.worldwind.symbology.AbstractIconRetriever
drawImage, equals, getRetrieverPath, hashCode, multiply, readImage, replaceColor
-
-
-
-
Field Detail
-
DEFAULT_COLOR
protected static final java.awt.Color DEFAULT_COLOR
-
PATH_PREFIX
protected static final java.lang.String PATH_PREFIX
- See Also:
- Constant Field Values
-
PATH_SUFFIX
protected static final java.lang.String PATH_SUFFIX
- See Also:
- Constant Field Values
-
variableWidths
protected static final int[] variableWidths
-
-
Constructor Detail
-
MilStd2525ModifierRetriever
public MilStd2525ModifierRetriever(java.lang.String retrieverPath)
Create a new retriever that will retrieve icons from the specified location.- Parameters:
retrieverPath
- File path or URL to the symbol directory, for example "http://myserver.com/milstd2525/".
-
-
Method Detail
-
createIcon
public java.awt.image.BufferedImage createIcon(java.lang.String symbolId, AVList params)
Create an icon for a symbol modifier.- Parameters:
symbolId
- Identifier for the modifier. This identifier is fields 11 and 12 of a MIL-STD-2525C SIDC (see MIL-STD-2525C Table A-I, pg. 51).params
- Parameters that affect icon retrieval. This retriever accepts only one parameter: AVKey.COLOR, which determines the color of the modifier (default is black).- Returns:
- BufferedImage containing the requested modifier, or null if the modifier cannot be retrieved.
-
composePath
protected java.lang.String composePath(java.lang.String symbolModifierCode, AVList params)
-
isVariableWidth
protected boolean isVariableWidth(AVList params)
-
mustApplyColor
protected boolean mustApplyColor(java.lang.String symbolId)
Indicates whether or not color must be applied to the modifier. Color is applied to all modifiers except for alternate Operational Condition modifiers, which have their own color.- Parameters:
symbolId
- Modifier id.- Returns:
- True if color must be applied to the modifier.
-
chooseBestFittingWidth
protected java.lang.Integer chooseBestFittingWidth(AVList params)
-
getColorFromParams
protected java.awt.Color getColorFromParams(AVList params)
Retrieves the value of the AVKey.COLOR parameter.- Parameters:
params
- Parameter list.- Returns:
- The value of the AVKey.COLOR parameter, if such a parameter exists and is of type java.awt.Color. Returns null if the parameter list is null, if there is no value for key AVKey.COLOR, or if the value is not a Color.
-
-