Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Dev/src/org/litesoft/GWT/client/dev/ui/testplan/TestPlanActionClickTableHeader.java

Diff revisions: vs.
  @@ -1,70 +1,70 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.GWT.client.dev.ui.testplan;
3 -
4 - import org.litesoft.GWT.client.*;
5 - import org.litesoft.GWT.client.ui.inspection.*;
6 - import org.litesoft.GWT.client.widgets.datatables.*;
7 - import org.litesoft.testplan.*;
8 -
9 - import com.google.gwt.user.client.ui.*;
10 -
11 - public class TestPlanActionClickTableHeader implements TestPlanAction
12 - {
13 - private static final long serialVersionUID = 1L;
14 -
15 - public static final String FORM = "ClickTableHeader";
16 -
17 - private /* final */ Integer mNth;
18 - private /* final */ int mCol;
19 - private /* final */ KeyboardKeyModifier mKeyboardKeyModifier;
20 -
21 - @SuppressWarnings({"deprecation", "UnusedDeclaration"}) @Deprecated /** for Serialization */
22 - TestPlanActionClickTableHeader()
23 - {
24 - }
25 -
26 - public TestPlanActionClickTableHeader( Integer pNth, int pCol, KeyboardKeyModifier pKeyboardKeyModifier )
27 - {
28 - mNth = pNth;
29 - mCol = pCol;
30 - mKeyboardKeyModifier = KeyboardKeyModifier.deNull( pKeyboardKeyModifier );
31 - }
32 -
33 - protected WidgetSelector createWidgetSelector()
34 - {
35 - return new NthWidgetSelector(mNth)
36 - {
37 - public boolean isAcceptable( Widget pWidget )
38 - {
39 - return foundNth(pWidget instanceof Table);
40 - }
41 - };
42 - }
43 -
44 - public boolean execute( Object pClickHandlerSharedObject )
45 - {
46 - Table<?> zTable = WidgetFinder.findRequired( this, createWidgetSelector() );
47 - if ( zTable != null )
48 - {
49 - zTable.simulateUserClickHeader( mCol, mKeyboardKeyModifier );
50 - }
51 - return true;
52 - }
53 -
54 - @Override
55 - public String toString()
56 - {
57 - StringBuilder sb = new StringBuilder();
58 - sb.append( FORM );
59 - if ( mNth != null )
60 - {
61 - sb.append( '[' ).append( mNth ).append( ']' );
62 - }
63 - if ( !KeyboardKeyModifier.None.equals( mKeyboardKeyModifier ) )
64 - {
65 - sb.append( ' ' ).append( mKeyboardKeyModifier );
66 - }
67 - sb.append( " /w " ).append( "Col: " ).append( mCol );
68 - return sb.toString();
69 - }
70 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.GWT.client.dev.ui.testplan;
3 +
4 + import org.litesoft.GWT.client.*;
5 + import org.litesoft.GWT.client.ui.inspection.*;
6 + import org.litesoft.GWT.client.widgets.datatables.*;
7 + import org.litesoft.testplan.*;
8 +
9 + import com.google.gwt.user.client.ui.*;
10 +
11 + public class TestPlanActionClickTableHeader implements TestPlanAction
12 + {
13 + private static final long serialVersionUID = 1L;
14 +
15 + public static final String FORM = "ClickTableHeader";
16 +
17 + private /* final */ Integer mNth;
18 + private /* final */ int mCol;
19 + private /* final */ KeyboardKeyModifier mKeyboardKeyModifier;
20 +
21 + @SuppressWarnings({"deprecation", "UnusedDeclaration"}) @Deprecated /** for Serialization */
22 + TestPlanActionClickTableHeader()
23 + {
24 + }
25 +
26 + public TestPlanActionClickTableHeader( Integer pNth, int pCol, KeyboardKeyModifier pKeyboardKeyModifier )
27 + {
28 + mNth = pNth;
29 + mCol = pCol;
30 + mKeyboardKeyModifier = KeyboardKeyModifier.deNull( pKeyboardKeyModifier );
31 + }
32 +
33 + protected WidgetSelector createWidgetSelector()
34 + {
35 + return new NthWidgetSelector(mNth)
36 + {
37 + public boolean isAcceptable( Widget pWidget )
38 + {
39 + return foundNth(pWidget instanceof Table);
40 + }
41 + };
42 + }
43 +
44 + public boolean execute( Object pClickHandlerSharedObject )
45 + {
46 + Table<?> zTable = WidgetFinder.findRequired( this, createWidgetSelector() );
47 + if ( zTable != null )
48 + {
49 + zTable.simulateUserClickHeader( mCol, mKeyboardKeyModifier );
50 + }
51 + return true;
52 + }
53 +
54 + @Override
55 + public String toString()
56 + {
57 + StringBuilder sb = new StringBuilder();
58 + sb.append( FORM );
59 + if ( mNth != null )
60 + {
61 + sb.append( '[' ).append( mNth ).append( ']' );
62 + }
63 + if ( !KeyboardKeyModifier.None.equals( mKeyboardKeyModifier ) )
64 + {
65 + sb.append( ' ' ).append( mKeyboardKeyModifier );
66 + }
67 + sb.append( " /w " ).append( "Col: " ).append( mCol );
68 + return sb.toString();
69 + }
70 + }