Examples of JRibbonBand


Examples of org.jvnet.flamingo.ribbon.JRibbonBand

            if(bandSVGIcon==null){ //when there's no representative icon for each task, use the first activity icon instead.
              bandSVGIcon = btnSVGIcon;
            }
           
            if(bandSVGIcon!=null){
              JRibbonBand band;
              band = new JRibbonBand(bandName, bandSVGIcon);                 
              activityByBand.put(bandName, band);
             
              if(!bandByTask.containsKey(taskName)) {
                RibbonTask task = new RibbonTask();
                bandByTask.put(taskName, task);
View Full Code Here

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

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

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

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

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

    }
    return band;
  }

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

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

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

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

    return band;
  }
 
  protected void createFileRibbonMenu(JRibbon ribbon){
    RibbonTask fileTask = new RibbonTask();
    JRibbonBand fileBand;
    if((fileBand = getFileBand()) != null) {
      fileTask.addBand(fileBand);
    }
   
    JRibbonBand editBand;
    if((editBand = getEditBand()) != null) {
      fileTask.addBand(editBand);
    }
   
    JRibbonBand simulationBand;
    if((simulationBand = getSimulationBand()) != null) {
      fileTask.addBand(simulationBand);
    }
   
    JRibbonBand helpBand;
    if((helpBand = getHelpBand()) != null) {
      fileTask.addBand(helpBand);
    }
   
    ribbon.addTask(GlobalContext.getLocalizedMessage("pd.menu.file", "File"),
View Full Code Here

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

     * File menu actions band
     *
     * @return file menu actionsBand
     */
    private JRibbonBand getActionsBand() {
        JRibbonBand actionsBand = new JRibbonBand(
                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

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

     * File menu exit band
     *
     * @return exitBand
     */
    private JRibbonBand getAppExitBand() {
        JRibbonBand appExitBand = new JRibbonBand(
                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

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

     * Extras menu view band and command buttons
     *
     * @return viewBand
     */
    private JRibbonBand getViewBand() {
        JRibbonBand viewBand = new JRibbonBand(
                I18n.COMMON.getString("AppView.ViewBand"),
                new EmptyResizableIcon(22));

        JCommandToggleButton cbtnStatusBar = new JCommandToggleButton(
                I18n.COMMON.getString("Action.StatusBar"),
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS22 + "statusbar.png"))));
        cbtnStatusBar.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onToogleStatusBar();
            }
        });
        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

Examples of org.jvnet.flamingo.ribbon.JRibbonBand

     * Extras menu band and command buttons
     *
     * @return extrasBand
     */
    private JRibbonBand getExtrasBand() {
        JRibbonBand extrasBand = new JRibbonBand(
                I18n.COMMON.getString("AppView.ExtrasBand"),
                new EmptyResizableIcon(22));
        extrasBand.setResizePolicies(
                CoreRibbonResizePolicies.getCorePoliciesRestrictive(extrasBand));

        JCommandButton cbtnSettings = new JCommandButton(
                I18n.COMMON.getString("Action.Settings"),
                ViewHelpers.createResizableIcon(new ImageIcon(getClass().getResource(
                                        ViewHelpers.ICONS22 + "settings.png"))));
        cbtnSettings.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                onSettings();
            }
        });
        cbtnSettings.setActionKeyTip("E");
        extrasBand.addCommandButton(cbtnSettings, RibbonElementPriority.TOP);

        return extrasBand;
    }
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.