1 38 package com.gargoylesoftware.htmlunit.html; 39 40 import java.util.Map ; 41 42 43 54 public abstract class HtmlTableCell extends ClickableElement { 55 56 62 protected HtmlTableCell(final HtmlPage page, final Map attributes) { 63 super( page, attributes ); 64 } 65 66 72 public int getColumnSpan() { 73 final String spanString = getAttributeValue( "colspan" ); 74 if( spanString == null || spanString.length() == 0 ) { 75 return 1; 76 } 77 else { 78 return Integer.parseInt( spanString ); 79 } 80 } 81 82 88 public int getRowSpan() { 89 final String spanString = getAttributeValue( "rowspan" ); 90 if( spanString == null || spanString.length() == 0 ) { 91 return 1; 92 } 93 else { 94 return Integer.parseInt( spanString ); 95 } 96 } 97 } 98 99 | Popular Tags |