Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.Label


   
    VerticalPanel verticalPanel = new VerticalPanel();
    initWidget(verticalPanel);
    verticalPanel.setSize("330px", "143px");
   
    final Label lblProfesionalSalud_1 = new Label("Profesional Salud");
    lblProfesionalSalud_1.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    lblProfesionalSalud_1.setStyleName("lztitulo-seccion");
    verticalPanel.add(lblProfesionalSalud_1);
   
    FlexTable flexTable = new FlexTable();
    flexTable.setStyleName("tabla-general");
   
    verticalPanel.add(flexTable);
    flexTable.setBorderWidth(0);
    flexTable.setSize("500", "");
    /*
     *
     */
    Label lblRutProfesional = new Label("Rut Profesional");
    flexTable.setWidget(0, 0, lblRutProfesional);
    flexTable.getCellFormatter().setWidth(0, 0, "150px");
    flexTable.getCellFormatter().setHeight(0, 0, "15px");
    flexTable.getCellFormatter().setStyleName(0, 0, "celdas-destacadas");
    textBoxRUN.addBlurHandler(new BlurHandler() {
      public void onBlur(BlurEvent event) {
        String RUT = formatearRUT(textBoxRUN.getText());
        textBoxRUN.setText(RUT);
      }
    });
   
 
    textBoxRUN.addKeyPressHandler(new KeyPressHandler() {
      public void onKeyPress(KeyPressEvent event) {
        if (!(Character.isDigit(event.getCharCode())
            || event.getCharCode()=='K'
            || event.getCharCode()=='k'
            || event.getCharCode()=='.'
            || event.getCharCode()=='-'
              || event.getCharCode()==8
              )) {
                      ((TextBox) event.getSource()).cancelKey();
                 }
        if (event.getCharCode()== 13)
          findProfesional();
       
      }
    });
   
    textBoxRUN.setMaxLength(12);
    textBoxRUN.setVisibleLength(12);
    flexTable.setWidget(0, 1, textBoxRUN);
    flexTable.getCellFormatter().setWidth(0, 1, "200px");
    flexTable.getCellFormatter().setHeight(0, 1, "15px");
    flexTable.getCellFormatter().setStyleName(0, 1, "celdas-no-destacada");
   
    Button buttonBuscar = new Button("New button");
    buttonBuscar.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        findProfesional();
      }
    });
    buttonBuscar.setHeight("28");
    buttonBuscar.setText("Buscar");
    flexTable.setWidget(0, 2, buttonBuscar);
   
    /*
     * Nombre Profesional
     */
    Label lblProfesionalSalud = new Label("Nombre");
    flexTable.setWidget(1, 0, lblProfesionalSalud);
    flexTable.getCellFormatter().setWidth(1, 0, "150px");
    flexTable.getCellFormatter().setHeight(1, 0, "15px");
    flexTable.getCellFormatter().setStyleName(1, 0, "celdas-destacadas");
   
    //Resultado Nombre Profesional
   
    flexTable.setWidget(1, 1, labelResultadoNombreProfesional);
    flexTable.getCellFormatter().setWidth(1, 1, "100px");
    flexTable.getCellFormatter().setHeight(1, 1, "15px");
    flexTable.getCellFormatter().setStyleName(1, 1, "celdas-no-destacada");
    Label lblEspecialidad = new Label("Especialidad");
    flexTable.setWidget(2, 0, lblEspecialidad);
    flexTable.getCellFormatter().setWidth(2, 0, "150px");
    flexTable.getCellFormatter().setHeight(2, 0, "15px");
    flexTable.getCellFormatter().setStyleName(2, 0, "celdas-destacadas");
   
   
    //VALORES ESPECIALIDAD
   
    listBoxEspecialidad.setSelectedIndex(0);
    listBoxEspecialidad.addItem("Sin Valor","0");
    listBoxEspecialidad.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
//        Window.alert(listBoxEspecialidad.getValue(listBoxEspecialidad.getSelectedIndex()));
        findPoliclinico(Integer.parseInt(listBoxEspecialidad.getValue(listBoxEspecialidad.getSelectedIndex())));
        InstanciaGrilla.find("0");
      }
    });
   
    flexTable.setWidget(2, 1, listBoxEspecialidad);
    flexTable.getCellFormatter().setWidth(2, 1, "100px");
    flexTable.getCellFormatter().setHeight(2, 1, "15px");
    flexTable.getCellFormatter().setStyleName(2, 1, "celdas-no-destacada");
   
   
    /*
     *
     */
    Label labelPoliclinico = new Label("PoliCl\u00EDnico");
    flexTable.setWidget(3, 0, labelPoliclinico);
   
    flexTable.getCellFormatter().setWidth(3, 0, "150px");
    flexTable.getCellFormatter().setHeight(3, 0, "15px");
    flexTable.getCellFormatter().setStyleName(3, 0, "celdas-destacadas");
View Full Code Here


    RootPanel rootPanel = RootPanel.get();   
    VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.setStyleName("tableEntryPoint");
    rootPanel.add(verticalPanel, 10, 10);
    verticalPanel.setSize("502px", "171px");
    Label lblAsignarBloque = new Label("ReAsignar Horario Medico");
    lblAsignarBloque.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    lblAsignarBloque.setStyleName("lztitulo-formulario");
    verticalPanel.add(lblAsignarBloque);
   
    Button btnIngresarRegistro = new Button("Ingresar Registro");
    /*
     * Example event button IngresarRegistro
View Full Code Here

          dialogContents.setStyleName("tabla-general");    
          dialogContents.setSpacing(4);
          dialogBox.setWidget(dialogContents);
          // Llamada a componente
          IngresarProfesional ingresarProfesional = new IngresarProfesional();
          dialogContents.add(new Label("Ingreso de Profesional"));
          dialogContents.add(ingresarProfesional);
          /*
           * Botones
           * Two button Example
           */
 
View Full Code Here

      public void onSuccess(ExternalOntologyInfo ontologyInfo) {
        String error = ontologyInfo.getError();
        if (error != null) {
          Orr.log("calling getExternalOntologyInfo ... error=" + error);
          popup.setWidget(new Label(error));
          Window.alert("Error while trying to load '" +ontologyUri+ "':\n\n" + error);
        }
        else {
          Orr.log("calling getExternalOntologyInfo ... success");
          popup.setWidget(new HTML("Load complete"));
View Full Code Here

      String endTime = fmtHHMM.format(trafficCountRecord.getEndTime());
      String dayType = trafficCountRecord.getDayType();
      String tag = trafficCountRecord.getTag();
     
      // create labels for each attribute we show in the table
      Label dateLabel = new Label(date);
      dateLabel.setStyleName(style.record());
      dateLabel.addStyleName(style.clickable());
      dateLabel.addClickHandler(new ClickHandler() {
       
        @Override
        public void onClick(ClickEvent event) {
          eventBus.fireEvent(new EditTrafficCountRecordEvent(trafficCountRecord));
        }
      });
      Label startTimeLabel = new Label(startTime);
      startTimeLabel.setStyleName(style.record());
     
      Label endTimeLabel = new Label(endTime);
      endTimeLabel.setStyleName(style.record());
     
      Label dayTypeLabel = new Label(dayType);
      dayTypeLabel.setStyleName(style.record());
     
      Label tagLabel = new Label(tag);
      tagLabel.setStyleName(style.record());
     
     
      int row = i + 1; // 1-index to account for column headers
      trafficCountRecordsTable.setWidget(row, 0, cb);
      trafficCountRecordsTable.getCellFormatter().setWidth(row, 0, "20px");
View Full Code Here

    // option -> separator
    private Map<String,String> optionSeparatorMap= new HashMap<String,String>();
   
    SeparatorPanel() {
      super();
      this.add(new Label("Separator:"));
      String[] separators = {
          // label,         separator
          "Comma (,)",        ",",
          "Semi-colon (;)",   ";",
          "Tab",              "\t",
View Full Code Here

    tagsTable.clear();
       
    for (int i = 0; i < tags.size(); i++) {
      final TagDetails tagDetails = tags.get(i);
     
      Label name = new Label(tagDetails.getName());
      name.addStyleName(style.clickable());
      name.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          resetRightPane();
          currentTagDetails = tagDetails;
          getSpeedDistributionAggregateByDayTypeReport(tagDetails);
View Full Code Here

     
      int column = 0;
      ArrayList thisRow = (ArrayList) iterator.next();
      for (Iterator iter = thisRow.iterator(); iter.hasNext();) {
        String value = (String) iter.next();
        Label l = new Label(value);
        if( column == 0 || column == 1 )
        {
          l.setStyleName(style.dayType());
        } else {
          if( !l.getText().equalsIgnoreCase("0"))
          {
            doubleValue = Double.parseDouble(l.getText());
            l.setText(NumberFormat.getFormat("#0.00000").format(doubleValue)); // reformat double values to
          }
          l.setStyleName(style.cellHeaderDouble());
        }
        reportTable.setWidget(row, column, l);
        column++;
      }
     
View Full Code Here

     
      if ( detail.loadedValue.equals(detail.registeredValue) ) {
        table.getFlexCellFormatter().setColSpan(row, 1, 2);
        table.getFlexCellFormatter().setAlignment(row, 1,
            HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
        table.setWidget(row, 1, new Label(detail.loadedValue));
      }
      else {
        if ( detail.loadedValue.length() > 0 && detail.registeredValue.length() > 0 ) {
          // non-empty, different values:
          propLabel.setHTML(DIFF_MARK +lbl);
        }
       
        table.getFlexCellFormatter().setAlignment(row, 1,
            HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
        table.setWidget(row, 1, new Label(detail.loadedValue));
       
        table.getFlexCellFormatter().setAlignment(row, 2,
            HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
        table.setWidget(row, 2, new Label(detail.registeredValue));
      }
     
      row++;
    }
    VerticalPanel vp = new VerticalPanel();
View Full Code Here

   
  }
 
  private void setLabelsAndTextBoxes()
  {
    dateLabel = new Label("Date");
    dayTypeLabel = new Label("Day type");
    startTimeLabel = new Label("Start time");
    startTimeLabel.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        timeHelper.center();
        timeHelper.show();
      }
    });
    startTimeLabel.setStylePrimaryName(style.clickable());
   
    endTimeLabel = new Label("End time");
    endTimeLabel.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        timeHelper.center();
        timeHelper.show();
      }
    });
    endTimeLabel.setStylePrimaryName(style.clickable());
   
    tagLabel = new Label("Tag");
    W2Label = new Label("Two-wheeler (W2)");
    W3Label = new Label("Three-wheeler (W3)");
    PCLabel = new Label("Passenger car (PC)");
    TXLabel = new Label("Taxi (TX) ");
    LDVLabel = new Label("Pickups, vans, SUVs (LDV)");
    LDCLabel = new Label("Light-duty commercial (LDC)");
    HDCLabel = new Label("Heavy-duty commercial (HDC)");
    MDBLabel = new Label("Medium-duty minibuses (MDB)");
    HDBLabel = new Label("Heavy-duty buses (HDB)")
   
    date = new TextBox();
   
    // force them to use the calendar widget
    // otherwise the startTime/endTime functions don't work
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.Label

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.