com.bbn.openmap.layer
Class BufferedLayer.BLMapBean

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.bbn.openmap.MapBean
                  extended by com.bbn.openmap.BufferedMapBean
                      extended by com.bbn.openmap.layer.BufferedLayer.BLMapBean
All Implemented Interfaces:
CenterListener, LayerListener, PanListener, ProjectionListener, ZoomListener, SoloMapComponent, java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener
Enclosing class:
BufferedLayer

public class BufferedLayer.BLMapBean
extends BufferedMapBean

An simple extension of the BufferedMapBean that calls a layer, presumably its parent, to call repaint(). This is necessary in order to make sure Swing calls paint properly. Only repaint() is overridden in this class over a standard BufferedMapBean.

See Also:
Serialized Form

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
 
Fields inherited from class com.bbn.openmap.BufferedMapBean
bufferDirty, drawingBuffer, panningTransform
 
Fields inherited from class com.bbn.openmap.MapBean
addedLayers, background, BackgroundProperty, currentLayers, CursorProperty, DEFAULT_BACKGROUND_COLOR, DEFAULT_CENTER_LAT, DEFAULT_CENTER_LON, DEFAULT_HEIGHT, DEFAULT_SCALE, DEFAULT_WIDTH, doContainerChange, layerRemovalDelayed, LayersProperty, minHeight, minWidth, painters, projection, projectionFactory, ProjectionProperty, projectionSupport, ProjectionVetoedProperty, removedLayers, repaintPolicy, rotationAngle, rotHelper, suppressCopyright, title, version
 
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
BufferedLayer.BLMapBean()
          Default constructor.
 
Method Summary
 void componentRemoved(java.awt.event.ContainerEvent e)
          We don't want the BLMapBean to be hanging on to removed layers, that'll be done at a higher level.
 java.awt.Color getBackground()
          For the Buffered Layer MapBean, the background color is always clear.
 Projection getRotatedProjection()
           
 void paintChildren(java.awt.Graphics g, java.awt.Rectangle clip)
          Fine-tuned for the purposes of a BufferedLayer - just create a new image if the buffer is dirty.
 void repaint(Layer layer)
          Set the buffer dirty, and call repaint on the layer.
 
Methods inherited from class com.bbn.openmap.BufferedMapBean
componentResized, dispose, disposeDrawingBuffer, getPanningTransform, isBufferDirty, isBuffered, resetDrawingBuffer, setBufferDirty, setPanningTransform
 
Methods inherited from class com.bbn.openmap.MapBean
addImpl, addPaintListener, addProjectionListener, addPropertyChangeListener, center, changeLayers, componentAdded, componentHidden, componentMoved, componentShown, debugmsg, drawProjectionBackground, fireProjectionChanged, getBckgrnd, getCenter, getCoordinates, getCoordinates, getCopyrightMessage, getDoContainerChange, getGraphics, getInsets, getMapBeanRepaintPolicy, getMinimumSize, getNonRotatedLocation, getNonRotatedLocation, getNonRotatedShape, getProjection, getProjectionFactory, getRotationAngle, getRotHelper, getScale, getUpdatedRotHelper, hideLayerPalettes, inverse, isLayerRemovalDelayed, paint, paintBorder, paintChildren, paintChildrenWithBorder, paintLayers, paintPainters, pan, projectionChanged, purgeAndNotifyRemovedLayers, removePaintListener, removeProjectionListener, setBackground, setBackgroundColor, setBckgrnd, setCenter, setCenter, setCenter, setCursor, setDoContainerChange, setLayerRemovalDelayed, setLayers, setLayout, setMapBeanRepaintPolicy, setMinimumSize, setProjection, setProjectionFactory, setRotationAngle, setRotationAngle, setRotHelper, setScale, showLayerPalettes, toString, zoom
 
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
 

Constructor Detail

BufferedLayer.BLMapBean

public BufferedLayer.BLMapBean()
Default constructor.

Method Detail

getBackground

public java.awt.Color getBackground()
For the Buffered Layer MapBean, the background color is always clear. Let the layers add the color...

Overrides:
getBackground in class MapBean
Returns:
color java.awt.Color.

repaint

public void repaint(Layer layer)
Set the buffer dirty, and call repaint on the layer.

Overrides:
repaint in class MapBean

paintChildren

public void paintChildren(java.awt.Graphics g,
                          java.awt.Rectangle clip)
Fine-tuned for the purposes of a BufferedLayer - just create a new image if the buffer is dirty.

Overrides:
paintChildren in class BufferedMapBean

getRotatedProjection

public Projection getRotatedProjection()
Overrides:
getRotatedProjection in class MapBean
Returns:
the expanded rotated projection if map rotated, normal projection if not rotated. The rotated projection is larger than the MapBean and has extra offsets.

componentRemoved

public void componentRemoved(java.awt.event.ContainerEvent e)
We don't want the BLMapBean to be hanging on to removed layers, that'll be done at a higher level.

Specified by:
componentRemoved in interface java.awt.event.ContainerListener
Overrides:
componentRemoved in class MapBean
Parameters:
e - ContainerEvent
See Also:
MapBean.purgeAndNotifyRemovedLayers()


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details