public class MilStd2525ModifierRetriever extends AbstractIconRetriever
Modifier and Type | Field and Description |
---|---|
protected static java.awt.Color |
DEFAULT_COLOR |
protected static java.lang.String |
PATH_PREFIX |
protected static java.lang.String |
PATH_SUFFIX |
protected static int[] |
variableWidths |
retrieverPath
Constructor and Description |
---|
MilStd2525ModifierRetriever(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.Integer |
chooseBestFittingWidth(AVList params) |
protected java.lang.String |
composePath(java.lang.String symbolModifierCode,
AVList params) |
java.awt.image.BufferedImage |
createIcon(java.lang.String symbolId,
AVList params)
Create an icon for a symbol modifier.
|
protected java.awt.Color |
getColorFromParams(AVList params)
Retrieves the value of the AVKey.COLOR parameter.
|
protected boolean |
isVariableWidth(AVList params) |
protected boolean |
mustApplyColor(java.lang.String symbolId)
Indicates whether or not color must be applied to the modifier.
|
drawImage, equals, getRetrieverPath, hashCode, multiply, readImage, replaceColor
protected static final java.awt.Color DEFAULT_COLOR
protected static final java.lang.String PATH_PREFIX
protected static final java.lang.String PATH_SUFFIX
protected static final int[] variableWidths
public MilStd2525ModifierRetriever(java.lang.String retrieverPath)
retrieverPath
- File path or URL to the symbol directory, for example "http://myserver.com/milstd2525/".protected java.lang.Integer chooseBestFittingWidth(AVList params)
protected java.lang.String composePath(java.lang.String symbolModifierCode, AVList params)
public java.awt.image.BufferedImage createIcon(java.lang.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 java.awt.Color getColorFromParams(AVList params)
params
- Parameter list.protected boolean isVariableWidth(AVList params)
protected boolean mustApplyColor(java.lang.String symbolId)
symbolId
- Modifier id.