Example usage for com.vaadin.server FontAwesome CERTIFICATE

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

Introduction

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

Prototype

FontAwesome CERTIFICATE

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

Click Source Link

Usage

From source file:ui.button.AddCertificateButton.java

License:Apache License

public AddCertificateButton(final Integer userId, final String language, final Achievement a) {
    super(Translator.getTranslation("Add Certificate", language), FontAwesome.CERTIFICATE);
    setDescription(Translator.getTranslation("Add Certificate", language));
    addClickListener(new Button.ClickListener() {
        @Override/*from w w w  .j  a va2 s  . c  o m*/
        public void buttonClick(Button.ClickEvent event) {
            UploadReceiver receiver = new CertificateUploadReceiver(userId, language, a);
            Upload upload = new Upload(Translator.getTranslation("Add Certificate", language), receiver);
            upload.addSucceededListener((Upload.SucceededListener) receiver);

            String wcaption = Translator.getTranslation("Upload", language);
            final Window window = new Window(wcaption, upload);
            window.center();
            //window.setModal(true);
            window.setStyleName("window");
            receiver.setWindow(window);
            window.addCloseListener(new Window.CloseListener() {

                @Override
                public void windowClose(Window.CloseEvent e) {
                    window.close();
                }
            });
            getUI().addWindow(window);
        }
    });
}

From source file:ui.button.ShowCertificatesButton.java

License:Apache License

public ShowCertificatesButton(Integer userId, String language) {
    super(translate("Show Documents", language), FontAwesome.CERTIFICATE);
    this.userId = userId;
    this.language = language;
    addClickListener(this);
}