Examples of PopupPanelCallback


Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

                availableColumns.add(column);
            }
        }

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

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

                    JCommandMenuButton button;
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

        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

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

  @Override
  protected void installComponents() {
    super.installComponents();

    final JRibbonApplicationMenuButton appMenuButton = (JRibbonApplicationMenuButton) this.commandButton;
    appMenuButton.setPopupCallback(new PopupPanelCallback() {
      @Override
      public JPopupPanel getPopupPanel(final JCommandButton commandButton) {
        JRibbonFrame ribbonFrame = (JRibbonFrame) SwingUtilities
            .getWindowAncestor(commandButton);
        final JRibbon ribbon = ribbonFrame.getRibbon();
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

    buttonStrip2.add(new JCommandButton("", new format_text_underline()));
    JCommandButton strike = new JCommandButton("",
        new format_text_strikethrough());
    strike
        .setCommandButtonKind(CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);
    strike.setPopupCallback(new PopupPanelCallback() {
      @Override
      public JPopupPanel getPopupPanel(JCommandButton commandButton) {
        return new SamplePopupMenu(commandButton
            .getComponentOrientation());
      }
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

    buttonStrip2.add(new JCommandButton("", new format_text_underline()));
    JCommandButton strike = new JCommandButton("",
        new format_text_strikethrough());
    strike
        .setCommandButtonKind(CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);
    strike.setPopupCallback(new PopupPanelCallback() {
      @Override
      public JPopupPanel getPopupPanel(JCommandButton commandButton) {
        return new SamplePopupMenu(commandButton
            .getComponentOrientation());
      }
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

    mainButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        System.out.println("Action invoked");
      }
    });
    mainButton.setPopupCallback(new PopupPanelCallback() {
      @Override
      public JPopupPanel getPopupPanel(JCommandButton commandButton) {
        return new SamplePopupMenu(commandButton
            .getComponentOrientation());
      }
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

      }
     
      private PopupPanelCallback getPopupPanelCallBack(StructurePath path, final RibbonBuildContext context) {
        childButtons.clear();
        context.processChildren(path, this);
        return new PopupPanelCallback() {
         
          public JPopupPanel getPopupPanel(JCommandButton commandButton) {
            JCommandPopupMenu popupmenu = new JCommandPopupMenu();
            for (Component comp : childButtons) {
              if(comp instanceof JSeparator) {
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

    private void addScriptsPopup(ARibbonContributor parent) {
        JCommandButton button = RibbonActionContributorFactory
            .createCommandButton(ActionUtils.getDummyAction(getKey()));
        button.setCommandButtonKind(CommandButtonKind.POPUP_ONLY);
        button.setPopupCallback(new PopupPanelCallback() {
            public JPopupPanel getPopupPanel(JCommandButton commandButton) {
                JCommandPopupMenu popupmenu = new JCommandPopupMenu();
                registerScripts(popupmenu);
                return popupmenu;
            }
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

        }
      }

      private RibbonApplicationMenuEntrySecondary wrapButton(AbstractCommandButton button) {
        ActionListener listener = null;
        PopupPanelCallback callback = null;
        CommandButtonKind kind = CommandButtonKind.ACTION_ONLY;
        if(button instanceof JCommandButton) {
          if(((JCommandButton) button).getPopupCallback() != null) {
            kind = (((JCommandButton) button).getCommandButtonKind());
            callback = ((JCommandButton) button).getPopupCallback();
View Full Code Here

Examples of org.pushingpixels.flamingo.api.common.popup.PopupPanelCallback

          return;
        }       
       
        JCommandButton button = new JCommandButton(TextUtils.removeTranslateComment(TextUtils.getText("FilterCondition")));
        button.setCommandButtonKind(CommandButtonKind.POPUP_ONLY);
        button.setPopupCallback(new PopupPanelCallback() {
          public JPopupPanel getPopupPanel(JCommandButton commandButton) {
            JCommandPopupMenu popupmenu = new JCommandPopupMenu();
             
              AFreeplaneAction action = context.getBuilder().getMode().getAction("ApplyToVisibleAction");
              JCommandToggleMenuButton toggleButton = RibbonActionContributorFactory.createCommandToggleMenuButton(action);
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.