01: package watij.runtime.ie;
02:
03: import com.jniwrapper.win32.com.IUnknown;
04: import com.jniwrapper.win32.mshtml.IHTMLTableCell;
05: import com.jniwrapper.win32.mshtml.impl.IHTMLTableCellImpl;
06: import org.w3c.dom.Element;
07: import watij.elements.TableCell;
08:
09: public class IETableCell extends IEHtmlElement implements TableCell {
10: public IETableCell(Element element, IE ie) throws Exception {
11: super (element, ie);
12: }
13:
14: private IHTMLTableCell ihtmlTableCell() throws Exception {
15: return (IHTMLTableCell) oleMessageLoop().bindObject(
16: new IHTMLTableCellImpl(oleMessageLoop().bindObject(
17: (IUnknown) htmlElement().getElementPeer())));
18: }
19:
20: public int colspan() throws Exception {
21: return (int) ihtmlTableCell().getColSpan().getValue();
22: }
23:
24: // public int colspan() throws Exception {
25: // String colspan = tableCell().getAttributeNode("colspan").getValue();
26: // return Utils.isEmpty(colspan)?0:Integer.valueOf(colspan);
27: // }
28: }
|