Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.tools.drawing
Class AbstractToolLoader

    java.lang.Object
      com.bbn.openmap.tools.drawing.AbstractToolLoader

All Implemented Interfaces:
  EditToolLoader

Direct Known Subclasses:
  OMCircleLoader, OMDecoratedSplineLoader, OMDistanceLoader, OMLineLoader, OMPointLoader, OMPolyLoader, OMRectLoader, OMScalingRasterLoader, OMSplineLoader, OMTextLoader

public abstract class AbstractToolLoader
extends java.lang.Object
implements EditToolLoader

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

### graphicInfo

    protected java.util.HashMap graphicInfo

### i18n

    protected I18n i18n

Constructor Detail

### AbstractToolLoader

    public AbstractToolLoader()

Method Detail

### init

    public abstract void init()

  Each subclass should initialize the graphicInfo HashMap by calling addEditClassWrapper(EditClassWrapper).

### addEditClassWrapper

    public void addEditClassWrapper(EditClassWrapper ecw)

### removeEditClassWrapper

    public void removeEditClassWrapper(EditClassWrapper ecw)

### getEditableClasses

    public java.lang.String[] getEditableClasses()

  Get the classnames that the loader is able to create EditableOMGraphics for.

  Specified by:
    `getEditableClasses` in interface `EditToolLoader`

### getEditableGraphic

    public EditableOMGraphic getEditableGraphic(java.lang.String classname)

  Give the classname of a graphic to create, returning an EditableOMGraphic for that graphic.

  Specified by:
    `getEditableGraphic` in interface `EditToolLoader`

### getEditableGraphic

    public EditableOMGraphic getEditableGraphic(java.lang.String classname,
                                                GraphicAttributes ga)

  Give the classname of a graphic to create, returning an EditableOMGraphic for that graphic. The GraphicAttributes object lets you set some of the initial parameters of the point, like point type and rendertype.

  Specified by:
    `getEditableGraphic` in interface `EditToolLoader`

### getEditableGraphic

    public abstract EditableOMGraphic getEditableGraphic(OMGraphic graphic)

  Give an OMGraphic to the EditToolLoader, which will create an EditableOMGraphic for it.

  Specified by:
    `getEditableGraphic` in interface `EditToolLoader`

### getIcon

    public javax.swing.ImageIcon getIcon(java.lang.String classname)

  Get an Icon for a classname.

  Specified by:
    `getIcon` in interface `EditToolLoader`
  Parameters:
    `classname` - the classname to get the icon for.
  Returns:
    Image classname icon.

### getPrettyName

    public java.lang.String getPrettyName(java.lang.String classname)

  Get the pretty name, suitable for a GUI, for a classname.

  Specified by:
    `getPrettyName` in interface `EditToolLoader`
  Parameters:
    `classname` - the classname to get the icon for.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details