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


Java TextArea类代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.TextArea的典型用法代码示例。如果您正苦于以下问题:Java TextArea类的具体用法?Java TextArea怎么用?Java TextArea使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: validateInput

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
private void validateInput() {
	String value = "";
	switch (inputType) {
		case TEXTBOX:
			value = ((TextBox)input).getValue();
			break;
		case TEXTAREA:
			value = ((TextArea)input).getValue();
			break;
		case PASSWORD:
			value = ((PasswordTextBox)input).getValue();
			break;
	}
	if (isOptional && value.length() == 0) {
		setInputValid(true);
	} else {
		if (validationStr != null) {
			setInputValid(value.matches(validationStr));
		} else {
			setInputValid(true);
		}
	}
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:24,代码来源:FormField.java

示例2: DocFieldWidget

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
public DocFieldWidget(String parentDocumentIdentifier, Label fieldLabel, Field field, ValidatableWidget<SuggestionBox> widget,
		ValidatableWidget<ListBox> lWidget, ValidatableWidget<TextArea> textAreaWidget, boolean isReadOnly) {
	this.parentDocumentIdentifier = parentDocumentIdentifier;
	this.fieldLabel = fieldLabel;
	this.field = field;
	this.textAreaWidget = textAreaWidget;
	this.widget = widget;
	this.lWidget = lWidget;
	this.isReadOnly = isReadOnly;
	// enabling or disabling the widgets based on 'readonly' flag
	if (lWidget != null) {
		this.lWidget.getWidget().setEnabled(!isReadOnly);
	}
	if (widget != null) {
		this.widget.getWidget().getTextBox().setEnabled(!isReadOnly);
	}
	if (textAreaWidget != null) {
		this.textAreaWidget.getWidget().setReadOnly(isReadOnly);
	}

	setForceReviewOfValidatableWidget();
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:23,代码来源:ValidatePanel.java

示例3: addCssStyle

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
/**
 * 
 */
private void addCssStyle() {
	editDependencyPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	editDependencyPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

	andButton.setSize(CustomWorkflowConstants._50PX, CustomWorkflowConstants._25PX);
	orButton.setSize(CustomWorkflowConstants._50PX, CustomWorkflowConstants._25PX);
	buttonsPanel.setSpacing(CustomWorkflowConstants.SPACING_15);
	dependenciesList.setVisibleItemCount(CustomWorkflowConstants.VISIBLE_ITEM_10);
	dependenciesListHorizontalPanel.add(dependenciesList);
	dependenciesTextArea.setSize(CustomWorkflowConstants._280PX, CustomWorkflowConstants._147PX);
	dependenciesTextArea.setTextAlignment(TextArea.ALIGN_JUSTIFY);
	editDependencyDockLayoutPanel.addStyleName(CustomWorkflowConstants.CUSTOM_WORKFLOW_PANEL);
	editDependencyDockLayoutPanel.addStyleName(CustomWorkflowConstants.MAIN_PANEL_LAYOUT);

	pluginLabel.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
	dependencyTypeLabel.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
	dependenciesLabel.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
	pluginNamesList.addStyleName(CustomWorkflowConstants.STRONG_LABEL);
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:23,代码来源:EditDependencyView.java

示例4: addToDependenciesList

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
public void addToDependenciesList(String dependencyType) {
	String selectedDependency = getSelectedValueFromList(getEditDependencyPresenter().getView().getDependenciesList());
	if (selectedDependency != null && !selectedDependency.isEmpty()) {
		StringBuffer selectedDependencies = new StringBuffer(getEditDependencyPresenter().getView().getDependenciesTextArea()
				.getText());
		if (!selectedDependencies.toString().isEmpty()) {
			if (dependencyType.equals(CustomWorkflowConstants.AND_SEPERATOR)) {
				selectedDependencies.append(CustomWorkflowConstants.AND_SEPERATOR);
				selectedDependencies.append(CustomWorkflowConstants.NEXT_LINE);
			} else if (dependencyType.equals(CustomWorkflowConstants.OR_SEPERATOR)) {
				selectedDependencies.append(CustomWorkflowConstants.OR_SEPERATOR);
				selectedDependencies.append(CustomWorkflowConstants.NEXT_LINE);
			}
		}
		selectedDependencies.append(selectedDependency);
		TextArea dependenciesTextArea = editDependencyPresenter.getView().getDependenciesTextArea();
		dependenciesTextArea.setText(selectedDependencies.toString());
		dependenciesTextArea.setCursorPos(selectedDependencies.length());
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:21,代码来源:DependencyManagementPresenter.java

示例5: createApplicationListener

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
@Override
public ApplicationListener createApplicationListener() {
    setLoadingListener(new LoadingListener() {
        @Override
        public void beforeSetup() {}

        @Override
        public void afterSetup() {
            textBox = new TextArea();
            textBox.getElement().getStyle().setPosition(Style.Position.RELATIVE);
            textBox.getElement().getStyle().setWidth(1000, Style.Unit.PX);
            textBox.getElement().getStyle().setHeight(500, Style.Unit.PX);
            textBox.getElement().getStyle().setDisplay(Style.Display.INLINE);
            textBox.getElement().getStyle().setTop(50, Style.Unit.PX);
            textBox.getElement().getStyle().setBackgroundColor("#664477");
            textBox.setEnabled(true);
            getRootPanel().add(textBox);
        }
    });
    return new BabelBobble(new GwtCopier());
}
 
开发者ID:tommyettinger,项目名称:SquidLib-Demos,代码行数:22,代码来源:GwtLauncher.java

示例6: render

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
@Override
public Widget render(Schema property) {
  HTMLPanel panel = new HTMLPanel("");
  panel.getElement().getStyle().setDisplay(Display.INLINE);

  panel.add(new InlineLabel("\""));
  if (property.locked()) {
    InlineLabel label = new InlineLabel();
    panel.add(label);
    hasText = label;
  } else {
    TextArea editor = new TextArea();
    panel.add(editor);
    hasText = editor;
  }
  panel.add(new InlineLabel("\""));

  if (property.getDefault() != null) {
    hasText.setText(property.getDefault());
  }

  return panel;
}
 
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:24,代码来源:SchemaForm.java

示例7: createXmlCallBack

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
private static AsyncCallback<?> createXmlCallBack(final TextArea textArea) {
	if(xmlCallBack == null){
		xmlCallBack = new AsyncCallback<Object>() {
			public void onSuccess(Object result) {
				if (result != null) {
					String xml = result.toString();
					textArea.setText(xml);
					}
				ClientApplicationContext.getInstance().setBusy(false);
			}
			public void onFailure(Throwable caught) {
				ClientApplicationContext.getInstance().log("Processing screen creation failed", "Error creating dynamic panel", true, true, caught);
				ClientApplicationContext.getInstance().setBusy(false);
				updateTime(null);
			}
		};
	}
	return xmlCallBack;
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:20,代码来源:MainFactoryActions.java

示例8: Text

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
public Text(Composite parent, int style) {
	this(new TextArea(), parent, style);
	textArea = (TextArea) getGwtWidget();
	panel = (LayoutPanel) getParent().getGwtWidget().getParent();
	panel.add(textArea);
	textArea.addBlurHandler(new BlurHandler() {

		@Override
		public void onBlur(BlurEvent event) {
			setText(textArea.getText());
			textArea.removeFromParent();
			sendEvent(SWT.Modify);
			sendEvent(SWT.FocusOut);
		}
	});
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:17,代码来源:Text.java

示例9: OriginalPanel

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
public OriginalPanel() {
	setSize("100%", "100%");
	setSpacing(5);
	Label title = new Label(appConstants.importTextTitle());
	add(title);
	setCellWidth(title,"100%");
	setCellHeight(title,"1%");
	
	textArea = new TextArea();
	textArea.addChangeListener(this);
	textArea.setSize("100%","100%");
	add(textArea);
	setCellWidth(textArea,"100%");
	setCellHeight(textArea,"99%");
	
}
 
开发者ID:Antokolos,项目名称:iambookmaster,代码行数:17,代码来源:ImportTextPanel.java

示例10: createLuckyWikiButton

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
private void createLuckyWikiButton()
{
    Anchor rndWikiButton = Anchor.wrap(Document.get().getElementById("btn_rnd_wiki"));
    final TextArea textArea = TextArea.wrap(Document.get().getElementById("input_text"));
    rndWikiButton.addClickHandler(new ClickHandler()
    {
        public void onClick(ClickEvent event)
        {
            wcService.getRandomWikiUrl(new AsyncCallback<String>()
            {
                public void onSuccess(String result)
                {
                    textArea.setText(result);
                }

                public void onFailure(Throwable caught)
                {
                    textArea.setText("http://en.wikipedia.org/wiki/Special:random");
                }
            });

        }
    });
}
 
开发者ID:spupyrev,项目名称:swcv,代码行数:25,代码来源:WordCloudApp.java

示例11: createLuckyTwitterButton

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
private void createLuckyTwitterButton()
{
    Anchor rndWikiButton = Anchor.wrap(Document.get().getElementById("btn_rnd_twitter"));
    final TextArea textArea = TextArea.wrap(Document.get().getElementById("input_text"));
    rndWikiButton.addClickHandler(new ClickHandler()
    {
        public void onClick(ClickEvent event)
        {
            wcService.getRandomTwitterUrl(new AsyncCallback<String>()
            {
                public void onSuccess(String result)
                {
                    textArea.setText(result);
                }

                public void onFailure(Throwable caught)
                {
                    textArea.setText("twitter: hot trend");
                }
            });

        }
    });
}
 
开发者ID:spupyrev,项目名称:swcv,代码行数:25,代码来源:WordCloudApp.java

示例12: createLuckyYoutubeButton

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
private void createLuckyYoutubeButton()
{
    Anchor rndWikiButton = Anchor.wrap(Document.get().getElementById("btn_rnd_youtube"));
    final TextArea textArea = TextArea.wrap(Document.get().getElementById("input_text"));
    rndWikiButton.addClickHandler(new ClickHandler()
    {
        public void onClick(ClickEvent event)
        {
            wcService.getRandomYoutubeUrl(new AsyncCallback<String>()
            {
                public void onSuccess(String result)
                {
                    textArea.setText(result);
                }

                public void onFailure(Throwable caught)
                {
                    textArea.setText("https://www.youtube.com");
                }
            });

        }
    });
}
 
开发者ID:spupyrev,项目名称:swcv,代码行数:25,代码来源:WordCloudApp.java

示例13: createLuckyGoogleButton

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
private void createLuckyGoogleButton()
{
    Anchor rndGoogleButton = Anchor.wrap(Document.get().getElementById("btn_rnd_google"));
    final TextArea textArea = TextArea.wrap(Document.get().getElementById("input_text"));
    rndGoogleButton.addClickHandler(new ClickHandler()
    {
        public void onClick(ClickEvent event)
        {
            wcService.getRandomGoogleUrl(new AsyncCallback<String>()
            {
                public void onSuccess(String result)
                {
                    textArea.setText(result);
                }

                public void onFailure(Throwable caught)
                {
                    textArea.setText("google: hot trend");
                }
            });

        }
    });
}
 
开发者ID:spupyrev,项目名称:swcv,代码行数:25,代码来源:WordCloudApp.java

示例14: createTextArea

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
private TextArea createTextArea()
{
    TextArea textArea = TextArea.wrap(Document.get().getElementById("input_text"));
    textArea.addKeyDownHandler(new KeyDownHandler()
    {
        public void onKeyDown(KeyDownEvent event)
        {
            event.preventDefault();
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
            {
                createWordCloud();
            }
        }
    });

    return textArea;
}
 
开发者ID:spupyrev,项目名称:swcv,代码行数:18,代码来源:WordCloudApp.java

示例15: log

import com.google.gwt.user.client.ui.TextArea; //导入依赖的package包/类
public void log(String msg)
{
   if (appScreen == null)
   {
       return;
   }
   TextArea logTextArea = appScreen.getTextArea();
   Date d = new Date();
   String t = d.toString() + ": " + msg;
   int cW = logTextArea.getCharacterWidth();
   String currentText = logTextArea.getText();
   if (currentText.length() > 0)
   {
       logTextArea.setText(currentText + "\n" + t);
   }
   else
   {
       logTextArea.setText(t);
       
   }
   appScreen.getScrollPanel().scrollToBottom();
   Log.debug(msg);
}
 
开发者ID:muquit,项目名称:gwtoauthlogindemo,代码行数:24,代码来源:GWTOAuthLoginDemo.java


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