Examples of EmptyResizableIcon


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

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

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

        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

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

      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

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

                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

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

  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

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

      @Override
      protected void executeInEDT() throws Throwable {
        JRibbonFrame frame = new JRibbonFrame();

        JRibbonBand findBand = new JRibbonBand("Find",
            new EmptyResizableIcon(32));
        findBand.setCollapsedStateKeyTip("ZY");

        findButton = new JCommandToggleButton("Find",
            new EmptyResizableIcon(32));
        findButton.getActionModel().setSelected(true);
        findBand
            .addCommandButton(findButton, RibbonElementPriority.TOP);

        replaceButton = new JCommandToggleButton("Replace",
            new EmptyResizableIcon(32));
        replaceButton.getActionModel().setSelected(true);
        findBand.addCommandButton(replaceButton,
            RibbonElementPriority.MEDIUM);

        findReplaceButton = new JCommandToggleButton("Find replace",
            new EmptyResizableIcon(32));
        findReplaceButton.getActionModel().setSelected(true);
        findBand.addCommandButton(findReplaceButton,
            RibbonElementPriority.MEDIUM);

        selectAllButton = new JCommandToggleButton("Select all",
            new EmptyResizableIcon(32));
        selectAllButton.getActionModel().setSelected(true);
        findBand.addCommandButton(selectAllButton,
            RibbonElementPriority.MEDIUM);

        List<RibbonBandResizePolicy> resizePolicies = new ArrayList<RibbonBandResizePolicy>();
View Full Code Here

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

  protected void setUp() throws Exception {
    this.buttons = new JCommandToggleButton[4][10];
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < 10; j++) {
        this.buttons[i][j] = new JCommandToggleButton("Button " + i
            + ":" + j, new EmptyResizableIcon(32));
      }
    }

    this.ribbonFrame = new JRibbonFrame();

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

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

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

    }
  }

  public void testAddition() {
    JCommandToggleButton newButton = new JCommandToggleButton("New",
        new EmptyResizableIcon(32));
    this.ribbonBand.addRibbonGalleryButtons(GALLERY_NAME, "Group 0",
        newButton);

    assertEquals(this.gallery.getButtonGroupCount(), 4);
    assertEquals(this.gallery.getButtonCount(), 41);
    assertEquals(this.gallery.getButtonGroup("Group 0").size(), 11);
    assertEquals(this.gallery.getButtonGroup("Group 1").size(), 10);
    assertEquals(this.gallery.getButtonGroup("Group 2").size(), 10);
    assertEquals(this.gallery.getButtonGroup("Group 3").size(), 10);

    JCommandToggleButton newButton2 = new JCommandToggleButton("New 2",
        new EmptyResizableIcon(32));
    this.ribbonBand.addRibbonGalleryButtons(GALLERY_NAME,
        "Group non-existent", newButton2);

    assertEquals(this.gallery.getButtonGroupCount(), 4);
    assertEquals(this.gallery.getButtonCount(), 41);
    assertEquals(this.gallery.getButtonGroup("Group 0").size(), 11);
    assertEquals(this.gallery.getButtonGroup("Group 1").size(), 10);
    assertEquals(this.gallery.getButtonGroup("Group 2").size(), 10);
    assertEquals(this.gallery.getButtonGroup("Group 3").size(), 10);
    assertTrue(this.gallery.getButtonGroup("Group 0").contains(newButton));

    JCommandToggleButton newButton3 = new JCommandToggleButton("New 3",
        new EmptyResizableIcon(32));
    JCommandToggleButton newButton4 = new JCommandToggleButton("New 4",
        new EmptyResizableIcon(32));
    this.ribbonBand.addRibbonGalleryButtons(GALLERY_NAME, "Group 2",
        newButton3, newButton4);

    assertEquals(this.gallery.getButtonGroupCount(), 4);
    assertEquals(this.gallery.getButtonCount(), 43);
View Full Code Here

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

   * @param ribbon
   *            the ribbon component
   */
  public JRibbonApplicationMenuButton(JRibbon ribbon) {
    super("", ribbon.getApplicationIcon() != null ? ribbon
        .getApplicationIcon() : new EmptyResizableIcon(16));
    this.setCommandButtonKind(CommandButtonKind.POPUP_ONLY);
    this.setDisplayState(APP_MENU_BUTTON_STATE);
    setRibbon(ribbon);
    // update the UI now that the ribbon has been set
    updateUI();
View Full Code Here

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

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