List of usage examples for com.vaadin.server FontAwesome THUMBS_O_UP
FontAwesome THUMBS_O_UP
To view the source code for com.vaadin.server FontAwesome THUMBS_O_UP.
Click Source Link
From source file:com.esofthead.mycollab.shell.view.components.AdRequestWindow.java
License:Open Source License
public AdRequestWindow(final SimpleUser user) { super("Need help!"); this.setModal(true); this.setResizable(false); this.setWidth("600px"); MVerticalLayout content = new MVerticalLayout(); Label message = new Label("Hey <b>" + AppContext.getUser().getDisplayName() + "</b>, you've been " + "using MyCollab for a while now. And we hope you are happy with it. We spent countless hours and money developing this free " + "software for you. If you like it, please write a few words on twitter, blog or our " + "testimonial form. It will help other " + "people find this useful software quickly. <b> Thank you</b>", ContentMode.HTML); MVerticalLayout shareControls = new MVerticalLayout(); Label rateSourceforge = new Label( new Div().appendChild(new Text(FontAwesome.THUMBS_O_UP.getHtml()), DivLessFormatter.EMPTY_SPACE(), new A("http://sourceforge.net/projects/mycollab/reviews/new", "_blank") .appendText("Rate us on Sourceforge")) .setStyle("color:#006dac").write(), ContentMode.HTML);//www. j a va 2s .c o m Label tweetUs = new Label(new Div().appendChild(new Text(FontAwesome.TWITTER.getHtml()), DivLessFormatter.EMPTY_SPACE(), new A("https://twitter.com/intent/tweet?text=Im using MyCollab to manage all project activities, accounts and it works great @mycollabdotcom&source=webclient", "_blank").appendText("Share on Twitter")) .setStyle("color:#006dac").write(), ContentMode.HTML); Label linkedIn = new Label(new Div().appendChild(new Text(FontAwesome.LINKEDIN_SQUARE.getHtml()), DivLessFormatter.EMPTY_SPACE(), new A("https://www.linkedin.com/cws/share?url=https%3A%2F%2Fwww.mycollab.com&original_referer=https%3A%2F%2Fwww.mycollab.com&token=&isFramed=false&lang=en_US", "_blank").appendText("Share on LinkedIn")) .setStyle("color:#006dac").write(), ContentMode.HTML); Button testimonialBtn = new Button("Write a testimonial", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { AdRequestWindow.this.close(); turnOffAdd(user); UI.getCurrent().addWindow(new TestimonialWindow()); } }); testimonialBtn.setStyleName(UIConstants.BUTTON_LINK); testimonialBtn.setIcon(FontAwesome.KEYBOARD_O); shareControls.with(rateSourceforge, tweetUs, linkedIn, testimonialBtn); MHorizontalLayout btnControls = new MHorizontalLayout(); Button ignoreBtn = new Button("No, thanks", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { close(); turnOffAdd(user); } }); ignoreBtn.addStyleName(UIConstants.BUTTON_OPTION); Button loveBtn = new Button("I did", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { AdRequestWindow.this.close(); NotificationUtil.showNotification("We appreciate your kindness action", "Thank you for your time"); turnOffAdd(user); } }); loveBtn.addStyleName(UIConstants.BUTTON_ACTION); loveBtn.setIcon(FontAwesome.HEART); btnControls.with(ignoreBtn, loveBtn); content.with(message, shareControls, btnControls).withAlign(btnControls, Alignment.MIDDLE_RIGHT); this.setContent(content); }
From source file:com.esofthead.mycollab.shell.view.MainViewImpl.java
License:Open Source License
private ComponentContainer createFooter() { MHorizontalLayout footer = new MHorizontalLayout().withFullWidth() .withMargin(new MarginInfo(false, true, false, true)); footer.setStyleName("footer"); footer.setHeight("30px"); Div companyInfoDiv = new Div().appendText("Powered by ") .appendChild(new A("https://www.mycollab.com", "_blank").appendText("MyCollab")) .appendText(" © " + new LocalDate().getYear()); ELabel companyInfoLbl = new ELabel(companyInfoDiv.write(), ContentMode.HTML).withWidth("-1px"); footer.with(companyInfoLbl).withAlign(companyInfoLbl, Alignment.MIDDLE_LEFT); Div socialLinksDiv = new Div().appendText(FontAwesome.RSS.getHtml()) .appendChild(new A("https://www.mycollab.com/blog", "_blank").appendText(" Blog")) .appendText(" " + FontAwesome.REPLY_ALL.getHtml()) .appendChild(new A("http://support.mycollab.com", "_blank").appendText(" Support")); if (SiteConfiguration.isCommunityEdition()) { socialLinksDiv.appendText(" " + FontAwesome.THUMBS_O_UP.getHtml()) .appendChild(new A("http://sourceforge.net/projects/mycollab/reviews/new", "_blank") .appendText("" + " Rate us")); }// ww w . j ava2 s. com socialLinksDiv.appendText(" " + FontAwesome.FACEBOOK.getHtml()) .appendChild(new A("https://www.facebook.com/mycollab2", "_blank").appendText(" FB page")); socialLinksDiv.appendText(" " + FontAwesome.TWITTER.getHtml()) .appendChild(new A( "https://twitter.com/intent/tweet?text=I am using MyCollab to manage all project " + "activities, accounts and it works great @mycollabdotcom &source=webclient", "_blank").appendText(" Tweet")); ELabel socialsLbl = new ELabel(socialLinksDiv.write(), ContentMode.HTML).withWidth("-1px"); footer.with(socialsLbl).withAlign(socialsLbl, Alignment.MIDDLE_RIGHT); return footer; }
From source file:com.etest.view.testbank.cellitem.CellItemWindow.java
FormLayout buildForms() {
FormLayout form = new FormLayout();
form.setWidth("100%");
form.setMargin(true);//from www.j av a 2 s .com
form.setSpacing(true);
HorizontalLayout hlayout = new HorizontalLayout();
hlayout.setWidth("100%");
Button helpBtn = new Button("HELP");
helpBtn.setWidthUndefined();
helpBtn.setIcon(FontAwesome.TASKS);
helpBtn.addStyleName(ValoTheme.BUTTON_PRIMARY);
helpBtn.addStyleName(ValoTheme.BUTTON_SMALL);
helpBtn.addClickListener((Button.ClickEvent event) -> {
Window sub = new MultipleChoiceHelpViewer();
if (sub.getParent() == null) {
UI.getCurrent().addWindow(sub);
}
});
hlayout.addComponent(helpBtn);
hlayout.setComponentAlignment(helpBtn, Alignment.MIDDLE_RIGHT);
form.addComponent(hlayout);
bloomsTaxonomy.setCaption("Blooms Class: ");
bloomsTaxonomy.setWidth("30%");
form.addComponent(bloomsTaxonomy);
stem = new TextArea("Stem: ");
stem.setWidth("100%");
stem.setRows(5);
stem.setWordwrap(true);
form.addComponent(stem);
HorizontalLayout h1 = new HorizontalLayout();
h1.setCaption("Option A:");
h1.setWidth("100%");
h1.setSpacing(true);
optionA = new CommonTextField("add option A", null);
optionA.setWidth("500px");
h1.addComponent(optionA);
Button optionABtn = new CommonButton("OPTION A");
optionABtn.setWidth("120px");
optionABtn.addClickListener(updateOptionAndKeyListerner);
h1.addComponent(optionABtn);
h1.setComponentAlignment(optionABtn, Alignment.MIDDLE_RIGHT);
optionABtn.setVisible(isEdit());
form.addComponent(h1);
HorizontalLayout h2 = new HorizontalLayout();
h2.setCaption("Key A:");
h2.setWidth("100%");
h2.setSpacing(true);
keyA = new CommonTextField("Enter a Key for Option A", null);
keyA.setWidth("500px");
h2.addComponent(keyA);
Button keyABtn = new CommonButton("KEY A");
keyABtn.setWidth("120px");
keyABtn.addClickListener(updateOptionAndKeyListerner);
h2.addComponent(keyABtn);
h2.setComponentAlignment(keyABtn, Alignment.MIDDLE_RIGHT);
keyABtn.setVisible(isEdit());
form.addComponent(h2);
HorizontalLayout h3 = new HorizontalLayout();
h3.setCaption("Option B:");
h3.setWidth("100%");
h3.setSpacing(true);
optionB = new CommonTextField("add option B", null);
optionB.setWidth("500px");
h3.addComponent(optionB);
Button optionBBtn = new CommonButton("OPTION B");
optionBBtn.setWidth("120px");
optionBBtn.addClickListener(updateOptionAndKeyListerner);
h3.addComponent(optionBBtn);
h3.setComponentAlignment(optionBBtn, Alignment.MIDDLE_RIGHT);
optionBBtn.setVisible(isEdit());
form.addComponent(h3);
HorizontalLayout h4 = new HorizontalLayout();
h4.setCaption("Key B:");
h4.setWidth("100%");
h4.setSpacing(true);
keyB = new CommonTextField("Enter a Key for Option B", null);
keyB.setWidth("500px");
h4.addComponent(keyB);
Button keyBBtn = new CommonButton("KEY B");
keyBBtn.setWidth("120px");
keyBBtn.addClickListener(updateOptionAndKeyListerner);
h4.addComponent(keyBBtn);
h4.setComponentAlignment(keyBBtn, Alignment.MIDDLE_RIGHT);
keyBBtn.setVisible(isEdit());
form.addComponent(h4);
HorizontalLayout h5 = new HorizontalLayout();
h5.setCaption("Option C:");
h5.setWidth("100%");
h5.setSpacing(true);
optionC = new CommonTextField("add option C", null);
optionC.setWidth("500px");
h5.addComponent(optionC);
Button optionCBtn = new CommonButton("OPTION C");
optionCBtn.setWidth("120px");
optionCBtn.addClickListener(updateOptionAndKeyListerner);
h5.addComponent(optionCBtn);
h5.setComponentAlignment(optionCBtn, Alignment.TOP_RIGHT);
optionCBtn.setVisible(isEdit());
form.addComponent(h5);
HorizontalLayout h6 = new HorizontalLayout();
h6.setCaption("Key C:");
h6.setWidth("100%");
h6.setSpacing(true);
keyC = new CommonTextField("Enter a Key for Option C", null);
keyC.setWidth("500px");
h6.addComponent(keyC);
Button keyCBtn = new CommonButton("KEY C");
keyCBtn.setWidth("120px");
keyCBtn.addClickListener(updateOptionAndKeyListerner);
h6.addComponent(keyCBtn);
h6.setComponentAlignment(keyCBtn, Alignment.MIDDLE_RIGHT);
keyCBtn.setVisible(isEdit());
form.addComponent(h6);
HorizontalLayout h7 = new HorizontalLayout();
h7.setCaption("Option D:");
h7.setWidth("100%");
h7.setSpacing(true);
optionD = new CommonTextField("add option D", null);
optionD.setWidth("500px");
h7.addComponent(optionD);
Button optionDBtn = new CommonButton("OPTION D");
optionDBtn.setWidth("120px");
optionDBtn.addClickListener(updateOptionAndKeyListerner);
h7.addComponent(optionDBtn);
h7.setComponentAlignment(optionDBtn, Alignment.MIDDLE_RIGHT);
optionDBtn.setVisible(isEdit());
form.addComponent(h7);
HorizontalLayout h8 = new HorizontalLayout();
h8.setCaption("Key D:");
h8.setWidth("100%");
h8.setSpacing(true);
keyD = new CommonTextField("Enter a Key for Option D", null);
keyD.setWidth("500px");
h8.addComponent(keyD);
Button keyDBtn = new CommonButton("KEY D");
keyDBtn.setWidth("120px");
keyDBtn.addClickListener(updateOptionAndKeyListerner);
h8.addComponent(keyDBtn);
h8.setComponentAlignment(keyDBtn, Alignment.MIDDLE_RIGHT);
keyDBtn.setVisible(isEdit());
form.addComponent(h8);
HorizontalLayout h = new HorizontalLayout();
h.setWidth("100%");
Button save = new Button("SAVE");
save.setWidth("200px");
save.setIcon(FontAwesome.SAVE);
save.addStyleName(ValoTheme.BUTTON_PRIMARY);
save.addStyleName(ValoTheme.BUTTON_SMALL);
save.addClickListener(buttonClickListener);
Button remove = new Button("ARCHIVE/REMOVE ITEM?");
remove.setWidth("200px");
remove.setIcon(FontAwesome.ARCHIVE);
remove.addStyleName(ValoTheme.BUTTON_PRIMARY);
remove.addStyleName(ValoTheme.BUTTON_SMALL);
remove.addClickListener(buttonClickListener);
Button approve = new Button("APPROVE ITEM?");
approve.setWidth("200px");
approve.setIcon(FontAwesome.THUMBS_O_UP);
approve.addStyleName(ValoTheme.BUTTON_PRIMARY);
approve.addStyleName(ValoTheme.BUTTON_SMALL);
approve.addClickListener(buttonClickListener);
Button edit = new Button("UPDATE");
edit.setWidth("200px");
edit.setIcon(FontAwesome.SAVE);
edit.addStyleName(ValoTheme.BUTTON_PRIMARY);
edit.addStyleName(ValoTheme.BUTTON_SMALL);
edit.addClickListener(buttonClickListener);
if (getCellItemId() != 0) {
CellItem ci = cis.getCellItemById(getCellItemId());
bloomsTaxonomy.setValue(ci.getBloomsClassId());
bloomsTaxonomy.addValueChangeListener((Property.ValueChangeEvent event) -> {
isBloomsChanged = true;
});
stem.setValue(ci.getItem());
stem.addTextChangeListener((FieldEvents.TextChangeEvent event) -> {
if (!stem.getValue().trim().equals(event.getText().trim())) {
isStemChanged = true;
}
});
/**
* OPTION A
*/
optionA.setValue(ci.getOptionA());
isOptionAKeyExist = k.isKeyExist(getCellItemId(), ci.getOptionA());
if (isOptionAKeyExist) {
keyA.setValue(k.getItemKey(getCellItemId(), ci.getOptionA()));
}
keyA.setData(k.getItemKeyId(getCellItemId(), ci.getOptionA()));
/**
* OPTION B
*/
optionB.setValue(ci.getOptionB());
isOptionBKeyExist = k.isKeyExist(getCellItemId(), ci.getOptionB());
if (isOptionBKeyExist) {
keyB.setValue(k.getItemKey(getCellItemId(), ci.getOptionB()));
}
keyB.setData(k.getItemKeyId(getCellItemId(), ci.getOptionB()));
/**
* OPTION C
*/
optionC.setValue(ci.getOptionC());
isOptionCKeyExist = k.isKeyExist(getCellItemId(), ci.getOptionC());
if (isOptionCKeyExist) {
keyC.setValue(k.getItemKey(getCellItemId(), ci.getOptionC()));
}
keyC.setData(k.getItemKeyId(getCellItemId(), ci.getOptionC()));
/**
* OPTION D
*/
optionD.setValue(ci.getOptionD());
isOptionDKeyExist = k.isKeyExist(getCellItemId(), ci.getOptionD());
if (isOptionDKeyExist) {
keyD.setValue(k.getItemKey(getCellItemId(), ci.getOptionD()));
}
keyD.setData(k.getItemKeyId(getCellItemId(), ci.getOptionD()));
h.addComponent(remove);
h.setComponentAlignment(remove, Alignment.MIDDLE_RIGHT);
h.addComponent(approve);
h.setComponentAlignment(approve, Alignment.MIDDLE_RIGHT);
h.addComponent(edit);
h.setComponentAlignment(edit, Alignment.MIDDLE_RIGHT);
form.addComponent(h);
} else {
h.addComponent(save);
h.setComponentAlignment(save, Alignment.MIDDLE_RIGHT);
form.addComponent(h);
}
return form;
}
From source file:com.mycollab.shell.view.components.AdRequestWindow.java
License:Open Source License
public AdRequestWindow(final SimpleUser user) { super("Need help!"); this.setModal(true); this.setResizable(false); this.setWidth("600px"); MVerticalLayout content = new MVerticalLayout(); Label message = new Label("Hey <b>" + AppContext.getUser().getDisplayName() + "</b>, you've been " + "using MyCollab for a while now. And we hope you are happy with it. We spent countless hours and money developing this free " + "software for you. If you like it, please write a few words on twitter, blog or our " + "testimonial form. It will help other " + "people find this useful software quickly. <b> Thank you</b>", ContentMode.HTML); MVerticalLayout shareControls = new MVerticalLayout(); Label rateSourceforge = new Label( new Div().appendChild(new Text(FontAwesome.THUMBS_O_UP.getHtml()), DivLessFormatter.EMPTY_SPACE(), new A("http://sourceforge.net/projects/mycollab/reviews/new", "_blank") .appendText("Rate us on Sourceforge")) .setStyle("color:#006dac").write(), ContentMode.HTML);//from w ww .ja v a 2 s.c om Label tweetUs = new Label(new Div().appendChild(new Text(FontAwesome.TWITTER.getHtml()), DivLessFormatter.EMPTY_SPACE(), new A("https://twitter.com/intent/tweet?text=Im using MyCollab to manage all project activities, accounts and it works great @mycollabdotcom&source=webclient", "_blank").appendText("Share on Twitter")) .setStyle("color:#006dac").write(), ContentMode.HTML); Label linkedIn = new Label(new Div().appendChild(new Text(FontAwesome.LINKEDIN_SQUARE.getHtml()), DivLessFormatter.EMPTY_SPACE(), new A("https://www.linkedin.com/cws/share?url=https%3A%2F%2Fwww.mycollab.com&original_referer=https%3A%2F%2Fwww.mycollab.com&token=&isFramed=false&lang=en_US", "_blank").appendText("Share on LinkedIn")) .setStyle("color:#006dac").write(), ContentMode.HTML); MButton testimonialBtn = new MButton("Write a testimonial", clickEvent -> { close(); turnOffAdd(user); UI.getCurrent().addWindow(new TestimonialWindow()); }).withIcon(FontAwesome.KEYBOARD_O).withStyleName(UIConstants.BUTTON_LINK); shareControls.with(rateSourceforge, tweetUs, linkedIn, testimonialBtn); MButton ignoreBtn = new MButton("No, thanks", clickEvent -> { close(); turnOffAdd(user); }).withStyleName(UIConstants.BUTTON_OPTION); MButton loveBtn = new MButton("I did", clickEvent -> { close(); NotificationUtil.showNotification("We appreciate your kindness action", "Thank you for your time"); turnOffAdd(user); }).withIcon(FontAwesome.HEART).withStyleName(UIConstants.BUTTON_ACTION); MHorizontalLayout btnControls = new MHorizontalLayout(ignoreBtn, loveBtn); content.with(message, shareControls, btnControls).withAlign(btnControls, Alignment.MIDDLE_RIGHT); this.setContent(content); }
From source file:de.fatalix.bookery.view.common.BookDetailLayout.java
License:Open Source License
private HorizontalLayout createImageLayout() { image = new Image(); image.setImmediate(true);/* ww w . ja v a 2 s .co m*/ image.setHeight("200px"); image.setWidth("130px"); downloadButton = new Button("download", FontAwesome.DOWNLOAD); downloadButton.addStyleName(ValoTheme.BUTTON_FRIENDLY); downloadButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { loadData(presenter.updateShared(bookEntry, SecurityUtils.getSubject().getPrincipal().toString())); } catch (SolrServerException | IOException ex) { Notification.show("Unexpected Error!\n" + ex.getMessage(), Notification.Type.ERROR_MESSAGE); logger.error(ex, ex); } } }); fileDownloader = new FileDownloader(new StreamResource(new BookStreamSource(null), "blbla.epub")); fileDownloader.extend(downloadButton); sendToKindleButton = new Button("Kindle", FontAwesome.BOOK); sendToKindleButton.addStyleName(ValoTheme.BUTTON_FRIENDLY); sendToKindleButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { presenter.shareBookWithKindle(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()); Notification.show("Book is sent to kindle", Notification.Type.HUMANIZED_MESSAGE); loadData(presenter.updateShared(bookEntry, SecurityUtils.getSubject().getPrincipal().toString())); } catch (SolrServerException | IOException | MessagingException ex) { Notification.show("Unexpected Error!\n" + ex.getMessage(), Notification.Type.ERROR_MESSAGE); logger.error(ex, ex); } } }); likeButton = new Button("0 likes", FontAwesome.THUMBS_O_UP); likeButton.addStyleName(ValoTheme.BUTTON_LINK); likeButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { BookEntry updatedEntry = presenter.updateLike(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()); loadData(updatedEntry); } catch (SolrServerException | IOException ex) { Notification.show("Unexpected Error!\n" + ex.getMessage(), Notification.Type.ERROR_MESSAGE); logger.error(ex, ex); } } }); watchListButton = new Button("merken", FontAwesome.STAR_O); watchListButton.addStyleName(ValoTheme.BUTTON_LINK); watchListButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { presenter.addRemoveFromWatchList(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()); loadData(bookEntry); } }); downloadCount = new Label("0 downloads"); VerticalLayout rightLayout = new VerticalLayout(sendToKindleButton, downloadButton, watchListButton, likeButton, downloadCount); rightLayout.setComponentAlignment(downloadCount, Alignment.MIDDLE_CENTER); rightLayout.setSpacing(true); HorizontalLayout layout = new HorizontalLayout(image, rightLayout); layout.setSpacing(true); return layout; }
From source file:de.fatalix.bookery.view.common.BookSearchLayout.java
License:Open Source License
private VerticalLayout createBookCoverLayout(final BookEntry bookEntry) { Image image = new Image(); image.setDescription(bookEntry.getTitle() + " von " + bookEntry.getAuthor()); image.setHeight("200px"); image.setWidth("130px"); image.setImmediate(true);/*from www. j a v a 2 s . c o m*/ if (bookEntry.getThumbnail() != null) { StreamResource.StreamSource source = new ByteStreamResource(bookEntry.getThumbnail()); image.setSource(new StreamResource(source, bookEntry.getId() + "_thumb.png")); } else if (bookEntry.getCover() != null) { StreamResource.StreamSource source = new ByteStreamResource(bookEntry.getCover()); image.setSource(new StreamResource(source, bookEntry.getId() + ".png")); } final MButton watchListButton = new MButton() .withIcon(presenter.isOnWatchList(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()) ? FontAwesome.STAR : FontAwesome.STAR_O) .withStyleName(ValoTheme.BUTTON_LINK); watchListButton.addStyleName("quick-action"); watchListButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { watchListButton.setIcon(presenter.addRemoveFromWatchList(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()) ? FontAwesome.STAR : FontAwesome.STAR_O); } }); final MButton likeButton = new MButton().withCaption("" + bookEntry.getLikes()) .withIcon(FontAwesome.THUMBS_O_UP).withStyleName(ValoTheme.BUTTON_LINK); likeButton.addStyleName("quick-action"); likeButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { BookEntry updatedBook = presenter.updateLike(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()); bookEntry.setLikes(updatedBook.getLikes()); bookEntry.setLikedby(updatedBook.getLikedby()); likeButton.setCaption("" + bookEntry.getLikes()); } catch (SolrServerException | IOException ex) { java.util.logging.Logger.getLogger(BookSearchLayout.class.getName()).log(Level.SEVERE, null, ex); } } }); final MButton downloadsButton = new MButton().withCaption("" + bookEntry.getDownloads()) .withIcon(FontAwesome.DOWNLOAD).withStyleName(ValoTheme.BUTTON_LINK); downloadsButton.addStyleName("quick-action"); HorizontalLayout quickActionLayout = new HorizontalLayout(watchListButton, likeButton, downloadsButton); quickActionLayout.addStyleName("quick-action-layout"); VerticalLayout result = new VerticalLayout(image, quickActionLayout); //result.setHeight("210px"); //result.setWidth("140px"); result.addStyleName("pointer-cursor"); result.addStyleName("book-card"); result.setComponentAlignment(image, Alignment.MIDDLE_CENTER); result.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { bookDetailLayout.loadData(bookEntry); bookDetailLayout.setLayoutVisible(true); //BookDetailDialog dialogInstance = bookDetail.get(); //dialogInstance.loadData(bookEntry); //UI.getCurrent().addWindow(dialogInstance); } }); return result; }