com.bbn.openmap.tools.symbology.milStd2525
Class BasicSymbolImageMaker

java.lang.Object
  extended by com.bbn.openmap.MapHandlerChild
      extended by com.bbn.openmap.OMComponent
          extended by 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


Field Summary
protected  java.awt.Paint background
           
protected  java.lang.String dataPath
           
 
Fields inherited from class com.bbn.openmap.OMComponent
i18n, propertyPrefix
 
Fields inherited from class com.bbn.openmap.MapHandlerChild
beanContextChildSupport, isolated
 
Fields inherited from interface com.bbn.openmap.tools.symbology.milStd2525.SymbolImageMaker
BackgroundPaintProperty, DataPathProperty
 
Fields inherited from interface com.bbn.openmap.PropertyConsumer
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
 
Constructor Summary
BasicSymbolImageMaker()
           
BasicSymbolImageMaker(java.lang.String dataPath)
           
 
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.OMComponent
getProperties, getPropertyInfo, getPropertyPrefix, setProperties, setPropertyPrefix
 
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
 
Methods inherited from interface com.bbn.openmap.PropertyConsumer
getProperties, getPropertyInfo, getPropertyPrefix, setProperties, setPropertyPrefix
 

Field Detail

dataPath

protected java.lang.String dataPath

background

protected java.awt.Paint background
Constructor Detail

BasicSymbolImageMaker

public BasicSymbolImageMaker()

BasicSymbolImageMaker

public BasicSymbolImageMaker(java.lang.String dataPath)
Method Detail

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 names
props - 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