| java.lang.Object com.vividsolutions.jump.workbench.plugin.AbstractPlugIn de.fho.jump.pirol.utilities.plugIns.StandardPirolPlugIn
StandardPirolPlugIn | abstract public class StandardPirolPlugIn extends AbstractPlugIn implements ErrorHandler(Code) | | Overrides most of the abstract methods of the AbstractPlugIn to implement
a default behavior, that fits the needs for a plugIn in the PIROL context.
Also implements the ErrorHandler interface and offers methods to post error
messages to the GUI.
author: Ole Rahn, Stefan Ostermann author:
author: FH Osnabrück - University of Applied Sciences Osnabrück, author: Project: PIROL (2005), author: Subproject: Daten- und Wissensmanagement version: $Rev: 856 $ |
Method Summary | |
public static MultiEnableCheck | createEnableCheck(WorkbenchContext workbenchContext, boolean needFence) | abstract public boolean | execute(PlugInContext context) This method is called to execute the PlugIn. | protected boolean | finishExecution(PlugInContext context, boolean retVal) To be called, when leaving the execute()-method. | public String | getCategoryName() | public static Feature[] | getFeaturesInFenceOrInLayer(PlugInContext context, Layer layer) | public Icon | getIcon() Method to load an icon from the surrounding jar-file if necessary. | abstract public String | getIconString() Method to enable loading an icon from the surrounding jar-file if necessary.
If the plugin doesn't need an icon, just return null else
return the file name, e.g. | public PersonalLogger | getLogger() | public static TaskMonitorDialog | getMonitor(PlugInContext context) | public String | getName() Name of the PlugIn to be shown in the menus or as a tooltip in JUMP.
Looks for a key (the PlugIn's name with no path) in the i18n resources, if none is found
the standard jump name generation will be used. | public static Layer | getSelectedLayer(PlugInContext context) | public static Layer[] | getSelectedLayers(PlugInContext context, int num) Get a given number of selected Layers.
Parameters: context - the current PlugInContext Parameters: num - max. | public String | getShortClassName() | public void | handleThrowable(Throwable t) | public void | initialize(PlugInContext context) The PlugIn will be added to the PIROL Tools/[return value of getCategoryName()] menu and a standard
com.vividsolutions.jump.workbench.plugin.EnableCheck is applied. | public void | initialize(PlugInContext context, String subMenuName) Standard intialization: PlugIn is added to the PIROL Tools/subMenuName (or localized menu name) menu and a standard
com.vividsolutions.jump.workbench.plugin.EnableCheck is applied. | protected void | postMessagesToGui(PlugInContext context) | protected void | println(String function, String msg) Prints output to the stdout. | public static void | println(Class c, String function, String message) Writes the given message and function string to the stdout. | public void | setLogger(PersonalLogger logger) | public void | setUseInToolbox(boolean toolboxUse) | public static void | warnUser(PlugInContext context, String msg) Puts a warning message into the statusbar of JUMP
Parameters: context - curr. |
bringUpMessages | protected boolean bringUpMessages(Code) | | Are errors to be shown in the statusbar (bringUpMessages = false, DEFAULT) or in an
output window (bringUpMessages = true)?
|
geometryFactory | protected static GeometryFactory geometryFactory(Code) | | |
icon | protected ImageIcon icon(Code) | | see description for method getIconString() for more information
|
logger | protected PersonalLogger logger(Code) | | logger reference for use with the StandardPirolPlugIn. Since loggers are personalized, this member has to be
initialized in derived classes by the programmer, before it can be used. For downward compatibility no abstract
method or constructur parameter was introduced to do this.
since: rev.1.12 |
messages | protected StringBuffer messages(Code) | | buffer for messages of errors that occured during execution - needed to implement the ErrorHandler interface
|
useToolIconSize | protected boolean useToolIconSize(Code) | | |
StandardPirolPlugIn | public StandardPirolPlugIn(PersonalLogger logger)(Code) | | Please, use this constructor in the deriving class!
Parameters: logger - the logger that will controll console outputs since: rev.1.17 |
finishExecution | protected boolean finishExecution(PlugInContext context, boolean retVal)(Code) | | To be called, when leaving the execute()-method. Puts out the error messages
collected during execution if any and returns the given boolean value.
Example:return finishExecution(context, true);
Parameters: context - the current PlugInContext Parameters: retVal - the value to be returned by execute() retVal |
getCategoryName | public String getCategoryName()(Code) | | The name of the category, a PlugIn can be found in - this method should be overridden by any derived class!
name of the category, a PlugIn can be found in |
getFeaturesInFenceOrInLayer | public static Feature[] getFeaturesInFenceOrInLayer(PlugInContext context, Layer layer)(Code) | | Get a List of Features (from the given Layer) that reside within the fence (if there is a fence) or just the features of the layer
(if there is currently no fence)
Parameters: context - the plugIn context Parameters: layer - the layer holding the features List of features within fence if present or just within the layer |
getIcon | public Icon getIcon()(Code) | | Method to load an icon from the surrounding jar-file if necessary.
the icon or null if the getIconString() returned null (or problems occured) |
getIconString | abstract public String getIconString()(Code) | | Method to enable loading an icon from the surrounding jar-file if necessary.
If the plugin doesn't need an icon, just return null else
return the file name, e.g. "xyz.png" and put the picture in the same folder
(package) as the deriving class.
the filename of the icon or null if the plugin has no icon. |
getMonitor | public static TaskMonitorDialog getMonitor(PlugInContext context)(Code) | | Parameters: context - the current PlugIn context a TaskMonitorDialog, to show progress information to the user |
getName | public String getName()(Code) | | Name of the PlugIn to be shown in the menus or as a tooltip in JUMP.
Looks for a key (the PlugIn's name with no path) in the i18n resources, if none is found
the standard jump name generation will be used.
|
getSelectedLayer | public static Layer getSelectedLayer(PlugInContext context)(Code) | | get one Layer that is selected
Parameters: context - the current PlugInContext one selected Layer, null if no Layers are selected |
getSelectedLayers | public static Layer[] getSelectedLayers(PlugInContext context, int num)(Code) | | Get a given number of selected Layers.
Parameters: context - the current PlugInContext Parameters: num - max. number of layers to return, -1 returns all selected layers a given number of selected Layers, null if no Layers are selected |
println | public static void println(Class c, String function, String message)(Code) | | Writes the given message and function string to the stdout.
The output will be formated as "classname.function: message".
Parameters: c - the calling class Parameters: function - the method from within this one is called. Parameters: message - the text with some useful information. |
setLogger | public void setLogger(PersonalLogger logger)(Code) | | Sets the personal logger - enables debug statement handling
Parameters: logger - the new personal logger See Also: PersonalLogger |
setUseInToolbox | public void setUseInToolbox(boolean toolboxUse)(Code) | | |
warnUser | public static void warnUser(PlugInContext context, String msg)(Code) | | Puts a warning message into the statusbar of JUMP
Parameters: context - curr. PlugInContext Parameters: msg - message to be shown to the user |
|
|