public class PluginServices
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
PluginServices.PluginLoadDataException |
class |
PluginServices.PluginPersistenceAddDefinitionException |
class |
PluginServices.PluginPersistenceNeedDefinitionException |
class |
PluginServices.PluginSaveDataException |
Constructor and Description |
---|
PluginServices(PluginClassLoader loader)
Creates a new PluginServices objetct.
|
PluginServices(PluginClassLoader loader,
java.lang.String[] alternativeNames) |
Modifier and Type | Method and Description |
---|---|
void |
addDependencyWithPlugin(PluginServices otherPlugin) |
static void |
addLoaders(java.util.ArrayList classLoaders) |
void |
addPopupMenuListener(java.lang.String name,
java.awt.Component c,
java.awt.event.ActionListener listener)
A�ade un listener a un popup menu registrado en el config.xml de alg�n
plugin
|
static java.lang.Thread |
backgroundExecution(java.lang.Runnable r)
Runs a background task.
|
static void |
cancelableBackgroundExecution(IMonitorableTask task)
Runs a backbround task.
|
static void |
closeApplication()
Closes the application.
|
java.lang.String[] |
getAlternativeNames() |
static java.lang.String |
getArgumentByName(java.lang.String name)
Deprecated.
use PluginManager.getArguments
|
static java.lang.String[] |
getArguments()
Deprecated.
|
PluginClassLoader |
getClassLoader()
Gets the plugin's classloader.
|
static ExtensionDecorator |
getDecoratedExtension(java.lang.Class extensionClass)
Deprecated.
|
static ExtensionDecorator[] |
getDecoratedExtensions()
Deprecated.
|
static DlgPreferences |
getDlgPreferences()
Deprecated.
|
static ExclusiveUIExtension |
getExclusiveUIExtension()
Deprecated.
|
static IExtension |
getExtension(java.lang.Class extensionClass)
Deprecated.
|
static java.util.Iterator |
getExtensions()
Deprecated.
|
static java.lang.String |
getFromClipboard()
Deprecated.
|
static IconTheme |
getIconTheme()
Deprecated.
use ToolsSwingLocator.getIconThemeManager().getCurrent()
|
static IconThemeManager |
getIconThemeManager()
Deprecated.
use ToolsSwingLocator.getIconThemeManager()
|
static Logger |
getLogger()
Deprecated.
|
static MainFrame |
getMainFrame()
Deprecated.
|
PluginsManager |
getManager()
Deprecated.
|
static MDIManager |
getMDIManager()
Deprecated.
|
XMLEntity |
getPersistentXML()
Deprecated.
|
java.io.File |
getPluginDirectory()
Gets the plugin's root directory.
|
java.io.File |
getPluginHomeFolder()
Returns the folder where the plugin stores its resources.
|
java.lang.String |
getPluginName()
Gets the plugin's name
|
DynObject |
getPluginProperties() |
static PluginServices |
getPluginServices(java.lang.Object pluginClassInstance)
Deprecated.
|
static PluginServices |
getPluginServices(java.lang.String pluginName)
Deprecated.
|
static java.lang.String |
getText(java.lang.Object pluginObject,
java.lang.String key)
Deprecated.
use I18NManager
|
java.lang.String |
getText(java.lang.String key)
Deprecated.
use I18NManager
|
static void |
putInClipboard(java.lang.String data)
Stores the provided text data on the clipboard.
|
static void |
registerKeyStroke(javax.swing.KeyStroke key,
java.awt.KeyEventDispatcher a) |
static boolean |
runningInDevelopment()
Try to detect if the application is running in a development
environment.
|
void |
savePluginProperties() |
static void |
setArguments(java.lang.String[] arguments)
Deprecated.
|
static void |
setExclusiveUIExtension(ExclusiveUIExtension extension)
Deprecated.
|
void |
setPersistentXML(XMLEntity entity)
Sets the XML data which should be saved on disk for this plugin.
|
java.lang.String |
toString() |
static void |
unRegisterKeyStroke(javax.swing.KeyStroke key) |
public PluginServices(PluginClassLoader loader)
loader
- The Plugin's ClassLoader.public PluginServices(PluginClassLoader loader, java.lang.String[] alternativeNames)
public java.lang.String[] getAlternativeNames()
public java.lang.String getText(java.lang.String key)
key
- Translation key whose associated message is to be obtainedpublic PluginClassLoader getClassLoader()
public java.lang.String getPluginName()
@Deprecated public static PluginServices getPluginServices(java.lang.Object pluginClassInstance)
pluginClassInstance
- An instance of a class. This class is contained in a plugin,
whose
services are to be obtainedjava.lang.RuntimeException
- If the parameter was not loaded from a plugin@Deprecated public static PluginServices getPluginServices(java.lang.String pluginName)
pluginName
- Plugin's name whose services are going to be used@Deprecated public static MDIManager getMDIManager()
@Deprecated public static MainFrame getMainFrame()
public static void registerKeyStroke(javax.swing.KeyStroke key, java.awt.KeyEventDispatcher a)
public static void unRegisterKeyStroke(javax.swing.KeyStroke key)
@Deprecated public static IExtension getExtension(java.lang.Class extensionClass)
extensionClass
- Class of the extension whose instance is to be returned@Deprecated public static ExtensionDecorator getDecoratedExtension(java.lang.Class extensionClass)
extensionClass
- The class of the extension whose decorator is to be returned@Deprecated public static ExtensionDecorator[] getDecoratedExtensions()
@Deprecated public static java.util.Iterator getExtensions()
public static java.lang.String getText(java.lang.Object pluginObject, java.lang.String key)
pluginObject
- Any object which was loaded from a pluginkey
- Translation key whose associated message is to be obtainedpublic void setPersistentXML(XMLEntity entity)
The
- XMLEntity object containing the data to be persisted.PluginServices.getPersistentXML()
,
XMLEntity
@Deprecated public XMLEntity getPersistentXML()
public void addPopupMenuListener(java.lang.String name, java.awt.Component c, java.awt.event.ActionListener listener)
name
- Nombre del men� contextualc
- Componente que desplegar� el men� cuando se haga click con el
bot�n derecholistener
- Listener que se ejecutar� cuando se seleccione cualquier
entrada del men�java.lang.RuntimeException
- Si la interfaz no est� preparada todav�a. S�lo puede darse
durante el arranquepublic java.io.File getPluginDirectory()
public static java.lang.Thread backgroundExecution(java.lang.Runnable r)
r
- The task to run.public static void cancelableBackgroundExecution(IMonitorableTask task)
task
- The task to run.public static void closeApplication()
@Deprecated public static java.lang.String[] getArguments()
appName plugins-directory [locale] [other args]
@Deprecated public static void setArguments(java.lang.String[] arguments)
arguments
- An array of String, each element of the array
represents one
argument.public static java.lang.String getArgumentByName(java.lang.String name)
@Deprecated public static Logger getLogger()
object from the Log4j library.
@Deprecated public static DlgPreferences getDlgPreferences()
public static void putInClipboard(java.lang.String data)
data
- An String containing the data to be stored
on the clipboard.@Deprecated public static java.lang.String getFromClipboard()
null
if the data was not available.@Deprecated public static ExclusiveUIExtension getExclusiveUIExtension()
null
.Launcher.initializeExclusiveUIExtension()
,
org.gvsig.andami.plugins.IExtension#isEnabled(IExtension extension)
,
org.gvsig.andami.plugins.IExtension#isVisible(IExtension extension)
@Deprecated public static void setExclusiveUIExtension(ExclusiveUIExtension extension)
ExclusiveUIExtension=ExtensionName
Launcher.initializeExclusiveUIExtension()
,
org.gvsig.andami.plugins.IExtension#isEnabled(IExtension extension)
,
org.gvsig.andami.plugins.IExtension#isVisible(IExtension extension)
public static void addLoaders(java.util.ArrayList classLoaders)
public static IconThemeManager getIconThemeManager()
public static IconTheme getIconTheme()
public static boolean runningInDevelopment()
@Deprecated public PluginsManager getManager()
public DynObject getPluginProperties()
public void savePluginProperties()
public java.io.File getPluginHomeFolder()
public java.lang.String toString()
toString
in class java.lang.Object
public void addDependencyWithPlugin(PluginServices otherPlugin)