## com.bbn.openmap.layer.link.amp
Class AmpLinkLayer

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  com.bbn.openmap.Layer
                      com.bbn.openmap.layer.OMGraphicHandlerLayer
                          com.bbn.openmap.layer.link.LinkLayer
                              com.bbn.openmap.layer.link.amp.AmpLinkLayer

All Implemented Interfaces:
  java.awt.event.ActionListener, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, DrawingToolRequestor, java.util.EventListener, GestureResponsePolicy, java.awt.image.ImageObserver, LinkActionConstants, LinkPropertiesConstants, MapMouseListener, java.awt.MenuContainer, ProjectionListener, ProjectionPainter, PropertyConsumer, java.io.Serializable, Tool

public class AmpLinkLayer
extends LinkLayer
implements Tool

The AmpLinkLayer is an extension to the LinkLayer. The difference is that this layer provides some components to the ToolBar for the creation of certain graphics to be sent to the LinkServer. This layer also wants access to the DrawingTool.

The entry in the openmap.properties file looks like this:

        # port number of server
        link.port=3031
        # host name of server
        link.host=host.com
        # URL of proerties file for server attributes
        link.propertiesURL=http://location.of.properties.file.com

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected DrawingTool` `drawingTool`
`protected OMGraphicList` `extraGraphics`
`protected javax.swing.JButton` `eZone`
`protected java.awt.Container` `gui`
`protected java.lang.String` `key`
`protected DrawingToolRequestor` `layer`
`protected javax.swing.JButton` `rrButton`
`static java.lang.String` `RRIntervalProperty`
`static java.lang.String` `RRIntervalUnitsProperty`

Fields inherited from class com.bbn.openmap.layer.link.LinkLayer
`args, ArgsProperty, currentGenerator, DEFAULT_DISTANCE_LIMIT, distanceLimit, DistanceLimitProperty, ExitOnCommandProperty, gestureDescriptor, GridGeneratorProperty, host, HostProperty, linkManager, listener, port, PortProperty, quiet, QuietProperty, ServerLocationProperty`

Fields inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer
`consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty`

Fields inherited from class com.bbn.openmap.Layer

`addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, attributes, autoPalette, AutoPaletteProperty, beanContextChildSupport, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, IDListeners, localHackList, lsListeners, maxScale, MaxScaleProperty, minScale, MinScaleProperty, palette, paletteListener, PrettyNameProperty, propertyPrefix, RedrawCmd, removable, RemovableProperty, SWING_PACKAGE, windowSupport`

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface com.bbn.openmap.layer.link.LinkPropertiesConstants

`LPC_BACKWARD_DIAG_PATTERN, LPC_CENTER_LAT, LPC_CENTER_LONG, LPC_CLEAR_PROPERTIES, LPC_CLEAR_PROPERTIES_CHAR, LPC_CROSS_PATTERN, LPC_DASH, LPC_DASH_DOT, LPC_DASH_DOT_DOT, LPC_DIAG_CROSS_PATTERN, LPC_DOT, LPC_FILLCOLOR, LPC_FILLPATTERN, LPC_FORWARD_DIAG_PATTERN, LPC_GRAPHICID, LPC_HEIGHT, LPC_HIGHLIGHTCOLOR, LPC_HORIZONTAL_PATTERN, LPC_HTML, LPC_INFO, LPC_LATMAX, LPC_LATMIN, LPC_LINECOLOR, LPC_LINESTYLE, LPC_LINEWIDTH, LPC_LINKRASTERIMAGEURL, LPC_LINKROTATION, LPC_LINKTEXTBASELINE, LPC_LINKTEXTFONT, LPC_LINKTEXTSTRING, LPC_LONG_DASH, LPC_LONMAX, LPC_LONMIN, LPC_MESSAGE, LPC_OLD_FILLCOLOR, LPC_OLD_FILLPATTERN, LPC_OLD_HIGHLIGHTCOLOR, LPC_OLD_LINECOLOR, LPC_OLD_LINESTYLE, LPC_OLD_LINEWIDTH, LPC_OLD_LINKTEXTFONT, LPC_OLD_LINKTEXTSTRING, LPC_PROJECTION, LPC_PROPERY_MANAGEMENT_POLICY, LPC_PROPERY_MANAGEMENT_POLICY_CHAR, LPC_REUSE_PROPERTIES, LPC_REUSE_PROPERTIES_CHAR, LPC_SCALE, LPC_SOLID, LPC_SOLID_PATTERN, LPC_TIME, LPC_URL, LPC_VERTICAL_PATTERN, LPC_WIDTH`

Fields inherited from interface com.bbn.openmap.layer.link.LinkActionConstants

`ACTION_GRAPHICS, ACTION_GUI, ACTION_MAP, CLIENT_NOTIFICATION_MASK, GRAPHIC_ID_MASK, KEY_PRESSED_MASK, KEY_RELEASED_MASK, MODIFY_DELETE_GRAPHIC_MASK, MODIFY_DESELECT_GRAPHIC_MASK, MODIFY_DESELECTALL_GRAPHIC_MASK, MODIFY_LOWER_GRAPHIC_MASK, MODIFY_RAISE_GRAPHIC_MASK, MODIFY_SELECT_GRAPHIC_MASK, MOUSE_CLICKED_MASK, MOUSE_DRAGGED_MASK, MOUSE_ENTERED_MASK, MOUSE_EXITED_MASK, MOUSE_MOVED_MASK, MOUSE_PRESSED_MASK, MOUSE_RELEASED_MASK, SERVER_NOTIFICATION_MASK, UPDATE_ADD_GRAPHIC_MASK, UPDATE_GRAPHIC_MASK`

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

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`AmpLinkLayer()` The default constructor for the Layer.
`AmpLinkLayer(java.lang.String host, int port, java.lang.String propertiesURL)` Constructor to use when LinkLayer is not being used with OpenMap application.

Method Summary
`void` `drawingComplete(OMGraphic omg, OMAction action)` The method where a graphic, and an action to take on the graphic, arrives.
`void` `findAndInit(java.lang.Object someObj)` This method is called by the findAndInit(Iterator) method, once for every object inside the iterator.
`void` `findAndUndo(java.lang.Object someObj)` This is the method that does the opposite as the findAndInit(Object).
`DrawingTool` `getDrawingTool()`
`java.awt.Container` `getFace()` The retrieval tool's interface.
`java.lang.String` `getKey()` The retrieval key for this tool
`boolean` `mouseClicked(java.awt.event.MouseEvent e)` Just need to check here if one of the new extra graphics (range ring) was clicked on, so that it can be sent to the drawing tool for modification if desired.
`void` `paint(java.awt.Graphics g)` Paints the layer.
`OMGraphicList` `prepare()` Prepares the graphics for the layer.
`void` `setDrawingTool(DrawingTool dt)`
`void` `setKey(java.lang.String aKey)` Set the retrieval key for this tool
`void` `setProperties(java.lang.String prefix, java.util.Properties properties)` Set all the Link properties from a properties object.

Methods inherited from class com.bbn.openmap.layer.link.LinkLayer

`checkAndReplaceOldPropertyName, checkAndReplaceOldPropertyNames, getDistanceLimit, getGestureDescriptor, getGraphicList, getListener, getMapMouseListener, getMouseModeServiceList, graphicGestureReaction, handleGesture, handleLinkActionList, handleLinkActionRequest, handleLinkGraphicList, handleMessages, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, removed, sendMapRequest, setDistanceLimit, setGestureDescriptor, setGraphicList, setListener, updateMap`

Methods inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer

`canSetList, copy, createLayerWorker, cut, deselect, doAction, doPrepare, filter, filter, filter, getConsumeEvents, getFilter, getInfoText, getItemsForMapMenu, getItemsForOMGraphicMenu, getLayerWorker, getList, getMouseEventInterpreter, getMouseModeIDsForEvents, getProjectionChangePolicy, getProperties, getPropertyInfo, getRenderPolicy, getSelected, getToolTipTextFor, getTransparency, getTransparencyAdjustmentPanel, highlight, interrupt, isCancelled, isHighlightable, isInterruptable, isSelectable, isWorking, leftClick, mouseOver, paste, projectionChanged, receivesMapEvents, renderDataForProjection, resetFiltering, select, setCancelled, setConsumeEvents, setFilter, setInterruptable, setLayerWorker, setList, setMouseEventInterpreter, setMouseModeIDsForEvents, setProjectionChangePolicy, setRenderPolicy, setTransparency, supportsSQL, unhighlight, workerComplete`

Methods inherited from class com.bbn.openmap.Layer

`actionPerformed, addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, createWindowSupport, finalize, findAndInit, fireHideToolTip, firePaletteEvent, fireRequestBrowserContent, fireRequestBrowserContent, fireRequestCursor, fireRequestInfoLine, fireRequestInfoLine, fireRequestInfoLine, fireRequestMessage, fireRequestMessage, fireRequestToolTip, fireRequestToolTip, fireRequestURL, fireRequestURL, fireStatusUpdate, fireStatusUpdate, fireVetoableChange, getAddAsBackground, getAddToBeanContext, getAttribute, getBeanContext, getGUI, getIcon, getMaxScale, getMinScale, getPackage, getPalette, getProjection, getPropertyPrefix, getWindowSupport, hasGUI, hidePalette, isAutoPalette, isProjectionOK, isRemovable, notifyHideHack, putAttribute, removeComponentListener, removeConfirmed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, repaint, resetPalette, setAddAsBackground, setAddToBeanContext, setAutoPalette, setBeanContext, setIcon, setMaxScale, setMinScale, setName, setPaletteVisible, setProjection, setProjection, setProperties, setPropertyPrefix, setRemovable, setVisible, setWindowSupport, showPalette`

Methods inherited from class javax.swing.JComponent

`addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUI`

Methods inherited from class java.awt.Container

`add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree`

Methods inherited from class java.awt.Component

`action, add, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle`

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

Methods inherited from interface com.bbn.openmap.tools.drawing.DrawingToolRequestor
`getName`

Methods inherited from interface java.beans.beancontext.BeanContextChild
`addPropertyChangeListener, removePropertyChangeListener`

Field Detail

### RRIntervalUnitsProperty

    public static final java.lang.String RRIntervalUnitsProperty

See Also:
  Constant Field Values

### RRIntervalProperty

    public static final java.lang.String RRIntervalProperty

See Also:
  Constant Field Values

### extraGraphics

    protected OMGraphicList extraGraphics

### drawingTool

    protected DrawingTool drawingTool

### layer

    protected final DrawingToolRequestor layer

### gui

    protected java.awt.Container gui

### rrButton

    protected javax.swing.JButton rrButton

### eZone

    protected javax.swing.JButton eZone

### key

    protected java.lang.String key

Constructor Detail

### AmpLinkLayer

    public AmpLinkLayer()

  The default constructor for the Layer. All of the attributes are set to their default values.

### AmpLinkLayer

    public AmpLinkLayer(java.lang.String host,
                        int port,
                        java.lang.String propertiesURL)

  Constructor to use when LinkLayer is not being used with OpenMap application.

Parameters:
  `host` - the hostname of the server's computer.
  `port` - the port number of the server.
  `propertiesURL` - the URL of a properties file that contains parameters for the server.

Method Detail

### setProperties

    public void setProperties(java.lang.String prefix,
                              java.util.Properties properties)

  Set all the Link properties from a properties object.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Overrides:
    `setProperties` in class `LinkLayer`
  Parameters:
    `prefix` - the prefix to the properties tha might individualize it to a particular layer.
    `properties` - the properties for the layer.

### prepare

    public OMGraphicList prepare()

  Prepares the graphics for the layer. This is where the getRectangle() method call is made on the link.

  Occasionally it is necessary to abort a prepare call. When this happens, the map will set the cancel bit in the LayerThread, (the thread that is running the prepare). If this Layer needs to do any cleanups during the abort, it should do so, but return out of the prepare asap.

  Overrides:
    `prepare` in class `LinkLayer`
  Returns:
    a list of graphics.

### paint

    public void paint(java.awt.Graphics g)

  Paints the layer.

  Overrides:
    `paint` in class `OMGraphicHandlerLayer`
  Parameters:
    `g` - the Graphics context for painting

### mouseClicked

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

  Just need to check here if one of the new extra graphics (range ring) was clicked on, so that it can be sent to the drawing tool for modification if desired.

  Specified by:
    `mouseClicked` in interface `MapMouseListener`
  Overrides:
    `mouseClicked` in class `LinkLayer`

### drawingComplete

    public void drawingComplete(OMGraphic omg,
                                OMAction action)

  Description copied from interface: `DrawingToolRequestor`
  The method where a graphic, and an action to take on the graphic, arrives.

  Specified by:
    `drawingComplete` in interface `DrawingToolRequestor`
  Overrides:
    `drawingComplete` in class `LinkLayer`

### getFace

    public java.awt.Container getFace()

  The retrieval tool's interface. This is added to the tool bar.

  Specified by:
    `getFace` in interface `Tool`
  Returns:
    String The key for this tool.

### getKey

    public java.lang.String getKey()

  The retrieval key for this tool

  Specified by:
    `getKey` in interface `Tool`
  Returns:
    String The key for this tool.

### setKey

    public void setKey(java.lang.String aKey)

  Set the retrieval key for this tool

  Specified by:
    `setKey` in interface `Tool`
  Parameters:
    `aKey` - The key for this tool.

### findAndInit

    public void findAndInit(java.lang.Object someObj)

  Description copied from class: `Layer`
  This method is called by the findAndInit(Iterator) method, once for every object inside the iterator. It's here to allow subclasses a way to receive objects and still let the super classes have a shot at the object. So, you can override this method can call super.findAndInit(obj), or override the findAndInit(Iterator) method and call super.findAndInit(obj). Whatever.

  Overrides:
    `findAndInit` in class `Layer`

### findAndUndo

    public void findAndUndo(java.lang.Object someObj)

  Description copied from class: `Layer`
  This is the method that does the opposite as the findAndInit(Object). Lets you call super classes with objects that need to be removed.

  Overrides:
    `findAndUndo` in class `Layer`

### setDrawingTool

    public void setDrawingTool(DrawingTool dt)

### getDrawingTool

    public DrawingTool getDrawingTool()

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