|
||||||||||
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 javax.swing.JPanel com.bbn.openmap.gui.OMComponentPanel com.bbn.openmap.gui.OMToolSet
public class OMToolSet
The OMToolSet bundles other control beans, and is a Tool used in the OpenMap application.
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
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 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 |
Fields inherited from class com.bbn.openmap.gui.OMComponentPanel |
---|
beanContextChildSupport, i18n, isolated, orientation, propertyPrefix, windowSupport |
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 | |
---|---|
OMToolSet()
Create the OMToolSet. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.bbn.openmap.gui.OMComponentPanel |
---|
addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, fireVetoableChange, getBeanContext, getOrientation, getPropertyPrefix, getWindowSupport, isIsolated, removeVetoableChangeListener, setBeanContext, setIsolated, setOrientation, setProperties, setPropertyPrefix, setWindowSupport |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
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, 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 |
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, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.bbn.openmap.gui.Tool |
---|
getOrientation, setOrientation |
Methods inherited from interface java.beans.beancontext.BeanContextChild |
---|
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
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
Constructor Detail |
---|
public OMToolSet()
Method Detail |
---|
public java.awt.Container getFace()
getFace
in interface Tool
protected void createFace()
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 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |