SwingTree extends AbstractSwingContainer implements XulTree { public XulTreeChildren getRootChildren() { if ( rootChildren == null ) { rootChildren = (XulTreeChildren) this.getChildNodes().get( 1 ); } return rootChildren; } SwingTree( Element self, XulComponent parent, XulDomContainer domContainer, String tagName ); JTable getTable(); JTree getTree(); int[] getActiveCellCoordinates(); XulTreeCols getColumns(); String getOnselect(); XulTreeChildren getRootChildren(); int getRows(); String getSeltype(); Object[][] getValues(); int getWidth(); void setWidth( int width ); boolean isDisabled(); boolean isEditable(); boolean isEnableColumnDrag(); boolean isHierarchical(); void setActiveCellCoordinates( int row, int column ); void setDisabled( boolean dis ); void setEditable( boolean edit ); void setEnableColumnDrag( boolean drag ); void setOnselect( final String select ); void setColumns( XulTreeCols columns ); void setRootChildren( final XulTreeChildren rootChildren ); void addTreeRow( XulTreeRow row ); void removeTreeRows( int[] rows ); void setRows( int rows ); void setSeltype( String type ); void setTableModel( TableModel model ); @Override void layout(); @Override void replaceChild( XulComponent oldElement, XulComponent newElement ); @Override Object getManagedObject(); int[] getSelectedRows(); int[] getAbsoluteSelectedRows(); void addRow( XulTreeRow row ); Object getData(); void setData( Object data ); void update(); void clearSelection(); void setSelectedRows( int[] rows ); String getOnedit(); void setOnedit( String onedit ); void setElements( Collection<T> elements ); Collection<T> getElements(); Object getSelectedItem(); void setExpanded( boolean expanded ); boolean getExpanded(); void registerCellEditor( String key, org.pentaho.ui.xul.util.TreeCellEditor editor ); void registerCellRenderer( String key, TreeCellRenderer renderer ); void setBoundObjectExpanded( Object o, boolean expanded ); void setTreeItemExpanded( XulTreeItem item, boolean expanded ); void collapseAll(); void expandAll(); Collection<T> getSelectedItems(); void setSelectedItems( Collection<T> items ); int findIndexOfItem( Object o ); boolean isHiddenrootnode(); void setHiddenrootnode( boolean hidden ); String getCommand(); void setCommand( String command ); boolean isPreserveexpandedstate(); void setPreserveexpandedstate( boolean preserve ); boolean isSortable(); void setSortable( boolean sort ); boolean isTreeLines(); void setTreeLines( boolean visible ); void setNewitembinding( String binding ); String getNewitembinding(); void setAutocreatenewrows( boolean auto ); boolean getAutocreatenewrows(); boolean isPreserveselection(); void setPreserveselection( boolean preserve );  }
@Test public void testRowAddCellText() throws Exception { tree.getRootChildren().getItem( 0 ).getRow().addCellText( 2, "Bob" ); }
@Test public void testRowCount() throws Exception { assertEquals( 2, tree.getRootChildren().getItemCount() ); }
@Test public void testGetRootChildren() throws Exception { assertEquals( tree.getRootChildren(), document.getElementById( "main_treechildren" ) ); }