当前位置: 首页>>代码示例>>Java>>正文


Java TextArea.setWidth方法代码示例

本文整理汇总了Java中com.vaadin.ui.TextArea.setWidth方法的典型用法代码示例。如果您正苦于以下问题:Java TextArea.setWidth方法的具体用法?Java TextArea.setWidth怎么用?Java TextArea.setWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.TextArea的用法示例。


在下文中一共展示了TextArea.setWidth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCopyPasteLayout

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
private VerticalLayout getCopyPasteLayout() {
	VerticalLayout layout = new VerticalLayout();
	Label label = new Label("Paste the complete Content of your java-file here:");

	layout.addComponent(label);
	layout.setComponentAlignment(label, Alignment.TOP_CENTER);

	copyPasteTextfield = new TextArea();
	copyPasteTextfield.setWordWrap(false);
	copyPasteTextfield.setWidth(30.0f, Unit.REM);
	copyPasteTextfield.setHeight(30.0f, Unit.REM);

	layout.addComponent(copyPasteTextfield);
	layout.setComponentAlignment(copyPasteTextfield, Alignment.MIDDLE_CENTER);

	Button button = new Button(ADD);
	button.addClickListener(x -> addPasteListener.accept(getCopyPasteText()));
	layout.addComponent(button);
	layout.setComponentAlignment(button, Alignment.BOTTOM_RIGHT);

	return layout;
}
 
开发者ID:RosesTheN00b,项目名称:MetricsToGo,代码行数:23,代码来源:UIStartPage.java

示例2: getDetails

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
@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;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:17,代码来源:ActionStatusMsgGrid.java

示例3: ImportFromClipboardWindow

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
public ImportFromClipboardWindow(String typeName, String columnsStringLabel) {
	super(Constants.uiImportFromClipboard);
	
	setResizable(false);
	setWidth("420px");
	
	TextArea textArea = new TextArea();
	textArea.addListener(this);
	textArea.setImmediate(true);
	textArea.setBuffered(true);
	textArea.setWidth("100%");
	
	VerticalLayout layout = new VerticalLayout();
	layout.setMargin(true);
	
	layout.addComponent(new Label(Constants.uiImportFromClipboardInstructions(columnsStringLabel), Label.CONTENT_XHTML));
	layout.addComponent(textArea);
	
	setContent(layout);
	
	textArea.focus();
}
 
开发者ID:alejandro-du,项目名称:enterprise-app,代码行数:23,代码来源:ImportFromClipboardWindow.java

示例4: buildHorizontalLayout_1

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("100.0%");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	
	// textArea
	textArea = new TextArea();
	textArea.setImmediate(false);
	textArea.setWidth("100.0%");
	textArea.setHeight("-1px");
	horizontalLayout_1.addComponent(textArea);
	horizontalLayout_1.setExpandRatio(textArea, 1.0f);
	
	return horizontalLayout_1;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:20,代码来源:MessageViewForm.java

示例5: buildVerticalLayoutFile

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
private VerticalLayout buildVerticalLayoutFile() {
	// common part: create layout
	verticalLayoutFile = new VerticalLayout();
	verticalLayoutFile.setImmediate(false);
	verticalLayoutFile.setWidth("100.0%");
	verticalLayoutFile.setHeight("100.0%");
	verticalLayoutFile.setMargin(false);
	
	// textAreaFile
	textAreaFile = new TextArea();
	textAreaFile.setCaption("Comentarios");
	textAreaFile.setImmediate(false);
	textAreaFile.setWidth("100.0%");
	textAreaFile.setHeight("-1px");
	verticalLayoutFile.addComponent(textAreaFile);
	
	// horizontalLayoutFileToolbox
	horizontalLayoutFileToolbox = buildHorizontalLayoutFileToolbox();
	verticalLayoutFile.addComponent(horizontalLayoutFileToolbox);
	
	return verticalLayoutFile;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:23,代码来源:AttachmentViewForm.java

示例6: addLogArea

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
private void addLogArea() {
    logArea = new TextArea( "Coordinator Logs" );

    // TODO make this file point configurable
    file = new File( "/var/log/chop-webapp.log" );
    try {
        r = new RandomAccessFile( file, "r" );
    }
    catch ( FileNotFoundException e ) {
        LOG.error( "Error while accessing file {}: {}", file, e );
    }
    logArea.setHeight( "100%" );
    logArea.setWidth( "100%" );
    getApplicationLog();
    addComponent( logArea );
    this.setComponentAlignment( logArea, Alignment.TOP_CENTER );
    this.setExpandRatio( logArea, 0.95f );
}
 
开发者ID:apache,项目名称:usergrid,代码行数:19,代码来源:LogLayout.java

示例7: addConsole

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
private TextArea addConsole(String title, String key) {
  TextArea console = new TextArea();
  console.setData(key);
  console.setWidth(100, Unit.PERCENTAGE);
  console.setWordWrap(false);
  console.setStyleName("console");

  consoles.addTab(console, title);

  return console;
}
 
开发者ID:Terracotta-OSS,项目名称:tinypounder,代码行数:12,代码来源:TinyPounderMainUI.java

示例8: addSystemInfo

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
@Override
public void addSystemInfo(Accordion systemInfoPanel) {
    VerticalLayout layout = new VerticalLayout();
    textArea = new TextArea("System Info");
    textArea.addStyleName(UIConstants.FIXED_FONT);
    textArea.setValue(getInfo());
    textArea.setRows(20);
    textArea.setHeight("400px");
    textArea.setWidth("100%");
    layout.addComponents(textArea);
    systemInfoPanel.addTab(layout, getCaption());
}
 
开发者ID:apache,项目名称:incubator-tamaya-sandbox,代码行数:13,代码来源:AbstractTextInfoProvider.java

示例9: generateUi

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
/**
	 * Diese Methode erstellt das UI, bestehend aus Inputfeld für Projektname und
	 * Projektbeschreibung.
	 *
	 * @author Marco Glaser
	 */
	public void generateUi(){
		setWidth(95, UNITS_PERCENTAGE);
		setHeight(SIZE_UNDEFINED, 0);
		setStyleName("projectCreationLayout");
		
		projectNameInput = new TextField();
		projectDescriptionInput = new TextArea();
		gap = new Label();
		secondGap = new Label();
		
		projectNameInput.setWidth(80, UNITS_PERCENTAGE);
//		projectNameInput.setHeight(30, UNITS_PIXELS);
		projectNameInput.setStyleName("projectNameInput");
		projectDescriptionInput.setWidth(80, UNITS_PERCENTAGE);
		projectDescriptionInput.setHeight(300, UNITS_PIXELS);
		projectDescriptionInput.setStyleName("projectNameInput");
		gap.setHeight("20px");
		secondGap.setSizeFull();
		
		projectNameInput.setValue("Geben Sie hier den Projektnamen ein.");
		projectDescriptionInput.setValue("Geben Sie hier eine Beschreibung des Projekts ein.");
		
		addComponent(projectNameInput);
		addComponent(gap);
		addComponent(projectDescriptionInput);
		
		projectNameInput.setCaption("Projektname");
		projectNameInput.setValue("Geben Sie hier den Projektnamen ein.");
		projectDescriptionInput.setCaption("Projektbeschreibung");
		projectDescriptionInput.setValue("Geben Sie hier eine Projektbeschreibung ein");
//		addComponent(secondGap);
//		setExpandRatio(secondGap, 1.0f);
	}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:40,代码来源:ProjectCreationViewImpl.java

示例10: buildMainLayout

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textAreaResults
	textAreaResults = new TextArea();
	textAreaResults.setCaption("Synch Results");
	textAreaResults.setImmediate(false);
	textAreaResults.setWidth("462px");
	textAreaResults.setHeight("222px");
	mainLayout.addComponent(textAreaResults);
	
	// buttonSynchronize
	buttonSynchronize = new Button();
	buttonSynchronize.setCaption("Synchronize");
	buttonSynchronize.setImmediate(true);
	buttonSynchronize.setWidth("-1px");
	buttonSynchronize.setHeight("-1px");
	mainLayout.addComponent(buttonSynchronize);
	mainLayout.setComponentAlignment(buttonSynchronize, new Alignment(24));
	
	return mainLayout;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:34,代码来源:GitSynchronizeWindow.java

示例11: getDescriptionTextArea

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
private TextArea getDescriptionTextArea() {
    final TextArea description = new TextAreaBuilder().caption(i18n.getMessage("textfield.description"))
            .style("text-area-style").prompt(i18n.getMessage("textfield.description")).immediate(true)
            .id(UIComponentIdProvider.BULK_UPLOAD_DESC).buildTextComponent();
    description.setNullRepresentation("");
    description.setWidth("100%");
    return description;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:9,代码来源:TargetBulkUpdateWindowLayout.java

示例12: buildDialogLayout

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
@Override
protected void buildDialogLayout() {
    VerticalLayout mainLayout = new VerticalLayout();
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    mainLayout.setMargin(true);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");

    txtQuery= new TextArea(ctx.tr("dialog.query"), query);
    txtQuery.setWidth("100%");
    txtQuery.setSizeFull();
    txtQuery.setNullRepresentation("");
    txtQuery.setNullSettingAllowed(true);
    txtQuery.setImmediate(true);
    txtQuery.addValidator(createSparqlQueryValidator());
    mainLayout.addComponent(txtQuery);
    mainLayout.setExpandRatio(txtQuery, 1.0f);

    VerticalLayout bottomLayout = new VerticalLayout();

    bottomLayout.addComponent(new CheckBox(ctx.tr("dialog.messageType.fail"), failExecution));

    mainLayout.addComponent(bottomLayout);
    mainLayout.setExpandRatio(bottomLayout, 0.1f);
    setCompositionRoot(mainLayout);
}
 
开发者ID:UnifiedViews,项目名称:Plugins,代码行数:28,代码来源:RdfValidatorVaadinDialog.java

示例13: createField

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
@Override
public Field createField(Item item, Object propertyId, Component uiContext) {
	Field field = super.createField(item, propertyId, uiContext);

	if (propertyId.equals(EinschaetzungPojo.EINSCHAETZUNGSTEXT_COLUMN)) {
		TextArea text = new TextArea("");
		text.setStyleName("einschaetzungText");
		text.setWidth("100%");
		text.setRows(25);
		text.setRequired(true);
		return text;
	}
	return field;
}
 
开发者ID:fossaag,项目名称:rolp,代码行数:15,代码来源:EinschaetzungAnlegenFormFields.java

示例14: bindTextAreaField

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
public TextArea bindTextAreaField(AbstractLayout form, ValidatingFieldGroup<E> group, String fieldLabel,
		String fieldName, int rows)
{
	TextArea field = new SplitTextArea(fieldLabel);
	field.setRows(rows);
	field.setWidth("100%");
	field.setImmediate(true);
	field.setNullRepresentation("");
	addValueChangeListeners(field);
	doBinding(group, fieldName, field);
	form.addComponent(field);
	return field;
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:14,代码来源:FormHelper.java

示例15: initElements

import com.vaadin.ui.TextArea; //导入方法依赖的package包/类
private void initElements() {
	
	lbName = new Label("Display name:");
	lbId = new Label();
	lbDescription = new Label("Description:");
	lbOptional = new Label("Optional:");
	
	name = new TextField();
	name.setWidth(WIDTH);
	name.setDescription("Display name for the element");
	name.setImmediate(true);
	name.addTextChangeListener(new CSCTextChangeListener(this));
	
	id = new TextField();
	id.setDescription("file name or unique identification");
	id.setImmediate(true);
	id.setRequired(true);
	id.setRequiredError(REQUIRED_TEXT);
	id.setWidth(WIDTH);
	id.addTextChangeListener(new CSCTextChangeListener(this, true));
	
	description = new TextArea();
	description.setWidth(WIDTH);
	description.setDescription("Short description");
	
	layout = new HorizontalLayout();
	
	prefix = new TextField();
	postfix = new TextField();
	
	layout.addComponent(prefix);
	layout.addComponent(new Label(MULTI_FILE_TEXT));
	layout.addComponent(postfix);
	
	optional = new CheckBox();
	optional.setDescription("Is this element optional");
	optional.setImmediate(true);
}
 
开发者ID:chipster,项目名称:chipster,代码行数:39,代码来源:BasicModel.java


注:本文中的com.vaadin.ui.TextArea.setWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。