public class MilStd2525PointGraphicRetriever extends AbstractIconRetriever
TacticalGraphic
system (for example, to populate a UI independent of the globe).Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DIR_FILL_TACGRP
Subdirectory for fill graphics.
|
protected static java.lang.String |
DIR_ICON_EMS
Subdirectory for graphics in the Emergency Management scheme.
|
protected static java.lang.String |
DIR_ICON_METOC
Subdirectory for graphics in the Meteorological and Oceanographic scheme.
|
protected static java.lang.String |
DIR_ICON_TACGRP
Subdirectory for graphics in the Tactical Graphics scheme.
|
protected static java.lang.String |
PATH_SUFFIX
Suffix added to file names to indicate the file type.
|
retrieverPath
Constructor and Description |
---|
MilStd2525PointGraphicRetriever(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 |
composeFilename(SymbolCode code)
Indicates the filename of the icon for a graphic.
|
protected java.lang.String |
composeFilenameEms(SymbolCode code)
Indicates the filename of a graphic in the Emergency Management scheme (MIL-STD-2525C Appendix G).
|
protected java.lang.String |
composeFilenameMetoc(SymbolCode code)
Indicates the filename of a graphic in the Meteorological and Oceanographic scheme (MIL-STD-2525C Appendix C).
|
protected java.lang.String |
composeFilenameTacticalGraphic(SymbolCode code,
java.lang.String dir)
Indicates the filename of a graphic in the Tactical Graphics scheme (MIL-STD-2525C Appendix B).
|
protected java.awt.image.BufferedImage |
composeFilledImage(java.awt.image.BufferedImage srcImg,
SymbolCode symbolCode)
Create an image by drawing over a fill image.
|
protected java.lang.String |
composeFillPath(SymbolCode code)
Compose a file path to the fill icon for a graphic.
|
java.awt.image.BufferedImage |
createIcon(java.lang.String sidc,
AVList params)
Create an icon for a MIL-STD-2525C point graphic.
|
protected java.awt.Color |
getColorForStandardIdentity(SymbolCode code)
Indicates the color to apply to a graphic based on the graphic's standard identity.
|
protected java.awt.Color |
getColorFromParams(AVList params)
Retrieves the value of the AVKey.COLOR parameter.
|
protected boolean |
mustDrawFill(SymbolCode code)
Indicates whether or not a fill must be drawn for a graphic.
|
drawImage, equals, getRetrieverPath, hashCode, multiply, readImage, replaceColor
protected static final java.lang.String DIR_FILL_TACGRP
protected static final java.lang.String DIR_ICON_EMS
protected static final java.lang.String DIR_ICON_METOC
protected static final java.lang.String DIR_ICON_TACGRP
protected static final java.lang.String PATH_SUFFIX
public MilStd2525PointGraphicRetriever(java.lang.String retrieverPath)
retrieverPath
- File path or URL to the symbol directory, for example "http://myserver.com/milstd2525/".protected java.lang.String composeFilename(SymbolCode code)
code
- Code that identifies a graphic in MIL-STD-2525C.protected java.lang.String composeFilenameEms(SymbolCode code)
code
- Code that identifies a graphic in the EMS scheme.protected java.lang.String composeFilenameMetoc(SymbolCode code)
code
- Code that identifies a graphic in the Metoc scheme.protected java.lang.String composeFilenameTacticalGraphic(SymbolCode code, java.lang.String dir)
code
- Code that identifies a graphic in the Tactical Graphics scheme.dir
- Directory to prepend to file name.protected java.awt.image.BufferedImage composeFilledImage(java.awt.image.BufferedImage srcImg, SymbolCode symbolCode)
srcImg
- Image to draw over fill.symbolCode
- Symbol code that identifies the graphic.srcImg
drawn over the appropriate fill.protected java.lang.String composeFillPath(SymbolCode code)
code
- Code the identifies the graphic.public java.awt.image.BufferedImage createIcon(java.lang.String sidc, AVList params)
sidc
- SIDC identifier for the symbol.params
- Parameters that affect icon retrieval. This retriever accepts only one parameter: AVKey.COLOR,
which determines the color of the image. By default the color will be determined from the standard
identity.protected java.awt.Color getColorForStandardIdentity(SymbolCode code)
code
- Symbol code that identifies the graphic.protected java.awt.Color getColorFromParams(AVList params)
params
- Parameter list.protected boolean mustDrawFill(SymbolCode code)
code
- Symbol code of a point graphic.