|
|||||||||||
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.imageTile.ImageTileLayer
The ImageTileLayer is a layer that manages georeferenced images over a map. The layer uses ImageReaders to figure out how to load images from a file, create an ImageTile object from the image data, and deduce where the ImageTile should be located from the information provided with/in the image data.
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 scale specifies the scale that images will not load when the projection is zoomed out from it. imageTileLayer.imageCutoffScale=1000000 # optional - image Reader loaders specify which image files are handled imageTileLayer.iamgeReaderLoaders=geotiff imageTileLayer.geotiff=com.bbn.openmap.dataAccess.image.geotiff.GeoTIFFImageReader.Loader # optional - Drawing attributes properties for image highlighting imageTileLayer.lineWidth=2 imageTileLayer.selectColor=FFFFFF00
Nested Class Summary | |
static class |
ImageTileLayer.ImageListCellRenderer
Renders the JList cells. |
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 | |
static int |
buttonSize
|
static java.lang.String |
FILE_PATH_ATTRIBUTE
|
protected java.util.Vector |
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 |
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
|
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 | |
ImageTileLayer()
Default constructor for layer, initializes tile cache. |
Method Summary | |
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. |
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 java.beans.beancontext.BeanContextChild |
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
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 filePaths
protected java.util.Vector 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
Constructor Detail |
public ImageTileLayer()
Method Detail |
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
public java.util.Properties getPropertyInfo(java.util.Properties props)
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMGraphicHandlerLayer
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()
getGUI
in class Layer
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()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |