litesoft
Diff Revisions
23
vs
49
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/ListTable.java
|
@@ -1,3 +1,4 @@ |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt |
1 |
2 |
|
package org.litesoft.GWT.client.widgets; |
2 |
3 |
|
|
3 |
4 |
|
import org.litesoft.core.util.*; |
|
@@ -9,12 +10,12 @@ |
9 |
10 |
|
public class ListTable extends ImprovedGrid |
10 |
11 |
|
{ |
11 |
12 |
|
private ObjectCommand<Integer> mClickCommand; |
12 |
|
- |
|
|
13 |
+ |
|
13 |
14 |
|
public ListTable() |
14 |
15 |
|
{ |
15 |
16 |
|
this(null); |
16 |
17 |
|
} |
17 |
|
- |
|
|
18 |
+ |
|
18 |
19 |
|
public ListTable(ObjectCommand<Integer> pClickCommand) |
19 |
20 |
|
{ |
20 |
21 |
|
super(0, 1); |
|
@@ -46,27 +47,27 @@ |
46 |
47 |
|
private class EventHandler implements ClickHandler, MouseOverHandler, MouseOutHandler |
47 |
48 |
|
{ |
48 |
49 |
|
private int mHilightedRow = -1; |
49 |
|
- |
|
|
50 |
+ |
|
50 |
51 |
|
@Override |
51 |
52 |
|
public void onClick(ClickEvent pEvent) |
52 |
53 |
|
{ |
53 |
54 |
|
int row = getRowForEvent(pEvent); |
54 |
55 |
|
mClickCommand.execute(row); |
55 |
56 |
|
} |
56 |
|
- |
|
|
57 |
+ |
|
57 |
58 |
|
@Override |
58 |
59 |
|
public void onMouseOver(MouseOverEvent pEvent) |
59 |
60 |
|
{ |
60 |
61 |
|
int row = getRowForEvent(pEvent); |
61 |
62 |
|
updateHighlightedRow(row); |
62 |
63 |
|
} |
63 |
|
- |
|
|
64 |
+ |
|
64 |
65 |
|
@Override |
65 |
66 |
|
public void onMouseOut(MouseOutEvent pEvent) |
66 |
67 |
|
{ |
67 |
68 |
|
updateHighlightedRow(-1); |
68 |
69 |
|
} |
69 |
|
- |
|
|
70 |
+ |
|
70 |
71 |
|
private void updateHighlightedRow(int pRow) |
71 |
72 |
|
{ |
72 |
73 |
|
if (mHilightedRow != pRow) |