Package net.sf.latexdraw.filters

Examples of net.sf.latexdraw.filters.SVGFilter


   */
  public JFileChooser getDialog(final boolean save) {
    if(fileChooser==null) {
      fileChooser = new JFileChooser();
      fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
      fileChooser.addChoosableFileFilter(new SVGFilter());
      fileChooser.setMultiSelectionEnabled(false);
    }

    if(save)
      fileChooser.setDialogTitle(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.188"));//$NON-NLS-1$
View Full Code Here


     * @param pathTemplate The path of the templates.
     * @param pathCache The path of the cache of the templates.
     * @param sharedTemplates True if the templates are shared templates (in the shared directory).
     */
    protected void createMenuItems(final String pathTemplate, final String pathCache, final boolean sharedTemplates) {
      final SVGFilter filter = new SVGFilter();
      final File[] files = new File(pathTemplate).listFiles();

      if(files!=null)
        for(int i=0; i<files.length; i++)
          if(filter.accept(files[i]) && !files[i].isDirectory()) {
            final MMenuItem menu = createTemplateMenuItem(files[i].getPath(), files[i].getName()+PNGFilter.PNG_EXTENSION, pathCache);

            if(menu!=null)
              templatesMenu.add(menu, i);
          }
View Full Code Here

      if(!templateDir.isDirectory())
        return; // There is no template

      // We get the list of the templates
      final SVGFilter filter = new SVGFilter();
      final File[] files = templateDir.listFiles();
      IShape template;
      File thumbnail;

      // We export the updated template
      if(files!=null)
                for(final File file : files)
                    if(filter.accept(file))
                        try {
                            template = toLatexdraw(new SVGDocument(file.toURI()), 0);
                            thumbnail = new File(pathCache + File.separator + file.getName() + PNGFilter.PNG_EXTENSION);
                            createTemplateThumbnail(thumbnail, template);
                        }catch(final Exception ex) {BadaboomCollector.INSTANCE.add(ex);}
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.filters.SVGFilter

Copyright © 2018 www.massapicom. 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.