|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vividsolutions.jump.workbench.plugin.AbstractPlugIn
org.openjump.test.TestToolsTest.ExamplePlugInWithDialog
public static class TestToolsTest.ExamplePlugInWithDialog
Fixture that outlines a plugin which accepts parameters in an user dialog. Both an user dialog and a map can be used to provide execution parameters.
Configuration: #execute(PlugInContext) shows a MultiInputDialog, in which the user can set field values. The dialog uses static
fields with strings from I18N to name its fields. When the dialog is
closed it contains the execution parameters to provide them for operations.
Programmatic configuration: Calling #execute(PlugInContext)
can be omitted by providing the execution parameters directly as a new dialog
instance using TestTools.configurePlugIn(PlugIn, java.util.Map, boolean).
The keys in the map are the names from the static I18N fields.
Execution: All operations take place in #run(TaskMonitor,
PlugInContext) which uses the execution parameters provided by the dialog.
That means that this method has a dependency to the dialog. To execute operations
without showing the user dialog use TestTools.executePlugIn(PlugIn,
WorkbenchContext) after the parameters in the dialog were configured.
The only methods allowed to be called on the dialog within the #run
method are getText(), getDouble(), getInteger(),
getLayer() and getBoolean() in order to use the operations
without showing the user dialog.
TestTools.configurePlugIn(PlugIn, java.util.Map, boolean),
TestTools.executePlugIn(PlugIn, WorkbenchContext)| Constructor Summary | |
|---|---|
TestToolsTest.ExamplePlugInWithDialog()
|
|
| Method Summary | |
|---|---|
boolean |
execute(PlugInContext context)
Configures plugin. |
void |
run(TaskMonitor monitor,
PlugInContext context)
Executes operations. |
| Methods inherited from class com.vividsolutions.jump.workbench.plugin.AbstractPlugIn |
|---|
createName, execute, execute, getName, initialize, isRollingBackInvalidEdits, reportNothingToUndoYet, toActionListener, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.vividsolutions.jump.workbench.plugin.PlugIn |
|---|
getName, initialize |
| Constructor Detail |
|---|
public TestToolsTest.ExamplePlugInWithDialog()
| Method Detail |
|---|
public boolean execute(PlugInContext context)
throws java.lang.Exception
execute in interface PlugInexecute in class AbstractPlugInjava.lang.Exception - if a problem occurs during plug-in executionThreadedPlugIn
public void run(TaskMonitor monitor,
PlugInContext context)
throws java.lang.Exception
run in interface ThreadedPlugInmonitor - context to which this task can report its progress and
check whether a party has requested its cancellation
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||