Example usage for com.vaadin.server FontAwesome PHONE

List of usage examples for com.vaadin.server FontAwesome PHONE

Introduction

In this page you can find the example usage for com.vaadin.server FontAwesome PHONE.

Prototype

FontAwesome PHONE

To view the source code for com.vaadin.server FontAwesome PHONE.

Click Source Link

Usage

From source file:com.anphat.customer.controller.CustomerContactController.java

private void addButtonAddContactOnTblTermInfo(CustomPageTableFilter tbl) {
    tbl.addGeneratedColumn("btnAddContact", new CustomTable.ColumnGenerator() {
        @Override/*from  w  ww.j a v a  2 s  .  co m*/
        public Object generateCell(CustomTable source, Object itemId, Object columnId) {
            TermInformationDTO term = (TermInformationDTO) itemId;
            CustomerContactDTO contactDTO = term.convert2CustomerContact();
            StaffDTO staff = (StaffDTO) VaadinSession.getCurrent().getAttribute("staff");
            contactDTO.setStaffCode(staff.getCode());
            Button btnAdd = new Button(FontAwesome.PHONE);
            btnAdd.addStyleName(Runo.BUTTON_LINK);
            addBtnAddContactClickListener(btnAdd, contactDTO);
            return btnAdd;
        }
    });
}

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  www  .  j  av  a 2 s .  co m
        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.incomingAppointments.IncomingAppointments.java

public AppointmentPreview(Appointment app) {
    this.appointment = app;
    this.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);

    HorizontalLayout hl = new HorizontalLayout();
    hl.setSpacing(false);//from   w  w  w  . ja v a2s.c  o  m

    SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
    String scheduleText = sdf.format(app.getProgramDateStart().getTime());
    if (app.getTimeLapse() != null) {
        scheduleText += " (" + app.getTimeLapse().toString() + ")";
    }
    schedule = new Button(scheduleText);
    schedule.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            onAppointmentClicked(appointment);
        }
    });
    schedule.addStyleName(ValoTheme.BUTTON_LINK);
    schedule.setWidth("100%");
    hl.addComponent(schedule);
    //type = new Label();
    if (app.getAppointmentType().getCode().equals("VIS")) {
        schedule.setIcon(FontAwesome.HOME);
    }
    if (app.getAppointmentType().getCode().equals("COM")) {
        schedule.setIcon(FontAwesome.PHONE);
    }
    if (app.getAppointmentType().getCode().equals("CON")) {
        schedule.setIcon(FontAwesome.USER);
    }
    //hl.addComponent(type);
    //hl.setComponentAlignment(type, Alignment.MIDDLE_RIGHT);
    hl.setExpandRatio(schedule, 1);
    this.addComponent(hl);

    if (app.getAppointmentType().getCode().equals("VIS") || app.getAppointmentType().getCode().equals("COM")) {
        customer = new Label(app.getCustomer().toString());
        //customer.addStyleName(ValoTheme.LABEL_H3);
        customer.setWidth("100%");
        this.addComponent(customer);
    }

    if ("VIS".equals(app.getAppointmentType().getCode())) {
        address = new Label(Objects.toString(app.getAddress(), "Direccin no disponible"));
        //address.addStyleName(ValoTheme.LABEL_H3);
        address.setWidth("100%");
        this.addComponent(address);
    }
    if ("CON".equals(app.getAppointmentType().getCode())) {
        contact = new Label(app.getContactNotes());
        //address.addStyleName(ValoTheme.LABEL_H3);
        contact.setWidth("100%");
        this.addComponent(contact);
    }

}