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

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


  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

    }
  }

  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

   * @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

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

   */
  @Override
  public void installUI(JComponent c) {
    this.controlPanel = (AbstractBandControlPanel) c;

    this.dummy = new JCommandButton("Dummy", new EmptyResizableIcon(16));
    this.dummy.setDisplayState(CommandButtonDisplayState.BIG);
    this.dummy
        .setCommandButtonKind(CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);

    installDefaults();
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

  /**
   * 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

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.