NASA World Wind

gov.nasa.worldwind.symbology.milstd2525
Class MilStd2525ModifierRetriever

java.lang.Object
  extended by gov.nasa.worldwind.symbology.AbstractIconRetriever
      extended by 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
protected static Color DEFAULT_COLOR
           
protected static String PATH_PREFIX
           
protected static String PATH_SUFFIX
           
protected static int[] variableWidths
           
 
Fields inherited from class gov.nasa.worldwind.symbology.AbstractIconRetriever
retrieverPath
 
Constructor Summary
MilStd2525ModifierRetriever(String retrieverPath)
          Create a new retriever that will retrieve icons from the specified location.
 
Method Summary
protected  Integer chooseBestFittingWidth(AVList params)
           
protected  String composePath(String symbolModifierCode, AVList params)
           
 BufferedImage createIcon(String symbolId, AVList params)
          Create an icon for a symbol modifier.
protected  Color getColorFromParams(AVList params)
          Retrieves the value of the AVKey.COLOR parameter.
protected  boolean isVariableWidth(AVList params)
           
protected  boolean mustApplyColor(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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COLOR

protected static final Color DEFAULT_COLOR

PATH_PREFIX

protected static final String PATH_PREFIX
See Also:
Constant Field Values

PATH_SUFFIX

protected static final String PATH_SUFFIX
See Also:
Constant Field Values

variableWidths

protected static final int[] variableWidths
Constructor Detail

MilStd2525ModifierRetriever

public MilStd2525ModifierRetriever(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

chooseBestFittingWidth

protected Integer chooseBestFittingWidth(AVList params)

composePath

protected String composePath(String symbolModifierCode,
                             AVList params)

createIcon

public BufferedImage createIcon(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.

getColorFromParams

protected 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.

isVariableWidth

protected boolean isVariableWidth(AVList params)

mustApplyColor

protected boolean mustApplyColor(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.

NASA World Wind