Package hec.map.image
Class ImportImageAction
java.lang.Object
javax.swing.AbstractAction
hec.map.image.ImportImageAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
This is the action that starts off the process of importing an image into the map structure. The import allows the
user to select many maps images (.bmp, .jpg, .tiff, .gif). If those files have a world file or embedded geo-referenced
data the map is imported and a .img is created to hold our map geo-referenced data and that file is loaded into the map.
If there is no world file or no geo-referenced data embedded, a UI is displayed to the user to have them enter some basic
Geo-Referencing information to start off the process. The image once imported can be resized and dragged into the correct
posistion by the user.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static class
-
Field Summary
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
Takes a list of maps and will put them in the MapPanel.protected File
createFile
(String path) protected List<FileFilter>
protected File[]
This is the method that opens a file selector to allow the user to retrieve a list of files.getTiffBounds
(File tiffFile) readGeoTiffExtents
(File tiffFile) readSidFileExtents
(File sidFile) void
setMapPanel
(MapPanel mapPanel) void
setMapsDirectory
(String mapsDirectory) void
setParentComponent
(Component parent) Sets the parent component used when dialogs are popped up.void
setRootDirctory
(String string) protected ImageMap
writeImageFile
(File imgFile, File pictureFile, WorldRect rect, double rotation) Sets the information to write the .img file to the data structureMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
ImportImageAction
public ImportImageAction()Creates a new instance of ImportImageAction
-
-
Method Details
-
setMapsDirectory
-
setMapPanel
-
setParentComponent
Sets the parent component used when dialogs are popped up. -
createFile
-
actionPerformed
-
getTiffBounds
-
readSidFileExtents
-
readGeoTiffExtents
-
addMaps
Takes a list of maps and will put them in the MapPanel. This method works in a standalone fashion. If you need to change the way maps are added to the map panel, then override this method. -
getInputStream
-
getBufferedReader
-
getBufferedWriter
-
getImageFiles
This is the method that opens a file selector to allow the user to retrieve a list of files. To override how this this is done, override this method. -
getFileFilters
-
writeImageFile
Sets the information to write the .img file to the data structure- Parameters:
imgFile
- - this is the file that points to the .img file to write.pictureFile
- - this is the file the represents the .GIF, .JPG, etcrotation
- - the amount in Radians to rotate the image. 0 is no rotation.
-
setRootDirctory
-