开发者

paint a property pane from xml schema

开发者 https://www.devze.com 2023-01-15 10:12 出处:网络
We need to build a swing component to let users enter property values in a property sheet. These properties are defined in a XSD file. For example:

We need to build a swing component to let users enter property values in a property sheet.

These properties are defined in a XSD file. For example:

 <xs:complexType name="email">
  <xs:sequence>
   <xs:element minOccurs="0" name="body" type="xs:string" />
   <xs:element minOccurs="0" name="from" type="tns:person" />
   <xs:element minOccurs="0" name="subject" type="xs:string" />
  </xs:sequence>
 </xs:complexType>

will present user with 3 properties: Body, From and Subject in a property sheet.

开发者_C百科L2FProd Common Components has a nice component for editing properties. Before we start building ourselves, want to know if something exists already that does this.


You can deal with Xerces directly.

Other possibility is use the JAXFront libraries which creates forms from a XSD ans are configurables by the developer or by the user in order to configurate the most suitable view.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号