|
||||||||||
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
public class 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 initial 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 #------------------------------------
Nested Class Summary |
---|
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 int |
auxSubframeCacheSize
Auxiliary 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 static java.util.logging.Logger |
logger
|
protected java.lang.String[] |
paths
The paths to the RPF directories, telling where the data is. |
protected static java.util.logging.Logger |
rpfLogger
|
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, layerWorkerQueue, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty |
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.List<RpfCoverageBox> |
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. |
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. |
java.lang.String |
getToolTipTextFor(OMGraphic omg)
If applicable, should return a tool tip for the OMGraphic. |
RpfViewAttributes |
getViewAttributes()
Get the view attributes or the layer. |
void |
highlight(OMGraphic omg)
Overridden to do nothing because we want nothing to happen. |
boolean |
isHighlightable(OMGraphic omg)
Query asking if OMGraphic is highlight-able, which means that something in the GUI should change when the mouse is moved or dragged over the given OMGraphic. |
static void |
main(java.lang.String[] argv)
Print out the contents of a properties file. |
OMGraphicList |
prepare()
Prepares the graphics for the layer. |
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 |
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. |
protected void |
showSubframes(boolean show)
|
void |
unhighlight(OMGraphic omg)
Overridden to do nothing because we want nothing to happen. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, 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, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, 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, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, 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, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, 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, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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 static java.util.logging.Logger logger
protected static java.util.logging.Logger rpfLogger
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 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.List<RpfCoverageBox> getCoverageBoxes()
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 boolean isHighlightable(OMGraphic omg)
OMGraphicHandlerLayer
isHighlightable
in interface GestureResponsePolicy
isHighlightable
in class OMGraphicHandlerLayer
public java.lang.String getToolTipTextFor(OMGraphic omg)
OMGraphicHandlerLayer
getToolTipTextFor
in interface GestureResponsePolicy
getToolTipTextFor
in class OMGraphicHandlerLayer
public void highlight(OMGraphic omg)
highlight
in interface GestureResponsePolicy
highlight
in class OMGraphicHandlerLayer
public void unhighlight(OMGraphic omg)
unhighlight
in interface GestureResponsePolicy
unhighlight
in class OMGraphicHandlerLayer
public 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 OMGraphicHandlerLayer
protected void showSubframes(boolean show)
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |