com.bbn.openmap.layer.rpf
Class RpfLayer

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bycom.bbn.openmap.Layer
                  extended bycom.bbn.openmap.layer.OMGraphicHandlerLayer
                      extended bycom.bbn.openmap.layer.rpf.RpfLayer
All Implemented Interfaces:
java.awt.event.ActionListener, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, GestureResponsePolicy, java.awt.image.ImageObserver, java.awt.MenuContainer, ProjectionListener, ProjectionPainter, PropertyConsumer, RpfConstants, java.io.Serializable

public class RpfLayer
extends OMGraphicHandlerLayer
implements java.awt.event.ActionListener, RpfConstants, java.io.Serializable

The RpfLayer fills the screen with RPF data. There is also a tool available that allows you to see the coverage of the available data. To view theimages, the projection of the map has to be set in the ARC projection, which OpenMap calls the CADRG projection. The RpfLayer can use several RPF directories at the same time, and doesn't require that the data actually be there at runtime. That way, you can give a location where the data may be mouted during runtime(i.e. CDROM) and the layer will still use the data. The scale of the projection does not necessarily have to match the scale of a map series for that series to be displayed. There are options, set in the RpfViewAttributes, that allow scaling of the RPF images to match the map scale.

The RpfLayer uses the RpfCacheManager to get the images it needs to display. Whenever the projection changes, the cache manager takes the new projection and creates a OMGraphicList with the new image frames and attribute text.

The RpfLayer gets its intial settings from properties. This should be done right after the RpfLayer is created. The properties list contains the location of the RPF directories, the opaqueness of the images, the number of colors to use, and whether to show the images and/or attributes by default. An example of the RpfLayer properties:

     
      
       
        
         
          
           
            
             
              
              #-----------------------------
              # Properties for RpfLayer
              #-----------------------------
              # Mandatory properties
              # This property should reflect the paths to the RPF directories
              rpf.paths=/usr/local/matt/data/RPF;/usr/local/matt/data/CIB/RPF
              
              # Optional Properties - the default will be set if these are not 
              # included in the properties file: 
              # Number between 0-255: 0 is transparent, 255 is opaque.  255 is default.
              rpf.opaque=128
              
              # Number of colors to use on the maps - 16, 32, 216.  216 is default.
              rpf.numberColors=216
              
              # Display maps on startup.  Default is true.
              rpf.showMaps=true
              
              # Display attribute information on startup.  Default is false.
              rpf.showInfo=false
              
              # Scale charts to match display scale.  Default is true.
              rpf.scaleImages=true
              
              # The scale factor to allow when scaling images (2x, 4x, also mean 1/2, 1/4).  Default is 4.
              rpf.imageScaleFactor=4
              
              # Delete the cache if the layer is removed from the map.  Default is false.
              rpf.killCache=true
              # Limit the display to the chart code specified. (GN, JN, ON, TP, etc.).
              # Default is ANY
              rpf.chartSeries=ANY
              # Get the subframe attribute data from the Frame provider.
              rpf.autofetchAttributes=false
              # Set to true if you want the coverage tool available.
              rpf.coverage=true
              # Set the subframe cache size. (Number of subframes to hold on to, 256x256 pixels)
              rpf.subframeCacheSize=128
              # Then also include coverage properties, which are available in the RpfConstants.
              #------------------------------------
              # End of properties for RpfLayer
              #------------------------------------
              
              
             
            
           
          
         
        
       
      
 

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
protected  int auxSubframeCacheSize
          Auxillary subframe cache size.
protected  RpfCacheManager cache
          The main source for the images and attribute information.
protected  RpfCoverage coverage
          The coverage tool for the layer.
protected  RpfFrameProvider frameProvider
          The supplier of frame data.
protected  boolean killCache
          Flag to delete the cache if the layer is removed from the map.
protected  java.lang.String[] paths
          The paths to the RPF directories, telling where the data is.
protected  int subframeCacheSize
          Subframe cache size.
protected  RpfViewAttributes viewAttributes
          The display attributes for the maps.
 
Fields inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer
consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty
 
Fields inherited from class com.bbn.openmap.Layer
addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, attributes, autoPalette, AutoPaletteProperty, beanContextChildSupport, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, IDListeners, localHackList, lsListeners, maxScale, MaxScaleProperty, minScale, MinScaleProperty, palette, paletteListener, PrettyNameProperty, propertyPrefix, RedrawCmd, removable, RemovableProperty, SWING_PACKAGE, windowSupport
 
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 com.bbn.openmap.layer.rpf.RpfConstants
A1, A2, A3, A4, AT, AutoFetchAttributeProperty, AuxCacheSizeProperty, BLANK, C1, C2, C3, C4, C5, C6, C7, C8, C9, CA, CacheSizeProperty, CADRG, CB, CC, CD, CDTED, CE, CF, CG, CGColorProperty, CH, ChartSeriesProperty, CIB, CIB10ColorProperty, CIB5ColorProperty, CITYGRAPHICS, CJ, CK, CL, CM, CN, CO, ColormodelProperty, CoverageProperty, CP, CQ, CR, CS, CT, D1, D2, DefaultRPFCoveragePrefix, DT, FillProperty, GN, GNCColorProperty, HA, I1, I2, I3, I4, IM, ImageScaleFactorProperty, JA, JG, JN, JNCColorProperty, JOGColorProperty, JR, KillCacheProperty, LF, LG, lockedButtonTitle, lockSeriesCommand, MISCColorProperty, MM, NumColorsProperty, OA, OI, ON, ONCColorProperty, OpaquenessProperty, OV, RpfPathsProperty, ScaleImagesProperty, showCGCommand, ShowCGProperty, showCIB10Command, ShowCIB10Property, showCIB5Command, ShowCIB5Property, showCoverageCommand, showGNCCommand, ShowGNCProperty, showInfoCommand, ShowInfoProperty, showJNCCommand, ShowJNCProperty, showJOGCommand, ShowJOGProperty, showMapsCommand, ShowMapsProperty, showMISCCommand, ShowMISCProperty, showONCCommand, ShowONCProperty, showTLMCommand, ShowTLMProperty, showTPCCommand, ShowTPCProperty, TC, TF, TL, TLMColorProperty, TOPOLINEMAP, TP, TPCColorProperty, TQ, TT, UK, unlockedButtonTitle, Various, VARIOUS
 
Fields inherited from interface com.bbn.openmap.PropertyConsumer
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RpfLayer()
          The default constructor for the Layer.
RpfLayer(java.lang.String[] pathsToRPFDirs)
          The default constructor for the Layer.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          The Action Listener method, that reacts to the palette widgets actions.
 void clearCache()
          Clear the frame cache.
 RpfCoverage getCoverage()
          Return the coverage tool used by the layer.
 java.util.Vector getCoverageBoxes()
          Returns the Vector containing RpfCoverageBoxes that was returned from the RpfFrameProvider as a result of the last setCache call.
 RpfFrameProvider getFrameProvider()
          Return RpfFrameProvider used by the layer.
 OMGraphicList getGraphicList()
          Retrieves the current graphics list.
 java.awt.Component getGUI()
          Provides the palette widgets to control the options of showing maps, or attribute text.
 java.lang.String[] getPaths()
          Get the paths to the RPF directories.
 java.util.Properties getProperties(java.util.Properties props)
          PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer.
 java.util.Properties getPropertyInfo(java.util.Properties list)
          Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
 RpfViewAttributes getViewAttributes()
          Get the view attributes or the layer.
static void main(java.lang.String[] argv)
          Print out the contents of a properties file.
 void paint(java.awt.Graphics g)
          Paints the layer.
 OMGraphicList prepare()
          Prepares the graphics for the layer.
 void projectionChanged(ProjectionEvent e)
          The projectionListener interface method that lets the Layer know when the projection has changes, and therefore new graphics have to created /supplied for the screen.
 void projectionChanged(ProjectionEvent e, boolean saveGraphicsForRedraw)
          Called from projectionListener interface method that lets the Layer know when the projection has changes, and therefore new graphics have to created /supplied for the screen.
 void removed(java.awt.Container cont)
          Called when the layer is no longer part of the map.
 void resetPalette()
          Called when something about the layer has changed that would require the palette to be reconfigured.
 void setCoverage(RpfCoverage cov)
          Set the RpfCoverage tool used by the layer.
protected  void setDefaultValues()
           
 void setFrameProvider(RpfFrameProvider fp)
          Set the RpfFrameProvider for the layer.
 void setGraphicList(OMGraphicList aList)
          Sets the current graphics list to the given list.
 void setPaths(java.lang.String[] pathsToRPFDirs)
          Set the paths to the RPF directories, which are by default the parents of the A.TOC table of contents files.
 void setProperties(java.lang.String prefix, java.util.Properties properties)
          Set all the RPF properties from a properties object.
 void setTransparency(float value)
          Set the transparency of the layer.
 void setViewAttributes(RpfViewAttributes rva)
          Set the view attributes for the layer.
 
Methods inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer
canSetList, copy, createLayerWorker, cut, deselect, doAction, doPrepare, filter, filter, filter, getConsumeEvents, getFilter, getInfoText, getItemsForMapMenu, getItemsForOMGraphicMenu, getLayerWorker, getList, getMapMouseListener, getMouseEventInterpreter, getMouseModeIDsForEvents, getProjectionChangePolicy, getRenderPolicy, getSelected, getToolTipTextFor, getTransparency, getTransparencyAdjustmentPanel, highlight, interrupt, isCancelled, isHighlightable, isInterruptable, isSelectable, isWorking, leftClick, mouseOver, paste, receivesMapEvents, renderDataForProjection, resetFiltering, select, setCancelled, setConsumeEvents, setFilter, setInterruptable, setLayerWorker, setList, setMouseEventInterpreter, setMouseModeIDsForEvents, setProjectionChangePolicy, setRenderPolicy, supportsSQL, unhighlight, workerComplete
 
Methods inherited from class com.bbn.openmap.Layer
addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, createWindowSupport, finalize, findAndInit, findAndInit, findAndUndo, fireHideToolTip, firePaletteEvent, fireRequestBrowserContent, fireRequestBrowserContent, fireRequestCursor, fireRequestInfoLine, fireRequestInfoLine, fireRequestInfoLine, fireRequestMessage, fireRequestMessage, fireRequestToolTip, fireRequestToolTip, fireRequestURL, fireRequestURL, fireStatusUpdate, fireStatusUpdate, fireVetoableChange, getAddAsBackground, getAddToBeanContext, getAttribute, getBeanContext, getIcon, getMaxScale, getMinScale, getPackage, getPalette, getProjection, getPropertyPrefix, getWindowSupport, hasGUI, hidePalette, isAutoPalette, isProjectionOK, isRemovable, notifyHideHack, putAttribute, removeComponentListener, removeConfirmed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, repaint, setAddAsBackground, setAddToBeanContext, setAutoPalette, setBeanContext, setIcon, setMaxScale, setMinScale, setName, setPaletteVisible, setProjection, setProjection, setProperties, setPropertyPrefix, setRemovable, setVisible, setWindowSupport, showPalette
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, 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, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, 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, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

cache

protected transient RpfCacheManager cache
The main source for the images and attribute information. All requests for graphic objects should go through this cache, and it will automatically handle getting the frame files, decoding them, and returning an object list.


paths

protected java.lang.String[] paths
The paths to the RPF directories, telling where the data is.


viewAttributes

protected RpfViewAttributes viewAttributes
The display attributes for the maps. This object should not be replaced, because the caches all look at it, too. Just adjust the parameters within it.

See Also:
RpfViewAttributes

killCache

protected boolean killCache
Flag to delete the cache if the layer is removed from the map.


frameProvider

protected RpfFrameProvider frameProvider
The supplier of frame data.


coverage

protected RpfCoverage coverage
The coverage tool for the layer.


subframeCacheSize

protected int subframeCacheSize
Subframe cache size. Default is 40.


auxSubframeCacheSize

protected int auxSubframeCacheSize
Auxillary subframe cache size. Default is 10.

Constructor Detail

RpfLayer

public RpfLayer()
The default constructor for the Layer. All of the attributes are set to their default values. Use this construct if you are going to use a standard properties file, which will set the paths.


RpfLayer

public RpfLayer(java.lang.String[] pathsToRPFDirs)
The default constructor for the Layer. All of the attributes are set to their default values.

Parameters:
pathsToRPFDirs - paths to the RPF directories that hold A.TOC files.
Method Detail

setPaths

public void setPaths(java.lang.String[] pathsToRPFDirs)
Set the paths to the RPF directories, which are by default the parents of the A.TOC table of contents files. Creates the RpfFrameProvider.

Parameters:
pathsToRPFDirs - Array of strings that list the paths to RPF directories.

getPaths

public java.lang.String[] getPaths()
Get the paths to the RPF directories.

Returns:
String[]

removed

public void removed(java.awt.Container cont)
Called when the layer is no longer part of the map. In this case, we should disconnect from the server if we have a link.

Overrides:
removed in class Layer
Parameters:
cont - Container

setDefaultValues

protected void setDefaultValues()

setProperties

public void setProperties(java.lang.String prefix,
                          java.util.Properties properties)
Set all the RPF properties from a properties object.

Specified by:
setProperties in interface PropertyConsumer
Overrides:
setProperties in class OMGraphicHandlerLayer
Parameters:
prefix - the token to prefix the property names
properties - the Properties object

getProperties

public java.util.Properties getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer. If the layer has a propertyPrefix set, the property keys should have that prefix plus a separating '.' prepended to each propery key it uses for configuration.

Specified by:
getProperties in interface PropertyConsumer
Overrides:
getProperties in class OMGraphicHandlerLayer
Parameters:
props - a Properties object to load the PropertyConsumer properties into. If props equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getPropertyInfo

public java.util.Properties getPropertyInfo(java.util.Properties list)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. The key for each property should be the raw property name (without a prefix) with a value that is a String that describes what the property key represents, along with any other information about the property that would be helpful (range, default value, etc.). For Layer, this method should at least return the 'prettyName' property.

Specified by:
getPropertyInfo in interface PropertyConsumer
Overrides:
getPropertyInfo in class OMGraphicHandlerLayer
Parameters:
list - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

resetPalette

public void resetPalette()
Description copied from class: Layer
Called when something about the layer has changed that would require the palette to be reconfigured. Will cause getGUI() to be called again. You should take steps before calling this method to make sure that the getGUI() method is ready to recreate the palette components from scratch if needed.

Overrides:
resetPalette in class Layer

setGraphicList

public void setGraphicList(OMGraphicList aList)
Sets the current graphics list to the given list.

Parameters:
aList - a list of OMGraphics.

getGraphicList

public OMGraphicList getGraphicList()
Retrieves the current graphics list.


clearCache

public void clearCache()
Clear the frame cache.


setViewAttributes

public void setViewAttributes(RpfViewAttributes rva)
Set the view attributes for the layer. The frame provider view attributes are updated, and the cache is cleared.

Parameters:
rva - the RpfViewAttributes used for the layer.

getViewAttributes

public RpfViewAttributes getViewAttributes()
Get the view attributes or the layer.

Returns:
RpfViewAttributes.

setCoverage

public void setCoverage(RpfCoverage cov)
Set the RpfCoverage tool used by the layer. If the view attributes chart series setting is not equal to RpfViewAttributes.ANY, then the palette of the tool is not shown.

Parameters:
cov - the RpfCoverage tool.

getCoverage

public RpfCoverage getCoverage()
Return the coverage tool used by the layer.

Returns:
RpfCoverage tool.

setFrameProvider

public void setFrameProvider(RpfFrameProvider fp)
Set the RpfFrameProvider for the layer. Clears out the cache, and the frame provider gets the RpfViewAttributes held by the layer.

Parameters:
fp - the frame provider.

getFrameProvider

public RpfFrameProvider getFrameProvider()
Return RpfFrameProvider used by the layer.


getCoverageBoxes

public java.util.Vector getCoverageBoxes()
Returns the Vector containing RpfCoverageBoxes that was returned from the RpfFrameProvider as a result of the last setCache call. These provide rudimentary knowledge about what is being displayed. This vector is from the primary cache handler.

Returns:
Vector of RpfCoverageBoxes.

projectionChanged

public void projectionChanged(ProjectionEvent e)
The projectionListener interface method that lets the Layer know when the projection has changes, and therefore new graphics have to created /supplied for the screen.

Specified by:
projectionChanged in interface ProjectionListener
Overrides:
projectionChanged in class OMGraphicHandlerLayer
Parameters:
e - The projection event, most likely fired from a map bean.
See Also:
ProjectionChangePolicy, StandardPCPolicy, ListResetPCPolicy

projectionChanged

public void projectionChanged(ProjectionEvent e,
                              boolean saveGraphicsForRedraw)
Called from projectionListener interface method that lets the Layer know when the projection has changes, and therefore new graphics have to created /supplied for the screen.

Parameters:
e - The projection event, most likely fired from a map bean.
saveGraphicsForRedraw - flag to test for whether the scale and zone has changed for the projection. If true, and the scale and zone is the same, we'll just reproject and redraw the current frames before getting new ones, to fake something happening quickly.

prepare

public OMGraphicList prepare()
Prepares the graphics for the layer. This is where the getRectangle() method call is made on the rpf.

Occasionally it is necessary to abort a prepare call. When this happens, the map will set the cancel bit in the LayerThread, (the thread that is running the prepare). If this Layer needs to do any cleanups during the abort, it should do so, but return out of the prepare asap.

Overrides:
prepare in class OMGraphicHandlerLayer
Returns:
graphics list of images and attributes.

paint

public void paint(java.awt.Graphics g)
Paints the layer.

Overrides:
paint in class OMGraphicHandlerLayer
Parameters:
g - the Graphics context for painting

getGUI

public java.awt.Component getGUI()
Provides the palette widgets to control the options of showing maps, or attribute text.

Overrides:
getGUI in class Layer
Returns:
Component object representing the palette widgets.

setTransparency

public void setTransparency(float value)
Description copied from class: OMGraphicHandlerLayer
Set the transparency of the layer. This transparency is applied during rendering.

Overrides:
setTransparency in class OMGraphicHandlerLayer
Parameters:
value - 0f for clear, 1f for opaque.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
The Action Listener method, that reacts to the palette widgets actions.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class Layer

main

public static void main(java.lang.String[] argv)
Print out the contents of a properties file.



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