home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2003 June / PCpro_2003_06.ISO / offline / picgrabber / pg-setup.exe / CLASSES / CLASSESA.jar / dhClasses / html / HtmlParser$TableCell.class (.txt) < prev    next >
Encoding:
Java Class File  |  2001-09-24  |  2.3 KB  |  79 lines

  1. package dhClasses.html;
  2.  
  3. import java.util.Vector;
  4.  
  5. public class HtmlParser$TableCell {
  6.    // $FF: synthetic field
  7.    private final HtmlParser this$0;
  8.    private int m_rowspan;
  9.    private int m_colspan;
  10.    private Vector m_content;
  11.    private HtmlTag m_cellTag;
  12.    private boolean m_spanned;
  13.  
  14.    public HtmlParser$TableCell(HtmlParser this$0, int row, int col) {
  15.       this.this$0 = this$0;
  16.       this.m_rowspan = 0;
  17.       this.m_colspan = 0;
  18.       this.m_content = new Vector();
  19.       this.m_cellTag = null;
  20.       this.m_spanned = false;
  21.       this.m_spanned = true;
  22.       this.m_rowspan = row;
  23.       this.m_colspan = col;
  24.    }
  25.  
  26.    public HtmlParser$TableCell(HtmlParser this$0, int rowspan, int colspan, HtmlTag cellTag) {
  27.       this.this$0 = this$0;
  28.       this.m_rowspan = 0;
  29.       this.m_colspan = 0;
  30.       this.m_content = new Vector();
  31.       this.m_cellTag = null;
  32.       this.m_spanned = false;
  33.       this.m_rowspan = rowspan;
  34.       this.m_colspan = colspan;
  35.       this.m_cellTag = cellTag;
  36.    }
  37.  
  38.    public void addElement(Object obj) {
  39.       this.m_content.addElement(obj);
  40.    }
  41.  
  42.    public Object elementAt(int index) {
  43.       return this.m_content.elementAt(index);
  44.    }
  45.  
  46.    public HtmlTag getCellTag() {
  47.       return this.m_cellTag;
  48.    }
  49.  
  50.    public String getCharacterData() {
  51.       String content = "";
  52.  
  53.       for(int i = 0; i < this.m_content.size(); ++i) {
  54.          Object obj = this.m_content.elementAt(i);
  55.          if (obj instanceof String) {
  56.             content = content + obj;
  57.          }
  58.       }
  59.  
  60.       return content;
  61.    }
  62.  
  63.    public int getColSpan() {
  64.       return this.m_colspan;
  65.    }
  66.  
  67.    public int getRowSpan() {
  68.       return this.m_rowspan;
  69.    }
  70.  
  71.    public boolean isSpanned() {
  72.       return this.m_spanned;
  73.    }
  74.  
  75.    public int size() {
  76.       return this.m_content.size();
  77.    }
  78. }
  79.