Re: NetBeans Options Panel validation
Randall Wood <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
> On 22 Jun 2016, at 09:07, kmortelite <[email protected]> wrote: > > The reason I want to do validation after they press OK is because this particular validation can take a long time. I don't want to do it for every character pressed or change made to the panel. Isn't that what I'll get if I do it in isValid()? Yes, but there are techniques around that: Can validation be broken up into multiple things that can independently validated rapidly? Can validation be triggered only by certain changes in the panel (like editing a text box) that can wait until focus has been lost or a change has not occurred in the past 0.5 seconds? If neither of those are options, make your option panel show the current option state with a button to open a separate modal window that performs validation when its closed, having isValid() return false while that validation is ongoing or fails. Randall Wood Alexandria Software 202.683.8604 [email protected] http://www.alexandriasoftware.com