本文整理汇总了Java中com.smartgwt.client.widgets.form.fields.TextItem类的典型用法代码示例。如果您正苦于以下问题:Java TextItem类的具体用法?Java TextItem怎么用?Java TextItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextItem类属于com.smartgwt.client.widgets.form.fields包,在下文中一共展示了TextItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createForm
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private DynamicForm createForm() {
DynamicForm df = new DynamicForm();
df.setMargin(4);
df.setNumCols(1);
df.setTitleOrientation(TitleOrientation.TOP);
df.setBrowserSpellCheck(false);
df.setDataSource(DeviceDataSource.getInstance());
TextItem fieldId = new TextItem(DeviceDataSource.FIELD_ID);
fieldId.setWidth(280);
fieldId.setCanEdit(false);
fieldId.setReadOnlyDisplay(ReadOnlyDisplayAppearance.STATIC);
TextItem fieldLabel = new TextItem(DeviceDataSource.FIELD_LABEL);
fieldLabel.setRequired(true);
fieldLabel.setWidth("*");
df.setItems(fieldId, fieldLabel);
return df;
}
开发者ID:proarc,项目名称:proarc,代码行数:18,代码来源:DeviceManager.java
示例2: createForm
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private DynamicForm createForm() {
DynamicForm form = new DynamicForm();
form.setEncoding(Encoding.MULTIPART);
form.setBrowserSpellCheck(false);
form.setNumCols(2);
form.setTitleOrientation(TitleOrientation.TOP);
form.setCanSubmit(true);
TextItem mimeItem = new TextItem(FIELD_MIMETYPE,
i18n.DigitalObjectEditor_MediaEditor_Uploader_Mimetype_Title());
mimeItem.setWidth(400);
mimeItem.setColSpan(2);
TextItem filenameItem = new TextItem(FIELD_FILE,
i18n.DigitalObjectEditor_MediaEditor_Uploader_Filename_Title());
filenameItem.setWidth(400);
filenameItem.setColSpan(2);
filenameItem.setRequired(Boolean.TRUE);
HiddenItem pidItem = new HiddenItem(FIELD_PID);
HiddenItem batchIdItem = new HiddenItem(FIELD_BATCHID);
form.setFields(filenameItem, mimeItem, pidItem, batchIdItem);
return form;
}
开发者ID:proarc,项目名称:proarc,代码行数:25,代码来源:UploadFile.java
示例3: BatchEditor
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
public BatchEditor(ClientMessages i18n) {
widget = new VLayout();
form = new DynamicForm();
form.setBrowserSpellCheck(false);
TextItem owner = new TextItem(DigitalObjectAdministrationDataSource.FIELD_OWNER);
owner.setCanEdit(Boolean.FALSE);
SelectItem device = new SelectItem(DigitalObjectAdministrationDataSource.FIELD_DEVICE,
i18n.ImportSourceChooser_OptionScanner_Title());
DeviceDataSource.setOptionDataSource(device);
device.setWidth(250);
device.setAllowEmptyValue(true);
device.setEmptyDisplayValue(ClientUtils.format("<i><%s></i>",
i18n.DigitalObjectEditor_AdministrationEditor_NoDeviceSelection_Title()));
form.setItems(device);
widget.setMembers(form);
}
开发者ID:proarc,项目名称:proarc,代码行数:20,代码来源:DigitalObjectAdministrationEditor.java
示例4: createPhysicalDocumentForm
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private DynamicForm createPhysicalDocumentForm() {
DynamicForm form = createExpansionForm();
TextAreaItem xml = new TextAreaItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_METADATA);
xml.setWidth("*");
form.setDataSource(WorkflowMaterialDataSource.getInstance(),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_CATALOG),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_BARCODE),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_FIELD001),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_SIGLA),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_SIGNATURE),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_DETAIL),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_ISSUE),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_VOLUME),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_YEAR),
new TextItem(WorkflowMaterialDataSource.FIELD_PHYSICAL_RDCZID),
createNoteItem(),
xml,
createSaveItem());
return form;
}
开发者ID:proarc,项目名称:proarc,代码行数:21,代码来源:WorkflowMaterialView.java
示例5: create
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
@Override
public DynamicForm create() {
DynamicForm form = new DynamicForm();
form.setNumCols(6);
TextItem place = new TextItem(ModsCustomDataSource.FIELD_PRINTER_PUBLISHER_PLACE,
i18n.PeriodicalForm_PrinterPublisherPlace_Title());
place.setPrompt(i18n.PeriodicalForm_PrinterPublisherPlace_Hint());
place.setValidators(new StringTrimValidator());
TextItem name = new TextItem(ModsCustomDataSource.FIELD_PRINTER_PUBLISHER_NAME,
i18n.PeriodicalForm_PrinterPublisherName_Title());
name.setPrompt(publisher
? i18n.PeriodicalForm_PublisherName_Hint()
: i18n.PeriodicalForm_PrinterName_Hint());
name.setValidators(new StringTrimValidator());
TextItem date = new TextItem(ModsCustomDataSource.FIELD_PRINTER_PUBLISHER_DATE,
i18n.PeriodicalForm_PrinterPublisherDate_Title());
date.setValidators(new StringTrimValidator());
form.setFields(name, place, date);
return form;
}
开发者ID:proarc,项目名称:proarc,代码行数:21,代码来源:PrinterPublisherFormFactory.java
示例6: create
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
@Override
public DynamicForm create() {
DynamicForm form = new DynamicForm();
TextItem value = new TextItem(name, title);
value.setShowTitle(showTitle);
if (width == Integer.MAX_VALUE) {
value.setWidth("100%");
form.setWidth100();
} else if (width > 0) {
value.setWidth(width);
}
value.setRequired(required);
value.setValidators(new StringTrimValidator());
form.setFields(value);
return form;
}
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:StringFormFactory.java
示例7: createTextItem
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private void createTextItem() {
// TODO Auto-generated method stub
query = new TextItem("query");
query.setShowFocused(false);
query.setCanFocus(false);
query.setShowTitle(false);
query.setWidth("500px");
/**
* DEPRECATED
*
* Difference between use this instead current approach, is that in this case
* search happens every time user press a button. This could be inefficient.
* */
// query.addChangedHandler(new ChangedHandler() {
//
// @Override
// public void onChanged(ChangedEvent event) {
// //getGrid().setData(getGridData(listRecords));
//
// }
// });
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:24,代码来源:SearchForm.java
示例8: YoutubeObjectEditor
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
public YoutubeObjectEditor() {
form = new DynamicForm();
videoText = new TextItem(YoutubeObject.YOUTUBE_URL, constants.youtubeURL()+" http://www.youtube.com/watch?v=");
videoText.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
String url = ""+event.getValue();
if (url.contains("youtube.com/watch?v=")) {
url = url.substring(url.indexOf("=")+1);
videoText.setValue(url);
}
if (url.contains("youtu.be/")) {
url = url.substring(url.indexOf(".be/")+4);
videoText.setValue(url);
}
if (url.contains("www.youtube.com/share_popup?v=")) {
url = url.substring(url.indexOf("=")+1);
videoText.setValue(url);
}
}
});
form.setFields(videoText);
form.setWidth100();
addMember(form);
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:27,代码来源:YoutubeObjectEditor.java
示例9: initSetTimeField
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private void initSetTimeField() {
selectTimeTextItem = new TextItem(TIMEDELTA_DEP);
selectTimeTextItem.setTitle("time delta");
selectTimeTextItem.setWrapTitle(false);
selectTimeTextItem.setStartRow(true);
selectTimeTextItem.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
onSave();
}
});
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:17,代码来源:TimeDepEditor.java
示例10: createForm
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
protected void createForm() {
titleText = new TextItem(GeneralItemModel.NAME_FIELD, constants.title());
titleText.setStartRow(true);
orderText = new TextItem(GeneralItemModel.SORTKEY_FIELD, constants.order());
if (AccountManager.getInstance().isAdvancedUser()) {
section = new TextItem(GeneralItemModel.SECTION, constants.section());
}
if (AccountManager.getInstance().isAdvancedUser()) {
form.setFields(titleText, orderText, section, textAreaItem);
} else {
form.setFields(titleText, orderText, textAreaItem);
}
form.setNumCols(4);
form.setWidth100();
form.setHeight(40);
addMember(form);
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:18,代码来源:BasicMetadataEditor.java
示例11: create
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
public FormItem create() {
final Img image = new Img();
image.setMaxHeight(200);
image.setMaxWidth(300);
image.setShowDisabled(false);
CanvasItem imgItem = new CanvasItem() {
public void setValue(String value) {
image.setSrc(value);
}
};
imgItem.setCanvas(image);
return new EnableToggleFormItem(new TextItem(), imgItem);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:17,代码来源:AttributeFormFieldRegistry.java
示例12: createEntryConditionEditCanvas
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private Canvas createEntryConditionEditCanvas() {
StaticTextItem labelItem = createLabelItem(i18n.enterCondition());
OverUndershootSelectionData data = controller.getOverUndershootEntryConditions();
SelectItem entryOperatorItem = createOperatorItem(data, GREATER_THAN_INT);
entryOperatorItem.addChangedHandler(createEntryOperatorChangedHandler());
entryOperatorItem.setWidth(EDIT_ITEMS_WIDTH);
TextItem entryValueItem = createValueItem();
entryValueItem.addChangedHandler(createEntryValueChangedHandler());
entryValueItem.setWidth(EDIT_ITEMS_WIDTH);
declareAsRequired(entryValueItem);
StaticTextItem entryUnitItem = createStaticUnitItem(data);
entryUnitItem.setWidth(EDIT_ITEMS_WIDTH);
FormItem[] items = new FormItem[] { labelItem, entryOperatorItem, entryValueItem, entryUnitItem };
entryConditionForm = assembleEditConditionForm(items);
return alignVerticalCenter(entryConditionForm);
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:21,代码来源:OverUndershootRuleTemplate.java
示例13: createEditConditionCanvas
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private Canvas createEditConditionCanvas() {
StaticTextItem label = createLabelItem(i18n.sensorFailure());
SelectItem unitItem = createUnitsItem();
unitItem.addChangedHandler(createEntryUnitChangedHandler());
unitItem.setValueMap(createTimeunitsMap());
unitItem.setWidth(2 * EDIT_ITEMS_WIDTH);
TextItem valueItem = createValueItem();
valueItem.addChangedHandler(createValueChangedHandler());
valueItem.setWidth(EDIT_ITEMS_WIDTH);
valueItem.setRequired(true);
// valueItem.setKeyPressFilter("[0-9]+(\\.|,)[0-9]+");
FormItem[] formItems = new FormItem[] { label, unitItem, valueItem };
conditionForm = assembleEditConditionForm(formItems);
return alignVerticalCenter(conditionForm);
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:19,代码来源:SensorLossRuleTemplate.java
示例14: createAbonnementNameItem
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private TextItem createAbonnementNameItem() {
aboNameItem = new TextItem();
aboNameItem.setRequired(true);
aboNameItem.setTextBoxStyle("n52_sensorweb_client_abo_name_textbox");
aboNameItem.setTitle(i18n.aboName());
aboNameItem.setWidth("*"); // fill form column
aboNameItem.setKeyPressFilter("[0-9a-zA-Z_]");
aboNameItem.setValue(controller.createSuggestedAbonnementName());
aboNameItem.addKeyUpHandler(new KeyUpHandler() {
public void onKeyUp(KeyUpEvent event) {
TextItem nameItem = (TextItem) event.getSource();
String currentAbonnementName = (String) nameItem.getValue();
controller.setSelectedAbonnementName(currentAbonnementName);
}
});
return aboNameItem;
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:18,代码来源:EventNameForm.java
示例15: setEntryOperatorRuleItem
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private void setEntryOperatorRuleItem() {
this.entryOperatorItem = new SelectItem();
this.entryOperatorItem.setWidth(this.entryItemWidth);
this.entryOperatorItem.setTitle(i18n.operator());
this.entryOperatorItem.setTitleOrientation(TitleOrientation.TOP);
this.entryOperatorItem.setValueMap(getMathSymbols());
this.entryOperatorItem.setDefaultValue(">");
this.entryOperatorItem.setTextAlign(Alignment.CENTER);
this.entryOperatorItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
if (exitOperatorItem != null) {
TextItem exitOperatorTextItem = (TextItem) event.getSource();
exitOperatorItem.setValue(getInverse(exitOperatorTextItem.getValueAsString()));
}
}
});
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:18,代码来源:CreateSimpleRuleLayout.java
示例16: createEmailTextInputs
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private void createEmailTextInputs() {
this.emailItem = new TextItem();
this.emailItem.setName("email");
this.emailItem.setLength(250);
this.verifyEmailItem = new TextItem();
this.verifyEmailItem.setName("verifyEmail");
this.verifyEmailItem.setTitle(i18n.emailAgain());
this.verifyEmailItem.setRequired(true);
this.verifyEmailItem.setLength(250);
MatchesFieldValidator matchesValidatorEmail = new MatchesFieldValidator();
matchesValidatorEmail.setOtherField("email");
matchesValidatorEmail.setErrorMessage(i18n.emailDoNotMatch());
this.verifyEmailItem.setValidators(matchesValidatorEmail);
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:17,代码来源:RegisterLayout.java
示例17: createVariableItem
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
private TextItem createVariableItem(Entry<String, JobVariable> var) {
TextItem t = new TextItem(var.getKey(), var.getKey());
t.setValue(var.getValue().getValue());
t.setWidth("100%");
t.setStartRow(true);
t.setEndRow(false);
return t;
}
开发者ID:ow2-proactive,项目名称:scheduling-portal,代码行数:9,代码来源:SubmitWindow.java
示例18: IdentifierDataSource
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
public IdentifierDataSource() {
setID(ID);
ClientMessages i18n = GWT.create(ClientMessages.class);
SmartGwtMessages i18nSmartGwt = ClientUtils.createSmartGwtMessages();
DataSourceField type = new DataSourceField(FIELD_TYPE, FieldType.TEXT,
i18n.PageForm_IdentifierType_Title());
type.setRequired(Boolean.TRUE);
ComboBoxItem typeEditor = new ComboBoxItem(IdentifierDataSource.FIELD_TYPE);
LocalizationDataSource.setOptionDataSource(typeEditor, BundleName.MODS_IDENTIFIER_TYPES);
typeEditor.setType("comboBox");
typeEditor.setCharacterCasing(CharacterCasing.LOWER);
typeEditor.setBrowserSpellCheck(Boolean.FALSE);
type.setEditorType(typeEditor);
DataSourceField value = new DataSourceField(FIELD_VALUE, FieldType.TEXT,
i18n.PageForm_IdentifierValue_Title());
value.setRequired(Boolean.TRUE);
TextItem valueEditor = new TextItem(IdentifierDataSource.FIELD_VALUE);
valueEditor.setWidth("250");
valueEditor.setBrowserSpellCheck(Boolean.FALSE);
valueEditor.setRequired(Boolean.TRUE);
valueEditor.setValidators(new IdentifierValidator(i18n, i18nSmartGwt));
value.setEditorType(valueEditor);
DataSourceField object = new DataSourceField(FIELD_VALUE, FieldType.ANY);
object.setHidden(true);
setFields(type, value);
setClientOnly(true);
setCacheAllData(true);
}
开发者ID:proarc,项目名称:proarc,代码行数:33,代码来源:IdentifierDataSource.java
示例19: getTextFormItem
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
public TextItem getTextFormItem(Field f, String lang) {
TextItem item = new TextItem(f.getName(), f.getTitle(activeLocale));
item.setLength(f.getLength() != null ? f.getLength() : defaultTextLength);
item.setWidth(defaultWidth);
item.setReadOnlyDisplay(ReadOnlyDisplayAppearance.STATIC);
item.setDefaultValue(f.getDefaultValue());
return item;
}
开发者ID:proarc,项目名称:proarc,代码行数:9,代码来源:FormGenerator.java
示例20: getDateYearFormItem
import com.smartgwt.client.widgets.form.fields.TextItem; //导入依赖的package包/类
public TextItem getDateYearFormItem(Field f, String lang) {
TextItem item = getTextFormItem(f, lang);
item.setWidth("150");
DateEditorValue yearEditorValue = DateEditorValue.gYear();
item.setEditorValueFormatter(yearEditorValue);
item.setEditorValueParser(yearEditorValue);
return item;
}
开发者ID:proarc,项目名称:proarc,代码行数:9,代码来源:FormGenerator.java
注:本文中的com.smartgwt.client.widgets.form.fields.TextItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论