|
||||||||||
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 com.bbn.openmap.MapBean com.bbn.openmap.BufferedMapBean com.bbn.openmap.BufferedLayerMapBean
public class BufferedLayerMapBean
The BufferedLayerMapBean is a BufferedMapBean with an additional image buffer that holds Layers designated as background layers. The additional image buffer is a BufferedLayer that this MapBean manages, and all background layers are added to the BufferedLayer, which is automatically added to the bottom of the map. When layers are added to the MapBean via the setLayers() method, the Layer.getAddAsBackground() flag is checked, and if that is true for a layer, it is added to the BufferedLayer. The background layers do not receive mouse events.
It should be cautioned that the appearance of the map may not match the layer stack as it is delivered to the MapBean because of this flag. If, for example, layers 1 and 4 are marked as background layers, while layers 2 and 3 are not (in a 4 layer stack), then the map will show layers 2, 3, 1, 4, with layers 1 and 4 being displayed from the BufferedLayer. Something to think about when it comes to designing GUI elements.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.bbn.openmap.BufferedMapBean |
---|
BufferedMapBean.PanHelper |
Nested classes/interfaces inherited from class com.bbn.openmap.MapBean |
---|
MapBean.RotationHelper |
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 BufferedLayer |
bufferedLayer
|
protected boolean |
DEBUG
|
Fields inherited from class com.bbn.openmap.BufferedMapBean |
---|
bufferDirty, drawingBuffer, panningTransform |
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BufferedLayerMapBean()
Construct a MapBean. |
|
BufferedLayerMapBean(boolean useThreadedNotification)
|
Method Summary | |
---|---|
protected void |
changeLayers(java.awt.event.ContainerEvent e)
ContainerListener Interface method. |
void |
dispose()
Call when getting rid of the MapBean, it releases pointers to all listeners and kills the ProjectionSupport thread. |
BufferedLayer |
getBufferedLayer()
|
void |
repaint(Layer layer)
In an effort to limit map flashing, the BufferedLayerMapBean consults the BufferedLayer to check that all background layers are ready to be painted after a projection change, before forwarding on all repaint requests. |
void |
setBackgroundColor(java.awt.Color color)
Set the background color of the map. |
void |
setBckgrnd(java.awt.Paint paint)
Set the background of the map. |
void |
setBufferedLayer(BufferedLayer bl)
|
void |
setLayers(LayerEvent evt)
LayerListener interface method. |
void |
setMapBeanRepaintPolicy(MapBeanRepaintPolicy mbrp)
Set the MapBeanRepaintPolicy used by the MapBean. |
Methods inherited from class com.bbn.openmap.BufferedMapBean |
---|
componentResized, disposeDrawingBuffer, getPanningTransform, isBufferDirty, isBuffered, paintChildren, resetDrawingBuffer, setBufferDirty, setPanningTransform |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getListeners, getLocation, getMaximumSize, 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, paintComponent, paintImmediately, paintImmediately, paramString, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, 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, 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, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected BufferedLayer bufferedLayer
protected boolean DEBUG
Constructor Detail |
---|
public BufferedLayerMapBean()
public BufferedLayerMapBean(boolean useThreadedNotification)
Method Detail |
---|
public void setBackgroundColor(java.awt.Color color)
setBackgroundColor
in class MapBean
color
- java.awt.Color.public void setBckgrnd(java.awt.Paint paint)
MapBean
setBckgrnd
in class MapBean
paint
- java.awt.Paint.public void setBufferedLayer(BufferedLayer bl)
public BufferedLayer getBufferedLayer()
public void setMapBeanRepaintPolicy(MapBeanRepaintPolicy mbrp)
setMapBeanRepaintPolicy
in class MapBean
public void setLayers(LayerEvent evt)
setLayers
in interface LayerListener
setLayers
in class MapBean
evt
- a LayerEventpublic void repaint(Layer layer)
repaint
in class MapBean
protected void changeLayers(java.awt.event.ContainerEvent e)
changeLayers
in class MapBean
e
- ContainerEventpublic void dispose()
dispose
in class BufferedMapBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |