Search in sources :

Example 1 with RemoveFilterHandler

use of org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler in project activityinfo by bedatadriven.

the class PartnerFilterPanel method createFilterToolBar.

private void createFilterToolBar() {
    filterToolBar = new FilterToolBar();
    filterToolBar.addApplyFilterHandler(new ApplyFilterHandler() {

        @Override
        public void onApplyFilter(ApplyFilterEvent deleteEvent) {
            applyFilter();
        }
    });
    filterToolBar.addRemoveFilterHandler(new RemoveFilterHandler() {

        @Override
        public void onRemoveFilter(RemoveFilterEvent deleteEvent) {
            clearFilter();
            ValueChangeEvent.fire(PartnerFilterPanel.this, value);
        }
    });
    setTopComponent(filterToolBar);
}
Also used : RemoveFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterEvent) ApplyFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterHandler) ApplyFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterEvent) RemoveFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler)

Example 2 with RemoveFilterHandler

use of org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler in project activityinfo by bedatadriven.

the class AttributeFilterPanel method createFilterToolBar.

private void createFilterToolBar() {
    filterToolBar = new FilterToolBar(false, true);
    filterToolBar.addRemoveFilterHandler(new RemoveFilterHandler() {

        @Override
        public void onRemoveFilter(RemoveFilterEvent deleteEvent) {
            clearFilter();
            ValueChangeEvent.fire(AttributeFilterPanel.this, value);
        }
    });
    setTopComponent(filterToolBar);
}
Also used : RemoveFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterEvent) RemoveFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler)

Example 3 with RemoveFilterHandler

use of org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler in project activityinfo by bedatadriven.

the class DateRangePanel method createFilterToolbar.

private void createFilterToolbar() {
    filterToolBar = new FilterToolBar();
    filterToolBar.addApplyFilterHandler(new ApplyFilterHandler() {

        @Override
        public void onApplyFilter(ApplyFilterEvent deleteEvent) {
            applyFilter();
        }
    });
    filterToolBar.addRemoveFilterHandler(new RemoveFilterHandler() {

        @Override
        public void onRemoveFilter(RemoveFilterEvent deleteEvent) {
            removeFilter();
        }
    });
    filterToolBar.setApplyFilterEnabled(true);
    setTopComponent(filterToolBar);
}
Also used : RemoveFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterEvent) ApplyFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterHandler) ApplyFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterEvent) RemoveFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler)

Example 4 with RemoveFilterHandler

use of org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler in project activityinfo by bedatadriven.

the class LocationFilterPanel method createFilterToolBar.

private void createFilterToolBar() {
    filterToolBar = new FilterToolBar();
    filterToolBar.add(removeSelectedItem);
    filterToolBar.addApplyFilterHandler(new ApplyFilterHandler() {

        @Override
        public void onApplyFilter(ApplyFilterEvent deleteEvent) {
            applyFilter();
        }
    });
    filterToolBar.addRemoveFilterHandler(new RemoveFilterHandler() {

        @Override
        public void onRemoveFilter(RemoveFilterEvent deleteEvent) {
            clearFilter();
            ValueChangeEvent.fire(LocationFilterPanel.this, value);
        }
    });
    setTopComponent(filterToolBar);
    removeSelectedItem.setEnabled(false);
    removeSelectedItem.addSelectionListener(new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            for (LocationDTO location : listSelectionModel.getSelection()) {
                store.remove(location);
            }
        }
    });
    listSelectionModel.addSelectionChangedListener(new SelectionChangedListener<LocationDTO>() {

        @Override
        public void selectionChanged(SelectionChangedEvent<LocationDTO> se) {
            removeSelectedItem.setEnabled(se.getSelectedItem() != null);
        }
    });
}
Also used : ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent) RemoveFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterEvent) ApplyFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterHandler) ApplyFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterEvent) RemoveFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler) LocationDTO(org.activityinfo.legacy.shared.model.LocationDTO)

Example 5 with RemoveFilterHandler

use of org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler in project activityinfo by bedatadriven.

the class AdminFilterPanel method createFilterToolBar.

private void createFilterToolBar() {
    filterToolBar = new FilterToolBar();
    filterToolBar.addApplyFilterHandler(new ApplyFilterHandler() {

        @Override
        public void onApplyFilter(ApplyFilterEvent deleteEvent) {
            applyFilter();
        }
    });
    filterToolBar.addRemoveFilterHandler(new RemoveFilterHandler() {

        @Override
        public void onRemoveFilter(RemoveFilterEvent deleteEvent) {
            removeFilter();
        }
    });
    setTopComponent(filterToolBar);
}
Also used : RemoveFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterEvent) ApplyFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterHandler) ApplyFilterEvent(org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterEvent) RemoveFilterHandler(org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler)

Aggregations

RemoveFilterEvent (org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterEvent)5 RemoveFilterHandler (org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler)5 ApplyFilterEvent (org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterEvent)4 ApplyFilterHandler (org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterHandler)4 ButtonEvent (com.extjs.gxt.ui.client.event.ButtonEvent)1 LocationDTO (org.activityinfo.legacy.shared.model.LocationDTO)1