|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
public class AmpLinkLayer
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 properties file for server attributes link.propertiesURL=http://location.of.properties.file.com
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, 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 int |
orientation
|
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, layerWorkerQueue, logger, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty |
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.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 |
int |
getOrientation()
Set the orientation for the GUI of the Tool, SwingConstants.HORIZONTAL or SwingConstants.VERTICAL. |
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 |
setOrientation(int orientation)
Set the orientation for the GUI of the Tool, SwingConstants.HORIZONTAL or SwingConstants.VERTICAL. |
void |
setProperties(java.lang.String prefix,
java.util.Properties properties)
Set all the Link properties from a properties object. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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 |
---|
public static final java.lang.String RRIntervalUnitsProperty
public static final java.lang.String RRIntervalProperty
protected OMGraphicList extraGraphics
protected DrawingTool drawingTool
protected int orientation
protected final DrawingToolRequestor layer
protected java.awt.Container gui
protected javax.swing.JButton rrButton
protected javax.swing.JButton eZone
protected java.lang.String key
Constructor Detail |
---|
public AmpLinkLayer()
public AmpLinkLayer(java.lang.String host, int port, java.lang.String propertiesURL)
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 |
---|
public void setProperties(java.lang.String prefix, java.util.Properties properties)
setProperties
in interface PropertyConsumer
setProperties
in class LinkLayer
prefix
- the prefix to the properties that might
individualize it to a particular layer.properties
- the properties for the layer.public OMGraphicList prepare()
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.
prepare
in class LinkLayer
public void paint(java.awt.Graphics g)
paint
in class OMGraphicHandlerLayer
g
- the Graphics context for paintingpublic boolean mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface MapMouseListener
mouseClicked
in class LinkLayer
e
- MouseEvent
public void drawingComplete(OMGraphic omg, OMAction action)
DrawingToolRequestor
drawingComplete
in interface DrawingToolRequestor
drawingComplete
in class LinkLayer
public java.awt.Container getFace()
getFace
in interface Tool
public java.lang.String getKey()
getKey
in interface Tool
public void setKey(java.lang.String aKey)
setKey
in interface Tool
aKey
- The key for this tool.public void findAndInit(java.lang.Object someObj)
Layer
findAndInit
in class Layer
public void findAndUndo(java.lang.Object someObj)
Layer
findAndUndo
in class Layer
public void setDrawingTool(DrawingTool dt)
public DrawingTool getDrawingTool()
public int getOrientation()
Tool
getOrientation
in interface Tool
public void setOrientation(int orientation)
Tool
setOrientation
in interface Tool
orientation
- that should be set on tool.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |