|
||||||||||
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.vpf.VPFLayer
public class VPFLayer
Implement an OpenMap Layer for display of NIMA data sources in the VPF (Mil-Std 2407) format.
The properties needed to configure this layer to display VPF data include
some "magic" strings specific to the VPF database you are trying to display.
DescribeDB
is a utility to help
you figure out what those strings are.
#-----------------------------
# Properties for a VMAP political layer
#-----------------------------
# Mandatory properties
# Mandatory for all layers
vmapPol.class= com.bbn.openmap.layer.vpf.VPFLayer
vmapPol.prettyName= Political Boundaries from VMAP
# Mandatory - choose .vpfPath or .libraryBean
# .vpfPath specifies a ';' separated list of paths to data, each of these
#directories should have a "lat" or "lat." file in them.
vmapPol.vpfPath= e:/VMAPLV0
# .libraryBean specifies a separate object in the properties file that
# locates vpf data. You should use this option if you have multiple VPF
# layers displaying the same VPF database. (For example, you have 3 VMAP
# layers, displaying coastlines, railroads and rivers. Each layer would
# then specify the same libraryBean name. This reduces the memory
# consumption of the VPF layers.)
# See LibraryBean javadoc
for properties info. (Example below)
vmapPol.libraryBean= VMAPdata
VMAPData.class=com.bbn.openmap.layer.vpf.LibraryBean
VMAPData.vpfPath=e:/VMAPLV0
# Don't forget to add VMAPData to the openmap.components property list, too.
#
#Optional (default is true) changes how features are located. Should
#use this option for multiple coverage types, or when null pointer errors
#are encountered.
vmapPol.searchByFeature=true
#Limit which VPF library is used (optional). If not specified,
#all available libraries will be checked and used.
vmapPol.libraryName=noamer
#
# Choose either .defaultLayer or .coverageType
#
# .defaultLayer results in the layer looking up the remainder of the
# properties in the defaultVPFLayers.properties files.
vmapPol.defaultLayer= vmapPolitical
#
# .coverageType continues in this property file - chose the VMAP bnd
# (Boundary) coverage
vmapPol.coverageType= bnd
# Select if we want edges (polylines), areas (filled polygons) or text
# This is a space-separated list of "edge" "area" "text" "epoint" and "cpoint"
vmapPol.featureTypes= edge area
#For DCW, the remaining 3 properties are ignored
#Select the text featureclasses we'd like to display. Since we didn't
#select text above, this is ignored
vmapPol.text=
#Select the edge featureclasses we'd like to display. In this case,
#draw political boundaries and coastline, but skip anything else.
vmapPol.edge=polbndl coastl
#Select the area featureclasses we'd like to display. In this case,
#draw politcal areas, but skip anything else.
vmapPol.area=polbnda
#Selectable drawing attributes - for default values, they don't need to
#be included. A hex ARGB color looks like FF000000 for black.
vmapPol.lineColor=hex ARGB color value - Black is default.
vmapPol.fillColor=hex ARGB color value - Clear is default.
vmapPol.lineWidth=float value, 1f is the default, 10f is the max.
# The column name in the feature table that should be displayed. The easiest
# way to find out what these columns should be for an application is to run the
# application with the other properties set for the layer, and then bring up
# the layer's palette. When the feature is selected, there are additional
# controls that let you display the coverage column names and display type,
# and the coverage column names in the popup are the ones that can be used
# in the properties (the column names are in parenthesis). NOTE: The features
# have to be added to the map and visible (proper scale setting < 30,000,000)
# in order for the palette controls to be visible.
vmapPol.attribute=na2
# How the attributes should be displayed, either 'label', 'tooltip', or 'information line'
vmapPol.attributeDisplay=label
#------------------------------------
# End of properties for a VMAP political layer
#------------------------------------
### Now a VMAP Coastline layer
vmapCoast.class=com.bbn.openmap.layer.vpf.VPFLayer
vmapCoast.prettyName=VMAP Coastline Layer
vmapCoast.vpfPath=/u5/vmap/vmaplv0
## a predefined layer from the VPF predefined layer set found in
## com/bbn/openmap/layer/vpf/defaultVPFLayers.properties
vmapCoast.defaultLayer=vmapCoastline
### Now a DCW Political layer
# Basic political boundaries with DCW
dcwPolitical.class=com.bbn.openmap.layer.vpf.VPFLayer
dcwPolitical.prettyName=DCW Political Boundaries
dcwPolitical.vpfPath=path to data
dcwPolitical.coverageType=po
dcwPolitical.featureTypes=edge area
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 | |
---|---|
static java.lang.String |
ConfigCmd
|
protected WindowSupport |
configWindowSupport
|
protected java.lang.String |
coverageType
the coverage type that we display |
static java.lang.String |
coverageTypeProperty
property extension used to set the desired coverage type. |
protected int |
cutoffScale
|
static java.lang.String |
cutoffScaleProperty
Property for setting VPF cutoff scale |
protected java.lang.String[] |
dataPaths
the path to the root VPF directory |
static java.lang.String |
defaultLayerProperty
property extension used to specify a default property set |
static java.lang.String |
featureTypesProperty
Property extension used to set the desired feature types. |
protected java.lang.String |
libraryBeanName
the name of the data bean to look for in beancontext |
protected java.lang.String |
libraryName
the library name to focus on |
static java.lang.String |
LibraryNameProperty
Property for setting VPF library name to use |
static java.lang.String |
libraryProperty
Property method for setting VPF data path |
static java.util.logging.Logger |
logger
|
protected LibrarySelectionTable |
lst
the object that knows all the nitty-gritty vpf stuff |
static java.lang.String |
pathProperty
property extension used to set the VPF root directory |
protected java.lang.String |
prefix
hang onto prefix used to initialize warehouse in setProperties() |
protected java.util.Properties |
props
hang onto properties file used to initialize warehouse |
static java.lang.String |
searchByFeatureProperty
Property that lets you search for graphics via feature type. |
protected boolean |
searchByFeatures
are we searching by feature table (true) or tile (false) |
protected LayerGraphicWarehouseSupport |
warehouse
our own little graphics factory |
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 | |
---|---|
VPFLayer()
Construct a VPF layer. |
|
VPFLayer(java.lang.String name)
Construct a VPFLayer, and sets its name. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Override of Layer's actionPerformed method, adds the capability that calls doPrepare() if the layer is visible and it receives a RedrawCmd command. |
void |
checkWarehouse(boolean sbf)
If the warehouse gets set as a result of this method being called, the properties will beed to be reset on it. |
void |
computeLayer()
Deprecated. use doPrepare() instead of computeLayer(); |
boolean |
getAreasEnabled()
Find out if areas are enabled. |
boolean |
getCPointsEnabled()
Find out if connected points are enabled. |
java.lang.String |
getDataTypes()
Get the current coverage type. |
DrawingAttributes |
getDrawingAttributes()
Get the DrawingAttributes used for the coverage type. |
boolean |
getEdgesEnabled()
Find out if edges are enabled. |
boolean |
getEPointsEnabled()
Find out if entity points are enabled. |
java.awt.Component |
getGUI()
Gets the palette associated with the layer. |
java.lang.String |
getInfoText(OMGraphic omg)
If applicable, should return a short, informational string about the OMGraphic to be displayed in the InformationDelegator. |
java.lang.String[] |
getPath()
Returns the list of paths we use to look for data. |
java.util.Properties |
getProperties(java.util.Properties props)
Overrides Layer getProperties method., also calls that method on Layer. |
OMGraphicList |
getRectangle()
Deprecated. use prepare() instead of getRectangle(); |
boolean |
getTextEnabled()
Find out if text is enabled. |
java.lang.String |
getToolTipTextFor(OMGraphic omg)
If applicable, should return a tool tip for the OMGraphic. |
LayerGraphicWarehouseSupport |
getWarehouse()
|
protected void |
initLST()
initialize the library selection table. |
OMGraphicList |
prepare()
Create the OMGraphicList to use on the map. |
void |
setAreasEnabled(boolean value)
Enable/Disable the display of areas. |
protected void |
setConfigSettings(java.lang.String prefix,
java.util.Properties props)
|
void |
setCPointsEnabled(boolean value)
Enable/Disable the display of connected points. |
void |
setDataTypes(java.lang.String dataTypes)
Set the coveragetype of the layer. |
void |
setDrawingAttributes(DrawingAttributes da)
Set the drawing attributes for the coverage type. |
void |
setEdgesEnabled(boolean value)
Enable/Disable the display of edges. |
void |
setEPointsEnabled(boolean value)
Enable/Disable the display of entity points. |
void |
setFeatures(java.lang.String features)
Sets the features (lines, areas, text, points) that get displayed. |
void |
setPath(java.lang.String newPath)
Set the data path to a single place. |
void |
setPath(java.lang.String[] newPaths)
Set the data path to multiple places. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Another way to set the parameters of the DcwLayer. |
void |
setTextEnabled(boolean value)
Enable/Disable the display of text. |
void |
setWarehouse(LayerGraphicWarehouseSupport wh)
|
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 com.bbn.openmap.event.ProjectionListener |
---|
projectionChanged |
Methods inherited from interface java.beans.beancontext.BeanContextChild |
---|
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
public static java.util.logging.Logger logger
public static final java.lang.String pathProperty
public static final java.lang.String coverageTypeProperty
public static final java.lang.String featureTypesProperty
public static final java.lang.String defaultLayerProperty
public static final java.lang.String searchByFeatureProperty
public static final java.lang.String libraryProperty
public static final java.lang.String cutoffScaleProperty
public static final java.lang.String LibraryNameProperty
protected transient LibrarySelectionTable lst
protected transient LayerGraphicWarehouseSupport warehouse
protected boolean searchByFeatures
protected java.lang.String libraryBeanName
protected java.lang.String prefix
protected java.util.Properties props
protected java.lang.String[] dataPaths
protected java.lang.String coverageType
protected int cutoffScale
protected java.lang.String libraryName
public static final java.lang.String ConfigCmd
protected WindowSupport configWindowSupport
Constructor Detail |
---|
public VPFLayer()
public VPFLayer(java.lang.String name)
name
- the name of the layer.Method Detail |
---|
public void setFeatures(java.lang.String features)
features
- a whitespace-separated list of features to display.public void setProperties(java.lang.String prefix, java.util.Properties props)
setProperties
in interface PropertyConsumer
setProperties
in class OMGraphicHandlerLayer
prefix
- the token to prefix the property namesprops
- the Properties
objectpathProperty
,
coverageTypeProperty
,
featureTypesProperty
public java.util.Properties getProperties(java.util.Properties props)
OMGraphicHandlerLayer
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 void setPath(java.lang.String newPath)
public void setPath(java.lang.String[] newPaths)
public java.lang.String[] getPath()
public void setDataTypes(java.lang.String dataTypes)
dataTypes
- the coveragetype to display.public java.lang.String getDataTypes()
public void setAreasEnabled(boolean value)
public boolean getAreasEnabled()
public void setEdgesEnabled(boolean value)
public boolean getEdgesEnabled()
public void setEPointsEnabled(boolean value)
public boolean getEPointsEnabled()
public void setCPointsEnabled(boolean value)
public boolean getCPointsEnabled()
public void setTextEnabled(boolean value)
public boolean getTextEnabled()
public DrawingAttributes getDrawingAttributes()
public void setDrawingAttributes(DrawingAttributes da)
protected void initLST()
public void setWarehouse(LayerGraphicWarehouseSupport wh)
public LayerGraphicWarehouseSupport getWarehouse()
public void checkWarehouse(boolean sbf)
sbf
- Search by features.public void computeLayer()
public OMGraphicList getRectangle()
public OMGraphicList prepare()
prepare
in class OMGraphicHandlerLayer
public java.awt.Component getGUI()
getGUI
in class Layer
public void actionPerformed(java.awt.event.ActionEvent e)
OMGraphicHandlerLayer
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class OMGraphicHandlerLayer
protected void setConfigSettings(java.lang.String prefix, java.util.Properties props)
public java.lang.String getToolTipTextFor(OMGraphic omg)
OMGraphicHandlerLayer
getToolTipTextFor
in interface GestureResponsePolicy
getToolTipTextFor
in class OMGraphicHandlerLayer
public java.lang.String getInfoText(OMGraphic omg)
OMGraphicHandlerLayer
getInfoText
in interface GestureResponsePolicy
getInfoText
in class OMGraphicHandlerLayer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |