Package org.codehaus.enunciate.samples.petclinic.client.schema

Examples of org.codehaus.enunciate.samples.petclinic.client.schema.Vet


        grid.getCellFormatter().setHorizontalAlignment(0, 1, HasAlignment.ALIGN_CENTER);
        grid.getRowFormatter().setStyleName(0, "clinic-tables-header");
        int row = 1;
        Iterator<Vet> vetsIt = collection.iterator();
        while (vetsIt.hasNext()) {
          final Vet vet = vetsIt.next();
          final Label details = new Label(vet.getFirstName() + " " + vet.getLastName());
          details.addClickListener(new ClickListener() {
            public void onClick(Widget widget) {
              final DialogBox detailsPanel = new DialogBox(true);
              String html = "Id: " + vet.getId()
                + "<br/>First Name: " + vet.getFirstName()
                + "<br/>Last Name: " + vet.getLastName()
                + "<br/>Phone: " + vet.getTelephone()
                + "<br/>Specialties: " ;
              Iterator specialtiesIt = vet.getSpecialties().iterator();
              while (specialtiesIt.hasNext()) {
                Specialty specialty = (Specialty) specialtiesIt.next();
                html = html + specialty.getName();
                if (specialtiesIt.hasNext()) {
                  html += ",";
                }
              }
              HTML htmlValue = new HTML(html);
              htmlValue.setHorizontalAlignment(HasAlignment.ALIGN_LEFT);
              detailsPanel.setWidget(htmlValue);
              detailsPanel.setTitle(vet.getFirstName() + " " + vet.getLastName());
              detailsPanel.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
                public void setPosition(int offsetWidth, int offsetHeight) {
                  detailsPanel.setPopupPosition(details.getAbsoluteLeft(), details.getAbsoluteTop());
                }
              });
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.samples.petclinic.client.schema.Vet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.