Subversion Repository Public Repository

litesoft

Diff Revisions 609 vs 610 for /trunk/Java/GWT/Dev/src/org/litesoft/GWT/client/dev/ui/inspection/FormInputSelector.java

Diff revisions: vs.
  @@ -6,29 +6,20 @@
6 6
7 7 import com.google.gwt.user.client.ui.*;
8 8
9 - public class FormInputSelector implements WidgetSelector
9 + public class FormInputSelector extends NthWidgetSelector
10 10 {
11 11 private String mLabel, mTooltip;
12 - private Integer mNth;
13 - private int mFound = -1;
14 12
15 13 public FormInputSelector( String pLabel, String pTooltip, Integer pNth )
16 14 {
15 + super( pNth );
17 16 mLabel = pLabel;
18 17 mTooltip = pTooltip;
19 - mNth = pNth;
20 18 }
21 19
22 20 public boolean isAcceptable( Widget pWidget )
23 21 {
24 - if ( pWidget instanceof AbstractFormElement )
25 - {
26 - if ( isLLacceptable( (AbstractFormElement) pWidget ) )
27 - {
28 - return (mNth == null) || (++mFound == mNth);
29 - }
30 - }
31 - return false;
22 + return foundNth( (pWidget instanceof AbstractFormElement) && isLLacceptable( (AbstractFormElement) pWidget ) );
32 23 }
33 24
34 25 @SuppressWarnings({"SimplifiableIfStatement"})