Subversion Repository Public Repository

litesoft

Diff Revisions 282 vs 475 for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/table/event/client/TableEvent.java

Diff revisions: vs.
  @@ -18,76 +18,90 @@
18 18 /**
19 19 * Handler interface for all Table events.
20 20 */
21 - public interface TableEvent {
22 - /**
23 - * Information about the cell that is being highlighted.
24 - */
25 - public static class Cell {
26 - private int cellIndex;
27 - private int rowIndex;
28 -
29 - /**
30 - * Construct a new Cell.
31 - *
32 - * @param rowIndex the index of the highlighted row
33 - * @param cellIndex the index of the highlighted cell
34 - */
35 - public Cell(int rowIndex, int cellIndex) {
36 - this.cellIndex = cellIndex;
37 - this.rowIndex = rowIndex;
38 - }
39 -
40 - /**
41 - * @return the cell index
42 - */
43 - public int getCellIndex() {
44 - return cellIndex;
45 - }
46 -
21 + public interface TableEvent
22 + {
47 23 /**
48 - * @return the row index
24 + * Information about the cell that is being highlighted.
49 25 */
50 - public int getRowIndex() {
51 - return rowIndex;
52 - }
53 - }
54 -
55 - /**
56 - * Information about the row that is being highlighted.
57 - */
58 - public static class Row implements Comparable<Row> {
59 - private int rowIndex;
60 -
61 - /**
62 - * Construct a new Row.
63 - *
64 - * @param rowIndex the index of the highlighted row
65 - */
66 - public Row(int rowIndex) {
67 - this.rowIndex = rowIndex;
68 - }
69 -
70 - public int compareTo(Row o) {
71 - if (o == null) {
72 - return 1;
73 - } else {
74 - return rowIndex - o.getRowIndex();
75 - }
76 - }
77 -
78 - @Override
79 - public boolean equals(Object o) {
80 - if (o instanceof Row) {
81 - return compareTo((Row) o) == 0;
82 - }
83 - return false;
26 + public static class Cell
27 + {
28 + private int cellIndex;
29 + private int rowIndex;
30 +
31 + /**
32 + * Construct a new Cell.
33 + *
34 + * @param rowIndex the index of the highlighted row
35 + * @param cellIndex the index of the highlighted cell
36 + */
37 + public Cell( int rowIndex, int cellIndex )
38 + {
39 + this.cellIndex = cellIndex;
40 + this.rowIndex = rowIndex;
41 + }
42 +
43 + /**
44 + * @return the cell index
45 + */
46 + public int getCellIndex()
47 + {
48 + return cellIndex;
49 + }
50 +
51 + /**
52 + * @return the row index
53 + */
54 + public int getRowIndex()
55 + {
56 + return rowIndex;
57 + }
84 58 }
85 59
86 60 /**
87 - * @return the row index
61 + * Information about the row that is being highlighted.
88 62 */
89 - public int getRowIndex() {
90 - return rowIndex;
63 + public static class Row implements Comparable<Row>
64 + {
65 + private int rowIndex;
66 +
67 + /**
68 + * Construct a new Row.
69 + *
70 + * @param rowIndex the index of the highlighted row
71 + */
72 + public Row( int rowIndex )
73 + {
74 + this.rowIndex = rowIndex;
75 + }
76 +
77 + public int compareTo( Row o )
78 + {
79 + if ( o == null )
80 + {
81 + return 1;
82 + }
83 + else
84 + {
85 + return rowIndex - o.getRowIndex();
86 + }
87 + }
88 +
89 + @Override
90 + public boolean equals( Object o )
91 + {
92 + if ( o instanceof Row )
93 + {
94 + return compareTo( (Row) o ) == 0;
95 + }
96 + return false;
97 + }
98 +
99 + /**
100 + * @return the row index
101 + */
102 + public int getRowIndex()
103 + {
104 + return rowIndex;
105 + }
91 106 }
92 - }
93 107 }