com.vaadin.ui.TextArea.setWidth()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.5k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中com.vaadin.ui.TextArea.setWidth()方法的一些代码示例,展示了TextArea.setWidth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextArea.setWidth()方法的具体详情如下:
包路径:com.vaadin.ui.TextArea
类名称:TextArea
方法名:setWidth

TextArea.setWidth介绍

暂无

代码示例

代码示例来源:origin: com.vaadin/vaadin-server

@Override
  public void setWidth(String width) {
    TextArea.this.setWidth(width);
  }
});

代码示例来源:origin: com.haulmont.cuba/cuba-web

@Override
public void setColumns(int columns) {
  this.columns = columns;
  // See com.vaadin.v7.client.ui.VTextField.setColumns for formula
  component.setWidth(columns + "em");
}

代码示例来源:origin: org.activiti/activiti-explorer

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);
}

代码示例来源:origin: org.activiti/activiti-explorer

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);
}

代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor

ValueWindow(String value) {
    super("Value"); // Set window caption
    center();
    TextArea textArea = new TextArea("", value);
    textArea.setWidth(400, Unit.PIXELS);
    textArea.setRows(10);
    
    setContent(textArea);
  }
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private TextArea getDescriptionTextArea() {
  final TextArea description = new TextAreaBuilder(Target.DESCRIPTION_MAX_SIZE)
      .caption(i18n.getMessage("textfield.description")).style("text-area-style")
      .id(UIComponentIdProvider.BULK_UPLOAD_DESC).buildTextComponent();
  description.setWidth("100%");
  return description;
}

代码示例来源:origin: apache/ace

/**
 * Creates a {@link TextArea} with a dump of the given event's properties.
 *
 * @param event
 *            the event to create a textarea for, cannot be <code>null</code>.
 * @return a {@link TextArea} instance, never <code>null</code>.
 */
final TextArea getProperties(Event event) {
  Map<String, String> props = event.getProperties();
  TextArea area = new TextArea("", dumpProperties(props));
  area.setWidth(FILL_AREA);
  area.setRows(props.size());
  area.setWordwrap(false);
  area.setReadOnly(true);
  area.setImmediate(true);
  return area;
}

代码示例来源:origin: eclipse/hawkbit

private TextArea getDescriptionTextArea() {
  final TextArea description = new TextAreaBuilder(Target.DESCRIPTION_MAX_SIZE)
      .caption(i18n.getMessage("textfield.description")).style("text-area-style")
      .id(UIComponentIdProvider.BULK_UPLOAD_DESC).buildTextComponent();
  description.setWidth("100%");
  return description;
}

代码示例来源:origin: org.apache.ace/org.apache.ace.server.log.ui

/**
 * Creates a {@link TextArea} with a dump of the given event's properties.
 * 
 * @param event the event to create a textarea for, cannot be <code>null</code>.
 * @return a {@link TextArea} instance, never <code>null</code>.
 */
private TextArea getProperties(LogEvent event) {
  Dictionary props = event.getProperties();
  TextArea area = new TextArea("", dumpProperties(props));
  area.setWidth(FILL_AREA);
  area.setRows(props.size());
  area.setWordwrap(false);
  area.setReadOnly(true);
  area.setImmediate(true);
  return area;
}

代码示例来源:origin: nz.co.senanque/madura-workflow-vaadin

public void load(Audit audit) {
    panel.removeAllComponents();
    getMaduraSessionManager().getValidationSession().bind(audit);
    BeanItem<Audit> beanItem = new BeanItem<Audit>(audit);
    m_fieldGroup =  m_maduraSessionManager.createMaduraFieldGroup();
    
    Map<String,Field<?>> fields = m_fieldGroup.buildAndBind(new String[]{"created","lockedBy","status","comment"},beanItem);
//        String[] fieldList = new String[]{"created","lockedBy","status","comment"};
//        m_fieldGroup.setFieldList(fieldList);
//        m_auditForm.setItemDataSource(beanItem);
    TextArea comment = (TextArea)fields.get("comment");
    comment.setWidth("700px");
    for (Field<?> f: fields.values()) {
      panel.addComponent(f);
    }
    panel.addComponent(getInitialLayout());
//        panel.requestRepaint();
    if (getParent() == null) {
      UI.getCurrent().addWindow(this);
      this.center();
    }
  }
  @PostConstruct

代码示例来源:origin: nz.co.senanque/madura-workflow-vaadin

public AbstractField<?> getTextField(MaduraPropertyWrapper property) {
    AbstractTextField ret = null;
    if (property.isSecret())
    {
      ret = new PasswordField();
    }
    else
    {
      if ("comment".equals(property.getName())) {
        TextArea textArea = new TextArea();
        textArea.setRows(5);
        textArea.setWordwrap(true);
        textArea.setWidth("400px");
        ret = textArea;
      } else {
        ret = new TextField();
      }
    }
    ret.setMaxLength(property.getMaxLength());
    if (property.getValue() == null) {
      property.setValue("");
    }
    return ret;
  }
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

@Override
  public Component getDetails(final RowReference rowReference) {
    // Find the bean to generate details for
    final Item item = rowReference.getItem();
    final String message = (String) item.getItemProperty(ProxyMessage.PXY_MSG_VALUE).getValue();
    final TextArea textArea = new TextArea();
    textArea.addStyleName(ValoTheme.TEXTAREA_BORDERLESS);
    textArea.addStyleName(ValoTheme.TEXTAREA_TINY);
    textArea.addStyleName("inline-icon");
    textArea.setHeight(120, Unit.PIXELS);
    textArea.setWidth(100, Unit.PERCENTAGE);
    textArea.setValue(message);
    textArea.setReadOnly(Boolean.TRUE);
    return textArea;
  }
}

代码示例来源:origin: eclipse/hawkbit

@Override
  public Component getDetails(final RowReference rowReference) {
    // Find the bean to generate details for
    final Item item = rowReference.getItem();
    final String message = (String) item.getItemProperty(ProxyMessage.PXY_MSG_VALUE).getValue();
    final TextArea textArea = new TextArea();
    textArea.addStyleName(ValoTheme.TEXTAREA_BORDERLESS);
    textArea.addStyleName(ValoTheme.TEXTAREA_TINY);
    textArea.addStyleName("inline-icon");
    textArea.setHeight(120, Unit.PIXELS);
    textArea.setWidth(100, Unit.PERCENTAGE);
    textArea.setValue(message);
    textArea.setReadOnly(Boolean.TRUE);
    return textArea;
  }
}

代码示例来源:origin: org.activiti/activiti-explorer

descriptionTextArea.setWidth(100, UNITS_PERCENTAGE);
descriptionTextArea.setValue(task.getDescription());
editLayout.addComponent(descriptionTextArea);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

valueField.setWidth("95%");

代码示例来源:origin: org.aperteworkflow/base-widgets

public ScriptCodeEditor() {
  VerticalLayout compositionRoot = new VerticalLayout();
  setCompositionRoot(compositionRoot);
  code = new TextArea();
  code.setWidth("100%");
  code.setNullRepresentation("");
  compositionRoot.addComponent(code);
  HorizontalLayout hl = new HorizontalLayout();
  Button save = new Button(getLocalizedMessage("script.editor.save"));
  save.addListener(new Button.ClickListener() {
    @Override
    public void buttonClick(Button.ClickEvent event) {
      validateAndSave();
    }
  });
  hl.addComponent(save);
  compositionRoot.addComponent(hl);
}

代码示例来源:origin: org.aperteworkflow/base-widgets

public ProcessDataWidgetsDefinitionEditor() {
  hierarchyEditor = new ProcessDataHierarchyEditor(this);
  rawText.setNullRepresentation("");
  rawText.setWidth("100%");
  rawText.setHeight("400px");
  TabSheet tabSheet = new TabSheet();
  tabSheet.setWidth("100%");
  tabSheet.addTab(hierarchyEditor, getLocalizedMessage("hierarchy-editor"));
  tabSheet.addTab(getRawTextEditorTab(), getLocalizedMessage("source-xml"));
  tabSheet.addTab(processPreview, getLocalizedMessage("preview"));
  tabSheet.setSelectedTab(hierarchyEditor);
  setCompositionRoot(tabSheet);
}

代码示例来源:origin: org.activiti/activiti-explorer

descriptionTextArea.setWidth(100, UNITS_PERCENTAGE);
descriptionTextArea.setValue(task.getDescription());
editLayout.addComponent(descriptionTextArea);

代码示例来源:origin: org.activiti/activiti-explorer

protected void addFields() {
 form = new Form();
 form.setCaption(i18nManager.getMessage(Messages.PROCESS_COPY_POPUP_CAPTION));
 form.getLayout().setMargin(true);
 
 nameTextField = new TextField(i18nManager.getMessage(Messages.TASK_NAME));
 nameTextField.setWidth(20, Sizeable.UNITS_EM);
 nameTextField.setRequired(true);
 nameTextField.setValue(modelData.getName());
 form.getLayout().addComponent(nameTextField);
 nameTextField.focus();
 
 descriptionTextArea = new TextArea(i18nManager.getMessage(Messages.TASK_DESCRIPTION));
 descriptionTextArea.setRows(8);
 descriptionTextArea.setWidth(20, Sizeable.UNITS_EM);
 form.getLayout().addComponent(descriptionTextArea);
 
 addComponent(form);
 
 // Some empty space
 Label emptySpace = new Label("&nbsp;", Label.CONTENT_XHTML);
 addComponent(emptySpace);
}

代码示例来源:origin: org.activiti/activiti-explorer

protected void addFields() {
 formLayout = new GridLayout(2, 3);
 formLayout.setSpacing(true);
 formLayout.addComponent(new Label(i18nManager.getMessage(Messages.TASK_NAME)));
 nameTextField = new TextField();
 nameTextField.setWidth(25, Sizeable.UNITS_EM);
 nameTextField.focus();
 formLayout.addComponent(nameTextField);
 
 formLayout.addComponent(new Label(i18nManager.getMessage(Messages.TASK_DESCRIPTION)));
 descriptionTextArea = new TextArea();
 descriptionTextArea.setRows(8);
 descriptionTextArea.setWidth(25, Sizeable.UNITS_EM);
 descriptionTextArea.addStyleName(ExplorerLayout.STYLE_TEXTAREA_NO_RESIZE);
 formLayout.addComponent(descriptionTextArea);
 
 Label editorLabel = new Label(i18nManager.getMessage(Messages.PROCESS_EDITOR_CHOICE));
 formLayout.addComponent(editorLabel);
 formLayout.setComponentAlignment(editorLabel, Alignment.MIDDLE_LEFT);
 
 selectEditorComponent = new SelectEditorComponent();
 formLayout.addComponent(selectEditorComponent);
 
 addComponent(formLayout);
 
 // Some empty space
 Label emptySpace = new Label("&nbsp;", Label.CONTENT_XHTML);
 addComponent(emptySpace);
}

相关文章