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

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


    ToolbarView group = submenu.addGroup();
    for (Alignment alignment : asArray(
        new Alignment("Left", css.alignLeft(), Paragraph.Alignment.LEFT),
        new Alignment("Centre", css.alignCentre(), Paragraph.Alignment.CENTER),
        new Alignment("Right", css.alignRight(), Paragraph.Alignment.RIGHT))) {
      ToolbarToggleButton b = group.addToggleButton();
      new ToolbarButtonViewBuilder()
          .setText(alignment.description)
          .setIcon(alignment.iconCss)
          .applyTo(b, createParagraphApplicationController(b, alignment.style));
    }
View Full Code Here


    return button;
  }

  @Override
  public ToolbarToggleButton addToggleButton() {
    ToolbarToggleButton button = insertToggleButton(items.size());
    showDividerIfNotFirst(button);
    return button;
  }
View Full Code Here

  }

  @Override
  public ToolbarToggleButton insertToggleButton(int beforeIndex) {
    Item item = insertItem(beforeIndex);
    ToolbarToggleButton button = new ToolbarToggleButton(item.proxy);
    item.asAbstractButton = button;
    return button;
  }
View Full Code Here

  }

  @Override
  public SubmenuToolbarView insertSubmenu(int beforeIndex) {
    Item item = insertItem(beforeIndex);
    SubmenuToolbarWidget submenu = new SubmenuToolbarWidget(new ToolbarToggleButton(item.proxy));
    submenu.setShowDropdownArrow(true);
    item.asAbstractButton = submenu;
    return submenu;
  }
View Full Code Here

    return button;
  }

  @Override
  public ToolbarToggleButton addToggleButton() {
    ToolbarToggleButton button = insertToggleButton(items.size());
    showDividerIfNotFirst(button);
    return button;
  }
View Full Code Here

    return button;
  }

  @Override
  public ToolbarToggleButton insertToggleButton(int beforeIndex) {
    ToolbarToggleButton button = new ToolbarToggleButton(new VerticalToolbarButtonWidget());
    insertAbstractButton(button, beforeIndex);
    return button;
  }
View Full Code Here

    setState(State.ENABLED);
  }

  @Override
  public SubmenuToolbarWidget insertSubmenu(int beforeIndex) {
    ToolbarToggleButton submenuButton = new ToolbarToggleButton(new VerticalToolbarButtonWidget());
    submenuButton.setShowDropdownArrow(true);
    panel.insert(submenuButton.hackGetWidget(), beforeIndex);
    SubmenuToolbarWidget submenu = new SubmenuToolbarWidget(submenuButton);
    // NOTE: don't set action listener or parent on the submenu button, set on
    // the submenu itself.
    submenu.setParent(this);
    items.add(beforeIndex, submenu);
View Full Code Here

    return button;
  }

  @Override
  public ToolbarToggleButton addToggleButton() {
    ToolbarToggleButton button = toolbar.insertToggleButton(getAndIncrementNextIndex());
    showDividerIfSingleton(button);
    return button;
  }
View Full Code Here

    group = toolbarUi.addGroup();
    createInsertAttachmentButton(group, user);
  }

  private void createBoldButton(ToolbarView toolbar) {
    ToolbarToggleButton b = toolbar.addToggleButton();
    new ToolbarButtonViewBuilder()
        .setIcon(css.bold())
        .applyTo(b, createTextSelectionController(b, "fontWeight", "bold"));
  }
View Full Code Here

        .setIcon(css.bold())
        .applyTo(b, createTextSelectionController(b, "fontWeight", "bold"));
  }

  private void createItalicButton(ToolbarView toolbar) {
    ToolbarToggleButton b = toolbar.addToggleButton();
    new ToolbarButtonViewBuilder()
        .setIcon(css.italic())
        .applyTo(b, createTextSelectionController(b, "fontStyle", "italic"));
  }
View Full Code Here

TOP

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

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.