List of usage examples for com.vaadin.ui.themes ValoTheme BUTTON_ICON_ONLY
String BUTTON_ICON_ONLY
To view the source code for com.vaadin.ui.themes ValoTheme BUTTON_ICON_ONLY.
Click Source Link
From source file:com.saax.gestorweb.presenter.ChatPresenter.java
/** * Cria botao para download de anexo/*from w w w. ja v a2s . co m*/ */ private Button buildButtonDownload(Anexo anexos) { Button exportar = new Button(); exportar.setIcon(FontAwesome.DOWNLOAD); exportar.addStyleName(ValoTheme.BUTTON_ICON_ONLY); exportar.addStyleName(ValoTheme.BUTTON_BORDERLESS); FileDownloader fd = new FileDownloader(new FileResource(new File(anexos.getCaminhoCompleto()))); fd.extend(exportar); return exportar; }
From source file:com.swifta.mats.web.usermanagement.UserDetailsModule.java
private HorizontalLayout setDetailsForm(String strUID, String strAction) { cDetailsAndOperations = new HorizontalLayout(); cDetailsAndOperations.setSizeUndefined(); cUPersonalDetails = new FormLayout(); cUPersonalDetails.setMargin(false);//from w ww . ja v a 2 s . co m cUPersonalDetails.setSpacing(false); cUPersonalDetails.setStyleName("frm_details_personal_info"); cUPersonalDetails.setSizeUndefined(); cDetailsAndOperations.addComponent(cUPersonalDetails); arrLAllFormFields = new ArrayList<Object>(); final String btnEditId = "edit"; arrLAllEditableFields = new ArrayList<Object>(); arrLTfEditableVals = new ArrayList<String>(); final Button btnEdit = new Button(); btnEdit.setId(btnEditId); btnEdit.setIcon(FontAwesome.EDIT); btnEdit.setStyleName(ValoTheme.BUTTON_ICON_ONLY); btnEdit.setStyleName("btn_link"); btnEdit.setVisible(false); final Button btnCancel = new Button(); btnCancel.setId(btnEditId); btnCancel.setIcon(FontAwesome.UNDO); btnCancel.setStyleName(ValoTheme.BUTTON_ICON_ONLY); btnCancel.setStyleName("btn_link"); btnCancel.setVisible(false); cBtnEditCancel = new HorizontalLayout(); cBtnEditCancel.setSizeUndefined(); cBtnEditCancel.addComponent(btnEdit); setData(strUID, strAction); return cDetailsAndOperations; }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java
private void buildContactInfo() { contactInfo = new ComboBox(); contactInfo.setContainerDataSource(containerContacts); contactInfo.setTextInputAllowed(false); contactInfo.setInputPrompt("Seleccione un contacto..."); contactInfo.setWidth("100%"); rootLayout.addComponent(contactInfo); contactInfoDetails = new Button(FontAwesome.PHONE); contactInfoDetails.addStyleName(ValoTheme.BUTTON_ICON_ONLY); contactInfoDetails.addClickListener(new Button.ClickListener() { @Override/*from ww w .jav a2 s.com*/ public void buttonClick(Button.ClickEvent event) { if (appointment.getContactInfo() != null) { Notification.show("Funcionalidad en desarrollo.", Notification.Type.ASSISTIVE_NOTIFICATION); //customerView.open(appointment.getCustomer()); } } }); HorizontalLayout wrapper = new HorizontalLayout(); wrapper.setCaption("Contacto"); wrapper.addComponent(contactInfo); wrapper.addComponent(contactInfoDetails); wrapper.setWidth("100%"); wrapper.setExpandRatio(contactInfo, 1); rootLayout.addComponent(wrapper); }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java
private void buildAddress() { address = new ComboBox(); address.setContainerDataSource(containerAddresses); address.setTextInputAllowed(false);//ww w . j a v a 2 s . c om address.setInputPrompt("Seleccione una direccin..."); address.setWidth("100%"); rootLayout.addComponent(address); addressDetails = new Button(FontAwesome.MAP_MARKER); addressDetails.addStyleName(ValoTheme.BUTTON_ICON_ONLY); addressDetails.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { if (appointment.getAddress() != null) { Notification.show("Funcionalidad en desarrollo.", Notification.Type.ASSISTIVE_NOTIFICATION); //customerView.open(appointment.getCustomer()); } } }); HorizontalLayout wrapper = new HorizontalLayout(); wrapper.setCaption("Direccin"); wrapper.addComponent(address); wrapper.addComponent(addressDetails); wrapper.setWidth("100%"); wrapper.setExpandRatio(address, 1); rootLayout.addComponent(wrapper); }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java
private void buildCustomer() { customer = new ComboBox(); customer.setContainerDataSource(containerCustomers); customer.setFilteringMode(FilteringMode.CONTAINS); customer.setInputPrompt("Seleccione un cliente..."); customer.setWidth("100%"); //<editor-fold defaultstate="collapsed" desc="Adjust ContactInfo and Addresses according to the selected Customer"> customer.addValueChangeListener(new ValueChangeListener() { @Override//from w w w . ja v a 2 s . c om public void valueChange(Property.ValueChangeEvent event) { updateCustomerCombos((CustomerCRM) event.getProperty().getValue()); } private void updateCustomerCombos(CustomerCRM customerCRM) { if (customerCRM != null) { containerAddresses.removeAllItems(); address.setValue(null); containerAddresses.addAll(customerCRMService.find(customerCRM.getId()).getAddressList()); if (containerAddresses.size() > 0) { address.select(containerAddresses.getIdByIndex(0)); } containerContacts.removeAllItems(); contactInfo.setValue(null); containerContacts.addAll(customerCRMService.find(customerCRM.getId()).getContactInfoList()); if (containerContacts.size() > 0) { contactInfo.select(containerContacts.getIdByIndex(0)); } } else { containerAddresses.removeAllItems(); address.setValue(null); containerContacts.removeAllItems(); contactInfo.setValue(null); } } }); //</editor-fold> customerDetails = new Button(FontAwesome.EYE); customerDetails.addStyleName(ValoTheme.BUTTON_ICON_ONLY); customerDetails.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { if (appointment.getCustomer() != null) { customerView.open(appointment.getCustomer()); } } }); HorizontalLayout customerWrapper = new HorizontalLayout(); customerWrapper.setCaption("Cliente"); customerWrapper.addComponent(customer); customerWrapper.addComponent(customerDetails); customerWrapper.setWidth("100%"); customerWrapper.setExpandRatio(customer, 1); rootLayout.addComponent(customerWrapper); //<editor-fold defaultstate="collapsed" desc="Antiguo buscador de clientes"> // Button searchCustomerBtn = new Button("Busca!"); // searchCustomerBtn.addClickListener(new Button.ClickListener() { // // @Override // public void buttonClick(Button.ClickEvent event) { // CustomerFinderDialogWindow dlgWin = new CustomerFinderDialogWindow(appointment.getCustomer(), customerCRMService){ // // @Override // protected void onButtonCancelClicked() { // this.close(); // } // // @Override // protected void onButtonOKClicked() { // //appointment.setCustomer(this.getSelectedCustomer()); // customer.setValue(this.getSelectedCustomer()); // //updateCustomerCombos(appointment.getCustomer()); // this.close(); // } // // // // }; // UI.getCurrent().addWindow(dlgWin); // dlgWin.focus(); // } // }); // rootLayout.addComponent(searchCustomerBtn); //</editor-fold> }
From source file:io.github.jikuja.vaadin_yamapa.ui.views.PoiMap.java
License:Creative Commons License
private void setupLocationButton() { locate.addStyleName("locatebutton"); locate.setIcon(FontAwesome.CROSSHAIRS); locate.addStyleName(ValoTheme.BUTTON_LARGE); locate.addStyleName(ValoTheme.BUTTON_ICON_ONLY); locate.setDescription("Locate me"); locate.addClickListener(event -> { Notification.show("Attention", "No real geolocation support. Map center is used as coordinates", Notification.Type.HUMANIZED_MESSAGE); VaadinSession session = VaadinSession.getCurrent(); session.setAttribute("lat", map.getCenter().getLat()); session.setAttribute("lon", map.getCenter().getLon()); MyUI.getInstance().getMenu().updateButtons(); });/*from w w w. ja v a 2s.co m*/ }
From source file:io.github.jikuja.vaadin_yamapa.ui.views.PoiMap.java
License:Creative Commons License
private void setupCenterCrossHair() { Button helper = new Button(); helper.addStyleName("helper"); helper.setIcon(FontAwesome.CROSSHAIRS); helper.addStyleName(ValoTheme.BUTTON_BORDERLESS); helper.addStyleName(ValoTheme.BUTTON_ICON_ONLY); addComponent(helper);/*from w w w . java2 s .com*/ }
From source file:org.eclipse.hawkbit.ui.components.SPUIComponentProvider.java
License:Open Source License
/** * Get the style required./*from www. j a v a 2 s . com*/ * * @return String */ public static String getPinButtonStyle() { final StringBuilder pinStyle = new StringBuilder(ValoTheme.BUTTON_BORDERLESS_COLORED); pinStyle.append(' '); pinStyle.append(ValoTheme.BUTTON_SMALL); pinStyle.append(' '); pinStyle.append(ValoTheme.BUTTON_ICON_ONLY); pinStyle.append(' '); pinStyle.append("pin-icon"); return pinStyle.toString(); }
From source file:org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleLargeIconNoBorder.java
License:Open Source License
/** * {@inheritDoc}// w w w.j a v a 2 s . c o m */ @Override public Button decorate(Button button, String style, boolean setStyle, Resource icon) { button.addStyleName(ValoTheme.BUTTON_LARGE); button.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); button.addStyleName(ValoTheme.BUTTON_ICON_ONLY); if (setStyle && style != null) { button.addStyleName(style); } button.setWidthUndefined(); // Set icon if (null != icon) { button.setIcon(icon); } return button; }
From source file:org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleNoBorder.java
License:Open Source License
/** * Decorate Button and return./*from w w w . j av a2 s. co m*/ * * @param button * as Button * @param style * as String * @param setStyle * as String * @param icon * as resource * @return Button */ @Override public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) { if (style != null && setStyle) { button.addStyleName(style); } button.addStyleName(ValoTheme.BUTTON_BORDERLESS); if (icon != null) { button.addStyleName(ValoTheme.BUTTON_ICON_ONLY); button.addStyleName("button-no-border"); button.setIcon(icon); } return button; }