## com.bbn.openmap.graphicLoader.netmap
Class NetMapGraphicLoader

    java.lang.Object
      com.bbn.openmap.MapHandlerChild
          com.bbn.openmap.OMComponent
              com.bbn.openmap.graphicLoader.AbstractGraphicLoader
                  com.bbn.openmap.graphicLoader.MMLGraphicLoader
                      com.bbn.openmap.graphicLoader.netmap.NetMapGraphicLoader

All Implemented Interfaces:
  java.awt.event.ActionListener, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, GraphicLoader, LightMapHandlerChild, MapMouseListener, NetMapConstants, NetMapListener, PropertyConsumer

public class NetMapGraphicLoader
extends MMLGraphicLoader
implements NetMapListener, NetMapConstants

The NetMapGraphicLoader is a component that can listen to a NetMapConnector, receive and interpret NetMapEvents, and draw the resulting network on the map. The NetMapConnector does all the heavy work, the NetMapGraphicLoader serves as an iterface to get OMGraphics on the map.

The easiest way to use this class is to create it with the NetMapConnector and add it to the LayerHandler or MapHandler. If the NetMapConnector is going to be created by another object for application design reasons, just create a NetMapConnectionHandler and add it to the MapHandler, and then add the NetMapConnector to the MapHandler, too. The NetMapConnectionHandler will create a NetMapGraphicLoader for the NetMapConnector. Make sure a GraphicLoaderConnector is also in the MapHandler, too, because it will create a GraphicLoaderPlugIn/PlugInLayer for the NetMapGraphicLoader.

Field Summary
`protected boolean` `DEBUG`
`protected java.lang.String` `localhostIP`
`protected OMGraphicList` `omList` The list that gets sent to the GraphicLoaderPlugIn.
`protected boolean` `toolTipUp`

Fields inherited from class com.bbn.openmap.graphicLoader.AbstractGraphicLoader
`DO_NOT_UPDATE_TIMER, name, NameProperty, proj, receiver, timer, TimerCmd, updateInterval`

Fields inherited from class com.bbn.openmap.OMComponent
`i18n, propertyPrefix`

Fields inherited from class com.bbn.openmap.MapHandlerChild
`beanContextChildSupport`

Fields inherited from interface com.bbn.openmap.graphicLoader.netmap.NetMapConstants

`CLEAR, COMMAND_FIELD, DATABASE_TAG_FIELD, DEFAULT_PORT, DEFAULT_SERVER, ELEVATION_FIELD, ERROR_VALUE_DOUBLE, ERROR_VALUE_FLOAT, ERROR_VALUE_INT, HEIGHT_FIELD, ICON_FIELD, INDEX_FIELD, IP_FIELD, JMAP_VIEW_CMD, JOFFSET_FIELD, LABEL_FIELD, LAT_FIELD, LINE_DELETE, LINE_DELETE_STRING, LINK_NODE1_FIELD, LINK_NODE2_FIELD, LINK_OBJECT, LINK_OBJECT_STATUS, LON_FIELD, MENU_FIELD, NAME_FIELD, NODE_DELETE, NODE_DELETE_STRING, NODE_MOVE, NODE_MOVE_STRING, NODE_OBJECT, NODE_OBJECT_STATUS, POSX_FIELD, POSY_FIELD, REFRESH, SHAPE_FIELD, STATUS_FIELD, TIME_FIELD, UPDATE, WIDTH_FIELD`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Constructor Summary
`NetMapGraphicLoader()` Constructor for the NetMapGraphicLoader, you still have to set the NetMapConnector.
`NetMapGraphicLoader(NetMapConnector nmc)` Constructor for the NetMapGraphicLoader that sets the NetMapConnector.

Method Summary
`void` `catchEvent(NetMapEvent nme)` NetMapListener method, called by the NetMapConnector.
`java.awt.Component` `getGUI()` Called by the GraphicLoaderPlugIn, the GUI is provided from the NetMapConnector.
`java.lang.String` `getName()` Needed to fill in a GUI with a receiver's name, to enable the user to send a graphic to a specific object.
`NetMapConnector` `getNetMapConnector()` Get the current NetMapConnector.
`protected OMGraphicList` `getOMList()` Internal method used to create a single OMGraphicList from the NodeCache and the LineCache.
`void` `manageGraphics()` The inherited AbstractGraphicLoader method, that sends the current OMGrapicList to the receiver.
`boolean` `mouseMoved(java.awt.event.MouseEvent e)` Invoked when the mouse button has been moved on a component (with no buttons down).
`protected void` `processEventProperties(java.util.Properties eventProps)` Process a NetMapEvent Properties object, which means that a Properties object, representing an event from the NetMap server, is evaluated and used to modify the NodeCache and LineCache accordingly.
`void` `setNetMapConnector(NetMapConnector nmc)` Set the NetMapConnector to listen to.

Methods inherited from class com.bbn.openmap.graphicLoader.MMLGraphicLoader
`getMouseModeServiceList, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased`

Methods inherited from class com.bbn.openmap.graphicLoader.AbstractGraphicLoader
`actionPerformed, createTimer, getProjection, getProperties, getPropertyInfo, getReceiver, getTimer, getUpdateInterval, setName, setProjection, setProperties, setReceiver, setTimer, setUpdateInterval`

Methods inherited from class com.bbn.openmap.OMComponent
`getPropertyPrefix, setProperties, setPropertyPrefix`

Methods inherited from class com.bbn.openmap.MapHandlerChild
`addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### omList

    protected OMGraphicList omList

  The list that gets sent to the GraphicLoaderPlugIn.

### DEBUG

    protected boolean DEBUG

### localhostIP

    protected java.lang.String localhostIP

### toolTipUp

    protected boolean toolTipUp

Constructor Detail

### NetMapGraphicLoader

    public NetMapGraphicLoader()

  Constructor for the NetMapGraphicLoader, you still have to set the NetMapConnector.

### NetMapGraphicLoader

    public NetMapGraphicLoader(NetMapConnector nmc)

  Constructor for the NetMapGraphicLoader that sets the NetMapConnector.

Parameters:
  `nmc` - the NetMapConnector to listen to.

Method Detail

### setNetMapConnector

    public void setNetMapConnector(NetMapConnector nmc)

  Set the NetMapConnector to listen to. This method will add the NetMapGraphicLoader to the NetMapConnector as a NetMapListener. If there is already a NetMapConnector set in this NetMapGraphicLoader, then this method will disconnect from the current NetMapConnector, and reconnect with the new one if it isn't null.

### getNetMapConnector

    public NetMapConnector getNetMapConnector()

  Get the current NetMapConnector.

### catchEvent

    public void catchEvent(NetMapEvent nme)

  NetMapListener method, called by the NetMapConnector.

  Specified by:
    `catchEvent` in interface `NetMapListener`

### processEventProperties

    protected void processEventProperties(java.util.Properties eventProps)

  Process a NetMapEvent Properties object, which means that a Properties object, representing an event from the NetMap server, is evaluated and used to modify the NodeCache and LineCache accordingly.

  Parameters:
    `eventProps` - the properties from a NetMapEvent.

### getOMList

    protected OMGraphicList getOMList()

  Internal method used to create a single OMGraphicList from the NodeCache and the LineCache.

### getGUI

    public java.awt.Component getGUI()

  Called by the GraphicLoaderPlugIn, the GUI is provided from the NetMapConnector.

  Specified by:
    `getGUI` in interface `GraphicLoader`
  Overrides:
    `getGUI` in class `AbstractGraphicLoader`

### getName

    public java.lang.String getName()

  Needed to fill in a GUI with a receiver's name, to enable the user to send a graphic to a specific object. Should be a pretty name, suitable to let a user know what it is.

  Specified by:
    `getName` in interface `GraphicLoader`
  Overrides:
    `getName` in class `AbstractGraphicLoader`

### manageGraphics

    public void manageGraphics()

  The inherited AbstractGraphicLoader method, that sends the current OMGrapicList to the receiver.

  Specified by:
    `manageGraphics` in class `AbstractGraphicLoader`
  See Also:
    `OMGraphicHandler.setList(OMGraphicList)`

### mouseMoved

    public boolean mouseMoved(java.awt.event.MouseEvent e)

  Invoked when the mouse button has been moved on a component (with no buttons down).

  Specified by:
    `mouseMoved` in interface `MapMouseListener`
  Overrides:
    `mouseMoved` in class `MMLGraphicLoader`
  Parameters:
    `e` - MouseEvent
  Returns:
    true if the listener was able to process the event.

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