|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaxodraw.plugin.AbstractJaxoPlugin
public abstract class AbstractJaxoPlugin
An abstract superclass for all plugins.
Constructor Summary | |
---|---|
protected |
AbstractJaxoPlugin()
Protected constructor, initialize properties settings. |
Method Summary | |
---|---|
protected void |
close(java.io.InputStream inputStream)
Closes the given InputStream, swallowing any IOException except for logging it in debug mode. |
protected void |
close(java.io.OutputStream outputStream)
Closes the given OutputStream, swallowing any IOException except for logging it in debug mode. |
protected void |
close(java.io.Reader reader)
Closes the given Reader, swallowing any IOException except for logging it in debug mode. |
protected void |
close(java.io.Writer writer)
Closes the given Writer, swallowing any IOException except for logging it in debug mode. |
java.lang.String |
getClassName()
Returns the name of this plugin class without the package. |
java.lang.Object |
getFailure()
Reason for failure of the last export(), probably an (IO)Exception. |
abstract java.lang.String |
getFileExtension()
Extension to be used for plugin files. |
abstract java.lang.String |
getFileExtensionDescription()
Description to be used for plugin file extensions. |
abstract java.lang.String |
getFormatName()
The name of the plugin (export or import) format. |
protected JaxoPluginDictionary |
getLang()
Get a dictionary for this plugin. |
protected JaxoPluginLogger |
getLog()
Get a logger for this plugin. |
java.awt.Component |
getParentComponent()
Parent component for dialogs. |
java.util.Properties |
getProperties()
Return the current set of properties. |
java.lang.String |
getProperty(java.lang.String key)
Returns the property for the specified key or null if the property is not found. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the property for the specified key or the given defaultValue if the property is not found. |
java.lang.String |
getShortGraphName()
Returns the short name of the current graph. |
boolean |
hasFailed()
Checks if the last export() has failed. |
boolean |
isSilent()
If silent, export() will/should not show any error messages. |
void |
loadProperties()
Each plugin should be able to load a set of properties from some default location. |
java.lang.String |
pluginName()
Return the name of this plugin. |
protected void |
registerDictionary(java.lang.Class c)
Register a plugin class for language translations. |
protected void |
setFailure(java.lang.Object value)
Sets the reason for an export failure. |
void |
setParentComponent(java.awt.Component value)
Sets the parent component of this dialog. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets a property to the given value. |
void |
setShortGraphName(java.lang.String newName)
Sets a short name for the current graph. |
void |
setSilent(boolean value)
Sets the silent mode. |
void |
storeProperties()
Stores the current set of properties in a persistent file, so they are automatically available at every session start-up. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.jaxodraw.plugin.JaxoPlugin |
---|
description, getShortName, makeAvailableAtRuntime, pluginId, version |
Methods inherited from interface net.sf.jaxodraw.util.JaxoLocalized |
---|
updateLanguage |
Constructor Detail |
---|
protected AbstractJaxoPlugin()
Method Detail |
---|
public java.lang.String pluginName()
pluginName
in interface JaxoPlugin
protected void registerDictionary(java.lang.Class c)
getLang()
.
c
- the class to register for bundle lookup.public java.awt.Component getParentComponent()
public void setParentComponent(java.awt.Component value)
value
- The parent component to set.public final boolean hasFailed()
public final java.lang.Object getFailure()
protected void setFailure(java.lang.Object value)
value
- The reason to set.public final boolean isSilent()
public void setSilent(boolean value)
value
- True for silent mode on.public final void setShortGraphName(java.lang.String newName)
newName
- The name to set.public final java.lang.String getShortGraphName()
public java.lang.String getProperty(java.lang.String key)
null
if the property is not found.
key
- the property key.
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
key
- the property key.defaultValue
- a default value.
public void setProperty(java.lang.String key, java.lang.String value)
key
- the key of the property.value
- the value corresponding to key.public void loadProperties()
JaxoPlugin.getShortName()
-plugin.properties".
loadProperties
in interface JaxoPlugin
public void storeProperties()
public java.util.Properties getProperties()
public final java.lang.String getClassName()
protected void close(java.io.Reader reader)
reader
- The Reader to close.protected void close(java.io.InputStream inputStream)
inputStream
- The InputStream to close.protected void close(java.io.Writer writer)
writer
- The Writer to close.protected void close(java.io.OutputStream outputStream)
outputStream
- The OutputStream to close.protected JaxoPluginLogger getLog()
protected JaxoPluginDictionary getLang()
registerDictionary(java.lang.Class)
then
an IllegalStateException is thrown.
registerDictionary(java.lang.Class)
public abstract java.lang.String getFormatName()
public abstract java.lang.String getFileExtension()
public abstract java.lang.String getFileExtensionDescription()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |