|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.plugins.Plugin
public abstract class Plugin
For all purposes of loading dynamic resources, the Plugin's class loader should be used (or else, the plugin jar will not be within the class path). A plugin may subclass this abstract base class (but it is optional). The actual implementation of this class is optional, as all functions will be called via reflection. This is to be able to change this interface without the need of recompiling or even breaking the plugins. If your class does not provide a function here (or does provide a function with a mismatching signature), it will not be called. That simple. Or in other words: See this base class as an documentation of what automatic callbacks are provided (you can register yourself to more callbacks in your plugin class constructor). Subclassing Plugin and overriding some functions makes it easy for you to keep sync with the correct actual plugin architecture of JOSM.
Field Summary | |
---|---|
private PluginInformation |
info
This is the info available for this plugin. |
Constructor Summary | |
---|---|
Plugin(PluginInformation info)
Creates the plugin |
Method Summary | |
---|---|
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)
Copies the resource 'from' to the file in the plugin directory named 'to'. |
java.lang.String |
getPluginDir()
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private PluginInformation info
Constructor Detail |
---|
public Plugin(PluginInformation info)
info
- the plugin information describing the plugin.Method Detail |
---|
public PluginInformation getPluginInformation()
public void setPluginInformation(PluginInformation info)
public java.lang.String getPluginDir()
public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame)
public PreferenceSetting getPreferenceSetting()
public void addDownloadSelection(java.util.List<DownloadSelection> list)
public void copy(java.lang.String from, java.lang.String to) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public java.lang.ClassLoader getPluginResourceClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |