當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。