Examples of JCommandButton


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

Examples of org.jvnet.flamingo.common.JCommandButton

          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

Examples of org.jvnet.flamingo.common.JCommandButton

      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

Examples of org.jvnet.flamingo.common.JCommandButton

      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

Examples of org.jvnet.flamingo.common.JCommandButton

      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

Examples of org.jvnet.flamingo.common.JCommandButton

      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

Examples of org.pushingpixels.flamingo.api.common.JCommandButton

     * @param columns Columns
     * @param acm AttributeColumnsManipulator
     * @return Prepared JCommandButton
     */
    private JCommandButton prepareJCommandButton(final AttributeTable table, final AttributeColumn[] columns, final AttributeColumnsManipulator acm) {
        JCommandButton manipulatorButton;
        if (acm.getIcon() != null) {
            manipulatorButton = new JCommandButton(acm.getName(), ImageWrapperResizableIcon.getIcon(acm.getIcon(), new Dimension(16, 16)));
        } else {
            manipulatorButton = new JCommandButton(acm.getName());
        }
        manipulatorButton.setCommandButtonKind(JCommandButton.CommandButtonKind.POPUP_ONLY);
        manipulatorButton.setDisplayState(CommandButtonDisplayState.MEDIUM);
        if (acm.getDescription() != null && !acm.getDescription().isEmpty()) {
            manipulatorButton.setPopupRichTooltip(new RichTooltip(NbBundle.getMessage(DataTableTopComponent.class, "DataTableTopComponent.RichToolTip.title.text"), acm.getDescription()));
        }

        final ArrayList<AttributeColumn> availableColumns = new ArrayList<AttributeColumn>();
        for (final AttributeColumn column : columns) {
            if (acm.canManipulateColumn(table, column)) {
                availableColumns.add(column);
            }
        }

        if (!availableColumns.isEmpty()) {
            manipulatorButton.setPopupCallback(new PopupPanelCallback() {

                public JPopupPanel getPopupPanel(JCommandButton jcb) {
                    JCommandPopupMenu popup = new JCommandPopupMenu();

                    JCommandMenuButton button;
                    for (final AttributeColumn column : availableColumns) {

                        button = new JCommandMenuButton(column.getTitle(), ImageWrapperResizableIcon.getIcon(ImageUtilities.loadImage("org/gephi/desktop/datalab/resources/column.png"), new Dimension(16, 16)));
                        button.addActionListener(new ActionListener() {

                            public void actionPerformed(ActionEvent e) {
                                DataLaboratoryHelper.getDefault().executeAttributeColumnsManipulator(acm, table, column);
                            }
                        });
                        popup.addMenuButton(button);
                    }
                    return popup;
                }
            });
        } else {
            manipulatorButton.setEnabled(false);
        }

        return manipulatorButton;
    }
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.JCommandButton

     * Create the special Add new column button.
     */
    private void prepareAddColumnButton() {
        JCommandButtonStrip strip = new JCommandButtonStrip(JCommandButtonStrip.StripOrientation.HORIZONTAL);
        strip.setDisplayState(CommandButtonDisplayState.BIG);
        JCommandButton button = new JCommandButton(NbBundle.getMessage(DataTableTopComponent.class, "DataTableTopComponent.addColumnButton.text"), ImageWrapperResizableIcon.getIcon(ImageUtilities.loadImage("org/gephi/desktop/datalab/resources/table-insert-column.png", true), new Dimension(16, 16)));
        button.setCommandButtonKind(JCommandButton.CommandButtonKind.ACTION_ONLY);
        button.setDisplayState(CommandButtonDisplayState.BIG);
        if (classDisplayed == ClassDisplayed.NODE) {
            button.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    showAddColumnUI(AddColumnUI.Mode.NODES_TABLE);
                }
            });
        } else {
            button.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    showAddColumnUI(AddColumnUI.Mode.EDGES_TABLE);
                }
            });
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.JCommandButton

     * Create the special merge columns button.
     */
    private void prepareMergeColumnsButton() {
        JCommandButtonStrip strip = new JCommandButtonStrip(JCommandButtonStrip.StripOrientation.HORIZONTAL);
        strip.setDisplayState(CommandButtonDisplayState.BIG);
        JCommandButton button = new JCommandButton(NbBundle.getMessage(DataTableTopComponent.class, "DataTableTopComponent.mergeColumnsButton.text"), ImageWrapperResizableIcon.getIcon(ImageUtilities.loadImage("org/gephi/desktop/datalab/resources/merge.png", true), new Dimension(16, 16)));
        button.setCommandButtonKind(JCommandButton.CommandButtonKind.ACTION_ONLY);
        button.setDisplayState(CommandButtonDisplayState.BIG);
        if (classDisplayed == ClassDisplayed.NODE) {
            button.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    showMergeColumnsUI(MergeColumnsUI.Mode.NODES_TABLE);
                }
            });
        } else {
            button.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    showMergeColumnsUI(MergeColumnsUI.Mode.EDGES_TABLE);
                }
            });
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.JCommandButton

        }

        //Add plugin general actions as a drop down list:
        final PluginGeneralActionsManipulator[] plugins = dlh.getPluginGeneralActionsManipulators();
        if (plugins != null && plugins.length > 0) {
            JCommandButton pluginsButton = new JCommandButton(NbBundle.getMessage(DataTableTopComponent.class, "DataTableTopComponent.general.actions.plugins.button.text"), ImageWrapperResizableIcon.getIcon(ImageUtilities.loadImage("org/gephi/desktop/datalab/resources/puzzle--arrow.png", true), new Dimension(16, 16)));
            pluginsButton.setDisplayState(CommandButtonDisplayState.MEDIUM);
            pluginsButton.setCommandButtonKind(JCommandButton.CommandButtonKind.POPUP_ONLY);
            pluginsButton.setPopupCallback(new PopupPanelCallback() {

                public JPopupPanel getPopupPanel(JCommandButton jcb) {
                    JCommandButtonPanel pluginsPanel = new JCommandButtonPanel(CommandButtonDisplayState.BIG);
                    Integer lastManipulatorType = null;
                    int group = 1;
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.