Example usage for com.vaadin.server FontAwesome CHECK

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

Introduction

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

Prototype

FontAwesome CHECK

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

Click Source Link

Usage

From source file:pl.exsio.frameset.vaadin.ui.support.dialog.PromptDialog.java

License:Open Source License

private static HorizontalLayout getControls(final Window window, final Handler handler, final TextField value) {
    final HorizontalLayout controls = new HorizontalLayout() {
        {//from ww  w  . j av  a 2 s .  co m
            Button confirm = new Button(t("core.ok"), FontAwesome.CHECK);
            Button cancel = new Button(t("core.cancel"), FontAwesome.TIMES);

            confirm.addClickListener(new Button.ClickListener() {

                @Override
                public void buttonClick(Button.ClickEvent event) {
                    window.close();
                }
            });
            cancel.addClickListener(new Button.ClickListener() {

                @Override
                public void buttonClick(Button.ClickEvent event) {
                    window.close();
                }
            });

            if (handler instanceof Handler) {
                confirm.addClickListener(new Button.ClickListener() {

                    @Override
                    public void buttonClick(Button.ClickEvent event) {
                        handler.handle(event, value.getValue());
                    }
                });
            }

            confirm.setClickShortcut(KeyCode.ENTER);
            cancel.setClickShortcut(KeyCode.ESCAPE);
            addComponent(confirm);
            addComponent(cancel);
        }
    };
    controls.setMargin(new MarginInfo(true, true, false, true));
    controls.setSpacing(true);
    return controls;
}

From source file:translation.TranslationCard.java

License:Apache License

public TranslationCard(final Integer userId, final String word, final String from, final String to) {
    original = new WordCard(word, from);
    translation = new EditabeWordCard(word, to);
    translate = new LifetimeButtonSmall("Translate", FontAwesome.CHECK);
    addComponents(original, translation, translate);
}

From source file:ui.button.OKButton.java

License:Apache License

public OKButton(Integer userId, String language) {
    super(userId, language, "OK", FontAwesome.CHECK);
    setCaption(getDescription());
}