Package org.waveprotocol.wave.client.widget.toolbar.buttons

Examples of org.waveprotocol.wave.client.widget.toolbar.buttons.ToolbarButtonView


   * Adds a fake item that isn't rendered but still has an entry in items
   * (so that it plays correctly with overflowing, etc).
   */
  private ToolbarButtonView addFakeItem() {
    // NOTE: simplest way to add a fake item is to add an invisible button.
    ToolbarButtonView fakeButton = addClickButton();
    fakeButton.setState(State.INVISIBLE);
    return fakeButton;
  }
View Full Code Here


  /**
   * Tests that a single group has the buttons in the correct order.
   */
  public void testSingleGroup() {
    ToolbarView group = toolbar.addGroup();
    ToolbarButtonView button1 = group.addClickButton();
    ToolbarButtonView button2 = group.addToggleButton();
    ToolbarButtonView button3 = group.addSubmenu();
    assertEquals(toolbar.getDisplayedItems(), ImmutableList.of(button1, button2, button3));
  }
View Full Code Here

  /**
   * Tests that a single group surrounded by non-grouped buttons are in the
   * correct order.
   */
  public void testSingleGroupWithOtherButtons() {
    ToolbarButtonView button1 = toolbar.addClickButton();
    ToolbarView group = toolbar.addGroup();
    ToolbarButtonView button2 = group.addClickButton();
    ToolbarButtonView button3 = group.addToggleButton();
    ToolbarButtonView button4 = group.addSubmenu();
    ToolbarButtonView button5 = toolbar.addToggleButton();
    assertEquals(
        toolbar.getDisplayedItems(), ImmutableList.of(button1, button2, button3, button4, button5));
  }
View Full Code Here

  /**
   * Tests that multiple singleton groups have the buttons in the right order.
   */
  public void testMultipleSingletonGroups() {
    ToolbarButtonView button1 = toolbar.addGroup().addClickButton();
    ToolbarButtonView button2 = toolbar.addGroup().addToggleButton();
    ToolbarButtonView button3 = toolbar.addGroup().addSubmenu();
    assertEquals(toolbar.getDisplayedItems(), ImmutableList.of(button1, button2, button3));
  }
View Full Code Here

  public void testMultipleSequentialGroups() {
    ToolbarView group1 = toolbar.addGroup();
    ToolbarView group2 = toolbar.addGroup();
    ToolbarView group3 = toolbar.addGroup();

    ToolbarButtonView button11 = group1.addClickButton();
    ToolbarButtonView button12 = group1.addToggleButton();
    ToolbarButtonView button13 = group1.addSubmenu();

    ToolbarButtonView button21 = group2.addClickButton();
    ToolbarButtonView button22 = group2.addToggleButton();
    ToolbarButtonView button23 = group2.addSubmenu();

    ToolbarButtonView button31 = group3.addClickButton();
    ToolbarButtonView button32 = group3.addToggleButton();
    ToolbarButtonView button33 = group3.addSubmenu();

    assertEquals(toolbar.getDisplayedItems(), ImmutableList.of(
        button11,
        button12,
        button13,
View Full Code Here

  public void testMultipleHorizontalGroups() {
    ToolbarView group1 = toolbar.addGroup();
    ToolbarView group2 = toolbar.addGroup();
    ToolbarView group3 = toolbar.addGroup();

    ToolbarButtonView button11 = group1.addClickButton();
    ToolbarButtonView button21 = group2.addClickButton();
    ToolbarButtonView button31 = group3.addClickButton();

    ToolbarButtonView button12 = group1.addToggleButton();
    ToolbarButtonView button22 = group2.addToggleButton();
    ToolbarButtonView button32 = group3.addToggleButton();

    ToolbarButtonView button13 = group1.addSubmenu();
    ToolbarButtonView button23 = group2.addSubmenu();
    ToolbarButtonView button33 = group3.addSubmenu();

    assertEquals(toolbar.getDisplayedItems(), ImmutableList.of(
        button11,
        button12,
        button13,
View Full Code Here

  /**
   * Adds a fake item that isn't rendered but still has an entry in items.
   */
  private ToolbarButtonView addFakeItem() {
    // NOTE: simplest way to add a fake item is to add an invisible button.
    ToolbarButtonView fakeButton = addClickButton();
    fakeButton.setState(State.INVISIBLE);
    return fakeButton;
  }
View Full Code Here

  /**
   * Adds a fake item that isn't rendered but still has an entry in items.
   */
  private ToolbarButtonView addFakeItem() {
    // NOTE: simplest way to add a fake item is to add an invisible button.
    ToolbarButtonView fakeButton = addClickButton();
    fakeButton.setState(State.INVISIBLE);
    return fakeButton;
  }
View Full Code Here

   * Adds a fake item that isn't rendered but still has an entry in items
   * (so that it plays correctly with overflowing, etc).
   */
  private ToolbarButtonView addFakeItem() {
    // NOTE: simplest way to add a fake item is to add an invisible button.
    ToolbarButtonView fakeButton = addClickButton();
    fakeButton.setState(State.INVISIBLE);
    return fakeButton;
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.widget.toolbar.buttons.ToolbarButtonView

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.