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

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


    for (Map.Entry<String, Widget> e : typeStringToNavLinkTarget.entrySet()) {
      InlineLabel link = new InlineLabel(e.getKey());
      link.setStylePrimaryName(Resources.INSTANCE.css().clickable());
     
      if (navLinks.getWidgetCount() > 1) {
        navLinks.add(new InlineHTML("&nbsp;|&nbsp;"));   // separator
      }
      navLinks.add(link);
     
      final Widget linkTarget = e.getValue();
      link.addClickHandler(new ClickHandler() {
View Full Code Here


        NarrativeContentItem narrative = (NarrativeContentItem)linkedNarrative;
       
        FlowPanel row = new FlowPanel();
        InlineLabel narrativeHeadline = new InlineLabel(narrative.getHeadline());
        narrativeHeadline.addStyleName(Resources.INSTANCE.css().clickable());
        InlineHTML narrativeType = new InlineHTML("&nbsp;-&nbsp;"
            + narrative.getNarrativeType().toString());
        narrativeType.addStyleName("greyFont");
        row.add(narrativeHeadline);
        row.add(narrativeType);
       
        FocusPanel clickableRow = new FocusPanel();
        clickableRow.add(row);
View Full Code Here

                   // We can set the id of a widget by accessing its Element
                   closeAddButton.getElement().setId("closeButton0");
                   VerticalPanel dialogChangeVPanel = new VerticalPanel();
                   dialogChangeVPanel.addStyleName("dialogVPanel");
         
                   InlineHTML tituloLabel = new InlineHTML("T\u00edtulo original:");
                   InlineHTML tituloEspLabel = new InlineHTML("T\u00edtulo espa\u00f1ol:");
                   InlineHTML anioLabel = new InlineHTML("A\u00f1o:");
                   InlineHTML clasificacionLabel = new InlineHTML("Clasificaci\u00F3n:");
                   InlineHTML directorLabel = new InlineHTML("Director:");
                   InlineHTML productoraLabel = new InlineHTML("Productora:");
                   InlineHTML actoresLabel = new InlineHTML("Actores:");
                   InlineHTML requerido1Label = new InlineHTML("*");
                   InlineHTML requerido2Label = new InlineHTML("*");
                   InlineHTML requerido3Label = new InlineHTML("*");
                  
                   Grid formulario = new Grid(11, 7);
                   InlineHTML tituloPopUp = new InlineHTML("Agregar Pel\u00edcula:")
                   formulario.setWidget(1, 2, tituloLabel);
                  formulario.setWidget(1, 4, tituloPelicula);
                  formulario.setWidget(1, 3, requerido1Label);
                  formulario.setWidget(2, 2, tituloEspLabel);
                  formulario.setWidget(2, 4, tituloEspPelicula);
                  formulario.setWidget(3, 2, anioLabel);
                  formulario.setWidget(3, 4, anioPelicula);
                  formulario.setWidget(3, 3, requerido2Label);
                  formulario.setWidget(4, 2, clasificacionLabel);
                  formulario.setWidget(4, 4, clasificacionPelicula);
                  formulario.setWidget(5, 2, directorLabel);
                  formulario.setWidget(5, 4, directorPelicula);
                  formulario.setWidget(6, 2, productoraLabel);
                  formulario.setWidget(6, 4, productoraPelicula);
                  formulario.setWidget(6, 3, requerido3Label);
                  formulario.setWidget(7, 2, actoresLabel);
                  formulario.setWidget(7, 4, actorPelicula);
                  formulario.setWidget(9, 2, addButton);
                  formulario.setWidget(9, 4, closeAddButton);
                 
              
                   dialogChangeVPanel.add(tituloPopUp);
                   dialogChangeVPanel.add(formulario);
                   listPopUp.setWidget(dialogChangeVPanel);
                   listPopUp.center();                    

                   // Add a handler
                   addButton.addClickHandler(new ClickHandler() {
                          @Override
                          public void onClick(ClickEvent event) {
                            MyUserServiceAsync service = (MyUserServiceAsync) GWT
                                .create(MyUserService.class);
                            ServiceDefTarget serviceDef = (ServiceDefTarget) service;
                            serviceDef.setServiceEntryPoint(GWT.getModuleBaseURL()
                                + "userService");
                        final DialogBox dialogBox = new DialogBox();
                        dialogBox.setAnimationEnabled(true);
                        final Button closeButton = new Button("Close");
                        // We can set the id of a widget by accessing its Element
                        closeButton.getElement().setId("closeButton");
                        final HTML serverResponseLabel = new HTML();
                       
                        String directorString = "";
                        String clasifString = "";
                        if (directorPelicula.getItemCount() > 0){
                          directorString = directorPelicula.getValue(directorPelicula.getSelectedIndex());
                        }
                        if (clasificacionPelicula.getItemCount() > 0){
                          clasifString = clasificacionPelicula.getValue(clasificacionPelicula.getSelectedIndex());
                        }
                       
                        VerticalPanel dialogVPanel = new VerticalPanel();
                        dialogVPanel.add(serverResponseLabel);
                        dialogVPanel.add(closeButton);
                        dialogBox.setWidget(dialogVPanel);
                       
                        if ((VerificadorDeCampos.isValidName(tituloPelicula.getText()))&&(VerificadorDeCampos.isValidNumber(anioPelicula.getText()))){

                          final PeliculaDTO pelDTO = new PeliculaDTO(tituloPelicula.getText(),tituloEspPelicula.getText(), Integer.valueOf(anioPelicula.getValue()),clasifString,directorString,productoraPelicula.getValue(productoraPelicula.getSelectedIndex()),getSelectedItems(actorPelicula));
                              service.agregarPelicula(pelDTO, new AsyncCallback<String>() {
                            public void onFailure(Throwable caught) {
                              Window.alert(caught.getMessage());
                            }
                 
                            public void onSuccess(String result) {
                              actualizarListaPeliculas();
                              listPopUp.hide();
                              serverResponseLabel.setHTML(result);
                              dialogBox.center();
                              closeButton.setFocus(true);
                            }
                          });
                             
                        }else{
                          serverResponseLabel.setHTML("Debe verificar los campos.<br />- Asegurese de escribir todos los campos obligatorios.<br />- Asegurese de escribir los a\u00f1os de manera correcta");
                          dialogBox.center();
                          closeButton.setFocus(true);               
                        }                   

                       // Add a handler to close the DialogBox
                      closeButton.addClickHandler(new ClickHandler() {
                        public void onClick(ClickEvent event) {
                          dialogBox.hide();
                        }
                      });
                          }
                        });   
                  
                   // Add a handler to close the DialogBox
                   closeAddButton.addClickHandler(new ClickHandler() {
                  public void onClick(ClickEvent event) {
                    listPopUp.hide();
                  }
                })
                            
                  
               }else{
                
                
                 final DialogBox listPopUpError = new DialogBox();
                 listPopUpError.setAnimationEnabled(true);
                  final HTML errormsg = new HTML();
                  errormsg.setHTML("Debe tener al menos una Productora registrada");
                 final Button closeError = new Button("Ok");
                 VerticalPanel dialogChangeVPanel2 = new VerticalPanel();
                 dialogChangeVPanel2.addStyleName("dialogVPanel");
                 dialogChangeVPanel2.add(errormsg);
                 dialogChangeVPanel2.add(closeError);
                 listPopUpError.setWidget(dialogChangeVPanel2);
                  listPopUpError.center()
                 
                 
                  closeError.addClickHandler(new ClickHandler() {
                  public void onClick(ClickEvent event) {
                    listPopUpError.hide();
                  }
                })
                 
               }
             
                  } 
                }
                service.getProdList(productoraCallback);
       
          }
        });
   
        //------------- FIN PELICULAS ------------------------------
   
       
       
       
       
       
        //------------- PERSONAS ------------------------------
        btnAgregarPersona.addClickHandler(new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
             // Create the popup dialog box
             final DialogBox listPopUp = new DialogBox();
             listPopUp.setAnimationEnabled(true);
              final TextBox apellidoPersona = new TextBox();
              //apellidoPersona.setText("Apellido");
              final TextBox nombrePersona = new TextBox();
              //nombrePersona.setText("Nombre");
              final TextBox nacionalidadPersona = new TextBox();
              //nacionalidadPersona.setText("Nacionalidad");
            final Button addButton = new Button("Agregar");
             final Button closeAddButton = new Button("Cancelar");
             // We can set the id of a widget by accessing its Element
             closeAddButton.getElement().setId("closeButton0");
             VerticalPanel dialogChangeVPanel = new VerticalPanel();
             dialogChangeVPanel.addStyleName("dialogVPanel");
   
             InlineHTML apellidoLabel = new InlineHTML("Apellido:");
             InlineHTML nombreLabel = new InlineHTML("Nombre:");
             InlineHTML nacionalidadLabel = new InlineHTML("Nacionalidad:");
             InlineHTML requerido1Label = new InlineHTML("*");
             InlineHTML requerido2Label = new InlineHTML("*");

             Grid formulario = new Grid(7, 7);
             InlineHTML tituloPopUp = new InlineHTML("Agregar Persona:")
             formulario.setWidget(1, 2, apellidoLabel);
            formulario.setWidget(1, 4, apellidoPersona);
            formulario.setWidget(1, 3, requerido1Label);
            formulario.setWidget(2, 2, nombreLabel);
            formulario.setWidget(2, 4, nombrePersona);
            formulario.setWidget(2, 3, requerido2Label);
            formulario.setWidget(3, 2, nacionalidadLabel);
            formulario.setWidget(3, 4, nacionalidadPersona);
            formulario.setWidget(5, 2, addButton);
            formulario.setWidget(5, 4, closeAddButton);
            
             dialogChangeVPanel.add(tituloPopUp);
             dialogChangeVPanel.add(formulario);
             listPopUp.setWidget(dialogChangeVPanel);
             listPopUp.center();
            
           
           // Add a handler
             addButton.addClickHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                      MyUserServiceAsync service = (MyUserServiceAsync) GWT
                          .create(MyUserService.class);
                      ServiceDefTarget serviceDef = (ServiceDefTarget) service;
                      serviceDef.setServiceEntryPoint(GWT.getModuleBaseURL()
                          + "userService");
                  final DialogBox dialogBox = new DialogBox();
                  dialogBox.setAnimationEnabled(true);
                  final Button closeButton = new Button("Close");
                  // We can set the id of a widget by accessing its Element
                  closeButton.getElement().setId("closeButton");
                  final HTML serverResponseLabel = new HTML();
                  final PersonaDTO persDTO = new PersonaDTO(apellidoPersona.getText(),nombrePersona.getText(), nacionalidadPersona.getText());
                  VerticalPanel dialogVPanel = new VerticalPanel();
                  dialogVPanel.add(serverResponseLabel);
                  dialogVPanel.add(closeButton);
                  dialogBox.setWidget(dialogVPanel);
                 
                  List<String> lista = new ArrayList<String>();
                  lista.add(apellidoPersona.getText());
                  lista.add(nombrePersona.getText());
                 
                  if (VerificadorDeCampos.isValidCollectionName(lista)){
   
                        service.agregarPersona(persDTO, new AsyncCallback<String>() {
                      public void onFailure(Throwable caught) {
                        Window.alert(caught.getMessage());
                      }
           
                      public void onSuccess(String result) {
                        actualizarListaPersonas();
                        listPopUp.hide();
                        serverResponseLabel.setHTML(result);
                        dialogBox.center();
                        closeButton.setFocus(true);
                      }
                    });
                       
                  }else{
                    serverResponseLabel.setHTML("Debe verificar los campos.<br />- Asegurese de escribir todos los campos.<br />- Asegurese de escribir los a\u00f1os de manera correcta");
                    dialogBox.center();
                    closeButton.setFocus(true);               
                  }                   
         
                 // Add a handler to close the DialogBox
                closeButton.addClickHandler(new ClickHandler() {
                  public void onClick(ClickEvent event) {
                    dialogBox.hide();
                  }
                });
                    }
                  });   
            
             // Add a handler to close the DialogBox
             closeAddButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
              listPopUp.hide();
            }
          })
              }
            });
       
            //------------- FIN PERSONAS ------------------------------
       
           
           
             
       
            //------------- PRODUCTORA ------------------------------
              btnAgregarProductora.addClickHandler(new ClickHandler() {
                  @Override
                  public void onClick(ClickEvent event) {
                 // Create the popup dialog box
                 final DialogBox listPopUp = new DialogBox();
                 listPopUp.setAnimationEnabled(true);
                  final TextBox nombreProductora = new TextBox();
                  //nombreProductora.setText("Nombre Productora");
                  final TextBox paisProductora = new TextBox();
                  //paisProductora.setText("Pais");
                  final TextBox direccionProductora = new TextBox();
                  //direccionProductora.setText("Direccion");
                  final TextBox telProductora = new TextBox();
                  //telProductora.setText("Telefono");
                  final TextBox desdeProductora = new TextBox();
                  desdeProductora.setText("1900");
                final Button addButton = new Button("Agregar");
                 final Button closeAddButton = new Button("Cancelar");
                 // We can set the id of a widget by accessing its Element
                 closeAddButton.getElement().setId("closeButton0");
                 VerticalPanel dialogChangeVPanel = new VerticalPanel();
                 dialogChangeVPanel.addStyleName("dialogVPanel");
       
                 InlineHTML nombreLabel = new InlineHTML("Nombre:");
                 InlineHTML paisLabel = new InlineHTML("Pa\u00eds:");
                 InlineHTML direccionLabel = new InlineHTML("Direcci\u00F3n:");
                 InlineHTML telefonoLabel = new InlineHTML("Tel\u00e9fono:");
                 InlineHTML desdeLabel = new InlineHTML("Desde:");
                 InlineHTML requerido1Label = new InlineHTML("*");
                 InlineHTML requerido2Label = new InlineHTML("*");
                 InlineHTML requerido3Label = new InlineHTML("*");
                
                 Grid formulario = new Grid(9, 7);
                 InlineHTML tituloPopUp = new InlineHTML("Agregar Productora:")
                 formulario.setWidget(1, 2, nombreLabel);
                formulario.setWidget(1, 4, nombreProductora);
                formulario.setWidget(1, 3, requerido1Label);
                formulario.setWidget(2, 2, paisLabel);
                formulario.setWidget(2, 4, paisProductora);
                formulario.setWidget(2, 3, requerido2Label);
                formulario.setWidget(3, 2, direccionLabel);
                formulario.setWidget(3, 4, direccionProductora);
                formulario.setWidget(4, 2, telefonoLabel);
                formulario.setWidget(4, 4, telProductora);
                formulario.setWidget(5, 2, desdeLabel);
                formulario.setWidget(5, 4, desdeProductora);
                formulario.setWidget(5, 3, requerido3Label);
                formulario.setWidget(7, 2, addButton);
                formulario.setWidget(7, 4, closeAddButton);
                
                 dialogChangeVPanel.add(tituloPopUp);
                 dialogChangeVPanel.add(formulario);
                 listPopUp.setWidget(dialogChangeVPanel);
                 listPopUp.center();
       
               
                 // Add a handler
                 addButton.addClickHandler(new ClickHandler() {
                        @Override
                        public void onClick(ClickEvent event) {
                          MyUserServiceAsync service = (MyUserServiceAsync) GWT
                              .create(MyUserService.class);
                          ServiceDefTarget serviceDef = (ServiceDefTarget) service;
                          serviceDef.setServiceEntryPoint(GWT.getModuleBaseURL()
                              + "userService");
                      final DialogBox dialogBox = new DialogBox();
                      dialogBox.setAnimationEnabled(true);
                      final Button closeButton = new Button("Close");
                      // We can set the id of a widget by accessing its Element
                      closeButton.getElement().setId("closeButton");
                      final HTML serverResponseLabel = new HTML();
                      VerticalPanel dialogVPanel = new VerticalPanel();
                      dialogVPanel.add(serverResponseLabel);
                      dialogVPanel.add(closeButton);
                      dialogBox.setWidget(dialogVPanel);
                     
                      List<String> lista = new ArrayList<String>();
                      lista.add(nombreProductora.getText());
                      lista.add(paisProductora.getText());
       
                      if ((VerificadorDeCampos.isValidCollectionName(lista))&&(VerificadorDeCampos.isValidNumber(desdeProductora.getText()))){
       
                        final ProductoraDTO prodDTO = new ProductoraDTO(nombreProductora.getText(),paisProductora.getText(), direccionProductora.getText(), telProductora.getText(), Integer.valueOf(desdeProductora.getValue()));
                            service.agregarProductora(prodDTO, new AsyncCallback<String>() {
                          public void onFailure(Throwable caught) {
                            Window.alert(caught.getMessage());
                          }
               
                          public void onSuccess(String result) {
                            actualizarListaProductoras();
                            listPopUp.hide();
                            serverResponseLabel.setHTML(result);
                            dialogBox.center();
                            closeButton.setFocus(true);
                          }
                        });
                         
                      }else{
                        serverResponseLabel.setHTML("Debe verificar los campos.<br />- Asegurese de escribir todos los campos.<br />- Asegurese de escribir los a\u00f1os de manera correcta");
                        dialogBox.center();
                        closeButton.setFocus(true);               
                     
                     // Add a handler to close the DialogBox
                    closeButton.addClickHandler(new ClickHandler() {
                      public void onClick(ClickEvent event) {
                        dialogBox.hide();
                      }
                    });
                        }
                      });   
                
                 // Add a handler to close the DialogBox
                 closeAddButton.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                  listPopUp.hide();
                }
              })
                  }
                });
             
                  //------------- FIN PRODUCTORA ------------------------------
             
                 
                 
                  //------------- CLASIFICACION ------------------------------
                  btnAgregarClasificacion.addClickHandler(new ClickHandler() {
                        @Override
                        public void onClick(ClickEvent event) {
                       // Create the popup dialog box
                       final DialogBox listPopUp = new DialogBox();
                       listPopUp.setAnimationEnabled(true);
                        final TextBox detalleClasificacion = new TextBox();
                        //detalleClasificacion.setText("Detalle Clasificaci\u00F3n");
                      final Button addButton = new Button("Agregar");
                       final Button closeAddButton = new Button("Cancelar");
                       // We can set the id of a widget by accessing its Element
                       closeAddButton.getElement().setId("closeButton0");
                       InlineHTML detalleLabel = new InlineHTML("Detalle:");
                       InlineHTML requerido1Label = new InlineHTML("*");

                       Grid formulario = new Grid(5, 7);
                       InlineHTML tituloPopUp = new InlineHTML("Modificar Clasificaci\u00F3n:")
                       formulario.setWidget(1, 2, detalleLabel);
                      formulario.setWidget(1, 4, detalleClasificacion);
                      formulario.setWidget(1, 3, requerido1Label);
                      formulario.setWidget(3, 2, addButton);
                      formulario.setWidget(3, 4, closeAddButton);
View Full Code Here

     final Button closeChangeButton = new Button("Cerrar");

     VerticalPanel dialogChangeVPanel = new VerticalPanel();
     dialogChangeVPanel.addStyleName("dialogVPanel");

     InlineHTML tituloLabel = new InlineHTML("T\u00edtulo original:");
     InlineHTML tituloEspLabel = new InlineHTML("T\u00edtulo espa\u00f1ol:");
     InlineHTML anioLabel = new InlineHTML("A\u00f1o:");
     InlineHTML clasificacionLabel = new InlineHTML("Clasificaci\u00F3n:");
     InlineHTML directorLabel = new InlineHTML("Director:");
     InlineHTML productoraLabel = new InlineHTML("Productora:");
     InlineHTML actoresLabel = new InlineHTML("Actores:");
     InlineHTML requerido1Label = new InlineHTML("*");
     InlineHTML requerido2Label = new InlineHTML("*");
     InlineHTML requerido3Label = new InlineHTML("*");
    
     Grid formulario = new Grid(11, 7);
     InlineHTML tituloPopUp = new InlineHTML("Modificar Pel\u00edcula:")
     formulario.setWidget(1, 2, tituloLabel);
    formulario.setWidget(1, 4, tituloPelicula);
    formulario.setWidget(1, 3, requerido1Label);
    formulario.setWidget(2, 2, tituloEspLabel);
    formulario.setWidget(2, 4, tituloEspPelicula);
View Full Code Here

    final Button changeButton = new Button("Modificar");
     final Button closeChangeButton = new Button("Cerrar");
     VerticalPanel dialogChangeVPanel = new VerticalPanel();
     dialogChangeVPanel.addStyleName("dialogVPanel");

     InlineHTML apellidoLabel = new InlineHTML("Apellido:");
     InlineHTML nombreLabel = new InlineHTML("Nombre:");
     InlineHTML nacionalidadLabel = new InlineHTML("Nacionalidad:");
     InlineHTML requerido1Label = new InlineHTML("*");
     InlineHTML requerido2Label = new InlineHTML("*");

     Grid formulario = new Grid(7, 7);
     InlineHTML tituloPopUp = new InlineHTML("Agregar Persona:")
     formulario.setWidget(1, 2, apellidoLabel);
    formulario.setWidget(1, 4, apellidoPersona);
    formulario.setWidget(1, 3, requerido1Label);
    formulario.setWidget(2, 2, nombreLabel);
    formulario.setWidget(2, 4, nombrePersona);
View Full Code Here

    final Button changeButton = new Button("Modificar");
     final Button closeChangeButton = new Button("Cerrar");
     VerticalPanel dialogChangeVPanel = new VerticalPanel();
     dialogChangeVPanel.addStyleName("dialogVPanel");

     InlineHTML nombreLabel = new InlineHTML("Nombre:");
     InlineHTML paisLabel = new InlineHTML("Pa\u00eds:");
     InlineHTML direccionLabel = new InlineHTML("Direcci\u00F3n:");
     InlineHTML telefonoLabel = new InlineHTML("Tel\u00e9fono:");
     InlineHTML desdeLabel = new InlineHTML("Desde:");
     InlineHTML requerido1Label = new InlineHTML("*");
     InlineHTML requerido2Label = new InlineHTML("*");
     InlineHTML requerido3Label = new InlineHTML("*");
    
     Grid formulario = new Grid(9, 7);
     InlineHTML tituloPopUp = new InlineHTML("Agregar Productora:")
     formulario.setWidget(1, 2, nombreLabel);
    formulario.setWidget(1, 4, nombreProductora);
    formulario.setWidget(1, 3, requerido1Label);
    formulario.setWidget(2, 2, paisLabel);
    formulario.setWidget(2, 4, paisProductora);
View Full Code Here

      final TextBox newFirstField = new TextBox();
      newFirstField.setText(input);
    final Button changeButton = new Button("Modificar");
     final Button closeChangeButton = new Button("Cerrar");
    
     InlineHTML detalleLabel = new InlineHTML("Detalle:");   
     InlineHTML requerido1Label = new InlineHTML("*");

     Grid formulario = new Grid(5, 7);
     InlineHTML tituloPopUp = new InlineHTML("Modificar Clasificaci\u00F3n:")
     formulario.setWidget(1, 2, detalleLabel);
    formulario.setWidget(1, 4, newFirstField);
    formulario.setWidget(1, 3, requerido1Label);
    formulario.setWidget(3, 2, changeButton);
    formulario.setWidget(3, 4, closeChangeButton)
View Full Code Here

    private int nodeToMoveTo;
    private int pinValue;
    private int duration = 250;

    public PinWidget() {
        InlineHTML inlineHTML = ourUiBinder.createAndBindUi(this);
        initWidget(inlineHTML);

        initDragging();
    }
View Full Code Here


    @Override
    public void onClick(final ClickEvent event)
    {
        InlineHTML tagWidget = (InlineHTML) event.getSource();
        removeTag(tagWidget);
    }
View Full Code Here

    private void addTag(final Tag tag)
    {
        if (!tags.containsKey(tag.getId()))
        {
            InlineHTML tagWidget = new InlineHTML(TAG_TEMPLATE.tag(tag.getId(), tag.getName()));
            tagWidget.addClickHandler(this);
            tags.put(tag.getId(), tag);
            tagsPanel.add(tagWidget);
        }
    }
View Full Code Here

TOP

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

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.