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 PluginClassLoaderclassLoaderprivate java.lang.ObjectpluginThe 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 voidaddDownloadSelection(java.util.List<DownloadSelection> list)Called in the download dialog to give the plugin a chance to modify the list of bounding box selectors.PluginClassLoadergetClassLoader()Get the class loader for the plugin.java.lang.ObjectgetPlugin()Get the plugin object.PreferenceSettinggetPreferenceSetting()Called in the preferences dialog to create a preferences page for the plugin, if any available.private voidhandlePluginException(java.lang.Throwable e)voidmapFrameInitialized(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:MapFrameListenerCalled 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:
mapFrameInitializedin interfaceMapFrameListener- Overrides:
mapFrameInitializedin classPlugin- Parameters:
oldFrame- The old MapFramenewFrame- The new MapFrame
-
getPreferenceSetting
public PreferenceSetting getPreferenceSetting()
Description copied from class:PluginCalled in the preferences dialog to create a preferences page for the plugin, if any available.- Overrides:
getPreferenceSettingin classPlugin- Returns:
- the preferences dialog, or
null
-
addDownloadSelection
public void addDownloadSelection(java.util.List<DownloadSelection> list)
Description copied from class:PluginCalled in the download dialog to give the plugin a chance to modify the list of bounding box selectors.- Overrides:
addDownloadSelectionin classPlugin- Parameters:
list- list of bounding box selectors
-
-