public class GoToMenu extends AbstractOpenMapMenu
gotoMenu.class=com.bbn.openmap.gui.GoToMenu #Add the default, world view option gotoMenu.addDefaults=true #Add the menu for DataBoundsProviders gotoMenu.addDataViews=true #Additional views goto.views=Argentina India United_States Caspian_Sea Argentina.latitude=-39.760445 Argentina.longitude=-65.92294 Argentina.name=Argentina Argentina.projection=Mercator Argentina.scale=5.0E7 India.latitude=20.895763 India.longitude=80.437485 India.name=India India.projection=Mercator India.scale=3.86688E7 United_States.latitude=38.82259 United_States.longitude=-96.74999 United_States.name=United States United_States.projection=Mercator United_States.scale=5.186114E7 Caspian_Sea.name=Caspian Sea Caspian_Sea.latitude=40f Caspian_Sea.longitude=47f Caspian_Sea.scale=1000000 Caspian_Sea.projection=CADRG
Modifier and Type | Class and Description |
---|---|
class |
GoToMenu.AddNewViewButton
This is the button that will bring up the dialog to actually name a new
view being added.
|
class |
GoToMenu.GoToButton
This button contains the trigger for a saved view.
|
class |
GoToMenu.NameFetcher
Brings up a GUI to name a new view.
|
javax.swing.JMenu.AccessibleJMenu, javax.swing.JMenu.WinListener
javax.swing.JMenuItem.AccessibleJMenuItem
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected boolean |
addDataViews |
static java.lang.String |
AddDataViewsProperty
Flag to use to enable/disable the gathering of DataBoundsProviders.
|
static java.lang.String |
AddDefaultListProperty
Flag to use to add default views (World, each continent.
|
protected boolean |
addDefaults |
protected java.util.List |
customViews |
protected OMBasicMenu |
dataBoundsMenu |
protected java.util.Hashtable |
dataBoundsProviders |
static java.lang.String |
LatProperty
The center latitude of the view projection.
|
static java.lang.String |
LonProperty
The center longitude of the view projection.
|
protected MapBean |
map |
static java.lang.String |
NameProperty
The name of the view to use in the GUI.
|
static java.lang.String |
ProjectionTypeProperty
The projection type of the view projection.
|
static java.lang.String |
ScaleProperty
The scale of the view projection.
|
static java.lang.String |
ViewListProperty
A space separated list of marker names for the views to be loaded from
the properties.
|
beanContextChildSupport, i18n, items, itemsProperties, ItemsProperty, itemsPropertyContents, MnemonicProperty, PrettyNameProperty, propertyPrefix, SeparatorProperty
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
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 |
---|
GoToMenu() |
Modifier and Type | Method and Description |
---|---|
void |
addDataBoundsProvider(DataBoundsProvider provider) |
void |
addDefaultLocations()
Add the default views to the menu.
|
void |
addLocationItem(java.lang.String prefix,
java.util.Properties props)
Parse and add the view from properties.
|
void |
addView(GoToMenu.GoToButton newOne)
Add a button to the menu that will set the map to a particular view.
|
protected java.util.List |
createCustomViews()
An internal callback method that creates the custom views List object.
|
java.util.List |
ensureCustomViews()
Should call this when dealing with the custom views list, will always
return a non-null answer.
|
void |
findAndInit(java.lang.Object someObj)
Method called when an object is added from the MapHandler.
|
void |
findAndUndo(java.lang.Object someObj)
Method called when an object is removed from the MapHandler.
|
java.util.List |
getCustomViews() |
MapBean |
getMap() |
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer interface method.
|
java.util.Properties |
getPropertyInfo(java.util.Properties props)
PropertyConsumer interface method.
|
void |
removeDataBoundsProvider(DataBoundsProvider provider) |
void |
setCustomViews(java.util.List views) |
void |
setMap(MapBean mb)
Set the map to control.
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
PropertyConsumer interface method.
|
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndUndo, getBeanContext, getMapHandler, getPropertyPrefix, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setProperties, setPropertyPrefix
add, add, add, add, add, addMenuListener, addSeparator, applyComponentOrientation, createActionChangeListener, createActionComponent, createWinListener, doClick, fireMenuCanceled, fireMenuDeselected, fireMenuSelected, getAccessibleContext, getComponent, getDelay, getItem, getItemCount, getMenuComponent, getMenuComponentCount, getMenuComponents, getMenuListeners, getPopupMenu, getPopupMenuOrigin, getSubElements, getUIClassID, insert, insert, insert, insertSeparator, isMenuComponent, isPopupMenuVisible, isSelected, isTearOff, isTopLevelMenu, menuSelectionChanged, paramString, processKeyEvent, remove, remove, remove, removeAll, removeMenuListener, setAccelerator, setComponentOrientation, setDelay, setMenuLocation, setModel, setPopupMenuVisible, setSelected, updateUI
actionPropertyChanged, addMenuDragMouseListener, addMenuKeyListener, configurePropertiesFromAction, fireMenuDragMouseDragged, fireMenuDragMouseEntered, fireMenuDragMouseExited, fireMenuDragMouseReleased, fireMenuKeyPressed, fireMenuKeyReleased, fireMenuKeyTyped, getAccelerator, getMenuDragMouseListeners, getMenuKeyListeners, init, isArmed, processKeyEvent, processMenuDragMouseEvent, processMenuKeyEvent, processMouseEvent, removeMenuDragMouseListener, removeMenuKeyListener, setArmed, setEnabled, setUI
addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, paintBorder, removeActionListener, removeChangeListener, removeItemListener, removeNotify, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, addContainerListener, addPropertyChangeListener, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected java.util.Hashtable dataBoundsProviders
protected OMBasicMenu dataBoundsMenu
protected MapBean map
public static final java.lang.String ViewListProperty
public static final java.lang.String NameProperty
public static final java.lang.String LatProperty
public static final java.lang.String LonProperty
public static final java.lang.String ScaleProperty
public static final java.lang.String ProjectionTypeProperty
public static final java.lang.String AddDefaultListProperty
public static final java.lang.String AddDataViewsProperty
protected boolean addDefaults
protected boolean addDataViews
protected java.util.List customViews
public void findAndUndo(java.lang.Object someObj)
AbstractOpenMapMenu
findAndUndo
in interface LightMapHandlerChild
findAndUndo
in class AbstractOpenMapMenu
public void findAndInit(java.lang.Object someObj)
AbstractOpenMapMenu
findAndInit
in interface LightMapHandlerChild
findAndInit
in class AbstractOpenMapMenu
public void setMap(MapBean mb)
public MapBean getMap()
public void setProperties(java.lang.String prefix, java.util.Properties props)
setProperties
in interface PropertyConsumer
setProperties
in class AbstractOpenMapMenu
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
getProperties
in interface PropertyConsumer
getProperties
in class AbstractOpenMapMenu
props
- a Properties object to load the PropertyConsumer properties
into. If props equals null, then a new Properties object should be
created.public java.util.Properties getPropertyInfo(java.util.Properties props)
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class AbstractOpenMapMenu
props
- a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.public void addDefaultLocations()
protected java.util.List createCustomViews()
public java.util.List getCustomViews()
public java.util.List ensureCustomViews()
public void setCustomViews(java.util.List views)
public void addLocationItem(java.lang.String prefix, java.util.Properties props)
public void addDataBoundsProvider(DataBoundsProvider provider)
public void removeDataBoundsProvider(DataBoundsProvider provider)
public void addView(GoToMenu.GoToButton newOne)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details