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

Examples of com.sencha.gxt.widget.core.client.menu.CheckMenuItem$CheckMenuItemAppearance


    rangeItems.add(RangeItem.LESSTHAN);
    rangeItems.add(RangeItem.GREATERTHAN);
    rangeItems.add(RangeItem.EQUAL);

    menu = new Menu();
    beforeItem = new CheckMenuItem();
    beforeItem.addCheckChangeHandler(handler);

    beforeMenu = new DateMenu();
    beforeMenu.addValueChangeHandler(handler);
    beforeItem.setSubMenu(beforeMenu);
    menu.add(beforeItem);

    afterItem = new CheckMenuItem();
    afterItem.addCheckChangeHandler(handler);
    afterMenu = new DateMenu();
    afterMenu.addValueChangeHandler(handler);
    afterItem.setSubMenu(afterMenu);
    menu.add(afterItem);

    menu.add(new SeparatorMenuItem());

    onItem = new CheckMenuItem();
    onItem.addCheckChangeHandler(handler);
    onMenu = new DateMenu();
    onMenu.addValueChangeHandler(handler);
    onItem.setSubMenu(onMenu);
    menu.add(onItem);
View Full Code Here


      ColumnConfig<M, ?> config = cm.getColumn(i);
      if (shouldNotCount(i, false)) {
        continue;
      }
      final int fcol = i;
      final CheckMenuItem check = new CheckMenuItem();
      check.setHideOnClick(false);
      check.setText(cm.getColumnHeader(i).asString());
      check.setChecked(!cm.isHidden(i));

      if (!config.isHideable()) {
        check.disable();
      }

      check.addCheckChangeHandler(new CheckChangeHandler<CheckMenuItem>() {

        @Override
        public void onCheckChange(CheckChangeEvent<CheckMenuItem> event) {
          cm.setHidden(fcol, !cm.isHidden(fcol));
          restrictMenu(columnMenu);
View Full Code Here

      }
    }

    if (count == 1) {
      for (Widget item : columns) {
        CheckMenuItem ci = (CheckMenuItem) item;
        if (ci.isChecked()) {
          ci.disable();
        }
      }
    } else {
      for (int i = 0, len = columns.getWidgetCount(); i < len; i++) {
        Widget item = columns.getWidget(i);
View Full Code Here

  public BooleanFilter(ValueProvider<? super M, Boolean> valueProvider) {
    super(valueProvider);

    setHandler(new BooleanFilterHandler());

    yesItem = new CheckMenuItem();
    yesItem.addCheckChangeHandler(handler);
    yesItem.setGroup(XDOM.getUniqueId());

    noItem = new CheckMenuItem();
    noItem.addCheckChangeHandler(handler);
    noItem.setGroup(yesItem.getGroup());

    menu.add(yesItem);
    menu.add(noItem);
View Full Code Here

  protected void bindStore(Store<M> store) {
    this.store = store;
  }

  protected Filter<M, ?> getMenuFilter(CheckChangeEvent<CheckMenuItem> event) {
    CheckMenuItem item = event.getItem();
    ColumnConfig<M, ?> config = grid.getColumnModel().getColumn((Integer) item.getData("index"));
    return getFilter(config.getPath());
  }
View Full Code Here

      separatorItem = new SeparatorMenuItem();
    }
    separatorItem.removeFromParent();

    if (checkFilterItem == null) {
      checkFilterItem = new CheckMenuItem(DefaultMessages.getMessages().gridFilters_filterText());
      checkFilterItem.addCheckChangeHandler(new CheckChangeHandler<CheckMenuItem>() {

        @Override
        public void onCheckChange(CheckChangeEvent<CheckMenuItem> event) {
          AbstractGridFilters.this.onCheckChange(event);
View Full Code Here

        });
        menu.add(new SeparatorMenuItem());
        menu.add(groupBy);
      }
      if (enableGrouping && enableNoGroups) {
        final CheckMenuItem showInGroups = new CheckMenuItem(
            DefaultMessages.getMessages().groupingView_showGroupsText());
        showInGroups.setChecked(true);
        showInGroups.addSelectionHandler(new SelectionHandler<Item>() {
          @Override
          public void onSelection(SelectionEvent<Item> event) {
            if (showInGroups.isChecked()) {
              groupBy(cm.getColumn(colIndex));
            } else {
              groupBy(null);
            }
          }
View Full Code Here

  public void setSelected(List<V> selected) {
    this.selected = new ArrayList<V>(selected);
  }

  protected void onCheckChange(CheckChangeEvent<CheckMenuItem> event) {
    CheckMenuItem item = event.getItem();
    V m = map.get(item);
    if (item.isChecked()) {
      if (!selected.contains(m)) {
        selected.add(m);
      }
    } else {
      selected.remove(m);
View Full Code Here

    for (int i = 0; i < store.size(); i++) {
      V m = store.get(i);

      if (!values.contains(m)) {
        values.add(m);
        CheckMenuItem item = new CheckMenuItem();
        item.setText(m == null ? "" : m.toString());
        item.setChecked(selected.contains(m));
        item.setHideOnClick(false);
        item.addCheckChangeHandler(handler);
        add(item);

        map.put(item, m);

      }
View Full Code Here

    rangeItems.add(RangeItem.LESSTHAN);
    rangeItems.add(RangeItem.GREATERTHAN);
    rangeItems.add(RangeItem.EQUAL);

    menu = new Menu();
    beforeItem = new CheckMenuItem();
    beforeItem.addCheckChangeHandler(handler);

    beforeMenu = new DateMenu();
    beforeMenu.addValueChangeHandler(handler);
    beforeItem.setSubMenu(beforeMenu);
    menu.add(beforeItem);

    afterItem = new CheckMenuItem();
    afterItem.addCheckChangeHandler(handler);
    afterMenu = new DateMenu();
    afterMenu.addValueChangeHandler(handler);
    afterItem.setSubMenu(afterMenu);
    menu.add(afterItem);

    menu.add(new SeparatorMenuItem());

    onItem = new CheckMenuItem();
    onItem.addCheckChangeHandler(handler);
    onMenu = new DateMenu();
    onMenu.addValueChangeHandler(handler);
    onItem.setSubMenu(onMenu);
    menu.add(onItem);
View Full Code Here

TOP

Related Classes of com.sencha.gxt.widget.core.client.menu.CheckMenuItem$CheckMenuItemAppearance

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.