/** * Creates a new instance of <code>ClassFinder</code>. */ public ClassFinder() { filter = new OrFileFilter( new ExtensionFilenameFilter(".class"), new AttributeFileFilter(FileAttribute.DIRECTORY) ); }
public boolean accept(AbstractFile file) { return accept(generator.getCriterionValue(file)); } }
@Override public FilenameFilter getFilenameFilter() { return new ExtensionFilenameFilter(EXTENSIONS); } }
public MoveAction(MainFrame mainFrame, Map<String,Object> properties) { super(mainFrame, properties); setSelectedFileFilter(new OrFileFilter( new FileOperationFilter(FileOperation.RENAME), new AndFileFilter( new FileOperationFilter(FileOperation.READ_FILE), new FileOperationFilter(FileOperation.WRITE_FILE) ) )); }
public SplitFileAction(MainFrame mainFrame, Map<String,Object> properties) { super(mainFrame, properties); setSelectedFileFilter(new AndFileFilter( new AttributeFileFilter(FileAttribute.DIRECTORY, true), new FileOperationFilter(FileOperation.READ_FILE) )); }
/** * Returns <code>true</code> if the specified file matches the association. * @param file file to match against the association. * @return <code>true</code> if the specified file matches the association, <code>false</code> otherwise. */ public boolean accept(AbstractFile file) {return fileFilter.match(file);}
/** * Creates a new <code>ExtensionPathFilter</code> matching paths ending with one of the specified * extensions and operating in the specified modes. * * @param ext the extensions to match * @param caseSensitive if true, this PathFilter will be case-sensitive * @param inverted if true, this filter will operate in inverted mode. */ public ExtensionPathFilter(String[] ext, boolean caseSensitive, boolean inverted) { super(new PathGenerator(), ext, caseSensitive, inverted); } }
/** * Creates a new <code>StartsFilenameFilter</code> matching filenames starting with the specified string and * operating in the specified modes. * * @param s the string to compare filenames against * @param caseSensitive if true, this FilenameFilter will be case-sensitive * @param inverted if true, this filter will operate in inverted mode. */ public StartsWithFilenameFilter(String s, boolean caseSensitive, boolean inverted) { super(new FilenameGenerator(), s, caseSensitive, inverted); } }
/** * Creates a new <code>AbstractFileFilter</code> operating in the specified mode. * * @param inverted if true, this filter will operate in inverted mode. */ public AbstractFileFilter(boolean inverted) { setInverted(inverted); }
public boolean accept(AbstractFile files[]) { int nbFiles = files.length; for(int i=0; i<nbFiles; i++) if(!accept(files[i])) return false; return true; }
public BatchRenameAction(MainFrame mainFrame, Map<String,Object> properties) { super(mainFrame, properties); setSelectedFileFilter(new OrFileFilter( new FileOperationFilter(FileOperation.RENAME), new AndFileFilter( new FileOperationFilter(FileOperation.READ_FILE), new FileOperationFilter(FileOperation.WRITE_FILE) ) )); }
@Override public FilenameFilter getFilenameFilter() { return new ExtensionFilenameFilter(EXTENSIONS); } }
/** * Creates a new instance of <code>AbstractViewerAction</code>. * @param mainFrame frame to which the action is attached. * @param properties action's properties. */ public AbstractViewerAction(MainFrame mainFrame, Map<String,Object> properties) { super(mainFrame, properties); // Enable this action only if the currently selected file is not a directory and can be read. setSelectedFileFilter(new AndFileFilter( new FileOperationFilter(FileOperation.READ_FILE), new AttributeFileFilter(FileAttribute.DIRECTORY, true) )); }
/** * Creates a new <code>AbstractPathFilter</code> operating in the specified mode. * * @param caseSensitive if true, this FilePathFilter will be case-sensitive * @param inverted if true, this filter will operate in inverted mode. */ public AbstractPathFilter(boolean caseSensitive, boolean inverted) { super(new PathGenerator(), caseSensitive, inverted); } }
/** * Creates a new <code>RegexpFilenameFilter</code> matching the specified regexp and operating in non-inverted * mode. * * @param regexp regular expression that matches string values. * @param caseSensitive whether the regular expression is case sensitive or not. * @throws PatternSyntaxException if the syntax of the regular expression is not correct. */ public RegexpFilenameFilter(String regexp, boolean caseSensitive) throws PatternSyntaxException { super(new FilenameGenerator(), regexp, caseSensitive, false); }
public RenameAction(MainFrame mainFrame, Map<String,Object> properties) { super(mainFrame, properties); setSelectedFileFilter(new OrFileFilter( new FileOperationFilter(FileOperation.RENAME), new AndFileFilter( new FileOperationFilter(FileOperation.READ_FILE), new FileOperationFilter(FileOperation.WRITE_FILE) ) )); }
@Override public FilenameFilter getFilenameFilter() { return new ExtensionFilenameFilter(EXTENSIONS); } }
/** * Creates a new <code>RegexpPathFilter</code> matching the specified regexp and operating in non-inverted * mode. * * @param regexp regular expression that matches string values. * @param caseSensitive whether the regular expression is case sensitive or not. * @throws PatternSyntaxException if the syntax of the regular expression is not correct. */ public RegexpPathFilter(String regexp, boolean caseSensitive) throws PatternSyntaxException { super(new PathGenerator(), regexp, caseSensitive, false); }
@Override public FilenameFilter getFilenameFilter() { return new ExtensionFilenameFilter(EXTENSIONS); } }
@Override public FilenameFilter getFilenameFilter() { return new ExtensionFilenameFilter(EXTENSIONS); } }