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.layer.link.draw
Class DrawLinkLayer

    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.draw.DrawLinkLayer

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

public class DrawLinkLayer
extends LinkLayer

The DrawLinkLayer is an extension to the LinkLayer. It allows to selectively disable interacting with graphics in the LinkLayer and to selectively enable using the drawing tool to modify graphics in the LinkLayer.

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 OMDrawingTool` | `drawingTool`
`protected java.lang.String` | `key`
`protected DrawingToolRequestor` | `layer`
`static java.lang.String` | `LPC_EDITABLE`
`static java.lang.String` | `LPC_SELECTABLE`

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
`DrawLinkLayer()` The default constructor for the Layer.
`DrawLinkLayer(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` | `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).
`OMDrawingTool` | `getDrawingTool()`
`java.lang.String` | `getKey()` The retrieval key for this tool
`boolean` | `mouseClicked(java.awt.event.MouseEvent e)` Modify the behavior of LinkLayer::mouseClicked to only interact with graphics that have the "selectable" property set to true.
`void` | `setDrawingTool(OMDrawingTool 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, drawingComplete, getDistanceLimit, getGestureDescriptor, getGraphicList, getListener, getMapMouseListener, getMouseModeServiceList, graphicGestureReaction, handleGesture, handleLinkActionList, handleLinkActionRequest, handleLinkGraphicList, handleMessages, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, prepare, 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, paint, 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

### LPC_EDITABLE

    public static final java.lang.String LPC_EDITABLE

See Also:
  Constant Field Values

### LPC_SELECTABLE

    public static final java.lang.String LPC_SELECTABLE

See Also:
  Constant Field Values

### drawingTool

    protected OMDrawingTool drawingTool

### layer

    protected final DrawingToolRequestor layer

### key

    protected java.lang.String key

Constructor Detail

### DrawLinkLayer

    public DrawLinkLayer()

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

### DrawLinkLayer

    public DrawLinkLayer(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.

### mouseClicked

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

  Modify the behavior of LinkLayer::mouseClicked to only interact with graphics that have the "selectable" property set to true. If the "editable" property is set then use the drawing tool to edit the graphic.

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

### getKey

    public java.lang.String getKey()

  The retrieval key for this tool

  Returns:
    String The key for this tool.

### setKey

    public void setKey(java.lang.String aKey)

  Set the retrieval key for this 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(OMDrawingTool dt)

### getDrawingTool

    public OMDrawingTool getDrawingTool()

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