public class MilStd2525ModifierRetriever extends AbstractIconRetriever
Modifier and Type | Field and Description |
---|---|
protected static Color |
DEFAULT_COLOR |
protected static String |
PATH_PREFIX |
protected static String |
PATH_SUFFIX |
protected static int[] |
variableWidths |
retrieverPath
Constructor and Description |
---|
MilStd2525ModifierRetriever(String retrieverPath)
Create a new retriever that will retrieve icons from the specified location.
|
Modifier and Type | Method and Description |
---|---|
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.
|
drawImage, equals, getRetrieverPath, hashCode, multiply, readImage, replaceColor
protected static final Color DEFAULT_COLOR
protected static final String PATH_PREFIX
protected static final String PATH_SUFFIX
protected static final int[] variableWidths
public MilStd2525ModifierRetriever(String retrieverPath)
retrieverPath
- File path or URL to the symbol directory, for example "http://myserver.com/milstd2525/".public BufferedImage createIcon(String symbolId, AVList params)
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).protected Color getColorFromParams(AVList params)
params
- Parameter list.protected boolean isVariableWidth(AVList params)
protected boolean mustApplyColor(String symbolId)
symbolId
- Modifier id.