public class EditorLayer extends DrawingToolLayer implements Tool
# could be com.bbn.openmap.layer.editor.DrawingEditorTool, for instance editorLayer.editor=EditorTool class
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected EditorTool |
editorTool
The EditorTool controls the interface, and how OMGraphics are managed.
|
static java.lang.String |
EditorToolProperty
The property to use of the EditorLayer doesn't really know what
EditorTool it will have.
|
protected EditorLayerMouseMode |
elmm
The mouse mode used to direct mouse events to the editor.
|
protected int |
orientation |
actions, box, dbfFactory, drawingAttributes, drawingTool, DTL_DEBUG, fileName, jcb, proxyMMM, SerializedURLNameProperty, showHints, ShowHintsProperty
consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, layerWorkerQueue, logger, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty
addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, attributes, autoPalette, AutoPaletteProperty, beanContextChildSupport, coordTransform, DataPathPrefixProperty, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, localHackList, maxScale, MaxScaleProperty, minScale, MinScaleProperty, palette, paletteListener, PrettyNameProperty, propertyPrefix, RedrawCmd, removable, RemovableProperty, SWING_PACKAGE, TransformProperty, windowSupport
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
EditorLayer() |
Modifier and Type | Method and Description |
---|---|
protected void |
creatingOMGraphic(OMGraphic newOMG)
A hook to get a handle on a new OMGraphic that is being created for
editing.
|
void |
dispose()
Overrides Layer.dispose(), makes sure the OMGraphicList is cleared.
|
void |
drawingComplete(OMGraphic omg,
OMAction action)
DrawingToolRequestor method.
|
void |
findAndInit(java.lang.Object someObj)
Called by findAndInit(Iterator) so subclasses can find objects, too.
|
void |
findAndUndo(java.lang.Object someObj)
BeanContextMembershipListener method.
|
EditorTool |
getEditorTool() |
java.awt.Container |
getFace()
The tool's interface.
|
java.lang.String |
getKey()
The retrieval key for this tool.
|
MapMouseInterpreter |
getMouseEventInterpreter()
Get the interpreter used to field and interpret MouseEvents, thereby
calling GestureResponsePolicy methods on this layer.
|
EditorLayerMouseMode |
getMouseMode()
Get and/or create the EditorLayerMouseMode that can be used specifically
for this layer, used to capture the MapBean's MouseEvents when an
EditorTool is invoked.
|
java.lang.String[] |
getMouseModeIDsForEvents()
This is the important method call that determines what MapMouseModes the
interpreter for this layer responds to.
|
int |
getOrientation()
Set the orientation for the GUI of the Tool, SwingConstants.HORIZONTAL or
SwingConstants.VERTICAL.
|
void |
setEditorTool(EditorTool editorTool) |
void |
setKey(java.lang.String aKey)
Set the retrieval key for this tool.
|
void |
setMouseModeIDsForEvents(java.lang.String[] modes)
Use this method to set which mouse modes this layer responds to.
|
void |
setName(java.lang.String name)
Need to do this so the EditorLayerMouseMode will be recreated with the
proper identification if the name of the layer changes.
|
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 props)
Overrides the Layer setProperties method.
|
void |
setVisible(boolean show)
Part of a layer hack to notify the component listener when the component
is hidden.
|
doIt, edit, getActions, getDbfFactory, getDrawingAttributes, getDrawingTool, getFileName, getGUI, getInfoText, getProperties, getPropertyInfo, getProxyMouseMode, getShowHints, getToolTipTextFor, isHighlightable, isSelectable, load, prepare, releaseProxyMouseMode, saveOMGraphics, select, setDbfFactory, setDrawingAttributes, setDrawingTool, setFileName, setProxyMouseMode, setShowHints, shouldEdit
actionPerformed, canSetList, copy, createLayerWorker, cut, deselect, doAction, doPrepare, filter, filter, filter, getConsumeEvents, getFilter, getItemsForMapMenu, getItemsForOMGraphicMenu, getLayerWorker, getList, getMapMouseListener, getProjectionChangePolicy, getRenderPolicy, getSelected, getTransparency, getTransparencyAdjustmentPanel, highlight, interrupt, isCancelled, isInterruptable, isWorking, leftClick, mouseOver, paint, paste, projectionChanged, receivesMapEvents, renderDataForProjection, resetFiltering, setCancelled, setConsumeEvents, setFilter, setInterruptable, setLayerWorker, setList, setMouseEventInterpreter, setProjectionChangePolicy, setRenderPolicy, setTransparency, supportsSQL, unhighlight, workerComplete
addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, createWindowSupport, disconnectFromBeanContext, finalize, findAndInit, fireHideToolTip, firePaletteEvent, fireRequestBrowserContent, fireRequestBrowserContent, fireRequestCursor, fireRequestInfoLine, fireRequestInfoLine, fireRequestInfoLine, fireRequestMessage, fireRequestMessage, fireRequestToolTip, fireRequestToolTip, fireRequestURL, fireRequestURL, fireStatusUpdate, fireStatusUpdate, fireVetoableChange, getAddAsBackground, getAddToBeanContext, getAttribute, getBeanContext, getCoordTransform, getIcon, getMaxScale, getMinScale, getPackage, getPalette, getProjection, getPropertyPrefix, getWindowSupport, hasGUI, hidePalette, isAutoPalette, isProjectionOK, isRemovable, notifyHideHack, prependDataPathPrefix, putAttribute, removeComponentListener, removeConfirmed, removed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, repaint, resetPalette, setAddAsBackground, setAddToBeanContext, setAutoPalette, setBeanContext, setCoordTransform, setIcon, setLayerProperties, setMaxScale, setMinScale, setPaletteVisible, setProjection, setProjection, setProperties, setPropertyPrefix, setRemovable, setWindowSupport, showPalette
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, isPaintingOrigin, 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
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, transferFocusDownCycle, validate, validateTree
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, transferFocusBackward, transferFocusUpCycle
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
protected EditorTool editorTool
protected EditorLayerMouseMode elmm
public static final java.lang.String EditorToolProperty
protected int orientation
public void setProperties(java.lang.String prefix, java.util.Properties props)
OMGraphicHandlerLayer
setProperties
in interface PropertyConsumer
setProperties
in class DrawingToolLayer
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic EditorLayerMouseMode getMouseMode()
If the EditorLayerMouseMode isn't set programmatically, this method will create one with this layer's name as the mouse mode ID. If the layer's name hasn't been set, a temporary mouse mode will be returned, but with a somewhat random name that may not really work as expected. Once the layer's name gets set, however, a good, usable mouse mode will get picked up and used.
public void setName(java.lang.String name)
public void drawingComplete(OMGraphic omg, OMAction action)
drawingComplete
in interface DrawingToolRequestor
drawingComplete
in class DrawingToolLayer
public void findAndInit(java.lang.Object someObj)
findAndInit
in class DrawingToolLayer
public void findAndUndo(java.lang.Object someObj)
DrawingToolLayer
findAndUndo
in class DrawingToolLayer
public void dispose()
OMGraphicHandlerLayer
dispose
in class OMGraphicHandlerLayer
public void setMouseModeIDsForEvents(java.lang.String[] modes)
OMGraphicHandlerLayer
setMouseModeIDsForEvents
in class OMGraphicHandlerLayer
public java.lang.String[] getMouseModeIDsForEvents()
OMGraphicHandlerLayer
getMouseModeIDsForEvents
in class OMGraphicHandlerLayer
public MapMouseInterpreter getMouseEventInterpreter()
getMouseEventInterpreter
in class OMGraphicHandlerLayer
public EditorTool getEditorTool()
public void setEditorTool(EditorTool editorTool)
public void setVisible(boolean show)
setVisible
in class Layer
public java.awt.Container getFace()
public java.lang.String getKey()
public void setKey(java.lang.String aKey)
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.protected void creatingOMGraphic(OMGraphic newOMG)
newOMG
- Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details