public abstract class Plugin extends java.lang.Object implements MapFrameListener
Modifier and Type | Class and Description |
---|---|
private class |
Plugin.PluginBaseDirectories |
Modifier and Type | Field and Description |
---|---|
private PluginInformation |
info
This is the info available for this plugin.
|
private IBaseDirectories |
pluginBaseDirectories |
Constructor and Description |
---|
Plugin(PluginInformation info)
Creates the plugin
|
Modifier and Type | Method and Description |
---|---|
void |
addDownloadSelection(java.util.List<DownloadSelection> list)
Called in the download dialog to give the plugin a chance to modify the list
of bounding box selectors.
|
void |
copy(java.lang.String from,
java.lang.String to)
Deprecated.
without replacement
|
java.lang.String |
getPluginDir()
Deprecated.
(since 13007) to get the same directory as this method, use
getPluginDirs().getUserDataDirectory(false) .
However, for files that can be characterized as cache or preferences, you are encouraged to use the appropriate
IBaseDirectories method from getPluginDirs() . |
IBaseDirectories |
getPluginDirs()
Get the directories where this plugin can store various files.
|
PluginInformation |
getPluginInformation()
Replies the plugin information object for this plugin
|
java.lang.ClassLoader |
getPluginResourceClassLoader()
Get a class loader for loading resources from the plugin jar.
|
PreferenceSetting |
getPreferenceSetting()
Called in the preferences dialog to create a preferences page for the plugin,
if any available.
|
void |
mapFrameInitialized(MapFrame oldFrame,
MapFrame newFrame)
Called after Main.mapFrame is initalized.
|
void |
setPluginInformation(PluginInformation info)
Sets the plugin information object for this plugin
|
private PluginInformation info
private final IBaseDirectories pluginBaseDirectories
public Plugin(PluginInformation info)
info
- the plugin information describing the plugin.public PluginInformation getPluginInformation()
public void setPluginInformation(PluginInformation info)
info
- the plugin information objectpublic IBaseDirectories getPluginDirs()
@Deprecated public java.lang.String getPluginDir()
getPluginDirs().getUserDataDirectory(false)
.
However, for files that can be characterized as cache or preferences, you are encouraged to use the appropriate
IBaseDirectories
method from getPluginDirs()
.public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame)
MapFrameListener
mapFrameInitialized
in interface MapFrameListener
oldFrame
- The old MapFramenewFrame
- The new MapFramepublic PreferenceSetting getPreferenceSetting()
null
public void addDownloadSelection(java.util.List<DownloadSelection> list)
list
- list of bounding box selectors@Deprecated public void copy(java.lang.String from, java.lang.String to) throws java.io.IOException
from
- source fileto
- target filejava.io.FileNotFoundException
- if the file exists but is a directory rather than a regular file,
does not exist but cannot be created, or cannot be opened for any other reasonjava.io.IOException
- if any other I/O error occurspublic java.lang.ClassLoader getPluginResourceClassLoader()