gov.nasa.worldwind.symbology.milstd2525
Class MilStd2525IconRetriever
java.lang.Object
gov.nasa.worldwind.symbology.AbstractIconRetriever
gov.nasa.worldwind.symbology.milstd2525.MilStd2525IconRetriever
- All Implemented Interfaces:
- IconRetriever
public class MilStd2525IconRetriever
- extends AbstractIconRetriever
Retriever to retrieve icons for symbols in the MIL-STD-2525 symbol set. The retriever can retrieve icons from either
a local or remote symbol store. See the Symbology
Usage Guide for details on how to configure a local symbol repository. For more information on how to use this
class see the IconRetriever Usage Guide and the IconRetrieverUsage
example.
Table IX (pg. 35) of MIL-STD-2525C defines a hierarchy for simplifying tactical symbols. This hierarchy is
implemented using retrieval parameters SHOW_FILL, SHOW_FRAME, and SHOW_ICON. By default, all three elements are
displayed, and they can be turned off by setting the appropriate parameter. If frame and icon are turned off the
retriever will return an image that contains a circle, either black or filled with the icon fill color (depending on
the state of SHOW_FILL).
createIcon accepts the following parameters:
| Key | Type | Description |
| SymbologyConstants.SHOW_ICON | Boolean | Determines
if the symbol will be created with an icon. |
| SymbologyConstants.SHOW_FRAME | Boolean | Determines
if the symbol will be created with a frame. |
| SymbologyConstants.SHOW_FILL | Boolean | Determines
if the symbol will be created with a fill color. |
| AVKey.COLOR | java.awt.Color | Fill color applied to the symbol. If the symbol is drawn with a
frame, then this color will be used to fill the frame. If the symbol is not drawn with a frame, then the fill will be
applied to the icon itself. The fill color has no effect if Show Fill is False. |
|
Method Summary |
protected String |
composeFillPath(SymbolCode symbolCode)
|
protected String |
composeFramePath(SymbolCode symbolCode)
|
protected String |
composeIconPath(SymbolCode symbolCode,
AVList params)
|
BufferedImage |
createIcon(String sidc,
AVList params)
Create an icon for a MIL-STD-2525C symbol. |
protected BufferedImage |
drawCircle(SymbolCode symbolCode,
AVList params,
BufferedImage dest)
|
protected BufferedImage |
drawFill(SymbolCode symbolCode,
AVList params,
BufferedImage dest)
|
protected BufferedImage |
drawFrame(SymbolCode symbolCode,
AVList params,
BufferedImage dest)
|
protected BufferedImage |
drawIcon(SymbolCode symbolCode,
AVList params,
BufferedImage dest)
|
protected BufferedImage |
drawIconComponent(String path,
Color color,
BufferedImage dest)
|
protected Color |
getColorFromParams(AVList params)
Retrieves the value of the AVKey.COLOR parameter. |
protected Color |
getFillColor(SymbolCode symbolCode,
AVList params)
|
protected Color |
getFrameColor(SymbolCode symbolCode,
AVList params)
|
protected String |
getGroundFunctionId(SymbolCode symbolCode)
|
protected Color |
getIconColor(SymbolCode symbolCode,
AVList params)
|
protected String |
getMaskedFillCode(SymbolCode symbolCode)
|
protected String |
getMaskedFrameCode(SymbolCode symbolCode)
|
protected String |
getMaskedIconCode(SymbolCode symbolCode,
AVList params)
|
protected String |
getMaskedUnknownIconCode(SymbolCode symbolCode,
AVList params)
|
protected String |
getSimpleStandardIdentity(SymbolCode symbolCode)
|
protected String |
getSimpleStatus(SymbolCode symbolCode)
|
protected boolean |
isDashedFrame(SymbolCode symbolCode)
|
protected boolean |
mustDrawFill(SymbolCode symbolCode,
AVList params)
|
protected boolean |
mustDrawFrame(SymbolCode symbolCode,
AVList params)
|
protected boolean |
mustDrawIcon(SymbolCode symbolCode,
AVList params)
|
protected SymbolCode |
transformToWarfightingScheme(SymbolCode symbolCode)
|
CIRCLE_LINE_WIDTH
protected static final int CIRCLE_LINE_WIDTH
- Line width used to stroke circle when fill is turned off.
- See Also:
- Constant Field Values
CIRCLE_RADIUS
protected static final int CIRCLE_RADIUS
- Radius (in pixels) of circle that is drawn to the represent the symbol when both frame and icon are off.
- See Also:
- Constant Field Values
DEFAULT_FRAME_COLOR
protected static final Color DEFAULT_FRAME_COLOR
DEFAULT_ICON_COLOR
protected static final Color DEFAULT_ICON_COLOR
DEFAULT_IMAGE_FORMAT
protected static final String DEFAULT_IMAGE_FORMAT
- See Also:
- Constant Field Values
emsEquipment
protected static final Set<String> emsEquipment
FILL_COLOR_LIGHT_BLUE
protected static final Color FILL_COLOR_LIGHT_BLUE
FILL_COLOR_LIGHT_GREEN
protected static final Color FILL_COLOR_LIGHT_GREEN
FILL_COLOR_LIGHT_PURPLE
protected static final Color FILL_COLOR_LIGHT_PURPLE
FILL_COLOR_LIGHT_RED
protected static final Color FILL_COLOR_LIGHT_RED
FILL_COLOR_LIGHT_YELLOW
protected static final Color FILL_COLOR_LIGHT_YELLOW
fillColorMap
protected static final Map<String,Color> fillColorMap
FILLS_PATH
protected static final String FILLS_PATH
- See Also:
- Constant Field Values
FRAME_COLOR_BLUE
protected static final Color FRAME_COLOR_BLUE
FRAME_COLOR_GREEN
protected static final Color FRAME_COLOR_GREEN
FRAME_COLOR_PURPLE
protected static final Color FRAME_COLOR_PURPLE
FRAME_COLOR_RED
protected static final Color FRAME_COLOR_RED
FRAME_COLOR_YELLOW
protected static final Color FRAME_COLOR_YELLOW
frameColorMap
protected static final Map<String,Color> frameColorMap
FRAMES_PATH
protected static final String FRAMES_PATH
- See Also:
- Constant Field Values
ICON_COLOR_DARK_GREEN
protected static final Color ICON_COLOR_DARK_GREEN
ICON_COLOR_GREEN
protected static final Color ICON_COLOR_GREEN
ICON_COLOR_ORANGE
protected static final Color ICON_COLOR_ORANGE
ICON_COLOR_RED
protected static final Color ICON_COLOR_RED
ICON_COLOR_YELLOW
protected static final Color ICON_COLOR_YELLOW
iconColorMap
protected static final Map<String,Color> iconColorMap
ICONS_PATH
protected static final String ICONS_PATH
- See Also:
- Constant Field Values
schemePathMap
protected static final Map<String,String> schemePathMap
TACTICAL_SYMBOLS_PATH
protected static final String TACTICAL_SYMBOLS_PATH
- See Also:
- Constant Field Values
unfilledIconMap
protected static final Set<String> unfilledIconMap
unframedIconMap
protected static final Set<String> unframedIconMap
UNKNOWN_PATH
protected static final String UNKNOWN_PATH
- See Also:
- Constant Field Values
MilStd2525IconRetriever
public MilStd2525IconRetriever(String retrieverPath)
- Create a new retriever that will retrieve icons from the specified location. The retrieval path may be a file URL
to a directory on the local file system (for example, file:///symbols/mil-std-2525). A URL to a network resource
(http://myserver.com/milstd2525/), or a URL to a JAR or ZIP file (jar:file:milstd2525-symbols.zip!).
- Parameters:
retrieverPath - File path or URL to the symbol directory, for example "http://myserver.com/milstd2525/".
composeFillPath
protected String composeFillPath(SymbolCode symbolCode)
composeFramePath
protected String composeFramePath(SymbolCode symbolCode)
composeIconPath
protected String composeIconPath(SymbolCode symbolCode,
AVList params)
createIcon
public BufferedImage createIcon(String sidc,
AVList params)
- Create an icon for a MIL-STD-2525C symbol. By default the symbol will include a filled frame and an icon. The
fill, frame, and icon can be turned off by setting retrieval parameters. If both frame and icon are turned off
then this method will return an image containing a circle.
- Parameters:
sidc - SIDC identifier for the symbol.params - Parameters that affect icon retrieval. See Parameters in class
documentation.
- Returns:
- An BufferedImage containing the icon for the requested symbol, or null if the icon cannot be retrieved.
drawCircle
protected BufferedImage drawCircle(SymbolCode symbolCode,
AVList params,
BufferedImage dest)
drawFill
protected BufferedImage drawFill(SymbolCode symbolCode,
AVList params,
BufferedImage dest)
drawFrame
protected BufferedImage drawFrame(SymbolCode symbolCode,
AVList params,
BufferedImage dest)
drawIcon
protected BufferedImage drawIcon(SymbolCode symbolCode,
AVList params,
BufferedImage dest)
drawIconComponent
protected BufferedImage drawIconComponent(String path,
Color color,
BufferedImage dest)
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.
getFillColor
protected Color getFillColor(SymbolCode symbolCode,
AVList params)
getFrameColor
protected Color getFrameColor(SymbolCode symbolCode,
AVList params)
getGroundFunctionId
protected String getGroundFunctionId(SymbolCode symbolCode)
getIconColor
protected Color getIconColor(SymbolCode symbolCode,
AVList params)
getMaskedFillCode
protected String getMaskedFillCode(SymbolCode symbolCode)
getMaskedFrameCode
protected String getMaskedFrameCode(SymbolCode symbolCode)
getMaskedIconCode
protected String getMaskedIconCode(SymbolCode symbolCode,
AVList params)
getMaskedUnknownIconCode
protected String getMaskedUnknownIconCode(SymbolCode symbolCode,
AVList params)
getSimpleStandardIdentity
protected String getSimpleStandardIdentity(SymbolCode symbolCode)
getSimpleStatus
protected String getSimpleStatus(SymbolCode symbolCode)
isDashedFrame
protected boolean isDashedFrame(SymbolCode symbolCode)
mustDrawFill
protected boolean mustDrawFill(SymbolCode symbolCode,
AVList params)
mustDrawFrame
protected boolean mustDrawFrame(SymbolCode symbolCode,
AVList params)
mustDrawIcon
protected boolean mustDrawIcon(SymbolCode symbolCode,
AVList params)
transformToWarfightingScheme
protected SymbolCode transformToWarfightingScheme(SymbolCode symbolCode)