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 String |
DIR_FILL_TACGRP
Subdirectory for fill graphics.
|
protected static String |
DIR_ICON_EMS
Subdirectory for graphics in the Emergency Management scheme.
|
protected static String |
DIR_ICON_METOC
Subdirectory for graphics in the Meteorological and Oceanographic scheme.
|
protected static String |
DIR_ICON_TACGRP
Subdirectory for graphics in the Tactical Graphics scheme.
|
protected static String |
PATH_SUFFIX
Suffix added to file names to indicate the file type.
|
retrieverPath
Constructor and Description |
---|
MilStd2525PointGraphicRetriever(String retrieverPath)
Create a new retriever that will retrieve icons from the specified location.
|
Modifier and Type | Method and Description |
---|---|
protected String |
composeFilename(SymbolCode code)
Indicates the filename of the icon for a graphic.
|
protected String |
composeFilenameEms(SymbolCode code)
Indicates the filename of a graphic in the Emergency Management scheme (MIL-STD-2525C Appendix G).
|
protected String |
composeFilenameMetoc(SymbolCode code)
Indicates the filename of a graphic in the Meteorological and Oceanographic scheme (MIL-STD-2525C Appendix C).
|
protected String |
composeFilenameTacticalGraphic(SymbolCode code,
String dir)
Indicates the filename of a graphic in the Tactical Graphics scheme (MIL-STD-2525C Appendix B).
|
protected BufferedImage |
composeFilledImage(BufferedImage srcImg,
SymbolCode symbolCode)
Create an image by drawing over a fill image.
|
protected String |
composeFillPath(SymbolCode code)
Compose a file path to the fill icon for a graphic.
|
BufferedImage |
createIcon(String sidc,
AVList params)
Create an icon for a MIL-STD-2525C point graphic.
|
protected Color |
getColorForStandardIdentity(SymbolCode code)
Indicates the color to apply to a graphic based on the graphic's standard identity.
|
protected 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 String DIR_FILL_TACGRP
protected static final String DIR_ICON_EMS
protected static final String DIR_ICON_METOC
protected static final String DIR_ICON_TACGRP
protected static final String PATH_SUFFIX
public MilStd2525PointGraphicRetriever(String retrieverPath)
retrieverPath
- File path or URL to the symbol directory, for example "http://myserver.com/milstd2525/".protected String composeFilename(SymbolCode code)
code
- Code that identifies a graphic in MIL-STD-2525C.protected String composeFilenameEms(SymbolCode code)
code
- Code that identifies a graphic in the EMS scheme.protected String composeFilenameMetoc(SymbolCode code)
code
- Code that identifies a graphic in the Metoc scheme.protected String composeFilenameTacticalGraphic(SymbolCode code, String dir)
code
- Code that identifies a graphic in the Tactical Graphics scheme.dir
- Directory to prepend to file name.protected BufferedImage composeFilledImage(BufferedImage srcImg, SymbolCode symbolCode)
srcImg
- Image to draw over fill.symbolCode
- Symbol code that identifies the graphic.srcImg
drawn over the appropriate fill.protected String composeFillPath(SymbolCode code)
code
- Code the identifies the graphic.public BufferedImage createIcon(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 Color getColorForStandardIdentity(SymbolCode code)
code
- Symbol code that identifies the graphic.protected Color getColorFromParams(AVList params)
params
- Parameter list.protected boolean mustDrawFill(SymbolCode code)
code
- Symbol code of a point graphic.