Search in sources :

Example 1 with ErrataFilterValue

use of org.ovirt.engine.ui.uicommonweb.models.ErrataFilterValue in project ovirt-engine by oVirt.

the class ErrataFilterPanel method addValueChangeHandler.

public void addValueChangeHandler(final ValueChangeHandler<ErrataFilterValue> handler) {
    ValueChangeHandler<Boolean> internalHandler = event -> {
        // Do this deferred to give the javascript time to activate/deactivate the buttons.
        Scheduler.get().scheduleDeferred(() -> {
            // one of the checkboxes changed, but get all three checkbox values for the event
            ErrataFilterValue value = new ErrataFilterValue(securityCheckbox.isActive(), bugCheckbox.isActive(), enhancementCheckbox.isActive());
            handler.onValueChange(new ValueChangeEvent<ErrataFilterValue>(value) {
            });
        });
    };
    securityCheckbox.addValueChangeHandler(internalHandler);
    bugCheckbox.addValueChangeHandler(internalHandler);
    enhancementCheckbox.addValueChangeHandler(internalHandler);
}
Also used : ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent) AssetProvider(org.ovirt.engine.ui.webadmin.gin.AssetProvider) GWT(com.google.gwt.core.client.GWT) Composite(com.google.gwt.user.client.ui.Composite) ErrataFilterValue(org.ovirt.engine.ui.uicommonweb.models.ErrataFilterValue) UiBinder(com.google.gwt.uibinder.client.UiBinder) ApplicationConstants(org.ovirt.engine.ui.webadmin.ApplicationConstants) Scheduler(com.google.gwt.core.client.Scheduler) CheckBoxButton(org.gwtbootstrap3.client.ui.CheckBoxButton) CssResource(com.google.gwt.resources.client.CssResource) UiField(com.google.gwt.uibinder.client.UiField) ButtonGroup(org.gwtbootstrap3.client.ui.ButtonGroup) ErrataFilterValue(org.ovirt.engine.ui.uicommonweb.models.ErrataFilterValue) ValueChangeEvent(com.google.gwt.event.logical.shared.ValueChangeEvent)

Aggregations

GWT (com.google.gwt.core.client.GWT)1 Scheduler (com.google.gwt.core.client.Scheduler)1 ValueChangeEvent (com.google.gwt.event.logical.shared.ValueChangeEvent)1 ValueChangeHandler (com.google.gwt.event.logical.shared.ValueChangeHandler)1 CssResource (com.google.gwt.resources.client.CssResource)1 UiBinder (com.google.gwt.uibinder.client.UiBinder)1 UiField (com.google.gwt.uibinder.client.UiField)1 Composite (com.google.gwt.user.client.ui.Composite)1 ButtonGroup (org.gwtbootstrap3.client.ui.ButtonGroup)1 CheckBoxButton (org.gwtbootstrap3.client.ui.CheckBoxButton)1 ErrataFilterValue (org.ovirt.engine.ui.uicommonweb.models.ErrataFilterValue)1 ApplicationConstants (org.ovirt.engine.ui.webadmin.ApplicationConstants)1 AssetProvider (org.ovirt.engine.ui.webadmin.gin.AssetProvider)1