|
@@ -15,42 +15,46 @@ |
15 |
15 |
|
*/ |
16 |
16 |
|
package com.google.gwt.gen2.table.client; |
17 |
17 |
|
|
18 |
|
- |
import com.google.gwt.user.client.DOM; |
19 |
|
- |
import com.google.gwt.user.client.Element; |
|
18 |
+ |
import com.google.gwt.user.client.*; |
20 |
19 |
|
|
21 |
20 |
|
/** |
22 |
21 |
|
* This class should be incorporated into the DOMImplSafari class. |
23 |
|
- |
* |
|
22 |
+ |
* <p/> |
24 |
23 |
|
* TODO: incorporate into DOMImplSafari |
25 |
24 |
|
*/ |
26 |
|
- |
class OverrideDOMImplSafari extends OverrideDOMImpl { |
27 |
|
- |
@Override |
28 |
|
- |
public Element createTD() { |
29 |
|
- |
Element td = super.createTD(); |
30 |
|
- |
DOM.setElementPropertyInt(td, "colSpan", 1); |
31 |
|
- |
DOM.setElementPropertyInt(td, "rowSpan", 1); |
32 |
|
- |
return td; |
33 |
|
- |
} |
|
25 |
+ |
class OverrideDOMImplSafari extends OverrideDOMImpl |
|
26 |
+ |
{ |
|
27 |
+ |
@Override |
|
28 |
+ |
public Element createTD() |
|
29 |
+ |
{ |
|
30 |
+ |
Element td = super.createTD(); |
|
31 |
+ |
DOM.setElementPropertyInt( td, "colSpan", 1 ); |
|
32 |
+ |
DOM.setElementPropertyInt( td, "rowSpan", 1 ); |
|
33 |
+ |
return td; |
|
34 |
+ |
} |
34 |
35 |
|
|
35 |
|
- |
@Override |
36 |
|
- |
public Element createTH() { |
37 |
|
- |
Element th = super.createTH(); |
38 |
|
- |
DOM.setElementPropertyInt(th, "colSpan", 1); |
39 |
|
- |
DOM.setElementPropertyInt(th, "rowSpan", 1); |
40 |
|
- |
return th; |
41 |
|
- |
} |
|
36 |
+ |
@Override |
|
37 |
+ |
public Element createTH() |
|
38 |
+ |
{ |
|
39 |
+ |
Element th = super.createTH(); |
|
40 |
+ |
DOM.setElementPropertyInt( th, "colSpan", 1 ); |
|
41 |
+ |
DOM.setElementPropertyInt( th, "rowSpan", 1 ); |
|
42 |
+ |
return th; |
|
43 |
+ |
} |
42 |
44 |
|
|
43 |
|
- |
/** |
44 |
|
- |
* Gets the cell index of a cell within a table row. |
45 |
|
- |
* |
46 |
|
- |
* The cellIndex property is not defined in Safari, so we must calculate the |
47 |
|
- |
* cell index manually. |
48 |
|
- |
* |
49 |
|
- |
* @param td the cell element |
50 |
|
- |
* @return the cell index |
51 |
|
- |
*/ |
52 |
|
- |
@Override |
53 |
|
- |
public int getCellIndex(Element td) { |
54 |
|
- |
return DOM.getChildIndex(DOM.getParent(td), td); |
55 |
|
- |
} |
|
45 |
+ |
/** |
|
46 |
+ |
* Gets the cell index of a cell within a table row. |
|
47 |
+ |
* <p/> |
|
48 |
+ |
* The cellIndex property is not defined in Safari, so we must calculate the |
|
49 |
+ |
* cell index manually. |
|
50 |
+ |
* |
|
51 |
+ |
* @param td the cell element |
|
52 |
+ |
* |
|
53 |
+ |
* @return the cell index |
|
54 |
+ |
*/ |
|
55 |
+ |
@Override |
|
56 |
+ |
public int getCellIndex( Element td ) |
|
57 |
+ |
{ |
|
58 |
+ |
return DOM.getChildIndex( DOM.getParent( td ), td ); |
|
59 |
+ |
} |
56 |
60 |
|
} |