Examples of SvgBatikResizableIcon


Examples of org.jvnet.flamingo.svg.SvgBatikResizableIcon

  private JRibbonBand getFileBand() {
    JRibbonBand band = null;
    URL bandIconResourceUrl = getClass().getClassLoader().getResource(
        ActivityLabel.getSVGIconPath(this.getClass(), "file"));
    if(bandIconResourceUrl!=null) {
      SvgBatikResizableIcon bandSVGIcon = SvgBatikResizableIcon.getSvgIcon(
          bandIconResourceUrl, new Dimension(32, 32));
      String bandName = GlobalContext.getLocalizedMessage("pd.menu.file", "File");
      band = new JRibbonBand(bandName, bandSVGIcon);

      URL btnIconResourceUrl = getClass().getClassLoader().getResource(
            ActivityLabel.getSVGIconPath(this.getClass(), "new"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.new", "New"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            loadDesign(ProcessDefinition.create());
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "open"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.open", "Open"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            loadDesign();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "save"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.save", "Save"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            saveDesign(false);
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "save_as"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.saveas", "Save As"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            saveDesign(true);
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "save_to_server"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.savetoserver", "Save to server"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            saveDesignToServer();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "import_from_bpel"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.importtobpel", "Import from BPEL"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            importBPEL();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "expose_webservices"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage(
                "pd.menu.exposeaswebservice", "Expose WebServices"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            generateServiceClass();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "generate_partner_process"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage(
                "pd.menu.generatepartnerprocess", "Generate Partener Process"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            generatePartnerProcess();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "print"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.print", "Print"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
View Full Code Here

Examples of org.jvnet.flamingo.svg.SvgBatikResizableIcon

  private JRibbonBand getEditBand() {
    JRibbonBand band = null;
    URL bandIconResourceUrl = getClass().getClassLoader().getResource(
        ActivityLabel.getSVGIconPath(this.getClass(), "edit"));
    if(bandIconResourceUrl!=null) {
      SvgBatikResizableIcon bandSVGIcon = SvgBatikResizableIcon.getSvgIcon(
          bandIconResourceUrl, new Dimension(32, 32));
      String bandName = GlobalContext.getLocalizedMessage("pd.menu.edit", "Edit");
      band = new JRibbonBand(bandName, bandSVGIcon);

      URL btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "undo"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.undo", "Undo"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            undo();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "redo"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.redo", "Redo"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            redo();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "settings"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.settings", "Settings"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            settings();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "role_picker"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.roles.label", "Role Picker"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
View Full Code Here

Examples of org.jvnet.flamingo.svg.SvgBatikResizableIcon

  private JRibbonBand getSimulationBand() {
    JRibbonBand band = null;
    URL bandIconResourceUrl = getClass().getClassLoader().getResource(
        ActivityLabel.getSVGIconPath(this.getClass(), "simulation"));
    if(bandIconResourceUrl!=null) {
      SvgBatikResizableIcon bandSVGIcon = SvgBatikResizableIcon.getSvgIcon(
          bandIconResourceUrl, new Dimension(32, 32));
      String bandName = GlobalContext.getLocalizedMessage(
          "pd.menu.simulation", "Simulation");
      band = new JRibbonBand(bandName, bandSVGIcon);

      URL btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "test"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.test"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
View Full Code Here

Examples of org.jvnet.flamingo.svg.SvgBatikResizableIcon

  private JRibbonBand getHelpBand() {
    JRibbonBand band = null;
    URL bandIconResourceUrl = getClass().getClassLoader().getResource(
        ActivityLabel.getSVGIconPath(this.getClass(), "help"));
    if(bandIconResourceUrl!=null) {
      SvgBatikResizableIcon bandSVGIcon = SvgBatikResizableIcon.getSvgIcon(
          bandIconResourceUrl, new Dimension(32, 32));
      String bandName = GlobalContext.getLocalizedMessage("pd.menu.help", "Help");
      band = new JRibbonBand(bandName, bandSVGIcon);

      URL btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "help"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.help", "Help"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            help();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "about"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.about", "About"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
          public void actionPerformed(ActionEvent e) {
            about();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
      }
     
      btnIconResourceUrl = getClass().getClassLoader().getResource(
          ActivityLabel.getSVGIconPath(this.getClass(), "update"));
      if(btnIconResourceUrl != null) {
        SvgBatikResizableIcon btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(32, 32));
        JCommandButton btn = new JCommandButton(
            GlobalContext.getLocalizedMessage("pd.menu.update"),
            btnSVGIcon);
        btn.addActionListener( new ActionListener(){
View Full Code Here

Examples of org.pushingpixels.flamingo.api.svg.SvgBatikResizableIcon

    public SvgIconPanel() {
      this.setLayout(new SvgIconPanelLayout());
      try {
        FileInputStream fis = new FileInputStream(
            "C:/jtools/tango-icon-theme-0.8.0/scalable/actions/edit-paste.svg");
        SvgBatikResizableIcon icon = SvgBatikResizableIcon.getSvgIcon(
            fis, new Dimension(32, 32));
        iconButton = new JCommandButton("just icon", icon);
        iconButton.setDisplayState(CommandButtonDisplayState.BIG);
        add(iconButton);
      } catch (IOException ioe) {
View Full Code Here

Examples of org.pushingpixels.flamingo.api.svg.SvgBatikResizableIcon

    public SvgIconPanel() {
      this.setLayout(new SvgIconPanelLayout());
      try {
        FileInputStream fis = new FileInputStream(
            "C:/JTools/icons/oxygen/categories/applications-accessories.svgz");
        SvgBatikResizableIcon icon = SvgBatikResizableIcon.getSvgzIcon(
            fis, new Dimension(32, 32));
        iconButton = new JCommandButton("just icon", icon);
        iconButton.setDisplayState(CommandButtonDisplayState.BIG);
        add(iconButton);
      } catch (IOException ioe) {
View Full Code Here

Examples of org.pushingpixels.flamingo.api.svg.SvgBatikResizableIcon

        for (final StringValuePair<InputStream> pair : pairs) {
          final String name = pair.getKey();
          InputStream svgStream = pair.getValue();
          Dimension svgDim = new Dimension(currDimension,
              currDimension);
          final SvgBatikResizableIcon svgIcon = name.endsWith(".svg") ? SvgBatikResizableIcon
              .getSvgIcon(svgStream, svgDim)
              : SvgBatikResizableIcon.getSvgzIcon(svgStream,
                  svgDim);
          JCommandButton svgButton = newButtons.get(name);
          svgButton.setIcon(svgIcon);

          RichTooltip richTooltip = new RichTooltip("Transcode",
              "Click to generate Java2D class");
          svgButton.setActionRichTooltip(richTooltip);
          svgButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              try {
                System.out.println(name);
                String svgClassName = name.substring(0, name
                    .lastIndexOf('.'));
                svgClassName = svgClassName.replace('-', '_');
                svgClassName = svgClassName.replace(' ', '_');

                String javaClassFilename = System
                    .getProperty("java.io.tmpdir")
                    + File.separator
                    + svgClassName
                    + ".java";

                PrintWriter pw = new PrintWriter(
                    javaClassFilename);

                SvgStreamTranscoder transcoder = new SvgStreamTranscoder(
                    new ByteArrayInputStream(svgIcon
                        .getSvgBytes()), svgClassName);

                transcoder.setPrintWriter(pw);
                transcoder.transcode();
                JOptionPane
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.