|
|||||||||||
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.Layer | +--com.bbn.openmap.layer.OMGraphicHandlerLayer | +--com.bbn.openmap.layer.rpf.RpfLayer
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 #------------------------------------
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 |
cancelled, CANCELLED_LOCK, consumeEvents, ConsumeEventsProperty, filter, layerWorker, LAYERWORKER_LOCK, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList |
Fields inherited from class com.bbn.openmap.Layer |
addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, autoPalette, AutoPaletteProperty, beanContextChildSupport, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, IDListeners, localHackList, lsListeners, palette, paletteListener, PrettyNameProperty, propertyPrefix, RedrawCmd, removable, RemovableProperty, RemoveableProperty, 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.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 |
setViewAttributes(RpfViewAttributes rva)
Set the view attributes for the layer. |
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 |
protected transient RpfCacheManager cache
protected java.lang.String[] paths
protected RpfViewAttributes viewAttributes
RpfViewAttributes
protected boolean killCache
protected RpfFrameProvider frameProvider
protected RpfCoverage coverage
protected int subframeCacheSize
protected int auxSubframeCacheSize
Constructor Detail |
public RpfLayer()
public RpfLayer(java.lang.String[] pathsToRPFDirs)
pathsToRPFDirs
- paths to the RPF directories that hold
A.TOC files.Method Detail |
public void setPaths(java.lang.String[] pathsToRPFDirs)
pathsToRPFDirs
- Array of strings that list the paths to
RPF directories.public java.lang.String[] getPaths()
public void removed(java.awt.Container cont)
removed
in class Layer
cont
- Containerprotected void setDefaultValues()
public void setProperties(java.lang.String prefix, java.util.Properties properties)
setProperties
in interface PropertyConsumer
setProperties
in class OMGraphicHandlerLayer
prefix
- the token to prefix the property namesproperties
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
getProperties
in interface PropertyConsumer
getProperties
in class OMGraphicHandlerLayer
props
- a Properties object to load the PropertyConsumer
properties into. If props equals null, then a new
Properties object should be created.
public java.util.Properties getPropertyInfo(java.util.Properties list)
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMGraphicHandlerLayer
list
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public void resetPalette()
Layer
resetPalette
in class Layer
public void setGraphicList(OMGraphicList aList)
aList
- a list of OMGraphics.public OMGraphicList getGraphicList()
public void clearCache()
public void setViewAttributes(RpfViewAttributes rva)
rva
- the RpfViewAttributes used for the layer.public RpfViewAttributes getViewAttributes()
public void setCoverage(RpfCoverage cov)
cov
- the RpfCoverage tool.public RpfCoverage getCoverage()
public void setFrameProvider(RpfFrameProvider fp)
fp
- the frame provider.public RpfFrameProvider getFrameProvider()
public java.util.Vector getCoverageBoxes()
public void projectionChanged(ProjectionEvent e)
projectionChanged
in interface ProjectionListener
projectionChanged
in class OMGraphicHandlerLayer
e
- The projection event, most likely fired from a map
bean.ProjectionChangePolicy
,
StandardPCPolicy
,
ListResetPCPolicy
public void projectionChanged(ProjectionEvent e, boolean saveGraphicsForRedraw)
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.public OMGraphicList prepare()
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.
prepare
in class OMGraphicHandlerLayer
public void paint(java.awt.Graphics g)
paint
in class OMGraphicHandlerLayer
g
- the Graphics context for paintingpublic java.awt.Component getGUI()
getGUI
in class Layer
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class Layer
public static void main(java.lang.String[] argv)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |