List of usage examples for com.vaadin.server FontAwesome ANGLE_DOUBLE_LEFT
FontAwesome ANGLE_DOUBLE_LEFT
To view the source code for com.vaadin.server FontAwesome ANGLE_DOUBLE_LEFT.
Click Source Link
From source file:com.etest.view.testbank.cellitem.ViewStemWindow.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setWidth("100%"); form.setMargin(true);//w ww.j a va 2 s .c o m form.setSpacing(true); CellItem ci = cis.getCellItemById(getCellItemId()); if (ci.getCellItemId() == 0) { ci = hs.getCellItemById(getCellItemId()); } keyList = k.getAllItemKey(getCellItemId()); keyIndexSize = keyList.size(); if (keyList.isEmpty()) { ShowErrorNotification.error("No Item Key was found for STEM: \n" + ci.getItem()); return null; } stem = ci.getItem().replace("{key}", "<u>" + keyList.get(getKeyIndex()) + "</u>"); label.setValue("<b>STEM</b>: " + getStem()); label.setContentMode(ContentMode.HTML); form.addComponent(label); HorizontalLayout h1 = new HorizontalLayout(); h1.setWidth("100%"); OptionGroup options = new OptionGroup(); options.addItems(ci.getOptionA(), ci.getOptionB(), ci.getOptionC(), ci.getOptionD()); options.addValueChangeListener((Property.ValueChangeEvent event) -> { boolean result = k.isAnswerCorrect(getCellItemId(), getItemKey(), CommonUtilities.escapeSingleQuote(event.getProperty().getValue())); if (result) { Notification.show("Correct Answer!", Notification.Type.TRAY_NOTIFICATION); } else { Notification.show("Wrong Answer", Notification.Type.TRAY_NOTIFICATION); } }); h1.addComponent(options); h1.setComponentAlignment(options, Alignment.MIDDLE_CENTER); form.addComponent(h1); GridLayout g = new GridLayout(2, 2); g.setWidth("100%"); g.setSpacing(true); prev = new Button(); prev.setWidth("50px"); prev.setIcon(FontAwesome.ANGLE_DOUBLE_LEFT); prev.addStyleName(ValoTheme.BUTTON_PRIMARY); prev.addStyleName(ValoTheme.BUTTON_SMALL); prev.addClickListener(prevBtnClickListener); g.addComponent(prev, 0, 0); g.setComponentAlignment(prev, Alignment.MIDDLE_LEFT); next = new Button(); next.setWidth("50px"); next.setIcon(FontAwesome.ANGLE_DOUBLE_RIGHT); next.addStyleName(ValoTheme.BUTTON_PRIMARY); next.addStyleName(ValoTheme.BUTTON_SMALL); next.addClickListener(nextBtnClickListener); g.addComponent(next, 1, 0); g.setComponentAlignment(next, Alignment.MIDDLE_RIGHT); if (getKeyIndexSize() == 1) { prev.setEnabled(false); next.setEnabled(false); } populateDataTable(); g.addComponent(table, 0, 1, 1, 1); g.setComponentAlignment(table, Alignment.MIDDLE_CENTER); form.addComponent(g); return form; }
From source file:fr.amapj.view.views.common.gapviewer.DatePerDateViewer.java
License:Open Source License
private Button addButton(boolean toRight, HorizontalLayout layout, ClickListener listener) { String str;//from www .j ava 2s . c o m if (toRight) { str = "SUIVANT"; } else { str = "PRECEDENT"; } Button b = new Button(str); b.addClickListener(listener); if (toRight) { b.setIcon(FontAwesome.ANGLE_DOUBLE_RIGHT); b.addStyleName("icon-align-right"); b.addStyleName("large"); } else { b.setIcon(FontAwesome.ANGLE_DOUBLE_LEFT); b.addStyleName("large"); } b.addStyleName("fleche"); layout.addComponent(b); return b; }
From source file:fr.amapj.view.views.common.gapviewer.MonthViewer.java
License:Open Source License
private void addButton(boolean toRight, HorizontalLayout layout, ClickListener listener) { String str;/*from ww w.j a v a 2 s. c o m*/ if (BaseUiTools.isWidthBelow(480)) { if (toRight) { str = "SUIVANT"; } else { str = "PRECEDENT"; } } else { if (toRight) { str = "MOIS SUIVANT"; } else { str = "MOIS PRECEDENT"; } } Button b = new Button(str); b.addClickListener(listener); if (toRight) { b.setIcon(FontAwesome.ANGLE_DOUBLE_RIGHT); b.addStyleName("icon-align-right"); b.addStyleName("large"); } else { b.setIcon(FontAwesome.ANGLE_DOUBLE_LEFT); b.addStyleName("large"); } b.addStyleName("fleche"); layout.addComponent(b); }
From source file:fr.amapj.view.views.common.gapviewer.WeekViewer.java
License:Open Source License
private void addButton(boolean toRight, HorizontalLayout layout, ClickListener listener) { String str;/*ww w . ja v a2 s . c om*/ if (BaseUiTools.isWidthBelow(480)) { if (toRight) { str = "SUIVANT"; } else { str = "PRECEDENT"; } } else { if (toRight) { str = "SEMAINE SUIVANTE"; } else { str = "SEMAINE PRECEDENTE"; } } Button b = new Button(str); b.addClickListener(listener); if (toRight) { b.setIcon(FontAwesome.ANGLE_DOUBLE_RIGHT); b.addStyleName("icon-align-right"); b.addStyleName("large"); } else { b.setIcon(FontAwesome.ANGLE_DOUBLE_LEFT); b.addStyleName("large"); } b.addStyleName("fleche"); layout.addComponent(b); }
From source file:me.uni.emuseo.view.common.paging.PagedTableLayout.java
License:Open Source License
protected void buildNavButtons() { prevPageButton = new Button(FontAwesome.ANGLE_LEFT); prevPageButton.addClickListener(new ClickListener() { private static final long serialVersionUID = -2235461491455250659L; @Override/* ww w .j a v a 2 s . c om*/ public void buttonClick(ClickEvent event) { goToPage(getCurrentPage() - 1); } }); nextPageButton = new Button(FontAwesome.ANGLE_RIGHT); nextPageButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 277167907625013749L; @Override public void buttonClick(ClickEvent event) { goToPage(getCurrentPage() + 1); } }); firstPageButton = new Button(FontAwesome.ANGLE_DOUBLE_LEFT); firstPageButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 277167907625013750L; @Override public void buttonClick(ClickEvent event) { goToPage(0); } }); lastPageButton = new Button(FontAwesome.ANGLE_DOUBLE_RIGHT); lastPageButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 277167907625013751L; @Override public void buttonClick(ClickEvent event) { goToPage(getPagesCount() - 1); } }); }
From source file:ui.button.CollapseButton.java
License:Apache License
public CollapseButton(Integer userId, String language) { super("", FontAwesome.ANGLE_DOUBLE_LEFT); setDescription(Translator.getTranslation("Hide Text", language)); }