|
||||||||||
| 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.DrawingToolLayer
com.bbn.openmap.layer.editor.EditorLayer
public class EditorLayer
The EditorLayer is a layer that provides a specific set of tools to modify a set of OMGraphics that represent specific types of objects. It has an EditorTool that controls what the interface looks like, and controls reception of the mouse events to direct their interpretation usefully. The EditorLayer can use the following property:
# could be com.bbn.openmap.layer.editor.DrawingEditorTool, for instance editorLayer.editor=EditorTool class
| 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 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
|
| Fields inherited from class com.bbn.openmap.layer.DrawingToolLayer |
|---|
actions, box, dbfFactory, drawingAttributes, drawingTool, DTL_DEBUG, fileName, jcb, omGraphics, proxyMMM, SerializedURLNameProperty, showHints, ShowHintsProperty |
| 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 | |
|---|---|
EditorLayer()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class com.bbn.openmap.layer.DrawingToolLayer |
|---|
doIt, edit, getActions, getDbfFactory, getDrawingAttributes, getDrawingTool, getFileName, getGUI, getInfoText, getOMGraphics, getProperties, getPropertyInfo, getProxyMouseMode, getShowHints, getToolTipTextFor, isHighlightable, isSelectable, load, prepare, releaseProxyMouseMode, saveOMGraphics, select, setDbfFactory, setDrawingAttributes, setDrawingTool, setFileName, setOMGraphics, setProxyMouseMode, setShowHints, shouldEdit |
| 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 EditorTool editorTool
protected EditorLayerMouseMode elmm
public static final java.lang.String EditorToolProperty
protected int orientation
| Constructor Detail |
|---|
public EditorLayer()
| Method Detail |
|---|
public void setProperties(java.lang.String prefix,
java.util.Properties props)
OMGraphicHandlerLayer
setProperties in interface PropertyConsumersetProperties in class DrawingToolLayerprefix - 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)
setName in class Layer
public void drawingComplete(OMGraphic omg,
OMAction action)
drawingComplete in interface DrawingToolRequestordrawingComplete in class DrawingToolLayerpublic void findAndInit(java.lang.Object someObj)
findAndInit in class DrawingToolLayerpublic void findAndUndo(java.lang.Object someObj)
DrawingToolLayer
findAndUndo in class DrawingToolLayerpublic void dispose()
OMGraphicHandlerLayer
dispose in class OMGraphicHandlerLayerpublic void setMouseModeIDsForEvents(java.lang.String[] modes)
OMGraphicHandlerLayer
setMouseModeIDsForEvents in class OMGraphicHandlerLayerpublic java.lang.String[] getMouseModeIDsForEvents()
OMGraphicHandlerLayer
getMouseModeIDsForEvents in class OMGraphicHandlerLayerpublic MapMouseInterpreter getMouseEventInterpreter()
getMouseEventInterpreter in class OMGraphicHandlerLayerpublic EditorTool getEditorTool()
public void setEditorTool(EditorTool editorTool)
public void setVisible(boolean show)
setVisible in class Layerpublic java.awt.Container getFace()
getFace in interface Toolpublic java.lang.String getKey()
getKey in interface Toolpublic void setKey(java.lang.String aKey)
setKey in interface ToolaKey - The key for this tool.public int getOrientation()
Tool
getOrientation in interface Toolpublic void setOrientation(int orientation)
Tool
setOrientation in interface Toolorientation - that should be set on tool.protected void creatingOMGraphic(OMGraphic newOMG)
newOMG -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||