.view_alert_common_tab_dampening_consecutive_occurrences_label_tooltip());
consecutiveOccurrencesStatic = new StaticTextItem("consecutiveOccurrencesStatic",
MSG.view_alert_common_tab_dampening_consecutive_occurrences_label());
consecutiveOccurrencesStatic.setWrapTitle(false);
consecutiveOccurrencesSpinner.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
updated = true;
}
});
// PARTIAL_COUNT
partialOccurrencesSpinner = new SpinnerItem("partialOccurrencesSpinner",
MSG.view_alert_common_tab_dampening_partial_occurrences_label());
partialOccurrencesSpinner.setWrapTitle(false);
partialOccurrencesSpinner.setMin(1);
partialOccurrencesSpinner.setMax(999999);
partialOccurrencesSpinner.setStep(1);
partialOccurrencesSpinner.setDefaultValue(1);
partialOccurrencesSpinner.setHoverWidth(300);
partialOccurrencesSpinner.setTooltip(MSG
.view_alert_common_tab_dampening_partial_occurrences_label_tooltip());
partialOccurrencesStatic = new StaticTextItem("partialOccurrencesStatic",
MSG.view_alert_common_tab_dampening_partial_occurrences_label());
partialOccurrencesStatic.setWrapTitle(false);
partialOccurrencesSpinner.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
updated = true;
}
});
partialEvaluationsSpinner = new SpinnerItem("partialEvaluationsSpinner",
MSG.view_alert_common_tab_dampening_partial_evalatuions_label());
partialEvaluationsSpinner.setWrapTitle(false);
partialEvaluationsSpinner.setMin(1);
partialEvaluationsSpinner.setMax(999999);
partialEvaluationsSpinner.setStep(1);
partialEvaluationsSpinner.setDefaultValue(1);
partialEvaluationsSpinner.setHoverWidth(300);
partialEvaluationsSpinner.setTooltip(MSG
.view_alert_common_tab_dampening_partial_evalatuions_label_tooltip());
partialEvaluationsStatic = new StaticTextItem("partialEvaluationStatic",
MSG.view_alert_common_tab_dampening_partial_evalatuions_label());
partialEvaluationsStatic.setWrapTitle(false);
partialEvaluationsSpinner.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
updated = true;
}
});
// DURATION_COUNT
durationOccurrencesSpinner = new SpinnerItem("durationOccurrencesSpinner",
MSG.view_alert_common_tab_dampening_duration_occurrences_label());
durationOccurrencesSpinner.setWrapTitle(false);
durationOccurrencesSpinner.setMin(1);
durationOccurrencesSpinner.setMax(999999);
durationOccurrencesSpinner.setStep(1);
durationOccurrencesSpinner.setDefaultValue(1);
durationOccurrencesSpinner.setHoverWidth(300);
durationOccurrencesSpinner.setTooltip(MSG
.view_alert_common_tab_dampening_duration_occurrences_label_tooltip());
durationOccurrencesStatic = new StaticTextItem("durationOccurrencesStatic",
MSG.view_alert_common_tab_dampening_duration_occurrences_label());
durationOccurrencesStatic.setWrapTitle(false);
durationOccurrencesSpinner.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
updated = true;
}
});
durationTimePeriodSpinner = new SpinnerItem("durationTimePeriodSpinner",
MSG.view_alert_common_tab_dampening_duration_period_label());
durationTimePeriodSpinner.setWrapTitle(false);
durationTimePeriodSpinner.setMin(1);
durationTimePeriodSpinner.setMax(999999);
durationTimePeriodSpinner.setStep(1);
durationTimePeriodSpinner.setDefaultValue(1);
durationTimePeriodSpinner.setHoverWidth(300);
durationTimePeriodSpinner.setTooltip(MSG.view_alert_common_tab_dampening_duration_period_label_tooltip());
durationTimePeriodStatic = new StaticTextItem("durationTimePeriodStatic",
MSG.view_alert_common_tab_dampening_duration_period_label());
durationTimePeriodStatic.setWrapTitle(false);
durationTimePeriodSpinner.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
updated = true;
}
});
durationTimeUnitsSelection = new SelectItem("durationTimeUnits", "");
LinkedHashMap<String, String> units = new LinkedHashMap<String, String>(4);
units.put(AlertDampening.TimeUnits.MINUTES.name(), getTimeUnitsTitle(AlertDampening.TimeUnits.MINUTES));
units.put(AlertDampening.TimeUnits.HOURS.name(), getTimeUnitsTitle(AlertDampening.TimeUnits.HOURS));
units.put(AlertDampening.TimeUnits.DAYS.name(), getTimeUnitsTitle(AlertDampening.TimeUnits.DAYS));
units.put(AlertDampening.TimeUnits.WEEKS.name(), getTimeUnitsTitle(AlertDampening.TimeUnits.WEEKS));
durationTimeUnitsSelection.setValueMap(units);
durationTimeUnitsSelection.setDefaultValue(AlertDampening.TimeUnits.MINUTES.name());
durationTimeUnitsStatic = new StaticTextItem("durationTimeUnitsStatic", "");
durationTimeUnitsSelection.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
updated = true;
}
});
dampeningRuleSelection.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
updated = true;
Category cat = AlertDampening.Category.valueOf(event.getValue().toString());