Package com.vaadin.ui

Examples of com.vaadin.ui.TextArea


  protected void initLayoutClickListener() {
    addListener(new LayoutClickListener() {
      public void layoutClick(LayoutClickEvent event) {
        if (event.getClickedComponent() != null && event.getClickedComponent().equals(descriptionLabel)) {
          // textarea
          final TextArea descriptionTextArea = new TextArea();
          descriptionTextArea.setWidth(100, UNITS_PERCENTAGE);
          descriptionTextArea.setValue(task.getDescription());
          editLayout.addComponent(descriptionTextArea);
         
          // ok button
          Button okButton = new Button(i18nManager.getMessage(Messages.BUTTON_OK));
          editLayout.addComponent(okButton);
          editLayout.setComponentAlignment(okButton, Alignment.BOTTOM_RIGHT);
         
          // replace
          replaceComponent(descriptionLabel, editLayout);
         
          // When OK is clicked -> update task data + ui
          okButton.addListener(new ClickListener() {
            public void buttonClick(ClickEvent event) {
              // Update data
              task.setDescription(descriptionTextArea.getValue().toString());
              taskService.saveTask(task);
             
              // Update UI
              descriptionLabel.setValue(task.getDescription());
              replaceComponent(editLayout, descriptionLabel);
View Full Code Here


   
    addField("url", urlField);
  }

  protected void initDescription() {
    TextArea descriptionField = new TextArea(i18nManager.getMessage(Messages.RELATED_CONTENT_DESCRIPTION));
    descriptionField.setWidth(100, UNITS_PERCENTAGE);
    descriptionField.setHeight(100, UNITS_PIXELS);
    addField("description", descriptionField);
  }
View Full Code Here

    nameField.setRequired(true);
    nameField.setRequiredError(i18nManager.getMessage(Messages.TASK_NAME_REQUIRED));
    form.addField("name", nameField);
   
    // description
    descriptionArea = new TextArea(i18nManager.getMessage(Messages.TASK_DESCRIPTION));
    descriptionArea.setColumns(25);
    form.addField("description", descriptionArea);
   
    // duedate
    dueDateField = new DateField(i18nManager.getMessage(Messages.TASK_DUEDATE));
View Full Code Here

    }
    return name;
  }

  protected void initDescription() {
    TextArea descriptionField = new TextArea(i18nManager.getMessage(Messages.RELATED_CONTENT_DESCRIPTION));
    descriptionField.setWidth(100, UNITS_PERCENTAGE);
    descriptionField.setHeight(50, UNITS_PIXELS);
    form.addField("description", descriptionField);
  }
View Full Code Here

    nameField.setRequired(true);
    nameField.setRequiredError(i18nManager.getMessage(Messages.TASK_NAME_REQUIRED));
    form.addField("name", nameField);
   
    // description
    descriptionArea = new TextArea(i18nManager.getMessage(Messages.TASK_DESCRIPTION));
    descriptionArea.setColumns(25);
    form.addField("description", descriptionArea);
   
    // duedate
    dueDateField = new DateField(i18nManager.getMessage(Messages.TASK_DUEDATE));
View Full Code Here

   
    addField("url", urlField);
  }

  protected void initDescription() {
    TextArea descriptionField = new TextArea(i18nManager.getMessage(Messages.RELATED_CONTENT_DESCRIPTION));
    descriptionField.setWidth(100, UNITS_PERCENTAGE);
    descriptionField.setHeight(100, UNITS_PIXELS);
    addField("description", descriptionField);
  }
View Full Code Here

    }
    return name;
  }

  protected void initDescription() {
    TextArea descriptionField = new TextArea(i18nManager.getMessage(Messages.RELATED_CONTENT_DESCRIPTION));
    descriptionField.setWidth(100, UNITS_PERCENTAGE);
    descriptionField.setHeight(50, UNITS_PIXELS);
    form.addField("description", descriptionField);
  }
View Full Code Here

          // layout for textarea + ok button
          final VerticalLayout editLayout = new VerticalLayout();
          editLayout.setSpacing(true);
         
          // textarea
          final TextArea descriptionTextArea = new TextArea();
          descriptionTextArea.setNullRepresentation("");
          descriptionTextArea.setWidth(100, UNITS_PERCENTAGE);
          descriptionTextArea.setValue(task.getDescription());
          editLayout.addComponent(descriptionTextArea);
         
          // ok button
          Button okButton = new Button(i18nManager.getMessage(Messages.BUTTON_OK));
          editLayout.addComponent(okButton);
          editLayout.setComponentAlignment(okButton, Alignment.BOTTOM_RIGHT);
         
          // replace
          descriptionLayout.replaceComponent(descriptionLabel, editLayout);
         
          // When OK is clicked -> update task data + ui
          okButton.addListener(new ClickListener() {
            public void buttonClick(ClickEvent event) {
              // Update data
              task.setDescription(descriptionTextArea.getValue().toString());
              taskService.saveTask(task);
             
              // Update UI
              descriptionLabel.setValue(task.getDescription());
              descriptionLayout.replaceComponent(editLayout, descriptionLabel);
View Full Code Here

        addComponent(row);
        setExpandRatio(row, 1.5f);

        row.addComponent(createPanel(new ChartGanancias().getChart()));

        TextArea notes = new TextArea("Notas");
        notes.setValue(((DashboardUI)UI.getCurrent()).getUser().getNota());
        notes.setSizeFull();
        notes.addTextChangeListener(new TextChangeListener() {
     
      @Override
      public void textChange(TextChangeEvent event) {
        UsuarioDetalle usuario =((DashboardUI)UI.getCurrent()).getUser();
        System.err.println(event.getText());
View Full Code Here

TOP

Related Classes of com.vaadin.ui.TextArea

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.