|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bbn.openmap.tools.drawing.AbstractToolLoader
public abstract class AbstractToolLoader
The AbstractToolLoader groups together some of the code that was being duplicated in the different EditToolLoaders. It uses a EditClassWrapper to describe how to edit/create/represent graphics, and keeps track of multiple EditClassWrappers in case the EditToolLoader can handle multiple graphic types.
Field Summary | |
---|---|
protected java.util.HashMap |
graphicInfo
|
protected I18n |
i18n
|
Constructor Summary | |
---|---|
AbstractToolLoader()
|
Method Summary | |
---|---|
void |
addEditClassWrapper(EditClassWrapper ecw)
|
java.lang.String[] |
getEditableClasses()
Get the classnames that the loader is able to create EditableOMGraphics for. |
abstract EditableOMGraphic |
getEditableGraphic(OMGraphic graphic)
Give an OMGraphic to the EditToolLoader, which will create an EditableOMGraphic for it. |
EditableOMGraphic |
getEditableGraphic(java.lang.String classname)
Give the classname of a graphic to create, returning an EditableOMGraphic for that graphic. |
EditableOMGraphic |
getEditableGraphic(java.lang.String classname,
GraphicAttributes ga)
Give the classname of a graphic to create, returning an EditableOMGraphic for that graphic. |
javax.swing.ImageIcon |
getIcon(java.lang.String classname)
Get an Icon for a classname. |
java.lang.String |
getPrettyName(java.lang.String classname)
Get the pretty name, suitable for a GUI, for a classname. |
abstract void |
init()
Each subclass should initialize the graphicInfo HashMap by calling addEditClassWrapper(EditClassWrapper). |
void |
removeEditClassWrapper(EditClassWrapper ecw)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap graphicInfo
protected I18n i18n
Constructor Detail |
---|
public AbstractToolLoader()
Method Detail |
---|
public abstract void init()
public void addEditClassWrapper(EditClassWrapper ecw)
public void removeEditClassWrapper(EditClassWrapper ecw)
public java.lang.String[] getEditableClasses()
getEditableClasses
in interface EditToolLoader
public EditableOMGraphic getEditableGraphic(java.lang.String classname)
getEditableGraphic
in interface EditToolLoader
public EditableOMGraphic getEditableGraphic(java.lang.String classname, GraphicAttributes ga)
getEditableGraphic
in interface EditToolLoader
public abstract EditableOMGraphic getEditableGraphic(OMGraphic graphic)
getEditableGraphic
in interface EditToolLoader
public javax.swing.ImageIcon getIcon(java.lang.String classname)
getIcon
in interface EditToolLoader
classname
- the classname to get the icon for.
public java.lang.String getPrettyName(java.lang.String classname)
getPrettyName
in interface EditToolLoader
classname
- the classname to get the icon for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |