@Test public void testIsLeaf() { RepositoryTreeModel treeModel = new RepositoryTreeModel(); assertNotNull( treeModel ); treeModel.setFileSystemRoot( repositoryRoot ); assertTrue( treeModel.isLeaf( repositoryRoot ) ); }
public boolean isLeaf( final Object node ) { if ( node instanceof RepositoryTreeRoot ) { return false; } try { final FileObject parElement = (FileObject) node; return ( parElement.getType() != FileType.FOLDER ); } catch ( FileSystemException fse ) { logger.debug( "Failed", fse ); return false; } }
RepositoryTreeModel implements TreeModel { public boolean isLeaf( final Object node ) { if ( node instanceof RepositoryTreeRoot ) { return false; } try { final FileObject parElement = (FileObject) node; return ( parElement.getType() != FileType.FOLDER ); } catch ( FileSystemException fse ) { logger.debug( "Failed", fse ); return false; } } }
RepositoryTreeModel implements TreeModel { public boolean isLeaf( final Object node ) { if ( node instanceof RepositoryTreeRoot ) { return false; } try { final FileObject parElement = (FileObject) node; return ( parElement.getType() != FileType.FOLDER ); } catch ( FileSystemException fse ) { logger.debug( "Failed", fse ); return false; } } RepositoryTreeModel();  RepositoryTreeModel( final FileObject repositoryRoot, final String[] filters, final boolean showFoldersOnly ); }
RepositoryTreeModel implements TreeModel { public boolean isLeaf( final Object node ) { if ( node instanceof RepositoryTreeRoot ) { return false; } try { final FileObject parElement = (FileObject) node; return ( parElement.getType() != FileType.FOLDER ); } catch ( FileSystemException fse ) { logger.debug( "Failed", fse ); return false; } } RepositoryTreeModel();  RepositoryTreeModel( final FileObject repositoryRoot, final String[] filters, final boolean showFoldersOnly ); void setShowFoldersOnly( final boolean showFoldersOnly ); boolean isShowFoldersOnly(); boolean isShowHiddenFiles(); void setShowHiddenFiles( final boolean showHiddenFiles ); String[] getFilters(); void setFilters( final String[] filters ); FileObject getFileSystemRoot(); void setFileSystemRoot( final FileObject root ); Object getRoot(); Object getChild( Object parent, final int index ); int getChildCount( Object parent ); boolean isLeaf( final Object node ); void valueForPathChanged( final TreePath path, final Object newValue ); int getIndexOfChild( Object parent, final Object childNode ); void addTreeModelListener( final TreeModelListener l ); void removeTreeModelListener( final TreeModelListener l ); void fireTreeDataChanged(); TreePath getTreePathForSelection( FileObject selectedFolder, final String selection ); static FileObject findNodeByName( final FileObject node, final String name ); }
RepositoryTreeModel implements TreeModel { public boolean isLeaf( final Object node ) { if ( node instanceof RepositoryTreeRoot ) { return false; } try { final FileObject parElement = (FileObject) node; return ( parElement.getType() != FileType.FOLDER ); } catch ( FileSystemException fse ) { logger.debug( "Failed", fse ); return false; } } RepositoryTreeModel();  RepositoryTreeModel( final FileObject repositoryRoot, final String[] filters, final boolean showFoldersOnly ); void setShowFoldersOnly( final boolean showFoldersOnly ); boolean isShowFoldersOnly(); boolean isShowHiddenFiles(); void setShowHiddenFiles( final boolean showHiddenFiles ); String[] getFilters(); void setFilters( final String[] filters ); FileObject getFileSystemRoot(); void setFileSystemRoot( final FileObject root ); Object getRoot(); Object getChild( Object parent, final int index ); int getChildCount( Object parent ); boolean isLeaf( final Object node ); void valueForPathChanged( final TreePath path, final Object newValue ); int getIndexOfChild( Object parent, final Object childNode ); void addTreeModelListener( final TreeModelListener l ); void removeTreeModelListener( final TreeModelListener l ); void fireTreeDataChanged(); TreePath getTreePathForSelection( FileObject selectedFolder, final String selection ); static FileObject findNodeByName( final FileObject node, final String name );  }