|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.io.FileImporter
public abstract class FileImporter
| Field Summary | |
|---|---|
private boolean |
enabled
|
ExtensionFileFilter |
filter
|
| Constructor Summary | |
|---|---|
FileImporter(ExtensionFileFilter filter)
|
|
| Method Summary | |
|---|---|
boolean |
acceptFile(java.io.File pathname)
|
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed. |
int |
compareTo(FileImporter other)
|
static org.apache.tools.bzip2.CBZip2InputStream |
getBZip2InputStream(java.io.InputStream in)
|
static java.util.zip.GZIPInputStream |
getGZipInputStream(java.io.InputStream in)
|
double |
getPriority()
If multiple files (with multiple file formats) are selected, they are opened in the order of their priorities. |
void |
importData(java.io.File file,
ProgressMonitor progressMonitor)
Needs to be implemented if isBatchImporter() returns false. |
void |
importData(java.util.List<java.io.File> files,
ProgressMonitor progressMonitor)
Needs to be implemented if isBatchImporter() returns true. |
boolean |
importDataHandleExceptions(java.io.File f,
ProgressMonitor progressMonitor)
Wrapper to give meaningful output if things go wrong. |
boolean |
importDataHandleExceptions(java.util.List<java.io.File> files,
ProgressMonitor progressMonitor)
|
boolean |
isBatchImporter()
A batch importer is a file importer that prefers to read multiple files at the same time. |
boolean |
isEnabled()
Returns the enabled state of this FileImporter. |
void |
layerAdded(Layer newLayer)
Notifies this listener that a layer has been added. |
void |
layerRemoved(Layer oldLayer)
Notifies this listener that a layer has been removed. |
void |
setEnabled(boolean enabled)
Sets the enabled state of the FileImporter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final ExtensionFileFilter filter
private boolean enabled
| Constructor Detail |
|---|
public FileImporter(ExtensionFileFilter filter)
| Method Detail |
|---|
public boolean acceptFile(java.io.File pathname)
public boolean isBatchImporter()
public void importData(java.io.File file,
ProgressMonitor progressMonitor)
throws java.io.IOException,
IllegalDataException
java.io.IOException
IllegalDataException
public void importData(java.util.List<java.io.File> files,
ProgressMonitor progressMonitor)
throws java.io.IOException,
IllegalDataException
java.io.IOException
IllegalDataException
public boolean importDataHandleExceptions(java.io.File f,
ProgressMonitor progressMonitor)
public boolean importDataHandleExceptions(java.util.List<java.io.File> files,
ProgressMonitor progressMonitor)
public double getPriority()
public int compareTo(FileImporter other)
compareTo in interface java.lang.Comparable<FileImporter>
public static org.apache.tools.bzip2.CBZip2InputStream getBZip2InputStream(java.io.InputStream in)
throws java.io.IOException
java.io.IOException
public static java.util.zip.GZIPInputStream getGZipInputStream(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionpublic final boolean isEnabled()
FileImporter. When enabled, it is listed and usable in "File->Open" dialog.
FileImporter is enabledpublic final void setEnabled(boolean enabled)
FileImporter. When enabled, it is listed and usable in "File->Open" dialog.
enabled - true to enable this FileImporter, false to disable it
public void activeLayerChange(Layer oldLayer,
Layer newLayer)
MapView.LayerChangeListener
activeLayerChange in interface MapView.LayerChangeListeneroldLayer - The previous active layernewLayer - The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded in interface MapView.LayerChangeListenernewLayer - The new added layerpublic void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved in interface MapView.LayerChangeListeneroldLayer - The old removed layer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||