Package org.jvnet.flamingo.common

Examples of org.jvnet.flamingo.common.JCommandButton


        btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(
            btnIconResourceUrl, new Dimension(24, 24));       
      }

      if(btnSVGIcon != null) {
        nameButton = new JCommandButton(value.getName().getText(), btnSVGIcon);
        nameButton.putClientProperty(
            SubstanceLookAndFeel.FLAT_PROPERTY, Boolean.FALSE);
        //nameButton.putClientProperty(SubstanceLookAndFeel.GRADIENT_PAINTER_PROPERTY,
        //      new org.jvnet.substance.painter.SpecularWaveGradientPainter());
        nameButton.setState(org.jvnet.flamingo.common.ElementState.CUSTOM, true);
View Full Code Here


          if(defaultIconResourceUrl!=null)
            btnSVGIcon = SvgBatikResizableIcon.getSvgIcon(defaultIconResourceUrl, new Dimension(32, 32));
        }

        if(btnSVGIcon != null) {
          JCommandButton btn = new JCommandButton(name, btnSVGIcon);
          activityTypeNameMap.put(activityCls, name);
          btn.setToolTipText(clsName);
          btn.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent ae){
              ProcessDesigner.this.insertActivity(activityCls);
              ProcessDesigner.this.setDocumentChanged(true);
            }         
          });
View Full Code Here

      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(){
          public void actionPerformed(ActionEvent e) {
            printDesign();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
View Full Code Here

      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(){
          public void actionPerformed(ActionEvent e) {
            viewRoleResolutionDlg();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
View Full Code Here

      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(){
          public void actionPerformed(ActionEvent e) {
            switchToSimulator();
          }
        });
        band.addGalleryButton(btn, RibbonElementPriority.MEDIUM);
View Full Code Here

      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(){
          public void actionPerformed(ActionEvent e) {
            update();
          }
        });
        //SubstanceLookAndFeel.setDecorationType(btn, DecorationAreaType.GENERAL);
View Full Code Here

    /**
     * Ribbon menu top taskbar actions
     */
    protected void configureTaskBar() {
        JCommandButton cbtnDashboard = new JCommandButton("",
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS16 + "dashboard.png"))));
        cbtnDashboard.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onOpenDashboard();
            }
        });

        JCommandButton cbtnCustomers = new JCommandButton("",
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS16 + "customer.png"))));
        cbtnCustomers.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onOpenCustomers();
            }
        });

        JCommandButton cbtnCategories = new JCommandButton("",
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS16 + "category.png"))));
        cbtnCategories.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onOpenCategories();
            }
        });

        JCommandButton cbtnCountries = new JCommandButton("",
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS16 + "country.png"))));
        cbtnCountries.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onOpenCountries();
            }
        });
View Full Code Here

                I18n.COMMON.getString("AppView.ActionsBand"),
                new EmptyResizableIcon(22));
        actionsBand.setResizePolicies(
                CoreRibbonResizePolicies.getCorePoliciesRestrictive(actionsBand));

        JCommandButton cbtnDashboard = new JCommandButton(
                I18n.CUSTOMERS.getString("Action.Dashboard"),
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS22 + "dashboard.png"))));
        cbtnDashboard.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onOpenDashboard();
            }
        });
        cbtnDashboard.setActionKeyTip("D");
        actionsBand.addCommandButton(cbtnDashboard, RibbonElementPriority.TOP);

        JCommandButton cbtnCustomers = new JCommandButton(
                I18n.CUSTOMERS.getString("Action.Customers"),
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS22 + "customer.png"))));
        cbtnCustomers.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onOpenCustomers();
            }
        });
        cbtnCustomers.setActionKeyTip("C");
        actionsBand.addCommandButton(cbtnCustomers, RibbonElementPriority.TOP);

        JCommandButton cbtnCategories = new JCommandButton(
                I18n.CUSTOMERS.getString("Action.Categories"),
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS22 + "category.png"))));
        cbtnCategories.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onOpenCategories();
            }
        });
        cbtnCategories.setActionKeyTip("A");
        actionsBand.addCommandButton(cbtnCategories, RibbonElementPriority.TOP);

        JCommandButton cbtnCountries = new JCommandButton(
                I18n.CUSTOMERS.getString("Action.Countries"),
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS22 + "country.png"))));
        cbtnCountries.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onOpenCountries();
            }
        });
        cbtnCountries.setActionKeyTip("O");
        actionsBand.addCommandButton(cbtnCountries, RibbonElementPriority.TOP);

        return actionsBand;
    }
View Full Code Here

                I18n.COMMON.getString("AppView.AppExitBand"),
                new EmptyResizableIcon(22));
        appExitBand.setResizePolicies(
                CoreRibbonResizePolicies.getCorePoliciesRestrictive(appExitBand));

        JCommandButton cbtnAppExit = new JCommandButton(
                I18n.COMMON.getString("Action.Exit"),
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS22 + "exit.png"))));
        cbtnAppExit.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                exitForm(null);
            }
        });
        cbtnAppExit.setActionKeyTip("X");
        appExitBand.addCommandButton(cbtnAppExit, RibbonElementPriority.TOP);

        return appExitBand;
    }
View Full Code Here

        });
        cbtnStatusBar.setActionKeyTip("S");
        cbtnStatusBar.getActionModel().setSelected(true);
        viewBand.addCommandButton(cbtnStatusBar, RibbonElementPriority.TOP);

        JCommandButton cbtnLookAndFeel = new JCommandButton(
                I18n.COMMON.getString("Action.LookAndFeel"),
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS22 + "laf.png"))));
        cbtnLookAndFeel.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onLookAndFeel();
            }
        });
        cbtnLookAndFeel.setActionKeyTip("T");
        viewBand.addCommandButton(cbtnLookAndFeel, RibbonElementPriority.TOP);

        return viewBand;
    }
View Full Code Here

TOP

Related Classes of org.jvnet.flamingo.common.JCommandButton

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.