public abstract class Plugin extends java.lang.Object
PluginThreaded there is no more guarantee that is the case.| Constructor and Description |
|---|
Plugin()
Default Plugin constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addIcyFrame(IcyFrame frame) |
void |
addSequence(Sequence sequence) |
IcyBufferedImage |
getActiveImage() |
Sequence |
getActiveSequence() |
Viewer |
getActiveViewer() |
PluginDescriptor |
getDescriptor() |
IcyBufferedImage |
getFocusedImage()
Deprecated.
Use
getActiveImage() instead |
Sequence |
getFocusedSequence()
Deprecated.
Use
getActiveSequence() instead |
Viewer |
getFocusedViewer()
Deprecated.
Use
getActiveViewer() instead |
javax.swing.ImageIcon |
getIconResource(java.lang.String resourceName)
Return the icon resource from given resource name
Ex:
getResourceAsStream("plugins/author/resources/icon.png"); |
java.awt.image.BufferedImage |
getImageResource(java.lang.String resourceName)
Return the image resource from given resource name
Ex:
getResourceAsStream("plugins/author/resources/image.png"); |
java.lang.String |
getInstallFolder() |
java.lang.String |
getName() |
java.lang.String |
getOwnerClassName() |
static Plugin |
getPlugin(java.util.List<Plugin> list,
java.lang.String className) |
XMLPreferences |
getPreferences(java.lang.String name)
Retrieve the plugin preferences node for specified name.
|
XMLPreferences |
getPreferencesRoot()
Retrieve the preferences root for this plugin.
|
java.net.URL |
getResource(java.lang.String name)
Return the resource URL from given resource name.
|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Return the resource as data stream from given resource name.
|
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name)
Return resources corresponding to given resource name.
|
java.util.ArrayList<Sequence> |
getSequences() |
boolean |
isBundled() |
boolean |
loadLibrary(java.lang.String libName)
Load a packed native library from the JAR file.
|
java.io.File |
prepareLibrary(java.lang.String libName)
Extract a packed native library from the JAR file to a temporary native library folder so it can be easily loaded
later.
|
void |
removeSequence(Sequence sequence) |
void |
report(java.lang.String errorLog)
Report an error log for this plugin (reported to Icy web site which report then to the
author of the plugin).
|
java.lang.String |
toString() |
public Plugin()
PluginLauncher is normally responsible of Plugin class instantiation.public PluginDescriptor getDescriptor()
public java.lang.String getName()
public boolean isBundled()
true if this is a bundled plugin (see PluginBundled).public java.lang.String getOwnerClassName()
PluginBundled) then it just returns the
current class name otherwise it will returns the plugin owner class name.public java.lang.String getInstallFolder()
public Viewer getActiveViewer()
public Sequence getActiveSequence()
public IcyBufferedImage getActiveImage()
@Deprecated public Viewer getFocusedViewer()
getActiveViewer() instead@Deprecated public Sequence getFocusedSequence()
getActiveSequence() instead@Deprecated public IcyBufferedImage getFocusedImage()
getActiveImage() insteadpublic void addIcyFrame(IcyFrame frame)
public void addSequence(Sequence sequence)
public void removeSequence(Sequence sequence)
public java.util.ArrayList<Sequence> getSequences()
public java.net.URL getResource(java.lang.String name)
getResource("plugins/author/resources/def.xml");name - resource namepublic java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
getResources("plugins/author/resources/def.xml");name - resource namejava.io.IOExceptionpublic java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream("plugins/author/resources/def.xml");name - resource namepublic java.awt.image.BufferedImage getImageResource(java.lang.String resourceName)
getResourceAsStream("plugins/author/resources/image.png");resourceName - resource namepublic javax.swing.ImageIcon getIconResource(java.lang.String resourceName)
getResourceAsStream("plugins/author/resources/icon.png");resourceName - resource namepublic XMLPreferences getPreferencesRoot()
public XMLPreferences getPreferences(java.lang.String name)
public boolean loadLibrary(java.lang.String libName)
/lib/unix32 libxxx.so /lib/unix64 libxxx.so /lib/mac32 libxxx.dylib /lib/mac64 libxxx.dylib /lib/win32 xxx.dll /lib/win64 xxx.dll /plugins/myname/mypackage MyPlugin.class ....Here "xxx" is the name of the native library.
libName - prepareLibrary(String)public java.io.File prepareLibrary(java.lang.String libName)
/lib/unix32 libxxx.so /lib/unix64 libxxx.so /lib/mac32 libxxx.dylib /lib/mac64 libxxx.dylib /lib/win32 xxx.dll /lib/win64 xxx.dll /plugins/myname/mypackage MyPlugin.class ....Here "xxx" is the name of the native library.
libName - loadLibrary(String)public void report(java.lang.String errorLog)
public java.lang.String toString()
toString in class java.lang.Object