litesoft
Diff Revisions
954
vs
955
for /trunk/Java/GWT/Dev/src/org/litesoft/GWT/client/dev/ui/testplan/TestPlanActionClickTableCell.java
|
@@ -8,8 +8,7 @@ |
8 |
8 |
|
|
9 |
9 |
|
import com.google.gwt.user.client.ui.*; |
10 |
10 |
|
|
11 |
|
- |
public class TestPlanActionClickTableCell implements TestPlanAction |
12 |
|
- |
{ |
|
11 |
+ |
public class TestPlanActionClickTableCell implements TestPlanAction { |
13 |
12 |
|
private static final long serialVersionUID = 1L; |
14 |
13 |
|
|
15 |
14 |
|
public static final String FORM = "ClickTableCell"; |
|
@@ -20,50 +19,42 @@ |
20 |
19 |
|
private /* final */ KeyboardKeyModifier mKeyboardKeyModifier; |
21 |
20 |
|
|
22 |
21 |
|
@SuppressWarnings({"deprecation", "UnusedDeclaration"}) @Deprecated /** for Serialization */ |
23 |
|
- |
protected TestPlanActionClickTableCell() |
24 |
|
- |
{ |
|
22 |
+ |
protected TestPlanActionClickTableCell() { |
25 |
23 |
|
} |
26 |
24 |
|
|
27 |
|
- |
public TestPlanActionClickTableCell( Integer pNth, int pRow, int pCol, KeyboardKeyModifier pKeyboardKeyModifier ) |
28 |
|
- |
{ |
|
25 |
+ |
public TestPlanActionClickTableCell( Integer pNth, int pRow, int pCol, KeyboardKeyModifier pKeyboardKeyModifier ) { |
29 |
26 |
|
mNth = pNth; |
30 |
27 |
|
mRow = pRow; |
31 |
28 |
|
mCol = pCol; |
32 |
29 |
|
mKeyboardKeyModifier = KeyboardKeyModifier.deNull( pKeyboardKeyModifier ); |
33 |
30 |
|
} |
34 |
31 |
|
|
35 |
|
- |
protected WidgetSelector createWidgetSelector() |
36 |
|
- |
{ |
37 |
|
- |
return new NthWidgetSelector(mNth) |
38 |
|
- |
{ |
39 |
|
- |
public boolean isAcceptable( Widget pWidget ) |
40 |
|
- |
{ |
41 |
|
- |
return foundNth(pWidget instanceof Table); |
|
32 |
+ |
protected WidgetSelector createWidgetSelector() { |
|
33 |
+ |
return new NthWidgetSelector( mNth ) { |
|
34 |
+ |
@Override |
|
35 |
+ |
public boolean isAcceptable( Widget pWidget ) { |
|
36 |
+ |
return foundNth( pWidget instanceof Table ); |
42 |
37 |
|
} |
43 |
38 |
|
}; |
44 |
39 |
|
} |
45 |
40 |
|
|
46 |
|
- |
public boolean execute( Object pClickHandlerSharedObject ) |
47 |
|
- |
{ |
|
41 |
+ |
@Override |
|
42 |
+ |
public boolean execute() { |
48 |
43 |
|
Table<?> zTable = WidgetFinder.findRequired( this, createWidgetSelector() ); |
49 |
|
- |
if ( zTable != null ) |
50 |
|
- |
{ |
|
44 |
+ |
if ( zTable != null ) { |
51 |
45 |
|
zTable.simulateUserClickDataGrid( mRow, mCol, mKeyboardKeyModifier ); |
52 |
46 |
|
} |
53 |
47 |
|
return true; |
54 |
48 |
|
} |
55 |
49 |
|
|
56 |
50 |
|
@Override |
57 |
|
- |
public String toString() |
58 |
|
- |
{ |
|
51 |
+ |
public String toString() { |
59 |
52 |
|
StringBuilder sb = new StringBuilder(); |
60 |
53 |
|
sb.append( FORM ); |
61 |
|
- |
if ( mNth != null ) |
62 |
|
- |
{ |
|
54 |
+ |
if ( mNth != null ) { |
63 |
55 |
|
sb.append( '[' ).append( mNth ).append( ']' ); |
64 |
56 |
|
} |
65 |
|
- |
if ( !KeyboardKeyModifier.None.equals( mKeyboardKeyModifier ) ) |
66 |
|
- |
{ |
|
57 |
+ |
if ( !KeyboardKeyModifier.None.equals( mKeyboardKeyModifier ) ) { |
67 |
58 |
|
sb.append( ' ' ).append( mKeyboardKeyModifier ); |
68 |
59 |
|
} |
69 |
60 |
|
sb.append( " /w " ).append( "Cell: " ).append( mRow ).append( "," ).append( mCol ); |