class SwingTree extends AbstractSwingContainer implements XulTree {

  public Object[][] getValues() {

    TableModel model = table.getModel();
    Object[][] data = new Object[getRootChildren().getChildNodes().size()][model.getColumnCount()];

    int y = 0;
    for ( XulComponent item : getRootChildren().getChildNodes() ) {
      int x = 0;
      for ( XulComponent tempCell : ( (XulTreeItem) item ).getRow().getChildNodes() ) {
        SwingTreeCell cell = (SwingTreeCell) tempCell;
        switch ( columns.getColumn( x ).getColumnType() ) {
          case CHECKBOX:
            Boolean flag = (Boolean) cell.getValue();
            if ( flag == null ) {
              flag = Boolean.FALSE;
            }
            data[y][x] = flag;
            break;
          case COMBOBOX:
            Vector values = (Vector) cell.getValue();
            int idx = cell.getSelectedIndex();
            data[y][x] = values.get( idx );
            break;
          default: // label
            data[y][x] = cell.getLabel();
            break;
        }
        x++;

      }

      y++;
    }

    // for(int row=0; row<this.rootChildren.getRowCount(); row++){
    // for(int col=0; col<model.getColumnCount(); col++){
    // data[row][col] = model.getValueAt(row,col);
    // }
    // }
    return data;
  }

  public  SwingTree( Element self, XulComponent parent, XulDomContainer domContainer, String tagName );

}