public class SymbolReferenceLibrary extends OMComponent
This SymbolReferenceLibrary has one property that lets you specify the SymbolImageMaker it should use to create image icons.
symbolreferencelibrary.class=com.bbn.openmap.tools.symbology.milStd2525.SymbolReferenceLibrary # properties to use for GIF image data files symbolreferencelibrary.imageMakerClass=com.bbn.openmap.tools.symbology.milStd2525.GIFSymbolImageMaker # optional property used as a path to the parent of the data files if it's not in the classpath. symbolreferencelibrary.path=<path to image data file directory> # optional background color for icons if you want something other than clear. symbolreferencelibrary.background=AAGGRRBB # properties to use for SVG image data files obtained from DISA. You need to have Batik jars in # your classpath to use the SVG files, as well as the omsvg.jar file symbolreferencelibrary.imageMakerClass=com.bbn.openmap.tools.symbology.milStd2525.SVGSymbolImageMaker # optional property used as a path to the parent of the data files if it's not in the classpath. symbolreferencelibrary.path=<path to image data file directory> # optional background color for icons if you want something other than clear. symbolreferencelibrary.background=AAGGRRBB
Modifier and Type | Field and Description |
---|---|
protected SymbolPart |
head |
protected static SymbolReferenceLibrary |
library |
protected CodePositionTree |
positionTree |
protected CodeOptions |
symbolAttributes |
protected SymbolImageMaker |
symbolImageMaker |
static java.lang.String |
SymbolImageMakerClassProperty |
i18n, propertyPrefix
beanContextChildSupport, isolated
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
SymbolReferenceLibrary()
A constructor used when the SymbolImageMaker will be set later,
either via the setProperties method or programmatically.
|
SymbolReferenceLibrary(SymbolImageMaker sim)
Create a SymbolReferenceLibrary with a SymbolImageMaker to use
to create images from a data source.
|
Modifier and Type | Method and Description |
---|---|
java.util.Properties |
findAndLoadProperties(java.lang.String propertiesResource) |
CodeOptions |
getCodeOptions() |
CodeOptions |
getCodeOptions(SymbolPart sp,
CodeOptions co)
Given a SymbolPart, return what options are available for it.
|
java.lang.String |
getDescription()
Returns a huge, multi-line string listing all of the symbols,
their names and their relation to each other.
|
SymbolPart |
getHead()
The SymbolParts in the library are stored in a tree hierarchy,
and this method gets the top level one representing the
MIL-STD-2525 tree.
|
javax.swing.ImageIcon |
getIcon(java.lang.String symbolCode,
java.awt.Dimension di)
Return an image given a SymbolCode and dimension.
|
javax.swing.ImageIcon |
getIcon(SymbolPart sp,
CodeOptions co,
java.awt.Dimension di)
Return an image for a particular SymbolPart, its options and
dimensions.
|
java.lang.String |
getSymbolCode(SymbolPart sp,
CodeOptions co)
Return the 15 character character string representing a
SymbolPart with CodeOptions.
|
SymbolImageMaker |
getSymbolImageMaker() |
SymbolPart |
getSymbolPartForCode(java.lang.String code)
Check to see if code exists, if it's valid.
|
protected SymbolPart |
getSymbolPartForCodeStartingAt(SymbolPart node,
java.lang.String code) |
protected void |
initialize(java.util.Properties props,
SymbolImageMaker sim) |
static void |
main(java.lang.String[] argv) |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent.
|
SymbolImageMaker |
setSymbolImageMaker(java.lang.String classname) |
void |
setSymbolImageMaker(SymbolImageMaker symbolImageMaker) |
getProperties, getPropertyInfo, getPropertyPrefix, setProperties, setPropertyPrefix
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated
public static final java.lang.String SymbolImageMakerClassProperty
protected SymbolPart head
protected CodePositionTree positionTree
protected static SymbolReferenceLibrary library
protected CodeOptions symbolAttributes
protected SymbolImageMaker symbolImageMaker
public SymbolReferenceLibrary()
public SymbolReferenceLibrary(SymbolImageMaker sim)
sim
- public java.util.Properties findAndLoadProperties(java.lang.String propertiesResource)
protected void initialize(java.util.Properties props, SymbolImageMaker sim)
public void setProperties(java.lang.String prefix, java.util.Properties props)
OMComponent
setProperties
in interface PropertyConsumer
setProperties
in class OMComponent
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic SymbolImageMaker setSymbolImageMaker(java.lang.String classname)
public CodeOptions getCodeOptions()
public CodeOptions getCodeOptions(SymbolPart sp, CodeOptions co)
sp
- The SymbolPart in question.co
- Current settings that may be in use.public javax.swing.ImageIcon getIcon(java.lang.String symbolCode, java.awt.Dimension di)
public javax.swing.ImageIcon getIcon(SymbolPart sp, CodeOptions co, java.awt.Dimension di)
public java.lang.String getSymbolCode(SymbolPart sp, CodeOptions co)
public SymbolPart getHead()
public java.lang.String getDescription()
public SymbolPart getSymbolPartForCode(java.lang.String code)
code
- protected SymbolPart getSymbolPartForCodeStartingAt(SymbolPart node, java.lang.String code)
public static void main(java.lang.String[] argv)
public SymbolImageMaker getSymbolImageMaker()
public void setSymbolImageMaker(SymbolImageMaker symbolImageMaker)
symbolImageMaker
- The symbolImageMaker to set.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details