Example usage for com.vaadin.server FontAwesome INFO

List of usage examples for com.vaadin.server FontAwesome INFO

Introduction

In this page you can find the example usage for com.vaadin.server FontAwesome INFO.

Prototype

FontAwesome INFO

To view the source code for com.vaadin.server FontAwesome INFO.

Click Source Link

Usage

From source file:com.etest.view.systemadministration.faculty.FacultyFormWindow.java

FormLayout buildForms() {
    FormLayout form = new FormLayout();
    form.setWidth("100%");
    form.setSpacing(true);/*from  w  w w .  ja  v a 2 s. c  o m*/
    form.setMargin(true);

    firstname.setWidth("100%");
    firstname.setIcon(FontAwesome.INFO);
    firstname.setRequired(true);
    firstname.addStyleName(ValoTheme.TEXTFIELD_SMALL);
    form.addComponent(firstname);

    middlename.setWidth("100%");
    middlename.setIcon(FontAwesome.INFO);
    middlename.setRequired(true);
    middlename.addStyleName(ValoTheme.TEXTFIELD_SMALL);
    form.addComponent(middlename);

    lastname.setWidth("100%");
    lastname.setIcon(FontAwesome.INFO);
    lastname.setRequired(true);
    lastname.addStyleName(ValoTheme.TEXTFIELD_SMALL);
    form.addComponent(lastname);

    userType.setCaption("User Type: ");
    userType.setIcon(FontAwesome.USER_MD);
    userType.setRequired(true);
    form.addComponent(userType);

    username.setWidth("100%");
    username.setIcon(FontAwesome.USER);
    username.setRequired(true);
    username.addStyleName(ValoTheme.TEXTFIELD_SMALL);
    form.addComponent(username);

    password1.setWidth("100%");
    password1.setIcon(FontAwesome.CODE);
    password1.setRequired(true);
    password1.addStyleName(ValoTheme.TEXTFIELD_SMALL);
    form.addComponent(password1);

    password2.setWidth("100%");
    password2.setIcon(FontAwesome.CODE);
    password2.setRequired(true);
    password2.addStyleName(ValoTheme.TEXTFIELD_SMALL);
    form.addComponent(password2);

    facultyBtn.setCaption(getButtonCaption());
    facultyBtn.setWidth("100%");
    facultyBtn.addStyleName(ValoTheme.BUTTON_PRIMARY);
    facultyBtn.addStyleName(ValoTheme.BUTTON_SMALL);
    facultyBtn.addClickListener(buttonClickListener);
    form.addComponent(facultyBtn);

    if (getFacultyId() != 0) {
        Users u = fs.getFacultyInfoById(getFacultyId());
        firstname.setValue(u.getFirstname());
        middlename.setValue(u.getMiddlename());
        lastname.setValue(u.getLastname());
        username.setValue(u.getUsername_());
        userType.setValue(CommonVariableMap.getFacultyUserType(u.getUserType()));
        password1.setValue(u.getPassword_());
        password2.setValue(u.getPassword_());
    }

    return form;
}

From source file:de.metas.procurement.webui.ui.view.DailyReportingView.java

License:Open Source License

public DailyReportingView() {
    super();/*from w  ww . j  a  v  a2  s.  com*/

    addStyleName(STYLE);

    //
    // Top
    {
        final NavigationBar navigationBar = getNavigationBar();
        navigationBar.setCaption(i18n.get("DailyReportingView.caption"));

        final NavigationButton logoutButton = new NavigationButton(i18n.get("Logout.caption"));
        logoutButton.setTargetView(this);
        logoutButton.addClickListener(new NavigationButtonClickListener() {
            @Override
            public void buttonClick(final NavigationButtonClickEvent event) {
                onLogout();
            }
        });
        navigationBar.setRightComponent(logoutButton);
    }

    //
    // Content
    {
        final VerticalLayout content = new VerticalLayout();

        // Date
        {
            datePanel = new DateNavigation();
            datePanel.addDateChangedListener(new PropertyChangeListener() {

                @Override
                public void propertyChange(final PropertyChangeEvent evt) {
                    onDayChanged(datePanel.getDate());
                }
            });

            final VerticalComponentGroup datePanelGroup = new VerticalComponentGroup();
            datePanelGroup.addComponent(datePanel);
            content.addComponent(datePanelGroup);
        }

        // Product buttons
        productButtons = new BeansVerticalComponentGroup<ProductQtyReport>() {
            @Override
            protected Component createItemComponent(final BeanItem<ProductQtyReport> item) {
                final ProductItemButton itemComp = new ProductItemButton();
                itemComp.setItem(item);
                return itemComp;
            };
        };
        content.addComponent(productButtons);

        setContent(content);
    }

    //
    // Toolbar (bottom)
    {
        final Button weekViewButton = new Button(i18n.get("DailyReportingView.weekViewButton"));
        weekViewButton.setStyleName("no-decoration");
        weekViewButton.setIcon(FontAwesome.CALENDAR);
        weekViewButton.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
                onWeekView();
            }
        });

        final Button addProductButton = new Button(i18n.get("DailyReportingView.addProductButton"));
        addProductButton.setStyleName("no-decoration");
        addProductButton.setIcon(FontAwesome.PLUS);
        addProductButton.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
                onProductAdd();
            }
        });

        final Button rfqButton = new Button(i18n.get("DailyReportingView.rfqButton"));
        rfqButton.setStyleName("no-decoration");
        rfqButton.setIcon(FontAwesome.MONEY);
        rfqButton.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
                onRfQ();
            }
        });

        final ISendService sendService = MFProcurementUI.getCurrentMFSession().getSendService();
        final Button sendButton = new Button(i18n.get("DailyReportingView.sendButton"));
        sendButton.setStyleName("no-decoration");
        sendButton.setIcon(FontAwesome.CHECK);
        final TextOverlay sendButtonOverlay = TextOverlay.extend(sendButton);
        sendButtonOverlay.setPropertyDataSource(sendService.getNotSentCounterProperty());
        sendButtonOverlay.setConverter(TextOverlay.CONVERTER_PositiveCounterOrNull);
        sendButton.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
                onSend();
            }
        });

        final Button infoButton = new Button(i18n.getWithDefault("InfoMessageView.caption.short", "Info"));
        infoButton.setStyleName("no-decoration");
        infoButton.setIcon(FontAwesome.INFO);
        infoButton.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
                onInfo();
            }
        });

        final Toolbar toolbar = new Toolbar();
        toolbar.addComponents(weekViewButton, addProductButton, sendButton, infoButton, rfqButton);
        setToolbar(toolbar);
    }

    //
    // Initialize
    final Date today = DateUtils.getToday();
    final Date date = DateUtils.addDays(today, +1); // tomorrow (FRESH-196)
    datePanel.setDate(date);
}

From source file:fr.univlorraine.mondossierweb.MdwTouchkitUI.java

License:Apache License

/**
 * Cration du menu tudiant//from   ww  w .j  av a  2s .  c  o  m
 */
private void initMenuEtudiant() {

    //Si le menuEtudiant n'a jamais t initialis
    if (menuEtudiant == null) {
        //On cr le menuEtudiant
        menuEtudiant = new TabBarView();
    }

    //Cration de l'onglet Informations
    tabInfoAnnuelles = menuEtudiant.addTab(informationsAnnuellesMobileView,
            applicationContext.getMessage("mobileUI.infoannuelles.title", null, getLocale()), FontAwesome.INFO);
    tabInfoAnnuelles.setId("tabInfoAnnuelles");

    //Cration de l'onglet Calendrier
    tabCalendrier = menuEtudiant.addTab(calendrierMobileView,
            applicationContext.getMessage("mobileUI.calendrier.title", null, getLocale()),
            FontAwesome.CALENDAR);
    tabCalendrier.setId("tabCalendrier");

    //Si le navigationManager des notes est null
    if (noteNavigationManager == null) {
        //On cr le navigationManager
        noteNavigationManager = new NavigationManager();
    }
    //le composant affich dans le navigationManager est la vue des notes
    noteNavigationManager.setCurrentComponent(notesMobileView);
    //le composant suivant  afficher dans le navigationManager est la vue du dtail des notes
    noteNavigationManager.setNextComponent(notesDetailMobileView);
    //Cration de l'onglet Rsultats
    tabNotes = menuEtudiant.addTab(noteNavigationManager,
            applicationContext.getMessage("mobileUI.resultats.title", null, getLocale()), FontAwesome.LIST);
    tabNotes.setId("tabNotes");

    //Dtection du retour sur la vue du dtail des notes pour mettre  jour le JS
    menuEtudiant.addListener(new SelectedTabChangeListener() {
        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            //test si on se rend sur la vue des notes
            if (menuEtudiant.getSelelectedTab().equals(tabNotes)) {
                //test si on se rend sur le dtail des notes
                if (noteNavigationManager.getCurrentComponent().equals(notesDetailMobileView)) {
                    //On met  jour le JS (qui est normalement perdu, sans explication)
                    notesDetailMobileView.refreshJavascript();
                }
            }

            //test si on se rend sur la vue calendrier
            if (menuEtudiant.getSelelectedTab().equals(tabCalendrier)) {
                /* Message d'info */
                if (applicationContext.getMessage(CalendrierMobileView.NAME + ".message.info", null,
                        getLocale()) != null) {
                    Notification note = new Notification(applicationContext
                            .getMessage(CalendrierMobileView.NAME + ".message.info", null, getLocale()), "",
                            Notification.TYPE_TRAY_NOTIFICATION, true);
                    note.setPosition(Position.MIDDLE_CENTER);
                    note.setDelayMsec(6000);
                    note.show(Page.getCurrent());
                    //Notification.show("", applicationContext.getMessage(CalendrierMobileView.NAME+".message.info", null, getLocale()), Notification.TYPE_TRAY_NOTIFICATION);
                }
            }
        }
    });

}

From source file:fr.univlorraine.mondossierweb.views.AssistanceView.java

License:Apache License

/**
 * Initialise la vue/*from www . j  a v  a2  s  .  c om*/
 */
@PostConstruct
public void init() {

    //On vrifie le droit d'accder  la vue
    if (userController.isEnseignant()) {
        // Style 
        setMargin(true);
        setSpacing(true);

        // Rcupration de la configuration pour cette vue
        String docUrl = configController.getAssistanceDocUrl();
        String helpdeskUrl = configController.getAssistanceHelpdeskUrl();
        String mailContact = configController.getAssistanceContactMail();

        // Titre 
        Label title = new Label(applicationContext.getMessage(NAME + ".title", null, getLocale()));
        title.addStyleName(ValoTheme.LABEL_H1);
        addComponent(title);

        // Texte
        if (StringUtils.hasText(applicationContext.getMessage(NAME + ".text", null, getLocale()))) {
            addComponent(new Label(applicationContext.getMessage(NAME + ".text", null, getLocale()),
                    ContentMode.HTML));
        }

        // Afficher la pop-up de dmarrage 
        Button popupBtn = new Button(applicationContext.getMessage(NAME + ".btnPopUp", null, getLocale()),
                FontAwesome.INFO);
        popupBtn.addStyleName(ValoTheme.BUTTON_LINK);
        popupBtn.addClickListener(e -> MainUI.getCurrent().afficherMessageIntroEnseignants(true, false));
        addComponent(popupBtn);

        // Accs  la documentation 
        if (StringUtils.hasText(docUrl)) {
            Button docBtn = new Button(applicationContext.getMessage(NAME + ".btnDoc", null, getLocale()),
                    FontAwesome.FILE_TEXT);
            docBtn.addStyleName(ValoTheme.BUTTON_LINK);
            BrowserWindowOpener docBwo = new BrowserWindowOpener(docUrl);
            docBwo.extend(docBtn);
            addComponent(docBtn);
        }

        // Envoyer un ticket 
        if (StringUtils.hasText(helpdeskUrl)) {
            Button helpDeskBtn = new Button(
                    applicationContext.getMessage(NAME + ".btnHelpdesk", null, getLocale()),
                    FontAwesome.AMBULANCE);
            helpDeskBtn.addStyleName(ValoTheme.BUTTON_LINK);
            BrowserWindowOpener helpDeskBwo = new BrowserWindowOpener(helpdeskUrl);
            helpDeskBwo.extend(helpDeskBtn);
            addComponent(helpDeskBtn);
        }

        // Envoyer un mail 
        if (StringUtils.hasText(mailContact)) {
            Button contactBtn = new Button(applicationContext.getMessage(NAME + ".btnContact",
                    new Object[] { mailContact }, getLocale()), FontAwesome.ENVELOPE);
            contactBtn.addStyleName(ValoTheme.BUTTON_LINK);
            BrowserWindowOpener contactBwo = new BrowserWindowOpener("mailto:" + mailContact);
            contactBwo.extend(contactBtn);
            addComponent(contactBtn);
        }

        /* Deconnexion */
        //Voir si on peut accder  l'appli hors ENT, le dtecter, et afficher le bouton dconnexion
        if (configController.isLogoutCasPropose()) {
            Button decoBtn = new Button("Dconnexion", FontAwesome.SIGN_OUT);
            decoBtn.addStyleName(ValoTheme.BUTTON_LINK);
            decoBtn.addClickListener(e -> {
                getUI().getPage().setLocation("j_spring_security_logout");
            });
            addComponent(decoBtn);
        }
    }
}

From source file:fr.univlorraine.mondossierweb.views.FavorisMobileView.java

License:Apache License

/**
 * Initialise la vue// w w  w. j  a  va 2  s  .  c om
 */
@PostConstruct
public void init() {

    //On vrifie le droit d'accder  la vue
    if (UI.getCurrent() instanceof MdwTouchkitUI && userController.isEnseignant()) {
        removeAllComponents();

        /* Style */
        setSizeFull();

        liste_types_inscrits = new LinkedList<String>();
        liste_types_inscrits.add("ELP");
        liste_types_inscrits.add("VET");

        liste_type_arbo = new LinkedList<String>();
        liste_type_arbo.add("CMP");
        liste_type_arbo.add("VET");

        List<Favoris> lfav = favorisController.getFavoris();

        //NAVBAR
        HorizontalLayout navbar = new HorizontalLayout();
        navbar.setSizeFull();
        navbar.setHeight("40px");
        navbar.setStyleName("navigation-bar");

        //Bouton info
        infoButton = new Button();
        infoButton.setIcon(FontAwesome.INFO);
        infoButton.setStyleName("v-nav-button");
        infoButton.addClickListener(e -> {
            /**
             * NOUVELLE VERSION
             */
            Notification note = new Notification(
                    applicationContext.getMessage("helpWindowMobile.text.enseignant", null, getLocale()), "",
                    Notification.TYPE_TRAY_NOTIFICATION, true);
            note.setPosition(Position.MIDDLE_CENTER);
            note.setDelayMsec(6000);
            note.show(UI.getCurrent().getPage());
            /**
             * ANCIENNE VERSION
             */
            /*
            //afficher message
            HelpMobileWindow hbw = new HelpMobileWindow(applicationContext.getMessage("helpWindowMobile.text.enseignant", null, getLocale()),applicationContext.getMessage("helpWindow.defaultTitle", null, getLocale()),false);
                    
            UI.getCurrent().addWindow(hbw);
            */
        });
        navbar.addComponent(infoButton);
        navbar.setComponentAlignment(infoButton, Alignment.MIDDLE_LEFT);

        //Title
        Label labelFav = new Label(applicationContext.getMessage(NAME + ".title.label", null, getLocale()));
        labelFav.setStyleName("v-label-navbar");
        navbar.addComponent(labelFav);
        navbar.setComponentAlignment(labelFav, Alignment.MIDDLE_CENTER);

        //Bouton Search
        Button searchButton = new Button();
        searchButton.setIcon(FontAwesome.SEARCH);
        searchButton.setStyleName("v-nav-button");
        navbar.addComponent(searchButton);
        navbar.setComponentAlignment(searchButton, Alignment.MIDDLE_RIGHT);
        searchButton.addClickListener(e -> {
            ((MdwTouchkitUI) MdwTouchkitUI.getCurrent()).navigateToRecherche(NAME);
        });
        navbar.setExpandRatio(labelFav, 1);
        addComponent(navbar);

        VerticalLayout globalLayout = new VerticalLayout();
        globalLayout.setSizeFull();
        globalLayout.setSpacing(true);
        globalLayout.setMargin(true);

        FormLayout labelLayout = new FormLayout();
        labelLayout.setSizeFull();
        labelLayout.setMargin(false);
        labelLayout.setSpacing(false);

        Label infoLabel = new Label(applicationContext.getMessage(NAME + ".info.label", null, getLocale()));
        infoLabel.setStyleName(ValoTheme.LABEL_SMALL);
        infoLabel.setIcon(FontAwesome.INFO_CIRCLE);
        infoLabel.setWidth("100%");

        labelLayout.addComponent(infoLabel);
        globalLayout.addComponent(labelLayout);

        if (lfav != null && lfav.size() > 0) {
            if (favorisContientVet(lfav)) {

                Panel vetPanel = new Panel(
                        applicationContext.getMessage(NAME + ".vetpanel.title", null, getLocale()));
                vetPanel.setStyleName("centertitle-panel");
                vetPanel.addStyleName("v-colored-panel-caption");
                vetPanel.setSizeFull();

                VerticalLayout vetLayout = new VerticalLayout();
                vetLayout.setSizeFull();
                vetLayout.setHeight(null);
                int i = 0;
                for (Favoris fav : lfav) {
                    if (fav.getId().getTypfav().equals(Utils.VET)) {
                        i++;

                        HorizontalLayout favVetLayout = new HorizontalLayout();
                        favVetLayout.setSizeFull();
                        favVetLayout.setMargin(true);
                        favVetLayout.setSpacing(true);
                        favVetLayout.setStyleName("v-layout-multiline");
                        favVetLayout.setWidth("100%");
                        favVetLayout.setHeight("100%");

                        Button codeButton = new Button(fav.getId().getIdfav());
                        codeButton.setCaption(fav.getId().getIdfav());
                        Utils.setButtonStyle(codeButton);
                        codeButton.setWidth("90px");
                        codeButton.addClickListener(e -> {
                            accessToDetail(fav.getId().getIdfav(), fav.getId().getTypfav());
                        });

                        Button libButton = new Button(favorisController.getLibObjFavori(fav.getId().getTypfav(),
                                fav.getId().getIdfav()));
                        Utils.setButtonStyle(libButton);
                        libButton.setHeight("100%");
                        libButton.setWidth("100%");
                        libButton.addClickListener(e -> {
                            accessToDetail(fav.getId().getIdfav(), fav.getId().getTypfav());
                        });

                        favVetLayout.addComponent(codeButton);
                        //favVetLayout.setComponentAlignment(codeButton, Alignment.MIDDLE_CENTER);
                        favVetLayout.addComponent(libButton);
                        favVetLayout.setComponentAlignment(libButton, Alignment.MIDDLE_CENTER);
                        favVetLayout.setExpandRatio(libButton, 1);
                        vetLayout.addComponent(favVetLayout);
                        if (i > 1) {
                            favVetLayout.addStyleName("line-separator");
                        }
                    }
                }
                vetPanel.setContent(vetLayout);
                globalLayout.addComponent(vetPanel);

            }

            if (favorisContientElp(lfav)) {
                Panel elpPanel = new Panel(
                        applicationContext.getMessage(NAME + ".elppanel.title", null, getLocale()));
                elpPanel.setStyleName("centertitle-panel");
                elpPanel.addStyleName("v-colored-panel-caption");
                elpPanel.setSizeFull();

                VerticalLayout elpLayout = new VerticalLayout();
                elpLayout.setSizeFull();
                elpLayout.setHeight(null);
                int i = 0;
                for (Favoris fav : lfav) {
                    if (fav.getId().getTypfav().equals(Utils.ELP)) {
                        i++;
                        HorizontalLayout favElpLayout = new HorizontalLayout();
                        favElpLayout.setSizeFull();
                        favElpLayout.setMargin(true);
                        favElpLayout.setSpacing(true);
                        favElpLayout.setStyleName("v-layout-multiline");
                        favElpLayout.setWidth("100%");
                        favElpLayout.setHeight("100%");

                        Button codeButton = new Button(fav.getId().getIdfav());
                        Utils.setButtonStyle(codeButton);
                        codeButton.setWidth("90px");
                        codeButton.addClickListener(e -> {
                            accessToDetail(fav.getId().getIdfav(), fav.getId().getTypfav());
                        });

                        Button libButton = new Button(favorisController.getLibObjFavori(fav.getId().getTypfav(),
                                fav.getId().getIdfav()));
                        Utils.setButtonStyle(libButton);
                        libButton.setHeight("100%");
                        libButton.setWidth("100%");
                        libButton.addClickListener(e -> {
                            accessToDetail(fav.getId().getIdfav(), fav.getId().getTypfav());
                        });

                        favElpLayout.addComponent(codeButton);
                        favElpLayout.addComponent(libButton);
                        favElpLayout.setComponentAlignment(libButton, Alignment.MIDDLE_CENTER);
                        favElpLayout.setExpandRatio(libButton, 1);
                        elpLayout.addComponent(favElpLayout);
                        if (i > 1) {
                            favElpLayout.addStyleName("line-separator");
                        }
                    }
                }
                elpPanel.setContent(elpLayout);
                globalLayout.addComponent(elpPanel);
            }

        }

        labelAucunFavoriLayout = new HorizontalLayout();
        labelAucunFavoriLayout.setMargin(true);
        labelAucunFavoriLayout.setSizeFull();
        Button aucunFavoris = new Button(
                applicationContext.getMessage(NAME + ".favoris.aucun", null, getLocale()));
        aucunFavoris.setStyleName("v-nav-button");
        aucunFavoris.addStyleName(ValoTheme.BUTTON_LINK);
        aucunFavoris.addClickListener(e -> {
            ((MdwTouchkitUI) MdwTouchkitUI.getCurrent()).navigateToRecherche(NAME);
        });

        labelAucunFavoriLayout.addComponent(aucunFavoris);
        labelAucunFavoriLayout.setVisible(false);
        globalLayout.addComponent(labelAucunFavoriLayout);

        if (lfav == null || lfav.size() == 0) {
            labelAucunFavoriLayout.setVisible(true);
        }

        //addComponent(globalLayout);
        contentLayout.setStyleName("v-scrollableelement");
        contentLayout.addComponent(globalLayout);
        addComponent(contentLayout);
        setExpandRatio(contentLayout, 1);

    }
}

From source file:helpers.Utils.java

License:Open Source License

public static HorizontalLayout questionize(Component c, final String info, final String header) {
    final HorizontalLayout res = new HorizontalLayout();
    res.setSpacing(true);//from w w w .j a  va  2s  . c  o  m
    if (c instanceof CustomVisibilityComponent) {
        CustomVisibilityComponent custom = (CustomVisibilityComponent) c;
        c = custom.getInnerComponent();
        custom.addListener(new VisibilityChangeListener() {

            @Override
            public void setVisible(boolean b) {
                res.setVisible(b);
            }
        });
    }

    res.setVisible(c.isVisible());
    res.setCaption(c.getCaption());
    c.setCaption(null);
    res.addComponent(c);

    PopupView pv = new PopupView(new Content() {

        @Override
        public Component getPopupComponent() {
            Label l = new Label(info, ContentMode.HTML);
            l.setCaption(header);
            l.setIcon(FontAwesome.INFO);
            l.setWidth("250px");
            l.addStyleName("info");
            return new VerticalLayout(l);
        }

        @Override
        public String getMinimizedValueAsHTML() {
            return "[?]";
        }
    });
    pv.setHideOnMouseOut(false);

    res.addComponent(pv);

    return res;
}

From source file:helpers.Utils.java

License:Open Source License

public static Panel createInfoBox(String caption, String description) {
    Panel panel = new Panel(caption);
    panel.setIcon(FontAwesome.INFO);
    panel.setStyleName(ValoTheme.PANEL_BORDERLESS);
    HorizontalLayout layout = new HorizontalLayout();
    Label label = new Label();
    label.setValue(description);/*from w  w  w .  j  a  va 2  s .co  m*/
    layout.addComponent(label);

    panel.setContent(layout);
    return panel;
}

From source file:org.eclipse.hawkbit.simulator.ui.GenerateDialog.java

License:Open Source License

/**
 * Creates a new pop window for setting the configuration of simulating
 * devices./*from ww w  . j  a  v a2s.c o m*/
 * 
 * @param callback
 *            the callback which is called when the dialog has been
 *            successfully confirmed.
 * @param dmfEnabled
 *            indicates if the AMQP/DMF interface is enabled by
 *            configuration and if the option DMF should be enabled or not
 */
public GenerateDialog(final GenerateDialogCallback callback, final boolean dmfEnabled) {
    this.dmfEnabled = dmfEnabled;
    formLayout.setSpacing(true);
    formLayout.setMargin(true);

    namePrefixTextField = createRequiredTextfield("name prefix", "dmfSimulated", FontAwesome.INFO,
            new NullValidator("Must be given", false));

    amountTextField = createRequiredTextfield("amount", new ObjectProperty<Integer>(10), FontAwesome.GEAR,
            new RangeValidator<Integer>("Must be between 1 and 30000", Integer.class, 1, 30000));

    tenantTextField = createRequiredTextfield("tenant", "default", FontAwesome.USER,
            new NullValidator("Must be given", false));

    pollDelayTextField = createRequiredTextfield("poll delay (sec)", new ObjectProperty<Integer>(10),
            FontAwesome.CLOCK_O, new RangeValidator<Integer>("Must be between 1 and 60", Integer.class, 1, 60));

    pollUrlTextField = createRequiredTextfield("base poll URL endpoint", "http://localhost:8080",
            FontAwesome.FLAG_O,
            new RegexpValidator("^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]",
                    "is not an URL"));
    pollUrlTextField.setColumns(50);
    pollUrlTextField.setVisible(false);

    gatewayTokenTextField = createRequiredTextfield("gateway token", "", FontAwesome.FLAG_O, null);
    gatewayTokenTextField.setColumns(50);
    gatewayTokenTextField.setVisible(false);

    createProtocolGroup();
    createOkButton(callback);

    namePrefixTextField.addValueChangeListener(event -> checkValid());
    amountTextField.addValueChangeListener(event -> checkValid());
    tenantTextField.addValueChangeListener(event -> checkValid());

    formLayout.addComponent(namePrefixTextField);
    formLayout.addComponent(amountTextField);
    formLayout.addComponent(tenantTextField);
    formLayout.addComponent(protocolGroup);
    formLayout.addComponent(pollDelayTextField);
    formLayout.addComponent(pollUrlTextField);
    formLayout.addComponent(gatewayTokenTextField);
    formLayout.addComponent(buttonOk);

    setCaption("Simulate Devices");
    setContent(formLayout);
    setResizable(false);
    center();
}