001 /* 002 * file FolderOnlyFilter.java 003 * 004 * Licensed Materials - Property of IBM 005 * Restricted Materials of IBM - you are allowed to copy, modify and 006 * redistribute this file as part of any program that interfaces with 007 * IBM Rational CM API. 008 * 009 * com.ibm.rational.teamapi.scout.FolderOnlyFilter 010 * 011 * © Copyright IBM Corporation 2004, 2008. All Rights Reserved. 012 * Note to U.S. Government Users Restricted Rights: Use, duplication or 013 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 014 */ 015 package com.ibm.rational.teamapi.scout; 016 017 import org.eclipse.jface.viewers.Viewer; 018 import org.eclipse.jface.viewers.ViewerFilter; 019 020 /** 021 * A ViewerFilter that allows the display of folders only. 022 */ 023 public class FolderOnlyFilter extends ViewerFilter { 024 025 /* 026 * @see ViewerFilter#select(Viewer, Object, Object) 027 */ 028 public boolean select(Viewer viewer, Object parentElement, Object element) { 029 return ((ProxyElement)element).isFolder(); 030 } 031 032 }