Re: NetBeans Options Panel validation
Randall Wood <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
You want to do your validation in the isValid() method (http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/netbeans/spi/options/OptionsPanelController.html#isValid--). IIRC the Apply and OK buttons are disabled when isValid() returns false. > On 21 Jun 2016, at 17:00, kmortelite <[email protected]> wrote: > > I have a class that extends org.netbeans.spi.options.OptionPanelController. > > When a user clicks OK, the following method gets called: > > > Code: > @Override > public void applyChanges() { ... } > > > > I have some items on the options panel that take a really long time to validate, and I'd like to wait until they press OK to validate them. Is there a way to keep the form from closing after they press OK? Here's a basic idea of what I want: > > > > Code: > @Override > public void applyChanges() { > // do my slow, slow, slow validation > // if valid, save and allow form to close return > // otherwise, show invalid validation results on the page and don't let the form close > } > > > > How can I do this? > > Thanks, > Karl > > > > Randall Wood Alexandria Software 202.683.8604 [email protected] http://www.alexandriasoftware.com