Package org.pushingpixels.flamingo.api.common.icon

Examples of org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon


            menuButtons = new JCommandMenuButton[MENU_BUTTON_COUNT];
            for (int i = 0; i < MENU_BUTTON_COUNT; i++) {
              final int index = i;
              menuButtons[i] = new JCommandMenuButton("popup "
                  + i, new EmptyResizableIcon(16));
              menuButtons[i]
                  .addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(
                        ActionEvent e) {
View Full Code Here


            menuButtons = new JCommandMenuButton[MENU_BUTTON_COUNT];
            for (int i = 0; i < MENU_BUTTON_COUNT; i++) {
              final int index = i;
              menuButtons[i] = new JCommandMenuButton("popup "
                  + i, new EmptyResizableIcon(16));
              menuButtons[i]
                  .addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(
                        ActionEvent e) {
View Full Code Here

  /**
   * Creates a new application menu button.
   */
  public JRibbonApplicationMenuButton(JRibbon ribbon) {
    super("", new EmptyResizableIcon(16));
    this.setCommandButtonKind(CommandButtonKind.POPUP_ONLY);
    this.setDisplayState(APP_MENU_BUTTON_STATE);
    this.ribbon = ribbon;
  }
View Full Code Here

        }
      };
      worker.execute();
    }

    this.dummy = new JCommandButton("Dummy", new EmptyResizableIcon(16));
    this.dummy.setDisplayState(CommandButtonDisplayState.MEDIUM);
    this.dummy
        .setCommandButtonKind(CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);
  }
View Full Code Here

      int initialSize = currDimension;
      if (initialSize < 0)
        initialSize = currState.getPreferredIconSize();
      JCommandButton button = new JCommandButton(name,
          new EmptyResizableIcon(initialSize));
      button.setHorizontalAlignment(SwingUtilities.LEFT);
      button.setDisplayState(this.currState);
      if (this.currState == CommandButtonDisplayState.FIT_TO_ICON)
        button.updateCustomDimension(currDimension);
View Full Code Here

import org.pushingpixels.flamingo.api.common.popup.JCommandPopupMenu;

public class SamplePopupMenu extends JCommandPopupMenu {
  public SamplePopupMenu(ComponentOrientation co) {
    this.addMenuButton(new JCommandMenuButton("Test menu item 1",
        new EmptyResizableIcon(16)));
    this.addMenuButton(new JCommandMenuButton("Test menu item 2",
        new EmptyResizableIcon(16)));
    this.addMenuButton(new JCommandMenuButton("Test menu item 3",
        new EmptyResizableIcon(16)));
    this.addMenuSeparator();
    this.addMenuButton(new JCommandMenuButton("Test menu item 4",
        new EmptyResizableIcon(16)));
    this.addMenuButton(new JCommandMenuButton("Test menu item 5",
        new EmptyResizableIcon(16)));

    this.applyComponentOrientation(co);
  }
View Full Code Here

        JCommandPopupMenu simpleMenu = new JCommandPopupMenu();

        simpleMenu.addMenuButton(new JCommandMenuButton(mf
            .format(new Object[] { "1" }), new address_book_new()));
        simpleMenu.addMenuButton(new JCommandMenuButton(mf
            .format(new Object[] { "2" }), new EmptyResizableIcon(
            16)));
        simpleMenu.addMenuButton(new JCommandMenuButton(mf
            .format(new Object[] { "3" }), new EmptyResizableIcon(
            16)));
        simpleMenu.addMenuSeparator();
        simpleMenu.addMenuButton(new JCommandMenuButton(mf
            .format(new Object[] { "4" }), new EmptyResizableIcon(
            16)));
        simpleMenu.addMenuButton(new JCommandMenuButton(mf
            .format(new Object[] { "5" }), new text_x_generic()));
        return simpleMenu;
      case SCROLLABLE:
        JCommandPopupMenu scrollableMenu = new JCommandPopupMenu();

        for (int i = 0; i < 20; i++) {
          final JCommandMenuButton smb = new JCommandMenuButton(mf
              .format(new Object[] { i }), new text_x_generic());
          smb.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
              System.out.println("Invoked action on '"
                  + smb.getText() + "'");
            }
          });
          scrollableMenu.addMenuButton(smb);
        }
        scrollableMenu.setMaxVisibleMenuButtons(8);
        return scrollableMenu;

      case COMPLEX:
        JCommandPopupMenu complexMenu = new JCommandPopupMenu(
            new QuickStylesPanel(resourceBundle, currLocale), 5, 3);
        complexMenu.addMenuButton(new JCommandMenuButton(resourceBundle
            .getString("SaveSelection.text"),
            new x_office_document()));
        complexMenu.addMenuButton(new JCommandMenuButton(resourceBundle
            .getString("ClearSelection.text"),
            new EmptyResizableIcon(16)));
        complexMenu.addMenuSeparator();
        complexMenu.addMenuButton(new JCommandMenuButton(resourceBundle
            .getString("ApplyStyles.text"), new EmptyResizableIcon(
            16)));
        return complexMenu;
      }
      return null;
    }
View Full Code Here

      String name = leaf.getKey();
      if (!name.endsWith(".svg") && !name.endsWith(".svgz"))
        continue;

      JCommandButton svgButton = new JCommandButton(name
          .replace('-', ' '), new EmptyResizableIcon(currDimension));
      RichTooltip richTooltip = new RichTooltip("Transcode",
          "Click to generate Java2D class");
      svgButton.setActionRichTooltip(richTooltip);
      svgButton.updateCustomDimension(currDimension);
View Full Code Here

                32, 32), new TopLeftDecoration(i),
            new BottomRightDecoration(j)));
      }
    }

    this.ribbonBand = new JRibbonBand("Band", new EmptyResizableIcon(32));

    Map<RibbonElementPriority, Integer> visibleButtonCounts = new HashMap<RibbonElementPriority, Integer>();
    visibleButtonCounts.put(RibbonElementPriority.LOW, 4);
    visibleButtonCounts.put(RibbonElementPriority.MEDIUM, 5);
    visibleButtonCounts.put(RibbonElementPriority.TOP, 6);
View Full Code Here

  protected void onSetUp() {
    GuiActionRunner.execute(new GuiTask() {
      private JRibbonBand createBand(int buttonCount, String title,
          String titlePrefix) {
        JRibbonBand result = new JRibbonBand(title,
            new EmptyResizableIcon(32));
        for (int i = 0; i < buttonCount; i++) {
          result.addCommandButton(new JCommandButton(titlePrefix
              + (i + 1), new EmptyResizableIcon(32)),
              RibbonElementPriority.TOP);
        }
        return result;
      }
View Full Code Here

TOP

Related Classes of org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon

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.