I am not sure - but if you look at the example buffer plugin on the wiki...
what would be different?
maybe that you are using a threaded plugin?
there are lots of plugins to look at. But as soon as you use a dialog I
would say you should use "extends AbstractThreadedUiPlugIn", do your
dialog stuff in "execute()" and do all your computation in the "run()"
method that is automatically called after things are done in execute.
See below...
but maybe I miss a point here too.
stefan
public boolean execute(PlugInContext context) throws Exception{
//Unlike ValidatePlugIn, here we always call #initDialog
because we want
//to update the layer comboboxes.
initDialog(context);
dialog.setVisible(true);
if (!dialog.wasOKPressed()) {
return false;
}
else{
this.getDialogValues(dialog);
}
return true;
}
public void run(TaskMonitor monitor, PlugInContext context) throws
Exception{
System.gc(); //flush garbage collector
this.context = context;
monitor.allowCancellationRequests();
//....you stuff here...
}
Am 26.06.12 12:47, schrieb Landon Blake:
> I'm working on a plug-in for OpenJUMP. Usually I will "roll my own"
> plug-in GUI, but this time the GUI was fairly simple, and I wanted to
> try out Michael's improvements to the MultiInputDialog class.
>
> I've been looking over the API for the code, and I've bumped into a
> smal challenge:
>
> Instead of processing the data collected in the dialog using the
> AcitonPerformed event of each JTextField, I'd like to do the data
> processing when all the data is present, after the OK button is
> pressed. This will allow me to do some data validation. I see the
> class has a "wasOkButtonPressed" method, but I don't think that is
> what I need. What I really need is a way to respond to the OK button
> click event.
>
> I could hack something, but I thought I'd ask if there is a "standard"
> way to do this using the MultiInputDialog class or its ancestor
> classes. I'd like to learn the "right" way to use the class because I
> may prepare a little MultiInputDialog tutorial when I'm done.
>
> Hopefully this makes sense. I'm probably missing something obvious.
>
> Thanks in advance for the help.
>
> Landon (AKA - The Sunburned Surveyor)
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel