|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.bbn.openmap.Layer
com.bbn.openmap.layer.OMGraphicHandlerLayer
com.bbn.openmap.layer.shape.ShapeLayer
An OpenMap Layer that displays shape files. Note that the ESRIRecords have been updated so that the OMGraphics that get created from them are loaded with an Integer object that notes the number of the record as it was read from the .shp file. This lets you align the object with the correct attribute data in the .dbf file.
############################
# Properties for a shape layer
shapeLayer.class=com.bbn.openmap.layer.shape.ShapeLayer
shapeLayer.prettyName=Name_for_Menu
shapeLayer.shapeFile=<path to shapefile (.shp)>
shapeLayer.spatialIndex=<path to generated spatial index file (.ssx)>
shapeLayer.lineColor=ff000000
shapeLayer.fillColor=ff000000
# plus any other properties used by the DrawingAttributes object.
shapeLayer.pointImageURL=<URL for image to use for point objects>
############################
SpatialIndex
,
Serialized FormNested 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 javax.swing.JPanel |
box
|
protected GeoCoordTransformation |
coordTransform
A translator for converting pre-projected coordinates from the file into decimal degree lat/lon. |
protected DrawingAttributes |
drawingAttributes
The DrawingAttributes object to describe the rendering of graphics. |
static java.lang.String |
pointImageURLProperty
The URL of an image to use for point objects. |
protected int |
shadowX
The holders of the shadow offset. |
static java.lang.String |
shadowXProperty
The name of the property that holds the offset of the shadow. |
protected int |
shadowY
|
static java.lang.String |
shadowYProperty
|
static java.lang.String |
shapeFileProperty
The name of the property that holds the name of the shape file. |
protected SpatialIndex |
spatialIndex
The spatial index of the shape file to be rendered. |
static java.lang.String |
spatialIndexProperty
The name of the property that holds the name of the spatial index file. |
static java.lang.String |
TransformProperty
The name of the class providing translation services if needed. |
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 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 | |
ShapeLayer()
Initializes an empty shape layer. |
|
ShapeLayer(java.lang.String shapeFileName)
|
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
The default actionPerformed method for Layer. |
protected OMGraphicList |
computeGraphics()
Deprecated. use prepare() instead. |
GeoCoordTransformation |
getCoordTransform()
|
DataBounds |
getDataBounds()
DataBoundsInformer interface. |
DrawingAttributes |
getDrawingAttributes()
|
java.awt.Component |
getGUI()
Gets the gui controls 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.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer method. |
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. |
SpatialIndex |
getSpatialIndex()
|
java.lang.String |
getToolTipTextFor(OMGraphic omg)
If applicable, should return a tool tip for the OMGraphic. |
void |
paint(java.awt.Graphics g)
Renders the layer on the map. |
OMGraphicList |
prepare()
Create the OMGraphics using the shape file and SpatialIndex. |
void |
removed(java.awt.Container cont)
Called when the Layer is removed from the MapBean, giving an opportunity to clean up. |
void |
setCoordTransform(GeoCoordTransformation coordTranslator)
|
void |
setDrawingAttributes(DrawingAttributes da)
|
protected void |
setFileProperties(java.lang.String realPrefix,
java.util.Properties props)
This method gets called from setProperties. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Initializes this layer from the given properties. |
void |
setSpatialIndex(SpatialIndex si)
|
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 com.bbn.openmap.util.DataBoundsProvider |
getName |
Methods inherited from interface java.beans.beancontext.BeanContextChild |
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
public static final java.lang.String shapeFileProperty
public static final java.lang.String spatialIndexProperty
public static final java.lang.String pointImageURLProperty
public static final java.lang.String shadowXProperty
public static final java.lang.String shadowYProperty
public static final java.lang.String TransformProperty
protected int shadowX
protected int shadowY
protected SpatialIndex spatialIndex
protected DrawingAttributes drawingAttributes
protected GeoCoordTransformation coordTransform
protected transient javax.swing.JPanel box
Constructor Detail |
public ShapeLayer()
public ShapeLayer(java.lang.String shapeFileName)
Method Detail |
public void setSpatialIndex(SpatialIndex si)
public SpatialIndex getSpatialIndex()
public GeoCoordTransformation getCoordTransform()
public void setCoordTransform(GeoCoordTransformation coordTranslator)
protected void setFileProperties(java.lang.String realPrefix, java.util.Properties props)
realPrefix
- This prefix has already been scoped, which means it is
an empty string if setProperties was called with a null prefix, or
it's a String ending with a period if it was defined with
characters.props
- Properties containing information about files and the layer.public void setProperties(java.lang.String prefix, java.util.Properties props)
setProperties
in interface PropertyConsumer
setProperties
in class OMGraphicHandlerLayer
props
- the Properties
holding settings for this
layerprefix
- the token to prefix the property namespublic java.util.Properties getProperties(java.util.Properties props)
getProperties
in interface PropertyConsumer
getProperties
in class OMGraphicHandlerLayer
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 setDrawingAttributes(DrawingAttributes da)
public DrawingAttributes getDrawingAttributes()
public java.lang.String getInfoText(OMGraphic omg)
OMGraphicHandlerLayer
getInfoText
in interface GestureResponsePolicy
getInfoText
in class OMGraphicHandlerLayer
public java.lang.String getToolTipTextFor(OMGraphic omg)
getToolTipTextFor
in interface GestureResponsePolicy
getToolTipTextFor
in class OMGraphicHandlerLayer
protected OMGraphicList computeGraphics()
public OMGraphicList prepare()
prepare
in class OMGraphicHandlerLayer
public void paint(java.awt.Graphics g)
paint
in class OMGraphicHandlerLayer
g
- a graphics contextpublic java.awt.Component getGUI()
Layer
getGUI
in class Layer
public void actionPerformed(java.awt.event.ActionEvent e)
Layer
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class Layer
public DataBounds getDataBounds()
getDataBounds
in interface DataBoundsProvider
public void removed(java.awt.Container cont)
removed
in class Layer
cont
- Container
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |