一个事物模型(一个节点)的编辑表单是根据它的描述者动态生成的,这里演示了表单的可用控件的类型,代码是描述者的代码。
7.数据表格
<?xml version="1.0" encoding="utf-8"?> <thing name="EditorDescriptor" descriptors="xworker.lang.MetaDescriptor3" description="<p>演示XWorker的事物编辑器的功能。</p>"> <attribute name="text" label="文本框" en_label="text"></attribute> <attribute name="textarea" label="文本区" inputtype="textarea" group="文本区" en_label="textarea"></attribute> <attribute name="label" label="标签" inputtype="label" en_label="label"></attribute> <attribute name="select" label="下拉选择框" inputtype="select" en_label="select"> <value name="java" label="Java" value="java"></value> <value name="c" label="C" value="c"></value> <value name="c++" label="C++" value="c++"></value> </attribute> <attribute name="multiSelect" label="下拉多选框" extends="xworker.example.ide.thingeditor.EditorDescriptor/@select" inputtype="multSelect" en_label="multiselect"></attribute> <attribute name="inputselect" label="输入下拉框" extends="xworker.example.ide.thingeditor.EditorDescriptor/@select" inputtype="inputSelect" en_label="inputselect"></attribute> <attribute name="treeselect" label="树形下拉选择框" inputtype="treeSelector" inputattrs="popWinWidth=300&dataSource=treeModel&READONLY=true&popWinHeight=450&selectType=single&BORDER=true&dataName=xworker.example.ide.thingeditor.TreeModels/@FileTreeModel" en_label="treeselect"></attribute> <attribute name="dropdownWindow" label="下拉弹出窗口" inputtype="popCombo" inputattrs="dynamicWinSize=false&compositePath=xworker.example.ide.thingeditor.DropDownWindow/@mainComposite&popWinWidth=400&popWinHeight=300&READ_ONLY=false&BORDER=false" en_label="popcombo"></attribute> <attribute name="truefalse" label="真假" inputtype="truefalse" en_label="truefase"></attribute> <attribute name="truefalseselect" label="真假下拉框" inputtype="truefalseselect" en_label="truefaseselect"></attribute> <attribute name="checkbox" label="复选框" extends="xworker.example.ide.thingeditor.EditorDescriptor/@select" inputtype="checkBox" en_label="checkbox"></attribute> <attribute name="radio" label="单选按钮" extends="xworker.example.ide.thingeditor.EditorDescriptor/@select" inputtype="radio" en_label="radio"></attribute> <attribute name="html" label="HTML文档输入" inputtype="html" group="HTML" en_label="html"></attribute> <attribute name="htmldesc" label="HTML说明" inputtype="htmlDesc" group="HTML" en_label="htmldoc"></attribute> <attribute name="hidden" label="隐藏输入" inputtype="hidden" en_label="hidden"></attribute> <attribute name="password" label="密码框" inputtype="password" en_label="password"></attribute> <attribute name="datepick" label="日期选择器" inputtype="datePick" group="日期" en_label="datepick"></attribute> <attribute name="datetime" label="日期时间输入" inputtype="dateTime" pattern="yyyy-MM-dd HH:mm:ss" group="日期" en_label="datetime"></attribute> <attribute name="time" label="时间输入" inputtype="time" group="日期" en_label="time"></attribute> <attribute name="openwindow" label="弹出窗口" inputtype="openWindow" group="选择器" inputattrs="xworker.swt.xworker.attributeEditor.openWins.FileSelector|" en_label="openwindow"></attribute> <attribute name="textbutton" label="文本框按钮" inputtype="textButton" group="选择器" inputattrs="buttonActionName=openShell&textReadOnly=false&buttonText=打开窗口" en_label="textbutton"> <actions> <MessageBox name="openShell" descriptors="xworker.swt.actions.MessageBoxActions/@MessageBox" title="文本框按钮" message="文本框按钮是文本+按钮的组合。"></MessageBox> </actions> </attribute> <attribute name="thingselecor" label="事物选择器" inputtype="dataSelector" group="选择器" en_label="thingselector"></attribute> <attribute name="pathSelector" label="路径选择器" inputtype="pathSelector" group="选择器" en_label="pathselector"></attribute> <attribute name="codeEditor" label="代码编辑器" inputtype="codeEditor" group="文本区" en_label="codeeitor"></attribute> <attribute name="fontSelector" label="字体选择器" inputtype="fontSelect" group="选择器" en_label="fontselector"></attribute> <attribute name="colorPick" label="颜色选择器" inputtype="colorpicker" group="选择器" en_label="colorpick"></attribute> <attribute name="imagePick" label="图片选择器" inputtype="imageSelector" group="选择器" en_label="imagepick"></attribute> <attribute name="filePick" label="文件选择器" inputtype="file" group="选择器" en_label="filepick"></attribute> <attribute name="dirPick" label="文件路径选择器" inputtype="filePath" group="选择器" en_label="dirpick"></attribute> <attribute name="dataTable" label="数据表格" inputtype="datatable" group="数据表格" inputattrs="desc=null&checkbox=true&dataStorePath=xworker.example.ide.thingeditor.DataStores&valueType=records&editable=false" en_label="dataTable"></attribute> </thing>
Copyright © 2007-2014 XWorker.org 版权所有