|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.MapHandlerChild com.bbn.openmap.OMComponent com.bbn.openmap.event.MapBeanKeyListener com.bbn.openmap.event.ProjMapBeanKeyListener
public class ProjMapBeanKeyListener
The ProjMapBeanKeyListener is a KeyListener that gets events when the MapBean has focus, and responds to certain keys by changing the projection. The arrow keys pan the map, and 'z' zooms in. Shift-z zooms out. The less than/comma key tells a projection stack to go back to the last projection, and the greater than/period tells it to go to the next projection. The MapBean has to have focus for these to work which is usually gained by clicking on the map.
Field Summary | |
---|---|
protected PanSupport |
panners
|
protected ListenerSupport<java.awt.event.ActionListener> |
projListeners
|
protected ZoomSupport |
zoomers
|
protected float |
zoomFactor
Default Zoom In Factor is 2, meaning that the scale number will be cut in half to zoom in and doubled to zoom out. |
Fields inherited from class com.bbn.openmap.event.MapBeanKeyListener |
---|
mapBean |
Fields inherited from class com.bbn.openmap.OMComponent |
---|
i18n, propertyPrefix |
Fields inherited from class com.bbn.openmap.MapHandlerChild |
---|
beanContextChildSupport, isolated |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
ProjMapBeanKeyListener()
|
Method Summary | |
---|---|
void |
addActionListener(java.awt.event.ActionListener al)
Add an ActionListener for events that trigger events to shift the Projection stack. |
void |
findAndInit(java.lang.Object someObj)
In addition to the MapBean, find a projection stack so the less than/greater than works on that. |
void |
findAndUndo(java.lang.Object someObj)
The childrenRemoved has been changed to go through its iterator to call this method with every object. |
protected void |
fireProjectionStackEvent(java.lang.String command)
Called by keyReleased when the period/comma keys are pressed. |
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
removeActionListener(java.awt.event.ActionListener al)
Remove an ActionListener that receives events that trigger events to shift the Projection stack. |
void |
setMapBean(MapBean map)
In addition to the super.setMapBean() method, also sets the MapBean as a zoom and pan listener. |
void |
updateProjectionStackStatus(boolean containsBackProjections,
boolean containsForwardProjections)
To receive a status to let the trigger know if any projections in the forward or backward stacks exist, possibly to disable any gui widgets. |
Methods inherited from class com.bbn.openmap.event.MapBeanKeyListener |
---|
getMapBean, keyPressed, keyTyped |
Methods inherited from class com.bbn.openmap.OMComponent |
---|
getProperties, getPropertyInfo, getPropertyPrefix, setProperties, setProperties, setPropertyPrefix |
Methods inherited from class com.bbn.openmap.MapHandlerChild |
---|
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient float zoomFactor
protected PanSupport panners
protected ZoomSupport zoomers
protected ListenerSupport<java.awt.event.ActionListener> projListeners
Constructor Detail |
---|
public ProjMapBeanKeyListener()
Method Detail |
---|
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
keyReleased
in class MapBeanKeyListener
public void setMapBean(MapBean map)
setMapBean
in class MapBeanKeyListener
protected void fireProjectionStackEvent(java.lang.String command)
public void addActionListener(java.awt.event.ActionListener al)
addActionListener
in interface ProjectionStackTrigger
public void removeActionListener(java.awt.event.ActionListener al)
removeActionListener
in interface ProjectionStackTrigger
public void updateProjectionStackStatus(boolean containsBackProjections, boolean containsForwardProjections)
updateProjectionStackStatus
in interface ProjectionStackTrigger
containsBackProjections
- there is at least one past
projection in the back cache.containsForwardProjections
- there is at least one future
projection in the forward cache. Used when a past
projection is being used.public void findAndInit(java.lang.Object someObj)
findAndInit
in interface LightMapHandlerChild
findAndInit
in class MapBeanKeyListener
public void findAndUndo(java.lang.Object someObj)
MapHandlerChild
findAndUndo
in interface LightMapHandlerChild
findAndUndo
in class MapBeanKeyListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |