• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DynamicForm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: buildColorizerSelector

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
Widget buildColorizerSelector() {
    
    DynamicForm form = new DynamicForm(); 
    form.setWidth100();
    form.setNumCols(2);

    LinkedHashMap<String, String> styleMap = new LinkedHashMap<String, String>();  
    styleMap.put("ColorizedOSWf", "OSWf Colorizer");  
    styleMap.put("ColorizedXML",  "XML Colorizer");  
    styleMap.put("XMLasHTML",     "No Colorizer");  

    // Default to 'Colorized as OSWf
    colorizeItem.setDefaultValue("ColorizedOSWf");  
    colorizeItem.setShowTitle(false);  
    colorizeItem.setValueMap(styleMap); 
    colorizeItem.setColSpan(2); 
    colorizeItem.setWidth("140px");
                           
    form.setFields(colorizeItem);
    return form;
}
 
开发者ID:will-gilbert,项目名称:OSWf-OSWorkflow-fork,代码行数:22,代码来源:WfDefinitionControls.java


示例2: setGetPane

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的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();

}
 
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:27,代码来源:NetworkPage.java


示例3: ProximityDependencyEditor

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
public ProximityDependencyEditor(Tab mapTab) {
		this.mapTab = mapTab;
		createRadiusTextEdit();
		createLatTextEdit();
		createLngTextEdit();
		setPadding(10);
        radiusTextItem.addChangedHandler(new ChangedHandler() {
            @Override
            public void onChanged(ChangedEvent event) {
                try {
                int value = Integer.parseInt(""+event.getValue());
                if (circle != null) circle.setRadius(value);
                onSave();
                } catch (Exception e) {
                }
            }
        });
		form = new DynamicForm();
		form.setFields(radiusTextItem, latTextItem, lngTextItem);
//		addMember(radiusSlider);
		addMember(form);
		
//		setWidth100();
		ProximityDependencyEditor.this.setVisibility(Visibility.HIDDEN);

	}
 
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:27,代码来源:ProximityDependencyEditor.java


示例4: getTimeSlotSelector

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
public DynamicForm getTimeSlotSelector() {
    DynamicForm form = new DynamicForm();

    final SelectItem selectedRange = new SelectItem("statRange", "");
    LinkedHashMap<String, String> nodeLineValues = new LinkedHashMap<String, String>();
    for (Model.StatHistory.Range r : Model.StatHistory.Range.values()) {
        nodeLineValues.put("" + r.getChar(), r.getString());
    }
    selectedRange.setDefaultValue("" + Model.StatHistory.Range.MINUTE_1.getChar());
    selectedRange.setValueMap(nodeLineValues);

    selectedRange.addChangedHandler(new ChangedHandler() {
        @Override
        public void onChanged(ChangedEvent event) {
            timeRange = Model.StatHistory.Range.create(selectedRange.getValueAsString().charAt(0));
            loadTable.removeRows(0, loadTable.getNumberOfRows());
            reload();
        }
    });

    form.setItems(selectedRange);
    form.setHeight(24);
    form.setWidth(40);

    return form;
}
 
开发者ID:ow2-proactive,项目名称:scheduling-portal,代码行数:27,代码来源:MBeanChart.java


示例5: createOpenQuestionWithVideo

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
private void createOpenQuestionWithVideo() {
		openQuestionWithVideoCBItem = new CheckboxItem();
		openQuestionWithVideoCBItem.setName("openQuestionWithVideo");
		openQuestionWithVideoCBItem.setTitle(constants.answerWithVideo());
		openQuestionWithVideoCBItem.setShowIfCondition(new FormItemIfFunction() {  
            public boolean execute(FormItem item, Object value, DynamicForm form) {  
            	if (form.getValue("isOpenQuestion") == null) return false;
                return form.getValue("isOpenQuestion").equals(Boolean.TRUE);  
            }

        });  
//		openQuestionWithVideoCBItem.addChangedHandler(new ChangedHandler() {
//
//			@Override
//			public void onChanged(ChangedEvent event) {
//				if ((Boolean)form.getValue("openQuestionWithVideo")) form.setValue("openQuestionWithImage", false);
//			}
//		});
		openQuestionWithVideoCBItem.setStartRow(true);

	}
 
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:22,代码来源:DataCollectionEditor.java


示例6: refreshBreadcrumbs

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
private void refreshBreadcrumbs(final DynamicForm filterForm) {
	String bCrumb = "<b>Filtered by: ";
	
	@SuppressWarnings("rawtypes")
	Iterator it = filterForm.getValues().entrySet().iterator();
    while (it.hasNext()) {
        @SuppressWarnings("rawtypes")
		Map.Entry pairs = (Map.Entry)it.next();
        System.out.println(pairs.getKey() + " = " + pairs.getValue());
        
        
        if (pairs.getValue() != null) {
        	bCrumb += " "+pairs.getKey();
	        bCrumb += " = "+pairs.getValue();
	        if (it.hasNext()) {
		        bCrumb += " >> ";
			}
		}
        
        it.remove(); // avoids a ConcurrentModificationException
    }
    
    breadcrumb.setHTML(bCrumb+"</b>");
}
 
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:25,代码来源:ResultDisplayLayout.java


示例7: createModsForm

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
private DynamicForm createModsForm(String editorId) {
    DynamicForm form = null;
    if (ModsCutomEditorType.EDITOR_PAGE.equals(editorId)) {
        form = new PageForm(i18n);
    } else if (ModsCutomEditorType.EDITOR_PERIODICAL.equals(editorId)) {
        form = new PeriodicalForm(i18n);
    } else if (ModsCutomEditorType.EDITOR_MONOGRAPH.equals(editorId)) {
        form = new MonographForm(i18n);
    } else if (ModsCutomEditorType.EDITOR_PERIODICAL_VOLUME.equals(editorId)) {
        form = new PeriodicalVolumeForm(i18n);
    } else if (ModsCutomEditorType.EDITOR_PERIODICAL_ISSUE.equals(editorId)) {
        form = new PeriodicalIssueForm(i18n);
    } else if (ModsCutomEditorType.EDITOR_MONOGRAPH_UNIT.equals(editorId)) {
        form = new MonographUnitForm(i18n);
    }
    return form;
}
 
开发者ID:proarc,项目名称:proarc,代码行数:18,代码来源:ModsCustomEditor.java


示例8: createLogForm

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的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;
}
 
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:DesaExportAction.java


示例9: YoutubeObjectEditor

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的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


示例10: createForm

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的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


示例11: createNestedCustomFormItem

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
private RepeatableFormItem createNestedCustomFormItem(final Field f, final String lang) {
    RepeatableFormItem rfi = new RepeatableFormItem(f, new FormWidgetFactory() {

        @Override
        public DynamicForm create() {
            throw new UnsupportedOperationException();
        }

        @Override
        public FormWidget createFormWidget(Field formField) {
            DynamicForm df = createNestedForm(f, lang);
            ValuesManager vm = new ValuesManager();
            vm.addMember(df);
            return customizeNestedForm(new FormWidget(df, vm), f);
        }
    });
    oneRow(rfi);
    return rfi;
}
 
开发者ID:proarc,项目名称:proarc,代码行数:20,代码来源:FormGenerator.java


示例12: createForm

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
private DynamicForm createForm() {
        DynamicForm form = new DynamicForm();
        form.setWrapItemTitles(false);
//        form.setAutoWidth();
        form.setAutoHeight();
        form.setBrowserSpellCheck(false);
        allowPageIndexes = new CheckboxItem("fillPageIndexes", i18n.PageMetadataEditor_CheckboxPageIndices_Title());
        allowPageIndexes.setStartRow(true);
        allowPageIndexes.setColSpan("*");
        allowPageIndexes.setShowTitle(false);
        allowPageNumbers = new CheckboxItem("fillPageNumbers", i18n.PageMetadataEditor_CheckboxPageNubers_Title());
        allowPageNumbers.setStartRow(true);
        allowPageNumbers.setColSpan("*");
        allowPageNumbers.setShowTitle(false);
        allowPageTypes = new CheckboxItem("fillPageTypes", i18n.PageMetadataEditor_CheckboxPageTypes_Title());
        allowPageTypes.setStartRow(true);
        allowPageTypes.setColSpan("*");
        allowPageTypes.setShowTitle(false);
        form.setFields(allowPageTypes, allowPageIndexes, allowPageNumbers);
        return form;
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:22,代码来源:CopyPageMetadataWidget.java


示例13: formatValue

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
@Override
        public String formatValue(Object value, Record record, DynamicForm form, FormItem item) {
//            ClientUtils.severe(LOG, "format: class: %s, value: %s", ClientUtils.safeGetClass(value), value);
            if (value == null) {
                return null;
            }
            try {
                Date date = value instanceof Date
                        ? (Date) value : ISO_FORMAT.parse((String) value);
                return displayFormat.format(date);
            } catch (IllegalArgumentException ex) {
                String toString = String.valueOf(value);
                LOG.log(Level.WARNING, toString, ex);
                return toString;
            }
        }
 
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:FormGenerator.java


示例14: parseValue

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
@Override
        public Object parseValue(String value, DynamicForm form, FormItem item) {
//            ClientUtils.severe(LOG, "parse: value: %s", value);
            Object result = null;
            if (value != null && !value.isEmpty()) {
                try {
                    Date date = displayFormat.parse(value);
                    result = ISO_FORMAT.format(date);
                } catch (IllegalArgumentException ex) {
                    String toString = String.valueOf(value);
                    LOG.log(Level.WARNING, toString, ex);
                    result = null;
                }
            }
            return result;
        }
 
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:FormGenerator.java


示例15: setPostPane

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的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();

}
 
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:27,代码来源:NetworkPage.java


示例16: savePlainEditor

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
private void savePlainEditor() {
    DynamicForm form = getPlainEditor().getForm();
    if (!form.valuesHaveChanged()) {
        // nothing to save, ignore
        return ;
    }
    form.saveData(new DSCallback() {

        @Override
        public void execute(DSResponse response, Object rawData, DSRequest request) {
            if (RestConfig.isStatusOk(response)) {
                StatusView.getInstance().show(i18n.SaveAction_Done_Msg());
            }
        }
    });
}
 
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:DigitalObjectAdministrationEditor.java


示例17: saveBatchEditor

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
private void saveBatchEditor() {
    DynamicForm form = getBatchEditor().getForm();
    String device = form.getValueAsString(DigitalObjectAdministrationDataSource.FIELD_DEVICE);
    String[] pids = DigitalObject.toPidArray(digitalObjects);
    Record update = new Record();
    update.setAttribute(DigitalObjectAdministrationDataSource.FIELD_PID, pids);
    String batchId = digitalObjects[0].getBatchId();
    if (batchId != null) {
        update.setAttribute(DigitalObjectResourceApi.ATM_ITEM_BATCHID, batchId);
    }
    update.setAttribute(DigitalObjectAdministrationDataSource.FIELD_DEVICE, device);
    DigitalObjectAdministrationDataSource.getInstance().updateData(update, new DSCallback() {

        @Override
        public void execute(DSResponse response, Object rawData, DSRequest request) {
            if (RestConfig.isStatusOk(response)) {
                StatusView.getInstance().show(i18n.SaveAction_Done_Msg());
            }
        }
    });
}
 
开发者ID:proarc,项目名称:proarc,代码行数:22,代码来源:DigitalObjectAdministrationEditor.java


示例18: BatchEditor

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的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>&lt;%s&gt;</i>",
            i18n.DigitalObjectEditor_AdministrationEditor_NoDeviceSelection_Title()));

    form.setItems(device);
    widget.setMembers(form);
}
 
开发者ID:proarc,项目名称:proarc,代码行数:20,代码来源:DigitalObjectAdministrationEditor.java


示例19: getForm

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
public DynamicForm getForm() {
    if (form != null) {
        return form;
    }
    if (model != null) {
        form = new DerForms().getForm(model, activeLocale);
        if (form == null) {
            form = new DesForms().getForm(model, activeLocale);
        }
        if (form != null) {
            return form;
        }
    }
    form = createFullForm();
    return form;
}
 
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:DcEditor.java


示例20: createFullForm

import com.smartgwt.client.widgets.form.DynamicForm; //导入依赖的package包/类
private DynamicForm createFullForm() {
    DynamicForm f = new DynamicForm();
    f.setWidth100();
    f.setNumCols(2);
    f.setBrowserSpellCheck(false);
    f.setWrapItemTitles(false);
    f.setTitleOrientation(TitleOrientation.TOP);
    ArrayList<FormItem> items = new ArrayList<FormItem>();
    addElement(items, DcConstants.CONTRIBUTOR, null, true);
    addElement(items, DcConstants.COVERAGE, null, true);
    addElement(items, DcConstants.CREATOR, null, true);
    addElement(items, DcConstants.DATE, null, true);
    addElement(items, DcConstants.DESCRIPTION, null, true);
    addElement(items, DcConstants.FORMAT, null, true);
    addElement(items, DcConstants.IDENTIFIER, null, true);
    addElement(items, DcConstants.LANGUAGE, null, true);
    addElement(items, DcConstants.PUBLISHER, null, true);
    addElement(items, DcConstants.RELATION, null, true);
    addElement(items, DcConstants.RIGHTS, null, true);
    addElement(items, DcConstants.SOURCE, null, true);
    addElement(items, DcConstants.SUBJECT, null, true);
    addElement(items, DcConstants.TITLE, null, true);
    addElement(items, DcConstants.TYPE, null, true);
    f.setFields(items.toArray(new FormItem[items.size()]));
    return f;
}
 
开发者ID:proarc,项目名称:proarc,代码行数:27,代码来源:DcEditor.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Exec类代码示例发布时间:2022-05-23
下一篇:
Java JavaParser类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap