Package edu.zao.fire.filters

Examples of edu.zao.fire.filters.GeneralMatchingFilter


  private GeneralMatchingFilter editedFilter;

  public static GeneralMatchingFilter createNewFilter(Shell parentShell) {
    GeneralMatchingFilterDialog dlg = new GeneralMatchingFilterDialog(parentShell, null);
    GeneralMatchingFilter filter = dlg.open() == OK ? dlg.editedFilter : null;
    return filter;
  }
View Full Code Here


  }

  protected GeneralMatchingFilterDialog(Shell parentShell, GeneralMatchingFilter filter) {
    super(parentShell);
    if (filter == null) {
      editedFilter = new GeneralMatchingFilter();
    } else {
      editedFilter = filter;
    }
  }
View Full Code Here

      viewer.setInput(userFilters);

      buttonNew.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          GeneralMatchingFilter newFilter = GeneralMatchingFilterDialog.createNewFilter(parent.getShell());
          if (newFilter != null) {
            userFilters.add(newFilter);
            viewer.refresh();
          }
        }
      });

      table.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          updateButtonStates();
        }
      });

      buttonEdit.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          // should be safe to assume that selection is exactly 1 item
          TableItem selectedItem = table.getSelection()[0];
          Object selectedObject = selectedItem.getData();
          GeneralMatchingFilter filter = (GeneralMatchingFilter) selectedObject;
          GeneralMatchingFilterDialog.editFilter(parent.getShell(), filter);
          updateButtonStates();
          viewer.refresh();
        }
      });
View Full Code Here

TOP

Related Classes of edu.zao.fire.filters.GeneralMatchingFilter

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.