|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.bbn.openmap.Layer
com.bbn.openmap.layer.OMGraphicHandlerLayer
com.bbn.openmap.layer.DemoLayer
public class DemoLayer
This layer demonstrates interactive capabilities of OpenMap. Instantiating this layer should show an icon loaded using HTTP Protocol, which represents Boston, MA in USA. Above Boston it should show a square that would change color when mouse is moved over it in 'Gesture' mode. Also clicking once brings up a message box and more than once brings up browser.
The DemoLayer has also been modified to demonstrate the first uses of the OMDrawingTool. The Palette has buttons that can be used to start the tool in several different ways.
Just added some decorated splines to test them. EL,
Serialized Form| 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
Found in the findAndInit() method, in the MapHandler. |
protected static java.lang.String |
externalKey
Used by geometries created in GUI for specify if the spatial filter is for objects outside the drawn shape. |
protected GraphicAttributes |
filterGA
|
protected static java.lang.String |
internalKey
Used by geometries created in GUI for specify if the spatial filter is for objects inside the drawn shape. |
protected DrawingToolRequestor |
layer
Used by the internal ActionListeners for a callback, see getGUI(). |
protected javax.swing.JPanel |
legend
|
protected OMGraphicList |
objects
This is a list to hold the non-changing OMGraphics to display on the layer. |
protected SymbolReferenceLibrary |
srl
Found in the findAndInit() method, in the MapHandler. |
| 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 | |
|---|---|
DemoLayer()
|
|
| Method Summary | |
|---|---|
void |
drawingComplete(OMGraphic omg,
OMAction action)
Called when the DrawingTool is complete, providing the layer with the modified OMGraphic. |
void |
findAndInit(java.lang.Object someObj)
Called when a component that is needed, and not available with an appropriate iterator from the BeanContext. |
void |
findAndUndo(java.lang.Object someObj)
BeanContextMembershipListener method. |
DrawingTool |
getDrawingTool()
|
protected GraphicAttributes |
getFilterGA()
|
java.awt.Component |
getGUI()
Gets the gui controls associated with the layer. |
java.lang.String |
getInfoText(OMGraphic omg)
Query for what text should be placed over the information bar when the mouse is over a particular OMGraphic. |
java.util.List<java.awt.Component> |
getItemsForMapMenu(MapMouseEvent me)
Return a JMenu with contents applicable to a pop-up menu for a location over the map. |
java.util.List<java.awt.Component> |
getItemsForOMGraphicMenu(OMGraphic omg)
Return a java.util.List containing input for a JMenu with contents applicable to a pop-up menu for a location over an OMGraphic. |
SymbolReferenceLibrary |
getSymbolReferenceLibrary()
|
java.lang.String |
getToolTipTextFor(OMGraphic omg)
Query for what tooltip to display for an OMGraphic when the mouse is over it. |
OMGraphicList |
init()
|
boolean |
isHighlightable(OMGraphic omg)
Query that an OMGraphic can be highlighted when the mouse moves over it. |
boolean |
isSelectable(OMGraphic omg)
Query that an OMGraphic is selectable. |
void |
paint(java.awt.Graphics g)
The default action is to get the OMGraphicList and render it. |
OMGraphicList |
prepare()
This is an important Layer method to override. |
void |
select(OMGraphicList list)
Called if isSelectable(OMGraphic) was true, so the list has the OMGraphic. |
void |
setDrawingTool(DrawingTool dt)
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Overrides the Layer setProperties method. |
void |
setSymbolReferenceLibrary(SymbolReferenceLibrary library)
Set the MilStd2525 SymbolReferenceLibrary object used to create symbols. |
| 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 |
|---|
protected javax.swing.JPanel legend
protected DrawingTool drawingTool
protected SymbolReferenceLibrary srl
protected final DrawingToolRequestor layer
protected static final java.lang.String internalKey
protected static final java.lang.String externalKey
protected GraphicAttributes filterGA
protected OMGraphicList objects
| Constructor Detail |
|---|
public DemoLayer()
| Method Detail |
|---|
public void paint(java.awt.Graphics g)
OMGraphicHandlerLayer
paint in class OMGraphicHandlerLayerg - java.awt.Graphics object to render OMGraphics into.public OMGraphicList init()
public void setProperties(java.lang.String prefix,
java.util.Properties props)
OMGraphicHandlerLayer
setProperties in interface PropertyConsumersetProperties in class OMGraphicHandlerLayerprefix - the token to prefix the property namesprops - the Properties objectpublic OMGraphicList prepare()
prepare in class OMGraphicHandlerLayerprotected GraphicAttributes getFilterGA()
public java.awt.Component getGUI()
Layer
getGUI in class Layerpublic DrawingTool getDrawingTool()
public void setDrawingTool(DrawingTool dt)
public void drawingComplete(OMGraphic omg,
OMAction action)
drawingComplete in interface DrawingToolRequestorpublic void findAndInit(java.lang.Object someObj)
findAndInit in class Layerpublic void setSymbolReferenceLibrary(SymbolReferenceLibrary library)
library - public SymbolReferenceLibrary getSymbolReferenceLibrary()
public void findAndUndo(java.lang.Object someObj)
findAndUndo in class Layerpublic boolean isHighlightable(OMGraphic omg)
isHighlightable in interface GestureResponsePolicyisHighlightable in class OMGraphicHandlerLayerpublic boolean isSelectable(OMGraphic omg)
isSelectable in interface GestureResponsePolicyisSelectable in class OMGraphicHandlerLayerpublic java.lang.String getInfoText(OMGraphic omg)
getInfoText in interface GestureResponsePolicygetInfoText in class OMGraphicHandlerLayerpublic java.lang.String getToolTipTextFor(OMGraphic omg)
getToolTipTextFor in interface GestureResponsePolicygetToolTipTextFor in class OMGraphicHandlerLayerpublic void select(OMGraphicList list)
select in interface GestureResponsePolicyselect in class OMGraphicHandlerLayerpublic java.util.List<java.awt.Component> getItemsForMapMenu(MapMouseEvent me)
OMGraphicHandlerLayer
getItemsForMapMenu in interface GestureResponsePolicygetItemsForMapMenu in class OMGraphicHandlerLayerme - a MapMouseEvent describing the location over where the menu
items should apply, in case different options are appropriate for
different places.
public java.util.List<java.awt.Component> getItemsForOMGraphicMenu(OMGraphic omg)
OMGraphicHandlerLayer
getItemsForOMGraphicMenu in interface GestureResponsePolicygetItemsForOMGraphicMenu in class OMGraphicHandlerLayer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||