com.bbn.openmap.tools.symbology.milStd2525
Class BasicSymbolImageMaker
java.lang.Object
com.bbn.openmap.MapHandlerChild
com.bbn.openmap.OMComponent
com.bbn.openmap.tools.symbology.milStd2525.BasicSymbolImageMaker
- All Implemented Interfaces:
- LightMapHandlerChild, PropertyConsumer, SymbolImageMaker, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener
- Direct Known Subclasses:
- GIFSymbolImageMaker, PNGSymbolImageMaker
public class BasicSymbolImageMaker
- extends OMComponent
- implements SymbolImageMaker
Method Summary |
java.awt.Paint |
getBackground()
|
java.lang.String |
getDataPath()
|
java.lang.String |
getFileExtension()
Return the file extension of this particular SymbolImageMaker, added to
the symbol name after the code has been massaged into a file name. |
protected java.net.URL |
getFileURL(java.lang.String code)
|
javax.swing.ImageIcon |
getIcon(java.lang.String code,
java.awt.Dimension di)
|
protected java.lang.String |
massageCode(java.lang.String code)
|
void |
setBackground(java.awt.Paint p)
|
void |
setDataPath(java.lang.String dataPath)
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent. |
Methods inherited from class com.bbn.openmap.MapHandlerChild |
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataPath
protected java.lang.String dataPath
background
protected java.awt.Paint background
BasicSymbolImageMaker
public BasicSymbolImageMaker()
BasicSymbolImageMaker
public BasicSymbolImageMaker(java.lang.String dataPath)
setProperties
public void setProperties(java.lang.String prefix,
java.util.Properties props)
- Description copied from class:
OMComponent
- Sets the properties for the OMComponent.
- Specified by:
setProperties
in interface PropertyConsumer
- Overrides:
setProperties
in class OMComponent
- Parameters:
prefix
- the token to prefix the property namesprops
- the Properties
object
getFileURL
protected java.net.URL getFileURL(java.lang.String code)
throws java.net.MalformedURLException
- Parameters:
code
-
- Returns:
- URL for a file containing the symbol for the given code, null if
it's not available.
- Throws:
java.net.MalformedURLException
getFileExtension
public java.lang.String getFileExtension()
- Return the file extension of this particular SymbolImageMaker, added to
the symbol name after the code has been massaged into a file name. The
BasicSymbolImageLaker doesn't add an extension. If you override, include
the dot at the beginning of the return string.
massageCode
protected java.lang.String massageCode(java.lang.String code)
- Parameters:
code
-
- Returns:
- code that has any wildcard characters changed for the sake of the
symbol database.
getIcon
public javax.swing.ImageIcon getIcon(java.lang.String code,
java.awt.Dimension di)
- Specified by:
getIcon
in interface SymbolImageMaker
setDataPath
public void setDataPath(java.lang.String dataPath)
- Specified by:
setDataPath
in interface SymbolImageMaker
setBackground
public void setBackground(java.awt.Paint p)
- Specified by:
setBackground
in interface SymbolImageMaker
getBackground
public java.awt.Paint getBackground()
- Returns:
- Returns the background.
getDataPath
public java.lang.String getDataPath()
- Returns:
- Returns the dataPath.
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details