Package org.openstreetmap.josm.plugins
Class PluginProxy
- java.lang.Object
-
- org.openstreetmap.josm.plugins.Plugin
-
- org.openstreetmap.josm.plugins.PluginProxy
-
- All Implemented Interfaces:
MapFrameListener
public class PluginProxy extends Plugin
Helper class for the JOSM system to communicate with the plugin. This class should be of no interest for sole plugin writer.
-
-
Field Summary
Fields Modifier and Type Field Description private PluginClassLoader
classLoader
private java.lang.Object
plugin
The plugin.
-
Constructor Summary
Constructors Constructor Description PluginProxy(java.lang.Object plugin, PluginInformation info, PluginClassLoader classLoader)
Constructs a newPluginProxy
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.PluginClassLoader
getClassLoader()
Get the class loader for the plugin.java.lang.Object
getPlugin()
Get the plugin object.PreferenceSetting
getPreferenceSetting()
Called in the preferences dialog to create a preferences page for the plugin, if any available.private void
handlePluginException(java.lang.Throwable e)
void
mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame)
Called after Main.mapFrame is initialized.-
Methods inherited from class org.openstreetmap.josm.plugins.Plugin
getPluginDirs, getPluginInformation, getPluginResourceClassLoader, setPluginInformation
-
-
-
-
Field Detail
-
plugin
private final java.lang.Object plugin
The plugin.
-
classLoader
private final PluginClassLoader classLoader
-
-
Constructor Detail
-
PluginProxy
public PluginProxy(java.lang.Object plugin, PluginInformation info, PluginClassLoader classLoader)
Constructs a newPluginProxy
.- Parameters:
plugin
- the plugininfo
- the associated plugin infoclassLoader
- the class loader for the plugin- Since:
- 12322
-
-
Method Detail
-
getPlugin
public java.lang.Object getPlugin()
Get the plugin object.- Returns:
- the plugin object
- Since:
- 12322
-
getClassLoader
public PluginClassLoader getClassLoader()
Get the class loader for the plugin.- Returns:
- the plugin class loader
- Since:
- 12322
-
handlePluginException
private void handlePluginException(java.lang.Throwable e)
-
mapFrameInitialized
public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame)
Description copied from interface:MapFrameListener
Called after Main.mapFrame is initialized. (After the first data is loaded). You can use this callback to tweak the newFrame to your needs, as example install an alternative Painter.- Specified by:
mapFrameInitialized
in interfaceMapFrameListener
- Overrides:
mapFrameInitialized
in classPlugin
- Parameters:
oldFrame
- The old MapFramenewFrame
- The new MapFrame
-
getPreferenceSetting
public PreferenceSetting getPreferenceSetting()
Description copied from class:Plugin
Called in the preferences dialog to create a preferences page for the plugin, if any available.- Overrides:
getPreferenceSetting
in classPlugin
- Returns:
- the preferences dialog, or
null
-
addDownloadSelection
public void addDownloadSelection(java.util.List<DownloadSelection> list)
Description copied from class:Plugin
Called in the download dialog to give the plugin a chance to modify the list of bounding box selectors.- Overrides:
addDownloadSelection
in classPlugin
- Parameters:
list
- list of bounding box selectors
-
-