Package com.extjs.gxt.ui.client.widget.menu

Examples of com.extjs.gxt.ui.client.widget.menu.MenuItem.addSelectionListener()


    Menu menu = super.createContextMenu(colIndex);

    if (menu != null && enableGroupingMenu && cm.isGroupable(colIndex)) {
      MenuItem groupBy = new MenuItem(GXT.MESSAGES.groupingView_groupByText());
      groupBy.setIcon(getImages().getGroupBy());
      groupBy.addSelectionListener(new SelectionListener<MenuEvent>() {

        @Override
        public void componentSelected(MenuEvent ce) {
          onGroupByClick(ce, colIndex);
        }
View Full Code Here


    if (name.length() > 15) {
      name = name.substring(0, 12) + "...";
    }
    hideElement.setText(messages.hideElement(name));
    hideElement.setIconStyle("icon-filter-remove");
    hideElement.addSelectionListener(new SelectionListener<ComponentEvent>() {
      public void componentSelected(ComponentEvent ce) {
        if (item.depth != 0 || isHideAllowed(item, roots, false)) {
          hideElement(item, null, viewId, axisId, column, false);
        } else {
          MessageBox.info(constants.information(),
View Full Code Here

    contextMenu.add(hideElement);
   
    MenuItem hideLevel = new MenuItem();
    hideLevel.setText(constants.hideLevel());
    hideLevel.setIconStyle("icon-filter-remove-level");
    hideLevel.addSelectionListener(new SelectionListener<ComponentEvent>() {
      public void componentSelected(ComponentEvent ce) {
        if (item.depth == 0) {
          if (isHideAllowed(item, roots, true)) {
            hideElement(item, roots, viewId, axisId, column, true);
          } else {
View Full Code Here

    XAxisHierarchy hierarchy = view.getAxisHierarchy(item.getHierarchyId());
    boolean enabled = hierarchy != null && hierarchy.getVisibleElements() != null && hierarchy.getVisibleElements().length > 0;
    MenuItem showAllElements = new MenuItem();
    showAllElements.setText(constants.showAllElements());
    showAllElements.setIconStyle("icon-filter");
    showAllElements.addSelectionListener(new SelectionListener<ComponentEvent>() {
      public void componentSelected(ComponentEvent ce) {
        XAxisHierarchy hierarchy = view.getAxisHierarchy(item.getHierarchyId());
        final String oldPaths = hierarchy.getProperty("filterPaths");

        // get old settings:
View Full Code Here

      }
    });
    menu.add(createDirectLink);
   
    MenuItem abi = new MenuItem(constants.about());
    abi.addSelectionListener(new SelectionListener<ComponentEvent>() {
      public void componentSelected(ComponentEvent ce) {
        WPaloPropertyServiceProvider.getInstance().getBuildNumber(new AsyncCallback<String>() {
          public void onFailure(Throwable arg0) {
            displayAboutDialog("<" + constants.unknown() + ">", null);
          }
View Full Code Here

  final void add(String action, String icon) {
    MenuItem item = new MenuItem();
    item.setText(action);
    item.setIconStyle(icon);
    item.addSelectionListener(this);
    contextMenu.add(item);
  }

  public void componentSelected(MenuEvent me) {
    browser.handleAction(((MenuItem) me.item).getText());
View Full Code Here

        item.setText(sb.getData("gxt-menutext").toString());
      }
      if (sb.getMenu() != null) {
        item.setSubMenu(sb.getMenu());
      }
      item.addSelectionListener(new SelectionListener<MenuEvent>() {

        @Override
        public void componentSelected(MenuEvent ce) {
          ButtonEvent e = new ButtonEvent(sb);
          e.setEvent(ce.getEvent());
View Full Code Here

    Menu menu = super.createContextMenu(colIndex);

    if (menu != null && enableGroupingMenu && cm.isGroupable(colIndex)) {
      MenuItem groupBy = new MenuItem(GXT.MESSAGES.groupingView_groupByText());
      groupBy.setIcon(getImages().getGroupBy());
      groupBy.addSelectionListener(new SelectionListener<MenuEvent>() {

        @Override
        public void componentSelected(MenuEvent ce) {
          onGroupByClick(ce, colIndex);
        }
View Full Code Here

    mb.add(selectionMenuHead);
   
   
    MenuItem getInformation = new MenuItem("More Information");
    getInformation.setIconStyle("icon-menu-information");
    getInformation.addSelectionListener(new SelectionListener<MenuEvent>(){

      @Override
      public void componentSelected(MenuEvent ce) {

        //
View Full Code Here

    });
    selectiontMenu.add(getInformation);
   
    MenuItem gotoStaticDisplay = new MenuItem("Goto Static Display");
    gotoStaticDisplay.setIconStyle("icon-menu-gotoStatic");
    gotoStaticDisplay.addSelectionListener(new SelectionListener<MenuEvent>(){

      @Override
      public void componentSelected(MenuEvent ce) {
        //
        String id = contentSection.getSelectedItemsId();
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.