public class OMToolSet extends OMComponentPanel implements java.io.Serializable, Tool
It contains a NavigatePanel, which is the directional rosette used to pan the MapBean, the ZoomPanel that has a zoom in and zoom out button, and a scale text window. To use the OMToolSet, create an instance of it, and then call setupListeners() with the MapBean. All the event handling is automatically set up.
If the OMToolSet is added to a BeanContext, it should be found by a ToolPanel. It looks for a MapBean add as listeners to the various widgets. If it doesn't get a MapBean, then the projection widgets will appear to be non-functioning.
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected boolean |
addPan |
static java.lang.String |
AddPanProperty |
protected boolean |
addScale |
static java.lang.String |
AddScaleProperty |
protected boolean |
addZoom |
static java.lang.String |
AddZoomProperty |
static java.lang.String |
defaultKey |
protected java.lang.String |
key |
protected NavigatePanel |
navPanel
Navigation rosette
|
protected ScaleTextPanel |
scaleField
ScaleTextPanel for scale text.
|
protected ZoomPanel |
zoomPanel
Zoom buttons
|
beanContextChildSupport, i18n, isolated, orientation, propertyPrefix, 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 |
---|
OMToolSet()
Create the OMToolSet.
|
Modifier and Type | Method and Description |
---|---|
void |
addButton(java.lang.String name,
java.lang.String info,
java.awt.event.ActionListener al)
Add a button to the panel.
|
void |
addButton(java.net.URL url,
java.lang.String info,
java.awt.event.ActionListener al)
Add a button to the panel.
|
protected void |
createFace()
Sets the visibility of the default components, based on their
boolean settings.
|
void |
findAndInit(java.lang.Object someObj)
MapHandlerChild method.
|
void |
findAndUndo(java.lang.Object someObj)
MapHandlerChild method.
|
java.awt.Container |
getFace()
Tool interface method.
|
java.lang.String |
getKey()
Tool interface method.
|
NavigatePanel |
getNavigatePanel()
Get the NavigatePanel.
|
java.util.Properties |
getProperties(java.util.Properties getList)
Method to fill in a Properties object, reflecting the current
values of the PropertyConsumer.
|
java.util.Properties |
getPropertyInfo(java.util.Properties list)
Method to fill in a Properties object with values reflecting
the properties able to be set on this PropertyConsumer.
|
ScaleTextPanel |
getScaleField()
Get the scale field widget.
|
ZoomPanel |
getZoomPanel()
Get the ZoomPanel
|
void |
removeFromAllListeners(MapBean aMapBean)
This function removes the mapBean object from its set of
Listeners.
|
void |
setKey(java.lang.String aKey)
Tool interface method.
|
void |
setProperties(java.lang.String prefix,
java.util.Properties setList)
Method to set the properties in the PropertyConsumer.
|
void |
setupListeners(MapBean aMapBean)
Convenience function to set up listeners of the components.
|
addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, fireVetoableChange, getBeanContext, getOrientation, getPropertyPrefix, getWindowSupport, isIsolated, removeVetoableChangeListener, setBeanContext, setIsolated, setOrientation, setProperties, setPropertyPrefix, setWindowSupport
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, 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, setVisible, unregisterKeyboardAction, update
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, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, 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, removeComponentListener, 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, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOrientation, setOrientation
public static final java.lang.String defaultKey
protected java.lang.String key
protected transient NavigatePanel navPanel
protected transient ZoomPanel zoomPanel
protected transient ScaleTextPanel scaleField
public static final java.lang.String AddZoomProperty
public static final java.lang.String AddPanProperty
public static final java.lang.String AddScaleProperty
protected boolean addZoom
protected boolean addPan
protected boolean addScale
public java.awt.Container getFace()
protected void createFace()
public java.lang.String getKey()
public void setKey(java.lang.String aKey)
public ZoomPanel getZoomPanel()
public NavigatePanel getNavigatePanel()
public ScaleTextPanel getScaleField()
public void setupListeners(MapBean aMapBean)
aMapBean
- a map object.public void removeFromAllListeners(MapBean aMapBean)
aMapBean
- a map object.public void addButton(java.lang.String name, java.lang.String info, java.awt.event.ActionListener al)
name
- image filenameinfo
- tool tipal
- ActionListenerpublic void addButton(java.net.URL url, java.lang.String info, java.awt.event.ActionListener al)
url
- URL for imageinfo
- tool tipal
- ActionListenerpublic void findAndInit(java.lang.Object someObj)
findAndInit
in interface LightMapHandlerChild
findAndInit
in class OMComponentPanel
public void findAndUndo(java.lang.Object someObj)
findAndUndo
in interface LightMapHandlerChild
findAndUndo
in class OMComponentPanel
public void setProperties(java.lang.String prefix, java.util.Properties setList)
setProperties
in interface PropertyConsumer
setProperties
in class OMComponentPanel
prefix
- a String used by the PropertyConsumer to prepend
to each property value it wants to look up -
setList.getProperty(prefix.propertyKey). If the prefix
had already been set, then the prefix passed in should
replace that previous value.setList
- a Properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public java.util.Properties getProperties(java.util.Properties getList)
getProperties
in interface PropertyConsumer
getProperties
in class OMComponentPanel
getList
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.public java.util.Properties getPropertyInfo(java.util.Properties list)
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMComponentPanel
list
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details