sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 10177 - svn://svn.freehep.org/svn / freehep / trunk / jaida / freehep-aidatld / src / java / hep / aida / web / taglib / util / PlotUtils.java
Unified Diff View - PlotUtils.java
Search for Help
/freehep/trunk/jaida/freehep-aidatld/src/java/hep/aida/web/taglib/util/PlotUtils.java @ revision 10176
/freehep/trunk/jaida/freehep-aidatld/src/java/hep/aida/web/taglib/util/PlotUtils.java @ revision 10177
@@ -12,6 +12,7 @@ import javax.servlet.jsp.PageContext; import org.freehep.util.export.ExportFileType; +import org.freehep.util.export.ExportFileTypeGroups; /**  * Various utility functions for the tags. @@ -102,26 +103,33 @@         StringBuffer buffer = new StringBuffer("\n<p>Download:"); -        List types = ExportFileType.getExportFileTypes(); -        Iterator iterator = types.iterator(); -        while (iterator.hasNext()) { -            ExportFileType fileType = (ExportFileType) iterator.next(); -            String format = fileType.getExtensions()[0]; +        ExportFileTypeGroups groups = new ExportFileTypeGroups(ExportFileType.getExportFileTypes()); +        String[] groupNames = { ExportFileTypeGroups.VECTOR, ExportFileTypeGroups.BITMAP }; +        for (int i=0; i<groupNames.length; i++) { +            if (i != 0) buffer.append(", "); +            buffer.append("\n(<i>"); +            buffer.append(groupNames[i]); +            buffer.append("</i>)\n"); +            List types = groups.getExportFileTypes(groupNames[i]); +            Iterator iterator = types.iterator(); +            while (iterator.hasNext()) { +                ExportFileType fileType = (ExportFileType) iterator.next(); +                String format = fileType.getExtensions()[0]; -            // For the moment exclude bmp, wbmp and svgz -            if ( format.equals("bmp") || format.equals("wbmp") || format.equals("svgz") ) -                continue; +                // For the moment exclude bmp and wbmp +                if (format.equals("bmp") || format.equals("wbmp")) +                    continue; -            plotCommand.setFormat(format); +                plotCommand.setFormat(format); -            buffer.append("\n"); -            buffer.append(" <a href=\""); -            buffer.append(urlEncode(request, plotCommand)); -            buffer.append("\">"); -            buffer.append(format); -            buffer.append("</a>\n"); +                buffer.append("\n"); +                buffer.append(" <a href=\""); +                buffer.append(urlEncode(request, plotCommand)); +                buffer.append("\">"); +                buffer.append(format); +                buffer.append("</a>\n"); +            }         } -         buffer.append("</p>\n");         return buffer.toString();


feed icon

sventon 2.5.1