本文整理汇总了Java中com.smartgwt.client.widgets.form.fields.TextAreaItem类的典型用法代码示例。如果您正苦于以下问题:Java TextAreaItem类的具体用法?Java TextAreaItem怎么用?Java TextAreaItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextAreaItem类属于com.smartgwt.client.widgets.form.fields包,在下文中一共展示了TextAreaItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createLogForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private DynamicForm createLogForm() {
DynamicForm form = new DynamicForm();
form.setBrowserSpellCheck(false);
form.setCanEdit(false);
form.setWidth100();
form.setHeight("40%");
TextAreaItem textAreaItem = new TextAreaItem(ExportResourceApi.RESULT_ERROR_LOG);
textAreaItem.setColSpan("*");
textAreaItem.setHeight("*");
textAreaItem.setWrap(TextAreaWrap.OFF);
textAreaItem.setShowTitle(false);
textAreaItem.setWidth("*");
textAreaItem.setCanEdit(false);
form.setItems(textAreaItem);
return form;
}
示例2: createLogForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private DynamicForm createLogForm() {
DynamicForm form = new DynamicForm();
form.setBrowserSpellCheck(false);
form.setCanEdit(false);
form.setWidth100();
form.setHeight("40%");
TextAreaItem textAreaItem = new TextAreaItem(ImportBatchDataSource.FIELD_LOG);
textAreaItem.setColSpan("*");
textAreaItem.setHeight("*");
textAreaItem.setWrap(TextAreaWrap.OFF);
textAreaItem.setShowTitle(false);
textAreaItem.setWidth("*");
textAreaItem.setCanEdit(false);
form.setItems(textAreaItem);
return form;
}
示例3: createPhysicalDocumentForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的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;
}
示例4: setGetPane
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private void setGetPane() {
getForm = new DynamicForm();
getForm.setIsGroup(true);
getForm.setGroupTitle("Message from server");
getForm.setWidth100();
getForm.setHeight100();
getForm.setNumCols(2);
getForm.setColWidths(60, "*");
// form.setBorder("1px solid blue");
getForm.setPadding(5);
getForm.setCanDragResize(true);
getForm.setResizeFrom("R");
TextAreaItem messageItem = new TextAreaItem("fromMessage");
messageItem.setShowTitle(false);
messageItem.setLength(500000);
messageItem.setColSpan(2);
messageItem.setWidth("*");
messageItem.setHeight("*");
getForm.setFields(messageItem);
getForm.draw();
}
示例5: setPostPane
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private void setPostPane() {
postForm = new DynamicForm();
postForm.setIsGroup(true);
postForm.setGroupTitle("Message to server");
postForm.setWidth100();
postForm.setHeight100();
postForm.setNumCols(2);
postForm.setColWidths(60, "*");
// form.setBorder("1px solid blue");
postForm.setPadding(5);
postForm.setCanDragResize(true);
postForm.setResizeFrom("R");
TextAreaItem messageItem = new TextAreaItem("toMessage");
messageItem.setShowTitle(false);
messageItem.setLength(500000);
messageItem.setColSpan(2);
messageItem.setWidth("*");
messageItem.setHeight("*");
postForm.setFields(messageItem);
postForm.draw();
}
示例6: addFormContent
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private void addFormContent() {
i_form = new DynamicForm();
i_form.setNumCols(2);
i_form.setDataSource(SharpNewsXmlDS.getInstance());
// set this value so we know that the ADD is from the user (in the DS);
i_form.setValue(SharpNewsXmlDS.ATTR_FROM_USER, NewsXmlDS.ATTR_FROM_USER);
TextAreaItem infoItem = new TextAreaItem(SharpNewsColumns.INFO.colName(), "Information");
infoItem.setWidth(400);
infoItem.setHeight(120);
i_form.setItems(infoItem);
addItem(i_form);
addButtons();
}
示例7: addFormContent
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private void addFormContent() {
i_form = new DynamicForm();
i_form.setNumCols(2);
i_form.setDataSource(NewsXmlDS.getInstance());
// set this value so we know that the ADD is from the user (in the DS);
i_form.setValue(NewsXmlDS.ATTR_FROM_USER, NewsXmlDS.ATTR_FROM_USER);
DateItem dateItem = new DateItem(NewsColumns.DATE.colName(), "Date");
TextAreaItem infoItem = new TextAreaItem(NewsColumns.INFO.colName(), "Information");
infoItem.setWidth(400);
infoItem.setHeight(100);
i_form.setItems(dateItem, infoItem);
addItem(i_form);
addButtons();
}
示例8: createForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private DynamicForm createForm(TextDataSource dataSource) {
DynamicForm form = new DynamicForm();
form.setDataSource(dataSource);
form.setWidth100();
form.setHeight100();
TextAreaItem textAreaItem = new TextAreaItem(TextDataSource.FIELD_CONTENT);
textAreaItem.setColSpan("*");
textAreaItem.setHeight("*");
textAreaItem.setWrap(TextAreaWrap.OFF);
textAreaItem.setShowTitle(false);
textAreaItem.setWidth("*");
form.setFields(textAreaItem);
return form;
}
示例9: createFormItem
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private FormItem createFormItem(DisplayType displayType, Record profile) {
String name = profile.getAttribute(WorkflowParameterDataSource.FIELD_NAME);
switch (displayType) {
case SELECT:
SelectItem si = new SelectItem();
setOptions(si, profile);
si.setWidth("*");
return si;
case COMBOBOX:
ComboBoxItem cbi = new ComboBoxItem();
setOptions(cbi, profile);
cbi.setLength(2000);
cbi.setWidth("*");
return cbi;
case CHECKBOX:
CheckboxItem ci = new CheckboxItem();
// the width must be set otherwise it overflows the form
ci.setWidth(150);
ci.setAllowEmptyValue(true);
return ci;
case TEXTAREA:
TextAreaItem tai = new TextAreaItem();
tai.setStartRow(true);
tai.setEndRow(true);
tai.setLength(2000);
tai.setColSpan("*");
tai.setWidth("*");
tai.setHeight(30);
return tai;
case DATETIME:
DateTimeItem di = new DateTimeItem();
return di;
case TEXT:
default:
TextItem ti = new TextItem(name);
ti.setLength(2000);
ti.setWidth("*");
return ti;
}
}
示例10: MonographUnitForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
public MonographUnitForm(final ClientMessages i18n) {
setWidth100();
setHeight100();
setTitleOrientation(TitleOrientation.TOP);
setNumCols(1);
// identifiers
final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
i18n.MonographUnitForm_Identifiers_Title());
identifiers.setDataSource(IdentifierDataSource.getInstance());
identifiers.setValidators(
new IdentifiersValidator(i18n, Arrays.asList(IdentifierDataSource.TYPE_UUID)));
DynamicForm identifierForm = new DynamicForm();
identifierForm.setUseAllDataSourceFields(true);
identifierForm.setNumCols(4);
identifiers.setFormPrototype(identifierForm);
identifiers.setEndRow(true);
identifiers.setColSpan("2");
TextItem unitNumber = new TextItem(ModsCustomDataSource.FIELD_MONOGRAPHUNIT_NUMBER);
unitNumber.setTitle(i18n.MonographUnitForm_UnitNumber_Title());
unitNumber.setRequired(true);
unitNumber.setValidators(new IsIntegerValidator());
TextAreaItem note = new TextAreaItem(ModsCustomDataSource.FIELD_NOTE, i18n.MonographUnitForm_Note_Title());
note.setWidth("*");
note.setHeight("*");
note.setColSpan("*");
setFields(unitNumber, identifiers, note);
}
示例11: PeriodicalVolumeForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
public PeriodicalVolumeForm(ClientMessages i18n) {
setWidth100();
setHeight100();
setTitleOrientation(TitleOrientation.TOP);
setNumCols(1);
TextItem volumeNumber = new TextItem(ModsCustomDataSource.FIELD_PER_VOLUME_NUMBER,
i18n.PeriodicalVolumeForm_Number_Title());
volumeNumber.setRequired(true);
// javascript regexp ^([1-9]\d{0,4}(-[1-9]\d{0,4})?)$
volumeNumber.setValidators(new StringTrimValidator(), new RegExpValidator("^([1-9]\\d{0,4}(-[1-9]\\d{0,4})?)$"));
TextItem date = new TextItem(ModsCustomDataSource.FIELD_PER_VOLUME_YEAR,
i18n.PeriodicalVolumeForm_Date_Title());
date.setRequired(true);
// issue 43; see https://docs.google.com/document/d/1zSriHPdnUY5d_tKv0M8a6nEym560DKh2H6XZ24tGAEw/edit?pli=1
// javascript regexp ^([1-9]\d{3}(-[1-9]\d{3})?)$
date.setValidators(new StringTrimValidator(), new RegExpValidator("^([1-9]\\d{3}(-[1-9]\\d{3})?)$"));
date.setEndRow(true);
// identifiers
final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
i18n.PeriodicalVolumeForm_Identifiers_Title());
identifiers.setDataSource(IdentifierDataSource.getInstance());
identifiers.setValidators(
new IdentifiersValidator(i18n, Arrays.asList(IdentifierDataSource.TYPE_UUID)));
DynamicForm identifierForm = new DynamicForm();
identifierForm.setUseAllDataSourceFields(true);
identifierForm.setNumCols(4);
identifiers.setFormPrototype(identifierForm);
identifiers.setEndRow(true);
identifiers.setColSpan("2");
TextAreaItem note = new TextAreaItem(ModsCustomDataSource.FIELD_NOTE,
i18n.PeriodicalVolumeForm_Note_Title());
note.setWidth("*");
note.setHeight("*");
note.setColSpan("*");
setFields(volumeNumber, date, identifiers, note);
}
示例12: createTextArea
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
protected void createTextArea() {
textAreaItem = new TextAreaItem(GeneralItemModel.RICH_TEXT_FIELD, "TextArea");
textAreaItem.setShowTitle(false);
textAreaItem.setColSpan(6);
textAreaItem.setWidth("100%");
textAreaItem.setHeight("*");
textAreaItem.setShowIfCondition(formIf);
}
示例13: SharpNewsListGrid
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
public SharpNewsListGrid() {
super();
i_sharpNewsXmlDS = SharpNewsXmlDS.getInstance();
setWidth100();
setHeight100();
setShowAllRecords(true);
setDataSource(i_sharpNewsXmlDS);
// This will show the delete icon.
setCanRemoveRecords(true);
setWarnOnRemoval(true);
setWarnOnRemovalMessage("Are you sure you want to remove this SHARP news item? This cannot be undone.");
setAnimateRemoveRecord(true);
// increase the cell height to allow multiple rows of text to be
// displayed.
setCellHeight(CELL_HEIGHT);
setWrapCells(true);
ListGridField idField = new ListGridField(SharpNewsColumns.ID.colName(), "ID");
// Don't allow the id to be edited.
idField.setCanEdit(false);
idField.setHidden(true);
ListGridField infoField = new ListGridField(SharpNewsColumns.INFO.colName(),
"SHARP Information");
// use a text area as the editor
TextAreaItem infoAreaItem = new TextAreaItem();
infoAreaItem.setHeight(CELL_HEIGHT);
infoField.setEditorType(infoAreaItem);
setFields(idField, infoField);
setAutoFetchData(true);
setCanEdit(true);
setEditEvent(ListGridEditEvent.DOUBLECLICK);
setModalEditing(true);
}
示例14: getTextAreaFormItem
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
public TextAreaItem getTextAreaFormItem(Field f, String lang) {
TextAreaItem item = new TextAreaItem(f.getName(), f.getTitle(activeLocale));
item.setLength(f.getLength());
item.setWidth(defaultWidth);
return item;
}
示例15: createForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入依赖的package包/类
private Widget createForm() {
taskForm = new DynamicForm();
taskForm.setDataSource(WorkflowTaskDataSource.getInstance());
taskForm.setNumCols(3);
taskForm.setColWidths("*", "*", "*");
taskForm.setTitleOrientation(TitleOrientation.TOP);
taskForm.setItemHoverWidth(300);
StaticTextItem jobLabel = new StaticTextItem(WorkflowTaskDataSource.FIELD_JOB_LABEL);
jobLabel.setColSpan("*");
jobLabel.setWidth("*");
jobLabel.setShowTitle(false);
jobLabel.setReadOnlyTextBoxStyle(Editor.CSS_HEADER_INSIDE_FORM);
jobLabel.setTextBoxStyle(Editor.CSS_HEADER_INSIDE_FORM);
final SelectItem owner = new SelectItem(WorkflowTaskDataSource.FIELD_OWNER);
owner.setOptionDataSource(UserDataSource.getInstance());
owner.setValueField(UserDataSource.FIELD_ID);
owner.setDisplayField(UserDataSource.FIELD_USERNAME);
owner.setWidth("*");
owner.setValidators(new RequiredIfValidator(requiredFunc));
TextAreaItem note = new TextAreaItem(WorkflowTaskDataSource.FIELD_NOTE);
note.setStartRow(true);
note.setColSpan("*");
note.setWidth("*");
// title tooltip is broken in SmartGWT 4.0
final FormItemIcon taskHelpIcon = new FormItemIcon();
taskHelpIcon.setSrc("[SKIN]/actions/help.png");
taskHelpIcon.setTabIndex(-1);
taskHelpIcon.setNeverDisable(true);
taskHelpIcon.setShowIfCondition(new FormItemIfFunction() {
@Override
public boolean execute(FormItem item, Object value, DynamicForm form) {
String hint = taskForm.getValueAsString(WorkflowTaskDataSource.FIELD_HINT);
taskHelpIcon.setPrompt(hint);
return hint != null;
}
});
TextItem label = new TextItem(WorkflowTaskDataSource.FIELD_LABEL);
label.setWidth("*");
label.setIcons(taskHelpIcon);
stateItem = new SelectItem(WorkflowTaskDataSource.FIELD_STATE);
stateItem.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
owner.redraw();
paramForm.markForRedraw();
}
});
taskForm.setFields(jobLabel,
label,
owner,
stateItem,
new TextItem(WorkflowTaskDataSource.FIELD_CREATED),
new TextItem(WorkflowTaskDataSource.FIELD_MODIFIED),
new SelectItem(WorkflowTaskDataSource.FIELD_PRIORITY),
note);
return taskForm;
}