public class MilStd2525IconRetriever extends AbstractIconRetriever
IconRetrieverUsage
example.
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. |
Modifier and Type | Field and Description |
---|---|
protected static int |
CIRCLE_LINE_WIDTH
Line width used to stroke circle when fill is turned off.
|
protected static int |
CIRCLE_RADIUS
Radius (in pixels) of circle that is drawn to the represent the symbol when both frame and icon are off.
|
protected static java.awt.Color |
DEFAULT_FRAME_COLOR |
protected static java.awt.Color |
DEFAULT_ICON_COLOR |
protected static java.lang.String |
DEFAULT_IMAGE_FORMAT |
protected static java.util.Set<java.lang.String> |
emsEquipment |
protected static java.awt.Color |
FILL_COLOR_LIGHT_BLUE |
protected static java.awt.Color |
FILL_COLOR_LIGHT_GREEN |
protected static java.awt.Color |
FILL_COLOR_LIGHT_PURPLE |
protected static java.awt.Color |
FILL_COLOR_LIGHT_RED |
protected static java.awt.Color |
FILL_COLOR_LIGHT_YELLOW |
protected static java.util.Map<java.lang.String,java.awt.Color> |
fillColorMap |
protected static java.lang.String |
FILLS_PATH |
protected static java.awt.Color |
FRAME_COLOR_BLUE |
protected static java.awt.Color |
FRAME_COLOR_GREEN |
protected static java.awt.Color |
FRAME_COLOR_PURPLE |
protected static java.awt.Color |
FRAME_COLOR_RED |
protected static java.awt.Color |
FRAME_COLOR_YELLOW |
protected static java.util.Map<java.lang.String,java.awt.Color> |
frameColorMap |
protected static java.lang.String |
FRAMES_PATH |
protected static java.awt.Color |
ICON_COLOR_DARK_GREEN |
protected static java.awt.Color |
ICON_COLOR_GREEN |
protected static java.awt.Color |
ICON_COLOR_ORANGE |
protected static java.awt.Color |
ICON_COLOR_RED |
protected static java.awt.Color |
ICON_COLOR_YELLOW |
protected static java.util.Map<java.lang.String,java.awt.Color> |
iconColorMap |
protected static java.lang.String |
ICONS_PATH |
protected static java.util.Map<java.lang.String,java.lang.String> |
schemePathMap |
protected static java.lang.String |
TACTICAL_SYMBOLS_PATH |
protected static java.util.Set<java.lang.String> |
unfilledIconMap |
protected static java.util.Set<java.lang.String> |
unframedIconMap |
protected static java.lang.String |
UNKNOWN_PATH |
retrieverPath
Constructor and Description |
---|
MilStd2525IconRetriever(java.lang.String retrieverPath)
Create a new retriever that will retrieve icons from the specified location.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
composeFillPath(SymbolCode symbolCode) |
protected java.lang.String |
composeFramePath(SymbolCode symbolCode) |
protected java.lang.String |
composeIconPath(SymbolCode symbolCode,
AVList params) |
java.awt.image.BufferedImage |
createIcon(java.lang.String sidc,
AVList params)
Create an icon for a MIL-STD-2525C symbol.
|
protected java.awt.image.BufferedImage |
drawCircle(SymbolCode symbolCode,
AVList params,
java.awt.image.BufferedImage dest) |
protected java.awt.image.BufferedImage |
drawFill(SymbolCode symbolCode,
AVList params,
java.awt.image.BufferedImage dest) |
protected java.awt.image.BufferedImage |
drawFrame(SymbolCode symbolCode,
AVList params,
java.awt.image.BufferedImage dest) |
protected java.awt.image.BufferedImage |
drawIcon(SymbolCode symbolCode,
AVList params,
java.awt.image.BufferedImage dest) |
protected java.awt.image.BufferedImage |
drawIconComponent(java.lang.String path,
java.awt.Color color,
java.awt.image.BufferedImage dest) |
protected java.awt.Color |
getColorFromParams(AVList params)
Retrieves the value of the AVKey.COLOR parameter.
|
protected java.awt.Color |
getFillColor(SymbolCode symbolCode,
AVList params) |
protected java.awt.Color |
getFrameColor(SymbolCode symbolCode,
AVList params) |
protected java.lang.String |
getGroundFunctionId(SymbolCode symbolCode) |
protected java.awt.Color |
getIconColor(SymbolCode symbolCode,
AVList params) |
protected java.lang.String |
getMaskedFillCode(SymbolCode symbolCode) |
protected java.lang.String |
getMaskedFrameCode(SymbolCode symbolCode) |
protected java.lang.String |
getMaskedIconCode(SymbolCode symbolCode,
AVList params) |
protected java.lang.String |
getMaskedUnknownIconCode(SymbolCode symbolCode,
AVList params) |
protected java.lang.String |
getSimpleStandardIdentity(SymbolCode symbolCode) |
protected java.lang.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) |
drawImage, equals, getRetrieverPath, hashCode, multiply, readImage, replaceColor
protected static final int CIRCLE_LINE_WIDTH
protected static final int CIRCLE_RADIUS
protected static final java.awt.Color DEFAULT_FRAME_COLOR
protected static final java.awt.Color DEFAULT_ICON_COLOR
protected static final java.lang.String DEFAULT_IMAGE_FORMAT
protected static final java.util.Set<java.lang.String> emsEquipment
protected static final java.awt.Color FILL_COLOR_LIGHT_BLUE
protected static final java.awt.Color FILL_COLOR_LIGHT_GREEN
protected static final java.awt.Color FILL_COLOR_LIGHT_PURPLE
protected static final java.awt.Color FILL_COLOR_LIGHT_RED
protected static final java.awt.Color FILL_COLOR_LIGHT_YELLOW
protected static final java.util.Map<java.lang.String,java.awt.Color> fillColorMap
protected static final java.lang.String FILLS_PATH
protected static final java.awt.Color FRAME_COLOR_BLUE
protected static final java.awt.Color FRAME_COLOR_GREEN
protected static final java.awt.Color FRAME_COLOR_PURPLE
protected static final java.awt.Color FRAME_COLOR_RED
protected static final java.awt.Color FRAME_COLOR_YELLOW
protected static final java.util.Map<java.lang.String,java.awt.Color> frameColorMap
protected static final java.lang.String FRAMES_PATH
protected static final java.awt.Color ICON_COLOR_DARK_GREEN
protected static final java.awt.Color ICON_COLOR_GREEN
protected static final java.awt.Color ICON_COLOR_ORANGE
protected static final java.awt.Color ICON_COLOR_RED
protected static final java.awt.Color ICON_COLOR_YELLOW
protected static final java.util.Map<java.lang.String,java.awt.Color> iconColorMap
protected static final java.lang.String ICONS_PATH
protected static final java.util.Map<java.lang.String,java.lang.String> schemePathMap
protected static final java.lang.String TACTICAL_SYMBOLS_PATH
protected static final java.util.Set<java.lang.String> unfilledIconMap
protected static final java.util.Set<java.lang.String> unframedIconMap
protected static final java.lang.String UNKNOWN_PATH
public MilStd2525IconRetriever(java.lang.String retrieverPath)
retrieverPath
- File path or URL to the symbol directory, for example "http://myserver.com/milstd2525/".protected java.lang.String composeFillPath(SymbolCode symbolCode)
protected java.lang.String composeFramePath(SymbolCode symbolCode)
protected java.lang.String composeIconPath(SymbolCode symbolCode, AVList params)
public java.awt.image.BufferedImage createIcon(java.lang.String sidc, AVList params)
sidc
- SIDC identifier for the symbol.params
- Parameters that affect icon retrieval. See Parameters in class
documentation.protected java.awt.image.BufferedImage drawCircle(SymbolCode symbolCode, AVList params, java.awt.image.BufferedImage dest)
protected java.awt.image.BufferedImage drawFill(SymbolCode symbolCode, AVList params, java.awt.image.BufferedImage dest)
protected java.awt.image.BufferedImage drawFrame(SymbolCode symbolCode, AVList params, java.awt.image.BufferedImage dest)
protected java.awt.image.BufferedImage drawIcon(SymbolCode symbolCode, AVList params, java.awt.image.BufferedImage dest)
protected java.awt.image.BufferedImage drawIconComponent(java.lang.String path, java.awt.Color color, java.awt.image.BufferedImage dest)
protected java.awt.Color getColorFromParams(AVList params)
params
- Parameter list.protected java.awt.Color getFillColor(SymbolCode symbolCode, AVList params)
protected java.awt.Color getFrameColor(SymbolCode symbolCode, AVList params)
protected java.lang.String getGroundFunctionId(SymbolCode symbolCode)
protected java.awt.Color getIconColor(SymbolCode symbolCode, AVList params)
protected java.lang.String getMaskedFillCode(SymbolCode symbolCode)
protected java.lang.String getMaskedFrameCode(SymbolCode symbolCode)
protected java.lang.String getMaskedIconCode(SymbolCode symbolCode, AVList params)
protected java.lang.String getMaskedUnknownIconCode(SymbolCode symbolCode, AVList params)
protected java.lang.String getSimpleStandardIdentity(SymbolCode symbolCode)
protected java.lang.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)