litesoft
Diff Revisions
947
vs
948
for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/table/cell/panel/ActionPanelItem.java
|
@@ -1,37 +1,34 @@ |
1 |
1 |
|
package com.temp.client.foundation.widget.table.cell.panel; |
2 |
2 |
|
|
3 |
|
- |
|
4 |
|
- |
import com.temp.client.foundation.handler.ActionHandler; |
5 |
|
- |
|
6 |
|
- |
import com.google.gwt.user.client.ui.Label; |
7 |
|
- |
import com.google.gwt.user.client.ui.Widget; |
|
3 |
+ |
import com.google.gwt.user.client.ui.*; |
|
4 |
+ |
import com.temp.client.foundation.handler.*; |
8 |
5 |
|
|
9 |
6 |
|
/** |
10 |
7 |
|
* Individual "action" item that can be combined into a list (with separators). |
11 |
8 |
|
* |
12 |
|
- |
* @author ngchihou |
13 |
|
- |
* |
14 |
9 |
|
* @param <T> |
|
10 |
+ |
* |
|
11 |
+ |
* @author ngchihou |
15 |
12 |
|
*/ |
16 |
13 |
|
public abstract class ActionPanelItem<T> extends ActionPanelEntry<T> implements ActionHandler<T> { |
17 |
14 |
|
private String label; |
18 |
15 |
|
|
19 |
|
- |
public ActionPanelItem(String label) { |
|
16 |
+ |
public ActionPanelItem( String label ) { |
20 |
17 |
|
this.label = label; |
21 |
18 |
|
} |
22 |
19 |
|
|
23 |
20 |
|
/** |
24 |
21 |
|
* Render the action item as a widget |
25 |
22 |
|
*/ |
26 |
|
- |
public Widget render(T obj) { |
27 |
|
- |
return new Label(renderLabel(obj)); |
|
23 |
+ |
public Widget render( T obj ) { |
|
24 |
+ |
return new Label( renderLabel( obj ) ); |
28 |
25 |
|
} |
29 |
26 |
|
|
30 |
|
- |
public boolean isEnabled(T obj) { |
|
27 |
+ |
public boolean isEnabled( T obj ) { |
31 |
28 |
|
return true; |
32 |
29 |
|
} |
33 |
30 |
|
|
34 |
|
- |
protected String renderLabel(T obj) { |
|
31 |
+ |
protected String renderLabel( T obj ) { |
35 |
32 |
|
return label; |
36 |
33 |
|
} |
37 |
34 |
|
} |