List of usage examples for com.vaadin.server FontAwesome ERASER
FontAwesome ERASER
To view the source code for com.vaadin.server FontAwesome ERASER.
Click Source Link
From source file:com.etest.view.systemadministration.curriculum.CurriculumFormWindow.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setMargin(true);//from w w w .j a va2 s.co m yearLevel.setWidth("75%"); form.addComponent(yearLevel); subjectField.setWidth("75%"); form.addComponent(subjectField); normCourseOffering.setWidth("75%"); form.addComponent(normCourseOffering); descriptiveTitleField.setWidth("100%"); descriptiveTitleField.setRows(3); descriptiveTitleField.setInputPrompt("Descriptive Title.."); form.addComponent(descriptiveTitleField); Button save = new Button("SAVE"); save.setWidth("100%"); save.setIcon(FontAwesome.SAVE); save.addStyleName(ValoTheme.BUTTON_PRIMARY); save.addStyleName(ValoTheme.BUTTON_SMALL); save.addClickListener(buttonClickListener); Button update = new Button("UPDATE"); update.setWidth("100%"); update.setIcon(FontAwesome.ADJUST); update.addStyleName(ValoTheme.BUTTON_PRIMARY); update.addStyleName(ValoTheme.BUTTON_SMALL); update.addClickListener(buttonClickListener); Button delete = new Button("DELETE"); delete.setWidth("100%"); delete.setIcon(FontAwesome.ERASER); delete.addStyleName(ValoTheme.BUTTON_PRIMARY); delete.addStyleName(ValoTheme.BUTTON_SMALL); delete.addClickListener(buttonClickListener); HorizontalLayout hlayout = new HorizontalLayout(); hlayout.setWidth("100%"); hlayout.setSpacing(true); if (getCurriculumId() != 0) { hlayout.addComponent(update); hlayout.addComponent(delete); Curriculum c = cs.getCurriculumById(getCurriculumId()); yearLevel.setValue(c.getYearLevel()); subjectField.setValue(c.getSubject()); normCourseOffering.setValue(c.getNormCourseOffering()); descriptiveTitleField.setValue(c.getDescriptiveTitle()); if (getButtonCaption().equals("edit")) { delete.setVisible(false); } else { update.setVisible(false); } } else { hlayout.addComponent(save); } form.addComponent(hlayout); return form; }
From source file:me.uni.emuseo.view.common.form.SearchFormLayout.java
License:Open Source License
private CssLayout createButtonsLayout() { CssLayout buttonsLayout = new CssLayout(); Button searchButton = new Button(); searchButton.addStyleName("primary"); searchButton.setIcon(FontAwesome.SEARCH); searchButton.addClickListener(new Button.ClickListener() { /**//from ww w . j a v a 2 s . co m * */ private static final long serialVersionUID = -8034803606737706285L; @Override public void buttonClick(ClickEvent event) { try { formBuilder.commit(); eventPropagator.fireChangeEvent(formBuilder.getBean()); } catch (CommitException e) { e.printStackTrace(); } } }); Button clearButton = new Button(); clearButton.addStyleName("primary"); clearButton.setIcon(FontAwesome.ERASER); clearButton.addClickListener(new Button.ClickListener() { /** * */ private static final long serialVersionUID = -8684340029871714722L; @Override public void buttonClick(ClickEvent event) { T bean = getBean(); formBuilder.setBean(bean); eventPropagator.fireClearEvent(formBuilder.getBean()); } }); buttonsLayout.addComponents(clearButton, searchButton); buttonsLayout.setSizeFull(); buttonsLayout.addStyleName("buttons-layout"); return buttonsLayout; }
From source file:org.eclipse.hawkbit.simulator.ui.SimulatorView.java
License:Open Source License
private void createToolbar() { final Button createDevicesButton = new Button("generate..."); createDevicesButton.setIcon(FontAwesome.GEARS); createDevicesButton.addClickListener(event -> openGenerateDialog()); final Button clearDevicesButton = new Button("clear"); clearDevicesButton.setIcon(FontAwesome.ERASER); clearDevicesButton.addClickListener(event -> clearSimulatedDevices()); toolbar.addComponent(createDevicesButton); toolbar.addComponent(clearDevicesButton); toolbar.setSpacing(true);/* www .j a va 2s . c om*/ }