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


Java TextBox.setName方法代码示例

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


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

示例1: getPublishPanel

import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
private static HTMLPanel getPublishPanel() {
    HTMLPanel publishPanel = new HTMLPanel(GerritCiPlugin.publishJobPanel.toString());
    TextBox publishCommand = new TextBox();
    publishCommand.setName("publishCommand");
    publishCommand.setText("./scripts/publish.sh");
    TextBox publishBranchRegex = new TextBox();
    publishBranchRegex.setName("publishBranchRegex");
    publishBranchRegex.setText("refs/heads/(develop|master)");
    TextBox jobType = new TextBox();
    jobType.setText("publish");
    jobType.setName("jobType");
    jobType.setVisible(false);
    publishPanel.add(jobType);
    publishPanel.addAndReplaceElement(publishCommand, "publishCommand");
    publishPanel.addAndReplaceElement(publishBranchRegex, "publishBranchRegex");
    addCommonFields(publishPanel);
    return publishPanel;
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:19,代码来源:JobPanels.java

示例2: getVerifyPanel

import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
private static HTMLPanel getVerifyPanel() {
    HTMLPanel verifyPanel = new HTMLPanel(GerritCiPlugin.verifyJobPanel.toString());
    TextBox verifyCommand = new TextBox();
    verifyCommand.setName("verifyCommand");
    verifyCommand.setText("./scripts/verify.sh");
    TextBox verifyBranchRegex = new TextBox();
    verifyBranchRegex.setName("verifyBranchRegex");
    verifyBranchRegex.setText(".*");
    TextBox jobType = new TextBox();
    jobType.setText("verify");
    jobType.setName("jobType");
    jobType.setVisible(false);
    verifyPanel.add(jobType);
    verifyPanel.addAndReplaceElement(verifyCommand, "verifyCommand");
    verifyPanel.addAndReplaceElement(verifyBranchRegex, "verifyBranchRegex");
    addCommonFields(verifyPanel);
    return verifyPanel;
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:19,代码来源:JobPanels.java

示例3: createJob

import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
private HTMLPanel createJob(String jobType) {
    final HTMLPanel p = JobPanels.createJobPanel(jobType);
    TextBox jobName = new TextBox();
    jobName.setName("jobName");
    jobName.setText(jobType + "_" + projectName + "_" + Random.nextInt());
    jobName.setVisible(false);
    p.add(jobName);
    final Button deleteButton = new Button("delete");
    deleteButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            deletePanel(p);
        }
    });
    p.addAndReplaceElement(deleteButton, "delete");
    if(jobType.equals("cron")) {
        addCronToggleButton(p, deleteButton);
    }
    activePanels.add(p);
    return p;
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:22,代码来源:ProjectConfigurationScreen.java

示例4: addHiddenUploadFormParameter

import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
/**
 * Allows to add the hidden file upload form parameters, which will be send to the server.
 * Create a TextBox, giving it a name so that it will be submitted. From descendant dialogs,
 * has to be called only after the dialog is populated, i.e. the populateDialog() is executed.
 * @param fieldName the name of the parameter to add
 * @param fieldValue the value of the parameter to add
 */
protected void addHiddenUploadFormParameter( final String fieldName, final String fieldValue){
	final TextBox field = new TextBox();
	field.setVisible(false);
	field.setName( fieldName );
	field.setText( fieldValue );
	verticalPanel.add( field );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:15,代码来源:FileUploadManagerDialog.java

示例5: addTextBox

import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
/**
 * To add Text Box.
 * 
 * @param row int
 * @param dto BatchClassPluginConfigDTO
 * @param readOnly boolean
 * @return ValidatableWidget<TextBox>
 */
public ValidatableWidget<TextBox> addTextBox(int row, final BatchClassPluginConfigDTO dto, boolean readOnly) {
	TextBox fieldValue = new TextBox();
	fieldValue.setReadOnly(readOnly);
	fieldValue.setWidth("160px");
	fieldValue.setName(dto.getPluginConfig().getFieldName());
	fieldValue.setText(dto.getValue());
	final ValidatableWidget<TextBox> validatableTextBox = new ValidatableWidget<TextBox>(fieldValue);
	if (!readOnly && dto.getPluginConfig() != null) {
		validatableTextBox.addValidator((Validator) ValidatorFactory.getValidator(dto.getDataType(), fieldValue));

		validatableTextBox.getWidget().addValueChangeHandler(new ValueChangeHandler<String>() {

			@Override
			public void onValueChange(ValueChangeEvent<String> event) {
				if (!dto.isMandatory() && validatableTextBox.getWidget().getText().isEmpty()) {
					validatableTextBox.getWidget().removeStyleName(AdminConstants.DATE_BOX_FORMAT_ERROR);
				} else {
					validatableTextBox.toggleValidDateBox();
				}
			}
		});

		if (!dto.isMandatory() && validatableTextBox.getWidget().getText().isEmpty()) {
			validatableTextBox.getWidget().removeStyleName(AdminConstants.DATE_BOX_FORMAT_ERROR);
		} else {
			validatableTextBox.toggleValidDateBox();
		}

		if (dto.isMandatory()) {
			validatableTextBox.addValidator(new EmptyStringValidator(validatableTextBox.getWidget()));
		}

	}

	return validatableTextBox;
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:45,代码来源:EditPluginView.java

示例6: getCronPanel

import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
private static HTMLPanel getCronPanel() {
    HTMLPanel cronPanel = new HTMLPanel(GerritCiPlugin.cronPanel.toString());
    TextBox cronCommand = new TextBox();
    cronCommand.setName("cronCommand");
    cronCommand.setText("./scripts/cron.sh");
    TextBox cronSchedule = new TextBox();
    cronSchedule.setName("cronJob");
    TextBox jobType = new TextBox();
    jobType.setText("cron");
    jobType.setName("jobType");
    jobType.setVisible(false);
    cronPanel.add(jobType);
    cronPanel.addAndReplaceElement(cronCommand, "cronCommand");
    cronPanel.addAndReplaceElement(cronSchedule, "cronJob");
    addCommonFields(cronPanel);
    return cronPanel;
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:18,代码来源:JobPanels.java

示例7: addCommonFields

import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
public static void addCommonFields(HTMLPanel p){
    CheckBox junitEnabled = new CheckBox();
    junitEnabled.setName("junitEnabled");
    junitEnabled.setValue(true);
    TextBox junitPath = new TextBox();
    junitPath.setText("build/test-results/*.xml");
    junitPath.setName("junitPath");
    TextBox timeoutMinutes = new TextBox();
    timeoutMinutes.setText("30");
    timeoutMinutes.setName("timeoutMinutes");
    p.addAndReplaceElement(junitEnabled, "junitEnabled");
    p.addAndReplaceElement(junitPath,"junitPath");
    p.addAndReplaceElement(timeoutMinutes, "timeoutMinutes");
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:15,代码来源:JobPanels.java


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