Examples of FileComparator


Examples of be.jacobsvanroy.springsqlunit.comparator.FileComparator

    private List<File> getSortedFiles(File[] files) {
        if (files == null) {
            return new ArrayList<File>();
        }
        List<File> result = Arrays.asList(files);
        Collections.sort(result, new FileComparator());
        return result;
    }
View Full Code Here

Examples of com.admc.util.FileComparator

            sb.append("</tr>\r\n");
        // END DIR ENTRY

        List<File> fileList = Arrays.asList(directory.listFiles(filter));
        Collections.sort(fileList, new FileComparator(sortBy, ascendSort));

        // Render the directory entries within this directory
        for (File file : fileList) {
            String nodeName = file.getName();
            if (namePattern != null)  {
View Full Code Here

Examples of com.admc.util.FileComparator

            sb.append("</tr>\r\n");
        // END DIR ENTRY

        List<File> fileList = Arrays.asList(directory.listFiles(filter));
        Collections.sort(fileList, new FileComparator(sortBy, ascendSort));

        // Render the directory entries within this directory
        for (File file : fileList) {
            String nodeName = file.getName();
            if (namePattern != null)  {
View Full Code Here

Examples of com.alee.utils.file.FileComparator

        webFileList.setPreferredColumnCount ( 4 );
        webFileList.setPreferredRowCount ( 5 );

        // Custome files list model
        File[] files = FileUtils.getDiskRoots ()[ 0 ].listFiles ();
        Arrays.sort ( files, new FileComparator () );
        webFileList.setModel ( new FileListModel ( files ) );

        return new GroupPanel ( webFileList.getScrollView () );
    }
View Full Code Here

Examples of com.alee.utils.file.FileComparator

                public void actionPerformed ( final ActionEvent e )
                {
                    final File[] files = file.listFiles ();
                    if ( files != null && files.length > 0 )
                    {
                        Arrays.sort ( files, new FileComparator () );
                        showFilesPopup ( files, fileButton );
                    }
                    else
                    {
                        TooltipManager.showOneTimeTooltip ( fileButton, null, "There are no files inside" );
View Full Code Here

Examples of com.jeecms.common.file.FileWrap.FileComparator

      if (dirAndEditable) {
        files = parent.listFiles(filter);
      } else {
        files = parent.listFiles();
      }
      Arrays.sort(files, new FileComparator());
      List<FileWrap> list = new ArrayList<FileWrap>(files.length);
      for (File f : files) {
        list.add(new FileWrap(f, realPathResolver.get("")));
      }
      return list;
View Full Code Here

Examples of com.jeecms.common.file.FileWrap.FileComparator

      if (dirAndEditable) {
        files = parent.listFiles(filter);
      } else {
        files = parent.listFiles();
      }
      Arrays.sort(files, new FileComparator());
      List<FileWrap> list = new ArrayList<FileWrap>(files.length);
      CmsFile file;
      for (File f : files) {
        file=fileMng.findByPath(f.getName());
        if(file!=null){
View Full Code Here

Examples of com.jeecms.common.file.FileWrap.FileComparator

  public List<FileWrap> queryFiles(String path, Boolean valid){
    File parent = new File(realPathResolver.get(path));
    if (parent.exists()) {
      File[] files;
      files = parent.listFiles();
      Arrays.sort(files, new FileComparator());
      List<FileWrap> list = new ArrayList<FileWrap>(files.length);
      CmsFile file;
      for (File f : files) {
        file=fileMng.findByPath(f.getName());
        if(valid!=null){
View Full Code Here

Examples of com.mucommander.commons.file.util.FileComparator

        AndFileFilter treeFileFilter = new AndFileFilter(
            new AttributeFileFilter(FileAttribute.DIRECTORY),
            new ConfigurableFolderFilter()
        );

        FileComparator sort = new FileComparator(FileComparator.NAME_CRITERION, true, true);
        model = new FilesTreeModel(treeFileFilter, sort);
        tree = new JTree(model);
    tree.setFont(ThemeCache.tableFont);
        tree.setBackground(ThemeCache.backgroundColors[ThemeCache.INACTIVE][ThemeCache.NORMAL]);
View Full Code Here

Examples of com.mucommander.commons.file.util.FileComparator

        // complexity is reduced to O(log n) instead of O(n^2)
        int left = parent==null?0:1;
        int right = getRowCount()-1;
        int mid;
        AbstractFile midFile;
        FileComparator fc = getFileComparator(sortInfo);

        while(left<=right) {
            mid = (right-left)/2 + left;
            midFile = getCachedFileAtRow(mid);
            if(midFile.equals(file))
                return mid;
            if(fc.compare(file, midFile)<0)
                right = mid-1;
            else
                left = mid+1;
        }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.