com.bbn.openmap.layer
Class BufferedLayer.BLMapBean

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bycom.bbn.openmap.MapBean
                  extended bycom.bbn.openmap.BufferedMapBean
                      extended bycom.bbn.openmap.layer.BufferedLayer.BLMapBean
All Implemented Interfaces:
CenterListener, java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.util.EventListener, java.awt.image.ImageObserver, LayerListener, java.awt.MenuContainer, PanListener, ProjectionListener, java.io.Serializable, SoloMapComponent, ZoomListener
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 inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.bbn.openmap.BufferedMapBean
bufferDirty, drawingBuffer
 
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, ProjectionProperty, projectionSupport, ProjectionVetoedProperty, removedLayers, repaintPolicy, 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(Layer parent)
           
 
Method Summary
 java.awt.Image createImage(int width, int height)
          We need the buffer to be able to be transparent.
 java.awt.Color getBackground()
          For the Buffered Layer MapBean, the background color is always clear.
 void paintBorder(java.awt.Graphics g)
          We override this to do nothing because we don't want a border on the BufferedLayer.
 void repaint()
          Set the buffer dirty, and call repaint on the layer.
 void wipeImage()
          We need this because if the background to the BufferedLayer is clear, we need to clear out anything that was previously there.
 
Methods inherited from class com.bbn.openmap.BufferedMapBean
componentResized, isBufferDirty, isBuffered, paintChildren, paintChildren, setBufferDirty, setLayers
 
Methods inherited from class com.bbn.openmap.MapBean
addImpl, addPaintListener, addProjectionListener, addPropertyChangeListener, center, changeLayers, componentAdded, componentHidden, componentMoved, componentRemoved, componentShown, debugmsg, drawProjectionBackground, fireProjectionChanged, getBckgrnd, getCenter, getCoordinates, getCoordinates, getCopyrightMessage, getDoContainerChange, getInsets, getMapBeanRepaintPolicy, getMinimumSize, getProjection, getProjectionType, getScale, hideLayerPalettes, isLayerRemovalDelayed, paint, paintChildrenWithBorder, pan, projectionChanged, purgeAndNotifyRemovedLayers, removePaintListener, removeProjectionListener, repaint, setBackground, setBackgroundColor, setBckgrnd, setCenter, setCenter, setCursor, setDoContainerChange, setLayerRemovalDelayed, setLayout, setMapBeanRepaintPolicy, setMinimumSize, setProjection, setProjectionType, setScale, showLayerPalettes, toString, zoom
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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(Layer parent)
Parameters:
parent - the parent layer of this MapBean.
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()
Set the buffer dirty, and call repaint on the layer.


wipeImage

public void wipeImage()
We need this because if the background to the BufferedLayer is clear, we need to clear out anything that was previously there. This seems to be the only way to do it.


createImage

public java.awt.Image createImage(int width,
                                  int height)
We need the buffer to be able to be transparent.


paintBorder

public void paintBorder(java.awt.Graphics g)
We override this to do nothing because we don't want a border on the BufferedLayer.

Overrides:
paintBorder in class MapBean


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