public class ImageTileLayer extends OMGraphicHandlerLayer
ImageReaderLoader objects are held by the layer to assist in finding the appropriate ImageReader for an image file.
The properties for this layer are:
# semi-colon separated paths to image files or directories containing images imageTileLayer.imageFilePath=path/to/file1;path/to/directory;path/to/file2 # optional - image cache size specifies how many images will be held in memory for fast retrieval. imageTileLayer.imageCacheSize=20 # optional - image cutoff ratio specifies the scale that images will not load when the projection is zoomed out from it. imageTileLayer.imageCutoffRatio=5 # optional - image Reader loaders specify which image files are handled imageTileLayer.imageReaderLoaders=geotiff imageTileLayer.geotiff=com.bbn.openmap.dataAccess.image.geotiff.GeoTIFFImageReader.Loader # optional - Drawing attributes properties for image highlighting imageTileLayer.lineWidth=2 imageTileLayer.selectColor=FFFFFF00
Modifier and Type | Class and Description |
---|---|
static class |
ImageTileLayer.ImageListCellRenderer
Renders the JList cells.
|
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static int |
buttonSize |
static java.lang.String |
FILE_PATH_ATTRIBUTE |
protected java.util.Vector<java.lang.String> |
filePaths |
protected java.lang.String |
HIDE_TILES_TITLE |
protected ImageTile.Cache |
imageCache |
static java.lang.String |
ImageCacheSizeProperty |
static java.lang.String |
ImageCutoffRatioProperty |
static java.lang.String |
ImageFilePathProperty |
protected java.util.Vector<ImageReaderLoader> |
imageReaderLoaders |
static java.lang.String |
ImageReaderLoadersProperty |
static javax.swing.ImageIcon |
invisibleImage |
protected javax.swing.JPanel |
itPanel |
protected com.bbn.openmap.layer.imageTile.ImageTileLayer.ListManager |
listManager |
protected javax.swing.DefaultListModel |
listModel |
static java.util.logging.Logger |
logger |
protected MapBean |
mapBean
MapBean is used to reset the projection of the map over the selected
images.
|
static java.lang.String |
NAME_ATTRIBUTE |
protected javax.swing.JList |
resultsList |
protected DrawingAttributes |
selectedDrawingAttributes |
protected ImageTile[] |
selectedTiles
The ImageTiles currently selected on the list in the GUI.
|
protected java.lang.String |
SHOW_TILES_TITLE |
static javax.swing.ImageIcon |
warningImage |
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
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
ImageTileLayer()
Default constructor for layer, initializes tile cache.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addImageTileToList(ImageTile tile)
Add an ImageTile to the list model.
|
protected void |
addImageToLists(ImageTile imageTile,
OMGraphicList ret,
java.net.URL fileURL)
A method to handle a newly created ImageTile object from the loadImage
method.
|
protected void |
addNewImagesWithFileChooser()
Asks the user to choose a new file or directory to load.
|
protected boolean |
areAllTilesDefective(ImageTile[] sTiles) |
void |
checkShowHideStatus()
Checks the selected tiles from the visible list and tallies their
visibility.
|
protected void |
clearImageTileList()
Clear the list model.
|
protected void |
configureImageReaderLoaders()
Internal callback method for subclasses to use to be able to configure
imageReaderLoader Vector with specific ImageReaderLoaders.
|
void |
deselect()
Un-highlight all of the tiles.
|
java.awt.Component |
getGUI()
Gets the gui controls associated with the layer.
|
protected javax.swing.ListModel |
getListModel()
The ListModel used by the JList, displaying the images.
|
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer interface method.
|
java.util.Properties |
getPropertyInfo(java.util.Properties props)
PropertyConsumer interface method.
|
protected int |
getResultListIndex(java.awt.event.MouseEvent e)
find out which list object was moused.
|
protected double |
getResultsListCellHeight()
Get the pixel height of each cell in the JList.
|
protected ImageTile[] |
getSelectedTiles() |
protected void |
goTo(ImageTile[] selectedTiles2)
Figure out where the images are and move the MapBean over them.
|
protected static void |
initIcons() |
protected void |
loadImage(java.lang.String filePath,
OMGraphicList ret)
If filePath is a file, the ImageReaderLoaders are used to try to load and
place the image.
|
protected OMGraphicList |
loadImages()
Gets the filePaths and loads the images found in those places.
|
protected void |
moveOneSlotToBottom(ImageTile[] selectedTiles2)
Move all the selected tiles down one space.
|
protected void |
moveOneSlotToTop(ImageTile[] selectedTiles2)
Move all of the selected tiles up one space.
|
protected void |
moveToBottom(ImageTile[] selectedTiles2)
Move all of the selected tiles to the bottom of the stack.
|
protected void |
moveToTop(ImageTile[] selectedTiles2)
Move all of the selected tiles to the top of the stack.
|
OMGraphicList |
prepare()
OMGraphicHandlerLayer method called when projection changes or when
doPrepare() is called.
|
protected void |
rebuildListModel()
Rebuild the list model contents based on the ImageTiles contained on the
OMGraphicList.
|
protected void |
removeImages(ImageTile[] selectedTiles2)
Remove the selected tiles from the image stack.
|
protected boolean |
removeImageTileFromList(ImageTile tile)
Remove an ImageTile from the ListModel.
|
void |
resetSelectAttributes()
Take the drawing attributes held by the layer and push the settings on
all of the ImageTiles.
|
protected void |
select(ImageTile[] selectedTiles2)
Note the provided tiles as being highlighted.
|
protected void |
setGUIButtonEnableState(boolean somethingSelected)
Set the GUI button state to be enabled or not based on something on the
list being selected.
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
PropertyConsumer interface method.
|
protected void |
setSelectedTiles(ImageTile[] sTiles)
Set the ImageTile[] of tiles currently selected in the GUI.
|
protected void |
setSelection(ImageTile[] selectedTiles2,
boolean isSelected)
Note the provided tiles as being highlighted or not.
|
protected void |
setVisibilityOnAllTiles(boolean visible)
Changes the visibility setting on all ImageTile objects.
|
protected void |
showHideTiles(java.lang.String text,
ImageTile[] selectedTiles2)
Action method called when the show/hide button is pressed.
|
actionPerformed, canSetList, copy, createLayerWorker, cut, deselect, dispose, doAction, doPrepare, filter, filter, filter, getConsumeEvents, getFilter, getInfoText, getItemsForMapMenu, getItemsForOMGraphicMenu, getLayerWorker, getList, getMapMouseListener, getMouseEventInterpreter, getMouseModeIDsForEvents, getProjectionChangePolicy, getRenderPolicy, getSelected, getToolTipTextFor, getTransparency, getTransparencyAdjustmentPanel, highlight, interrupt, isCancelled, isHighlightable, 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, unhighlight, 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, removed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, repaint, resetPalette, 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
public static java.util.logging.Logger logger
public static final java.lang.String ImageFilePathProperty
public static final java.lang.String ImageReaderLoadersProperty
public static final java.lang.String ImageCacheSizeProperty
public static final java.lang.String ImageCutoffRatioProperty
protected java.lang.String SHOW_TILES_TITLE
protected java.lang.String HIDE_TILES_TITLE
protected java.util.Vector<java.lang.String> filePaths
protected java.util.Vector<ImageReaderLoader> imageReaderLoaders
protected ImageTile.Cache imageCache
protected DrawingAttributes selectedDrawingAttributes
public static final java.lang.String NAME_ATTRIBUTE
public static final java.lang.String FILE_PATH_ATTRIBUTE
protected javax.swing.JPanel itPanel
protected javax.swing.JList resultsList
protected javax.swing.DefaultListModel listModel
protected com.bbn.openmap.layer.imageTile.ImageTileLayer.ListManager listManager
protected MapBean mapBean
protected ImageTile[] selectedTiles
public static int buttonSize
public static javax.swing.ImageIcon warningImage
public static javax.swing.ImageIcon invisibleImage
public ImageTileLayer()
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
objectprotected void configureImageReaderLoaders()
public 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 props)
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMGraphicHandlerLayer
props
- a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.public OMGraphicList prepare()
prepare
in class OMGraphicHandlerLayer
protected OMGraphicList loadImages()
protected void loadImage(java.lang.String filePath, OMGraphicList ret)
filePath
- ret
- The OMGraphicList to add any ImageTiles to.protected void addImageToLists(ImageTile imageTile, OMGraphicList ret, java.net.URL fileURL)
imageTile
- The new ImageTileret
- An OMGraphicList to add the ImageTile to.fileURL
- A URL describing the location of the source image file.public java.awt.Component getGUI()
protected void setVisibilityOnAllTiles(boolean visible)
visible
- protected void showHideTiles(java.lang.String text, ImageTile[] selectedTiles2)
text
- if SHOW_TILES_TITLE, tiles made visible.selectedTiles2
- protected void moveOneSlotToBottom(ImageTile[] selectedTiles2)
selectedTiles2
- protected void moveToBottom(ImageTile[] selectedTiles2)
selectedTiles2
- protected void moveOneSlotToTop(ImageTile[] selectedTiles2)
selectedTiles2
- protected void moveToTop(ImageTile[] selectedTiles2)
selectedTiles2
- protected void goTo(ImageTile[] selectedTiles2)
selectedTiles2
- protected void select(ImageTile[] selectedTiles2)
selectedTiles2
- protected void setSelection(ImageTile[] selectedTiles2, boolean isSelected)
selectedTiles2
- public void deselect()
public void resetSelectAttributes()
protected void removeImages(ImageTile[] selectedTiles2)
selectedTiles2
- protected void addNewImagesWithFileChooser()
protected void setGUIButtonEnableState(boolean somethingSelected)
somethingSelected
- whether something is selected.protected javax.swing.ListModel getListModel()
protected void addImageTileToList(ImageTile tile)
tile
- protected void clearImageTileList()
protected boolean removeImageTileFromList(ImageTile tile)
tile
- protected void rebuildListModel()
protected ImageTile[] getSelectedTiles()
protected void setSelectedTiles(ImageTile[] sTiles)
sTiles
- protected boolean areAllTilesDefective(ImageTile[] sTiles)
public void checkShowHideStatus()
protected int getResultListIndex(java.awt.event.MouseEvent e)
e
- protected double getResultsListCellHeight()
protected static void initIcons()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details