Package com.sencha.gxt.widget.core.client.button

Examples of com.sencha.gxt.widget.core.client.button.SplitButton


    // TODO do we really want all these types referenced here?
    if (w instanceof SeparatorToolItem) {
      menu.add(new SeparatorMenuItem());

    } else if (w instanceof SplitButton) {
      final SplitButton sb = (SplitButton) w;
      MenuItem item = new MenuItem(sb.getText(), sb.getIcon());
      item.setEnabled(sb.isEnabled());
      item.setItemId(sb.getItemId());
      if (sb.getData("gxt-menutext") != null) {
        item.setText(sb.getData("gxt-menutext").toString());
      }
      if (sb.getMenu() != null) {
        item.setSubMenu(sb.getMenu());
      }

      item.addSelectionHandler(new SelectionHandler<Item>() {

        @Override
        public void onSelection(SelectionEvent<Item> event) {
          sb.fireEvent(new SelectEvent());
        }
      });
      menu.add(item);

    } else if (w instanceof TextButton) {
View Full Code Here


    // TODO do we really want all these types referenced here?
    if (w instanceof SeparatorToolItem) {
      menu.add(new SeparatorMenuItem());

    } else if (w instanceof SplitButton) {
      final SplitButton sb = (SplitButton) w;
      MenuItem item = new MenuItem(sb.getText(), sb.getIcon());
      item.setEnabled(sb.isEnabled());
      item.setItemId(sb.getItemId());
      if (sb.getData("gxt-menutext") != null) {
        item.setText(sb.getData("gxt-menutext").toString());
      }
      if (sb.getMenu() != null) {
        item.setSubMenu(sb.getMenu());
      }

      item.addSelectionHandler(new SelectionHandler<Item>() {

        @Override
        public void onSelection(SelectionEvent<Item> event) {
          sb.fireEvent(new SelectEvent());
        }
      });
      menu.add(item);

    } else if (w instanceof TextButton) {
View Full Code Here

TOP

Related Classes of com.sencha.gxt.widget.core.client.button.SplitButton

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.