this.alertDefView = alertDefView;
tabSet = new TabSet();
tabSet.setHeight100();
generalPropertiesTab = new Tab(MSG.common_title_generalProp());
generalProperties = new GeneralPropertiesAlertDefinitionForm(alertDefinition);
generalPropertiesTab.setPane(generalProperties);
generalPropertiesTab.addTabDeselectedHandler(new TabDeselectedHandler() {
@Override
public void onTabDeselected(TabDeselectedEvent event) {
if (!generalProperties.validate()) {
event.cancel();
}
}
});
Tab conditionsTab = new Tab(MSG.view_alert_common_tab_conditions());
conditions = new ConditionsAlertDefinitionForm(alertDefView.getResourceType(), alertDefinition);
conditionsTab.setPane(conditions);
Tab notificationsTab = new Tab(MSG.view_alert_common_tab_notifications());
notifications = new NotificationsAlertDefinitionForm(alertDefinition);
notificationsTab.setPane(notifications);
Tab recoveryTab = new Tab(MSG.view_alert_common_tab_recovery());
recovery = new RecoveryAlertDefinitionForm(alertDefView.getAlertDefinitionDataSource(), alertDefinition);
recoveryTab.setPane(recovery);
Tab dampeningTab = new Tab(MSG.view_alert_common_tab_dampening());
dampening = new DampeningAlertDefinitionForm(alertDefinition);
dampeningTab.setPane(dampening);
tabSet.setTabs(generalPropertiesTab, conditionsTab, notificationsTab, recoveryTab, dampeningTab);
final HLayout buttons = new HLayout();
buttons.setMembersMargin(20);