public class RpfLayer extends OMGraphicHandlerLayer implements java.awt.event.ActionListener, RpfConstants, java.io.Serializable
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 #------------------------------------
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
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.
|
consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, layerWorkerQueue, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty, wrapItUp
addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, attributes, autoPalette, AutoPaletteProperty, beanContextChildSupport, coordTransform, DataPathPrefixProperty, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, localHackList, maxScale, MaxScaleProperty, minScale, MinScaleProperty, palette, paletteListener, PrettyNameProperty, propertyPrefix, RedrawCmd, removable, RemovableProperty, SWING_PACKAGE, TransformProperty, windowSupport
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
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
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
RpfLayer()
The default constructor for the Layer.
|
RpfLayer(java.lang.String[] pathsToRPFDirs)
The default constructor for the Layer.
|
Modifier and Type | Method and Description |
---|---|
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<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.
|
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.
|
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)
Fleeting change of appearance for mouse movements over an OMGraphic.
|
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 |
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.
|
protected void |
showSubframes(boolean show) |
void |
unhighlight(OMGraphic omg)
Notification to set OMGraphic to normal appearance.
|
canSetList, copy, createLayerWorker, cut, deselect, dispose, doAction, doPrepare, filter, filter, filter, getConsumeEvents, getFilter, getInfoText, getItemsForMapMenu, getItemsForOMGraphicMenu, getLayerWorker, getList, getMapMouseListener, getMouseEventInterpreter, getMouseModeIDsForEvents, getProjectionChangePolicy, getRenderPolicy, getSelected, getTransparency, getTransparencyAdjustmentPanel, interrupt, isCancelled, isInterruptable, isSelectable, isWorking, leftClick, mouseOver, paint, paste, projectionChanged, receivesMapEvents, renderDataForProjection, resetFiltering, select, setCancelled, setConsumeEvents, setFilter, setInterruptable, setLayerWorker, setList, setMouseEventInterpreter, setMouseModeIDsForEvents, setProjectionChangePolicy, setRenderPolicy, setTransparency, shouldWrapItUp, supportsSQL, workerComplete
addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, createWindowSupport, disconnectFromBeanContext, 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, getCoordTransform, getIcon, getMaxScale, getMinScale, getPackage, getPalette, getProjection, getPropertyPrefix, getWindowSupport, hasGUI, hidePalette, isAutoPalette, isProjectionOK, isRemovable, notifyHideHack, prependDataPathPrefix, putAttribute, removeComponentListener, removeConfirmed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, repaint, setAddAsBackground, setAddToBeanContext, setAutoPalette, setBeanContext, setCoordTransform, setIcon, setLayerProperties, setMaxScale, setMinScale, setName, setPaletteVisible, setProjection, setProjection, setProperties, setPropertyPrefix, setRemovable, setVisible, setWindowSupport, showPalette
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, isPaintingOrigin, 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
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, transferFocusDownCycle, validate, validateTree
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, transferFocusBackward, transferFocusUpCycle
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
public RpfLayer()
public RpfLayer(java.lang.String[] pathsToRPFDirs)
pathsToRPFDirs
- paths to the RPF directories that hold A.TOC files.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)
protected 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<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)
OMGraphicHandlerLayer
highlight
in interface GestureResponsePolicy
highlight
in class OMGraphicHandlerLayer
public void unhighlight(OMGraphic omg)
OMGraphicHandlerLayer
unhighlight
in interface GestureResponsePolicy
unhighlight
in class OMGraphicHandlerLayer
public java.awt.Component getGUI()
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)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details