litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/table/client/TextCellEditor.java
|
@@ -20,8 +20,7 @@ |
20 |
20 |
|
/** |
21 |
21 |
|
* An {@link InlineCellEditor} that can be used to edit {@link String Strings}. |
22 |
22 |
|
*/ |
23 |
|
- |
public class TextCellEditor extends InlineCellEditor<String> |
24 |
|
- |
{ |
|
23 |
+ |
public class TextCellEditor extends InlineCellEditor<String> { |
25 |
24 |
|
/** |
26 |
25 |
|
* The text field used in this editor. |
27 |
26 |
|
*/ |
|
@@ -30,8 +29,7 @@ |
30 |
29 |
|
/** |
31 |
30 |
|
* Construct a new {@link TextCellEditor} using a normal {@link TextBox}. |
32 |
31 |
|
*/ |
33 |
|
- |
public TextCellEditor() |
34 |
|
- |
{ |
|
32 |
+ |
public TextCellEditor() { |
35 |
33 |
|
this( new TextBox() ); |
36 |
34 |
|
} |
37 |
35 |
|
|
|
@@ -40,8 +38,7 @@ |
40 |
38 |
|
* |
41 |
39 |
|
* @param textBox the text box to use |
42 |
40 |
|
*/ |
43 |
|
- |
public TextCellEditor( TextBoxBase textBox ) |
44 |
|
- |
{ |
|
41 |
+ |
public TextCellEditor( TextBoxBase textBox ) { |
45 |
42 |
|
super( textBox ); |
46 |
43 |
|
this.textBox = textBox; |
47 |
44 |
|
} |
|
@@ -53,15 +50,13 @@ |
53 |
50 |
|
* @param textBox the text box to use |
54 |
51 |
|
* @param images the images to use for the accept/cancel buttons |
55 |
52 |
|
*/ |
56 |
|
- |
public TextCellEditor( TextBoxBase textBox, InlineCellEditorImages images ) |
57 |
|
- |
{ |
|
53 |
+ |
public TextCellEditor( TextBoxBase textBox, InlineCellEditorImages images ) { |
58 |
54 |
|
super( textBox, images ); |
59 |
55 |
|
this.textBox = textBox; |
60 |
56 |
|
} |
61 |
57 |
|
|
62 |
58 |
|
@Override |
63 |
|
- |
public void editCell( CellEditInfo cellEditInfo, String cellValue, Callback<String> callback ) |
64 |
|
- |
{ |
|
59 |
+ |
public void editCell( CellEditInfo cellEditInfo, String cellValue, Callback<String> callback ) { |
65 |
60 |
|
super.editCell( cellEditInfo, cellValue, callback ); |
66 |
61 |
|
textBox.setFocus( true ); |
67 |
62 |
|
} |
|
@@ -69,22 +64,18 @@ |
69 |
64 |
|
/** |
70 |
65 |
|
* @return the text box used in the editor |
71 |
66 |
|
*/ |
72 |
|
- |
protected TextBoxBase getTextBox() |
73 |
|
- |
{ |
|
67 |
+ |
protected TextBoxBase getTextBox() { |
74 |
68 |
|
return textBox; |
75 |
69 |
|
} |
76 |
70 |
|
|
77 |
71 |
|
@Override |
78 |
|
- |
protected String getValue() |
79 |
|
- |
{ |
|
72 |
+ |
protected String getValue() { |
80 |
73 |
|
return textBox.getText(); |
81 |
74 |
|
} |
82 |
75 |
|
|
83 |
76 |
|
@Override |
84 |
|
- |
protected void setValue( String cellValue ) |
85 |
|
- |
{ |
86 |
|
- |
if ( cellValue == null ) |
87 |
|
- |
{ |
|
77 |
+ |
protected void setValue( String cellValue ) { |
|
78 |
+ |
if ( cellValue == null ) { |
88 |
79 |
|
cellValue = ""; |
89 |
80 |
|
} |
90 |
81 |
|
textBox.setText( cellValue ); |