<commit_before>package com.niafikra.meddela.ui.vaadin.dashboard.settings.notifications

import com.niafikra.meddela.data.Notification
import com.niafikra.meddela.meddela
import com.vaadin.ui.Button

import com.vaadin.ui.TabSheet
import com.vaadin.ui.VerticalLayout

import com.vaadin.ui.Window

import org.vaadin.peter.buttongroup.ButtonGroup
import com.niafikra.meddela.ui.vaadin.dashboard.settings.notifications.basic.NotificationBasicUI
import com.niafikra.meddela.ui.vaadin.dashboard.settings.notifications.trigger.NotificationTrigerUI
import com.niafikra.meddela.ui.vaadin.dashboard.settings.notifications.template.NotificationsTemplateUI

/**
 * Author: <NAME> <<EMAIL>>
 * Date: 7/21/12
 * Time: 4:18 PM
 */
class NotificationUI extends VerticalLayout implements Button.ClickListener {

    NotificationBasicUI basicUI
    NotificationTrigerUI trigerUI
    NotificationsTemplateUI templateUI
    NotificationManagementUI managementUI
    Button save, delete
    boolean isNew
    Notification notification

    NotificationUI(Notification notification, boolean isNew, NotificationManagementUI managementUI) {
        this.isNew = isNew
        this.notification = notification
        this.managementUI = managementUI
        basicUI = new NotificationBasicUI(notification, isNew)
        trigerUI = new NotificationTrigerUI(notification)
        templateUI = new NotificationsTemplateUI(notification,isNew)

        save = new Button("Save")
        delete = new Button("Delete")
        build()
    }

    def build() {
        setSpacing(true)
        setMargin(true)
        setSizeFull()
        TabSheet uiHolder = new TabSheet()
        uiHolder.addTab(basicUI, "Basics")
        uiHolder.addTab(trigerUI, "Trigger")
        uiHolder.addTab(templateUI, "Template")
        uiHolder.setSizeFull()

        ButtonGroup footer = new ButtonGroup()
        save.setWidth("150px")
        delete.setWidth("150px")
        delete.setVisible(!isNew)
        save.addListener(this)
        delete.addListener(this)

        footer.addButton(save)
        footer.addButton(delete)
        //  footer.setSpacing(true)
<commit_msg>trigger shedule UI to manage new and update trigger info independently setting the selectables fields<commit_after>package com.niafikra.meddela.ui.vaadin.dashboard.settings.notifications

import com.niafikra.meddela.data.Notification
import com.niafikra.meddela.meddela
import com.vaadin.ui.Button

import com.vaadin.ui.TabSheet
import com.vaadin.ui.VerticalLayout

import com.vaadin.ui.Window

import org.vaadin.peter.buttongroup.ButtonGroup
import com.niafikra.meddela.ui.vaadin.dashboard.settings.notifications.basic.NotificationBasicUI
import com.niafikra.meddela.ui.vaadin.dashboard.settings.notifications.trigger.NotificationTrigerUI
import com.niafikra.meddela.ui.vaadin.dashboard.settings.notifications.template.NotificationsTemplateUI

/**
 * Author: <NAME> <<EMAIL>>
 * Date: 7/21/12
 * Time: 4:18 PM
 */
class NotificationUI extends VerticalLayout implements Button.ClickListener {

    NotificationBasicUI basicUI
    NotificationTrigerUI trigerUI
    NotificationsTemplateUI templateUI
    NotificationManagementUI managementUI
    Button save, delete
    boolean isNew
    Notification notification

    NotificationUI(Notification notification, boolean isNew, NotificationManagementUI managementUI) {
        this.isNew = isNew
        this.notification = notification
        this.managementUI = managementUI
        basicUI = new NotificationBasicUI(notification, isNew)
        trigerUI = new NotificationTrigerUI(notification,isNew)
        templateUI = new NotificationsTemplateUI(notification,isNew)

        save = new Button("Save")
        delete = new Button("Delete")
        build()
    }

    def build() {
        setSpacing(true)
        setMargin(true)
        setSizeFull()
        TabSheet uiHolder = new TabSheet()
        uiHolder.addTab(basicUI, "Basics")
        uiHolder.addTab(trigerUI, "Trigger")
        uiHolder.addTab(templateUI, "Template")
        uiHolder.setSizeFull()

        ButtonGroup footer = new ButtonGroup()
        save.setWidth("150px")
        delete.setWidth("150px")
        delete.setVisible(!isNew)
        save.addListener(this)
        delete.addListener(this)

        footer.addButton(save)
        footer.addButton(delete)
        //  footer.setSpacing(true)

{'fraction_non_alphanumeric': 0.08509174311926605, 'fraction_numerical': 0.006422018348623854, 'mean_word_length': 3.5569487983281087, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4639140', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1235, 'n_words': 230}