本文整理汇总了Java中com.smartgwt.client.widgets.form.fields.TextAreaItem.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java TextAreaItem.setHeight方法的具体用法?Java TextAreaItem.setHeight怎么用?Java TextAreaItem.setHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.smartgwt.client.widgets.form.fields.TextAreaItem
的用法示例。
在下文中一共展示了TextAreaItem.setHeight方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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();
}
示例4: 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();
}
示例5: 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();
}
示例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(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();
}
示例7: 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;
}
示例8: 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;
}
}
示例9: 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);
}
示例10: 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);
}
示例11: 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);
}
示例12: 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);
}
示例13: PeriodicalIssueForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入方法依赖的package包/类
public PeriodicalIssueForm(ClientMessages i18n) {
setWidth100();
setHeight100();
setTitleOrientation(TitleOrientation.TOP);
setNumCols(1);
ComboBoxItem issueSequenceNumber = new ComboBoxItem(ModsCustomDataSource.FIELD_PER_ISSUE_NUMBER_SORTING,
i18n.PeriodicalIssueForm_NumberSorting_Title());
issueSequenceNumber.setRequired(true);
issueSequenceNumber.setValidators(new StringTrimValidator(), new RegExpValidator(
"^([1-9]\\d{0,4}(-[1-9]\\d{0,4})?|mimořádné|zvláštní|na ukázku)$"));
issueSequenceNumber.setValueMap("mimořádné", "na ukázku", "zvláštní");
issueSequenceNumber.setHideEmptyPickList(true);
TextItem date = new TextItem(ModsCustomDataSource.FIELD_PER_ISSUE_DATE, i18n.PeriodicalIssueForm_Date_Title());
date.setRequired(true);
// issue 43, see https://docs.google.com/document/d/1zSriHPdnUY5d_tKv0M8a6nEym560DKh2H6XZ24tGAEw/edit?pli=1
// YYYY|YYYY-YYYY|MM.YYYY|MM.-MM.YYYY|DD.MM.YYYY|DD.-DD.MM.YYYY
// javascript regex ^([1-9]\d{3}(-[1-9]\d{3})?|(1\d|[1-9])\.(-(1\d|[1-9])\.)?[1-9]\d{3}|([123]\d|[1-9])\.(1\d|[1-9])\.(-([123]\d|[1-9])\.(1\d|[1-9])\.)?[1-9]\d{3})$
date.setValidators(new StringTrimValidator(), new RegExpValidator(
"^([1-9]\\d{3}(-[1-9]\\d{3})?|(1\\d|[1-9])\\.(-(1\\d|[1-9])\\.)?[1-9]\\d{3}|([123]\\d|[1-9])\\.(1\\d|[1-9])\\.(-([123]\\d|[1-9])\\.(1\\d|[1-9])\\.)?[1-9]\\d{3})$"));
// identifiers
final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
i18n.PeriodicalIssueForm_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.PeriodicalIssueForm_Note_Title());
note.setWidth("*");
note.setHeight("*");
note.setColSpan("*");
setFields(issueSequenceNumber, date, identifiers, note);
}
示例14: PageForm
import com.smartgwt.client.widgets.form.fields.TextAreaItem; //导入方法依赖的package包/类
/**
* Create a new form.
* @param i18n I18N
* @param typeValueMapId {@link ValueMapDataSource#getOptionDataSource}
* reference to bundle with page types.
*/
public PageForm(ClientMessages i18n, String typeValueMapId) {
// save on Enter is supposed mainly for ImportBatchItemEditor
// see submit handler in ModsMultiEditor
setSaveOnEnter(true);
setWidth100();
setHeight100();
setTitleOrientation(TitleOrientation.TOP);
SelectItem pageType = new SelectItem(ModsCustomDataSource.FIELD_PAGE_TYPE, i18n.PageForm_PageType_Title());
pageType.setOptionDataSource(ValueMapDataSource.getInstance().getOptionDataSource(typeValueMapId));
pageType.setValueField(BundleValue.KEY);
pageType.setDisplayField(BundleValue.VALUE);
pageType.setDefaultValue(ModsCustomDataSource.getDefaultPageType());
pageType.setWidth(200);
pageType.setEndRow(true);
IntegerItem pageIndex = new IntegerItem(ModsCustomDataSource.FIELD_PAGE_INDEX);
pageIndex.setTitle(i18n.PageForm_PageIndex_Title());
pageIndex.setValidators(new IsIntegerValidator());
pageIndex.setRequired(true);
pageIndex.setEndRow(true);
TextItem pageNumber = new TextItem(ModsCustomDataSource.FIELD_PAGE_NUMBER);
pageNumber.setTitle(i18n.PageForm_PageNumber_Title());
pageNumber.setEndRow(true);
pageNumber.setRequired(true);
pageNumber.setValidators(new StringTrimValidator());
// pageNumber.setLength(5);
final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
i18n.PageForm_Identifiers_Title());
identifiers.setDataSource(IdentifierDataSource.getInstance());
identifiers.setRequired(true);
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("3");
// TextAreaItem note = new AutoFitTextAreaItem(ModsCustomDataSource.FIELD_NOTE, "Note");
TextAreaItem note = new TextAreaItem(ModsCustomDataSource.FIELD_NOTE, i18n.PageForm_Note_Title());
note.setWidth("*");
note.setHeight("*");
note.setColSpan("*");
setFields(pageType, pageIndex, pageNumber, identifiers, note);
IntegerRangeValidator integerRangeValidator = new IntegerRangeValidator();
integerRangeValidator.setMin(0);
integerRangeValidator.setMax(Integer.MAX_VALUE);
pageIndex.setValidators(integerRangeValidator);
}