List of usage examples for com.vaadin.server FontAwesome TIMES
FontAwesome TIMES
To view the source code for com.vaadin.server FontAwesome TIMES.
Click Source Link
From source file:org.vaadin.viritin.it.MNotificationExapmle.java
License:Apache License
@Override public Component getTestComponent() { MVerticalLayout layout = new MVerticalLayout(new MLabel("MNotification Examples").withStyleName("h1"), new MHorizontalLayout(new MButton(FontAwesome.COMMENT, "Humanized", new Button.ClickListener() { @Override//from ww w. ja v a 2s. co m public void buttonClick(Button.ClickEvent event) { MNotification.humanized("Humanized", "This is a humanized notification!") .withIcon(FontAwesome.COMMENT); } }).withStyleName("primary"), new MButton(FontAwesome.TIMES, "Error", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { MNotification.error("Error", "This is an error notification!").withIcon(FontAwesome.TIMES); } }).withStyleName("danger"), new MButton(FontAwesome.EXCLAMATION_TRIANGLE, "Warning", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { MNotification.warning("Warning", "This is a warning notification!") .withIcon(FontAwesome.EXCLAMATION_TRIANGLE); } }), new MButton(FontAwesome.DOWNLOAD, "Tray", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { MNotification.tray("Tray", "This is a tray notification!") .withIcon(FontAwesome.DOWNLOAD); } }).withStyleName("friendly"), new MButton(FontAwesome.WHEELCHAIR, "Assistive", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { MNotification.assistive("Assistive", "This is an assistive notification!"); } }).withStyleName("quiet"))).withFullWidth(); return layout; }
From source file:pl.exsio.ca.module.terrain.evidence.QuickNotifyWindow.java
License:Open Source License
private Button getCancelButton() { Button cancel = new Button("", FontAwesome.TIMES); cancel.addClickListener(new Button.ClickListener() { @Override/*from w ww.j a v a 2 s . co m*/ public void buttonClick(Button.ClickEvent event) { close(); } }); return cancel; }
From source file:pl.exsio.frameset.vaadin.account.menu.presenter.AccountMenuPresenterImpl.java
License:Open Source License
protected Button getLogoutButton() { Button logout = new NativeButton(t("core.logout")); logout.setIconAlternateText(t("core.logout")); logout.setIcon(FontAwesome.TIMES); logout.setStyleName("logout"); logout.addClickListener(new Button.ClickListener() { @Override// w w w. j a v a 2s . co m public void buttonClick(Button.ClickEvent event) { ConfirmationDialog.show(t("core.logout.confirm"), new ConfirmationDialog.Handler() { @Override public void handle(Button.ClickEvent event) { UI.getCurrent().getSession().close(); UI.getCurrent().getPage().setLocation(logoutPath); } }, null); } }); return logout; }
From source file:pl.exsio.frameset.vaadin.account.window.view.AccountWindowView.java
License:Open Source License
private Button createCancelButton() { Button cancelButton = new Button(t("core.cancel"), FontAwesome.TIMES); cancelButton.addClickListener(new Button.ClickListener() { @Override/*from w ww . j a va 2 s. c o m*/ public void buttonClick(Button.ClickEvent event) { presenter.close(); } }); return cancelButton; }
From source file:pl.exsio.frameset.vaadin.module.management.frames.FramesTree.java
License:Open Source License
private Button createRemoveFrameButton(final JPAContainer<Frame> frames) { final Button removeButton = new Button(t("core.management.frames.button.remove"), FontAwesome.TIMES); removeButton.addClickListener(new Button.ClickListener() { @Override// w w w . j av a 2 s. com public void buttonClick(Button.ClickEvent event) { ConfirmationDialog.show(t("core.management.frames.deletion.confirmation"), new ConfirmationDialog.Handler() { @Override public void handle(Button.ClickEvent event) { Frame targetFrame = frames.getItem(tree.getValue()).getEntity(); if (!targetFrame.isRoot()) { FrameDao<Frame> frameDao = coreRepositories.getFrameRepository(); frameDao.removeSingle(targetFrame); frames.removeItem(targetFrame.getId()); frames.refresh(); } else { Notification.show(t("core.management.frames.tree.wrong_operation"), Notification.Type.ERROR_MESSAGE); } } }, null); } }); return removeButton; }
From source file:pl.exsio.frameset.vaadin.ui.support.component.data.common.DataComponent.java
License:Open Source License
private Button createFormCancelButton(final Window formWindow) { Button cancel = new Button(t(config.getFormCancelButtonLabel()), FontAwesome.TIMES); cancel.addClickListener(new Button.ClickListener() { @Override/*from www .j ava 2 s . c om*/ public void buttonClick(Button.ClickEvent event) { formWindow.close(); } }); cancel.setStyleName("frameset-dc-form-button-cancel"); return cancel; }
From source file:pl.exsio.frameset.vaadin.ui.support.dialog.ConfirmationDialog.java
License:Open Source License
private static HorizontalLayout getControls(final Window window, final Handler positiveHandler, final Handler negativeHandler) { final HorizontalLayout controls = new HorizontalLayout() { {/* w ww. java 2 s. c om*/ Button positive = new Button(t("core.yes"), FontAwesome.CHECK); Button negative = new Button(t("core.no"), FontAwesome.TIMES); positive.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { window.close(); } }); negative.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { window.close(); } }); if (positiveHandler instanceof Handler) { positive.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { positiveHandler.handle(event); } }); } if (negativeHandler instanceof Handler) { negative.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { negativeHandler.handle(event); } }); } positive.setClickShortcut(ShortcutAction.KeyCode.ENTER); negative.setClickShortcut(ShortcutAction.KeyCode.ESCAPE); addComponent(positive); addComponent(negative); } }; controls.setMargin(new MarginInfo(true, true, false, true)); controls.setSpacing(true); return controls; }
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() { {/* www . jav 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:pl.exsio.plupload.field.PluploadField.java
License:Open Source License
@Override protected Component initContent() { this.layout = new HorizontalLayout(); this.layout.setStyleName("plupload-field"); this.layout.setSpacing(true); this.uploader.setMultiSelection(false); this.uploader.setStyleName("plupload-field-uploader"); if (byte[].class.equals(this.returnTypeClass)) { this.uploader.setChunkHandlerFactory(new ByteArrayChunkHandlerFactory()); }// w ww. ja v a 2s . co m this.progressBar = new ProgressBar(); this.progressBar.setIndeterminate(false); this.progressBar.setValue(0f); this.progressBar.setWidth("128px"); this.progressBar.setStyleName("plupload-field-progressbar"); this.progressBar.setVisible(false); this.nameLabel = new Label(); this.nameLabel.setStyleName("plupload-field-name"); this.nameLabel.setWidth("128px"); this.removeButton = new Button(this.removeLabel, FontAwesome.TIMES); this.removeButton.setVisible(false); this.removeButton.setStyleName("plupload-field-remove"); VerticalLayout vlayout = new VerticalLayout(); vlayout.addComponent(this.nameLabel); vlayout.addComponent(this.progressBar); this.layout.addComponent(this.uploader); this.layout.addComponent(vlayout); this.layout.addComponent(this.removeButton); this.layout.setComponentAlignment(this.removeButton, Alignment.TOP_RIGHT); return layout; }
From source file:ui.button.CancelButton.java
License:Apache License
public CancelButton(Integer userId, String language) { super(userId, language, "Cancel", FontAwesome.TIMES); setCaption(getDescription()); }