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

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

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

TextArea.addStyleName介绍

暂无

代码示例

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

@Override
protected TextArea createTextComponent() {
  final TextArea textArea = new TextArea();
  textArea.addStyleName(ValoTheme.TEXTAREA_SMALL);
  return textArea;
}

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

@Override
protected TextArea createTextComponent() {
  final TextArea textArea = new TextArea();
  textArea.addStyleName(ValoTheme.TEXTAREA_SMALL);
  return textArea;
}

代码示例来源: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.eclipse.hawkbit/hawkbit-ui

/**
 * reset the tag name and tag description component border color.
 */
protected void restoreComponentStyles() {
  tagName.removeStyleName(TAG_NAME_DYNAMIC_STYLE);
  tagDesc.removeStyleName(TAG_DESC_DYNAMIC_STYLE);
  tagName.addStyleName(SPUIDefinitions.TAG_NAME);
  tagDesc.addStyleName(SPUIDefinitions.TAG_DESC);
  getPreviewButtonColor(ColorPickerConstants.DEFAULT_COLOR);
}

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

/**
 * reset the tag name and tag description component border color.
 */
protected void restoreComponentStyles() {
  tagName.removeStyleName(TAG_NAME_DYNAMIC_STYLE);
  tagDesc.removeStyleName(TAG_DESC_DYNAMIC_STYLE);
  tagName.addStyleName(SPUIDefinitions.TAG_NAME);
  tagDesc.addStyleName(SPUIDefinitions.TAG_DESC);
  getPreviewButtonColor(ColorPickerConstants.DEFAULT_COLOR);
}

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

/**
 * Set tag name and desc field border color based on chosen color.
 *
 * @param tagName
 * @param tagDesc
 * @param taregtTagColor
 */
protected void createDynamicStyleForComponents(final TextField tagName, final TextArea tagDesc,
    final String taregtTagColor) {
  tagName.removeStyleName(SPUIDefinitions.TAG_NAME);
  tagDesc.removeStyleName(SPUIDefinitions.TAG_DESC);
  getTargetDynamicStyles(taregtTagColor);
  tagName.addStyleName(TAG_NAME_DYNAMIC_STYLE);
  tagDesc.addStyleName(TAG_DESC_DYNAMIC_STYLE);
}

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

/**
 * Set tag name and desc field border color based on chosen color.
 *
 * @param tagName
 * @param tagDesc
 * @param taregtTagColor
 */
protected void createDynamicStyleForComponents(final TextField tagName, final TextArea tagDesc,
    final String taregtTagColor) {
  tagName.removeStyleName(SPUIDefinitions.TAG_NAME);
  tagDesc.removeStyleName(SPUIDefinitions.TAG_DESC);
  getTargetDynamicStyles(taregtTagColor);
  tagName.addStyleName(TAG_NAME_DYNAMIC_STYLE);
  tagDesc.addStyleName(TAG_DESC_DYNAMIC_STYLE);
}

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

private static void createDynamicStyleForComponents(final TextField tagName, final TextField typeKey,
    final TextArea typeDesc, final String typeTagColor) {
  tagName.removeStyleName(SPUIDefinitions.TYPE_NAME);
  typeKey.removeStyleName(SPUIDefinitions.TYPE_KEY);
  typeDesc.removeStyleName(SPUIDefinitions.TYPE_DESC);
  getDynamicStyles(typeTagColor);
  tagName.addStyleName(TYPE_NAME_DYNAMIC_STYLE);
  typeKey.addStyleName(TYPE_NAME_DYNAMIC_STYLE);
  typeDesc.addStyleName(TYPE_DESC_DYNAMIC_STYLE);
}

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

private static void createDynamicStyleForComponents(final TextField tagName, final TextField typeKey,
    final TextArea typeDesc, final String typeTagColor) {
  tagName.removeStyleName(SPUIDefinitions.TYPE_NAME);
  typeKey.removeStyleName(SPUIDefinitions.TYPE_KEY);
  typeDesc.removeStyleName(SPUIDefinitions.TYPE_DESC);
  getDynamicStyles(typeTagColor);
  tagName.addStyleName(TYPE_NAME_DYNAMIC_STYLE);
  typeKey.addStyleName(TYPE_NAME_DYNAMIC_STYLE);
  typeDesc.addStyleName(TYPE_DESC_DYNAMIC_STYLE);
}

代码示例来源:origin: net.sf.itcb.common/itcb-common-web-vaadin

public ContextAnalyserPanel(final Jaxb2Marshaller marshaller, final ContextHolder contextHolder, final Component specificComponentToAdd, final Button.ClickListener specificClickListener) {
  this.setSizeFull();
  StringWriter writer = new StringWriter();
  StreamResult stringResult = new StreamResult(writer);
  
  marshaller.marshal(contextHolder.getNavigationContext(), stringResult);
  textArea= new TextArea("Flow content", writer.toString());
  textArea.setSizeFull();
  textArea.addStyleName("ContextAnalyserPanelTextArea");
  addComponent(textArea);
  
  if(specificComponentToAdd != null) {
    addComponent(specificComponentToAdd);
  }
  
  modifyButton = new Button("Modify context", new Button.ClickListener() {
    
    private static final long serialVersionUID = 1L;
    @Override
    public void buttonClick(ClickEvent event) {
      contextHolder.setNavigationContext(marshaller.unmarshal(new StreamSource(new ByteArrayInputStream(textArea.getValue().toString().getBytes()) )));
      if(specificClickListener != null) {
        specificClickListener.buttonClick(event);
      }
    }
  });
  modifyButton.addStyleName("ContextAnalyserPanelModifyButton");
  addComponent(modifyButton);
}

代码示例来源:origin: korpling/ANNIS

legendLabel.setValue("Legend:");
legendLabel.setReadOnly(true);	
legendLabel.addStyleName("borderless");
legendLabel.addStyleName("legend");
legendLabel.addStyleName("legend-label");				
tfStruct.addStyleName("legend");
tfStruct.addStyleName("legend-struct");				
tfSpan.addStyleName("legend");
tfSpan.addStyleName("legend-span");		
tfToken.addStyleName("legend");
tfToken.addStyleName("legend-token");

代码示例来源:origin: org.opennms.features/vaadin-jmxconfiggenerator

private TabContent(OutputDataKey key) {
  configTextArea.setSizeFull();
  configTextArea.addStyleName("borderless");
  descriptionLabel = new Label(
      UIHelper.loadContentFromFile(getClass(), key.getDescriptionFilename()),
      ContentMode.HTML);
  VerticalLayout leftLayout = new VerticalLayout(descriptionLabel);
  leftLayout.setMargin(true);
  addComponent(configTextArea);
  addComponent(leftLayout);
  setSizeFull();
  setLocked(false);
  setSplitPosition(75, Unit.PERCENTAGE);
  setCaption(key.getTitle());
}

代码示例来源: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(" ", Label.CONTENT_XHTML);
 addComponent(emptySpace);
}

代码示例来源:origin: io.permazen/permazen-vaadin

this.exprField.setRows(6);
this.exprField.setWidth("100%");
this.exprField.addStyleName("jsdb-fixed-width");
this.showForm.addComponent(this.exprField);
this.showForm.addComponent(this.showButton);

代码示例来源:origin: org.jsimpledb/jsimpledb-vaadin

this.exprField.setRows(6);
this.exprField.setWidth("100%");
this.exprField.addStyleName("jsdb-fixed-width");
this.showForm.addComponent(this.exprField);
this.showForm.addComponent(this.showButton);

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

stackTraceTextArea.setValue(stackTrace);
stackTraceTextArea.setStyleName(cubaLogContentClass);
stackTraceTextArea.addStyleName(cubaCopyLogContentClass);
stackTraceTextArea.setReadOnly(true);

相关文章