The reason why I like HTML most, is because its flexibility. Even rookies can master it quickly. In eclipse there is form UI, in which FormText supports parsing HTML-like tags to render user interface.
Thought it doesn’t support free HTML style, it is still a big advantage over traditional Java UI building. We can easily format a paragraph of stylish text with bullet list, image, and links. How many efforts do you need in traditional Java way?
However, bear in mind that it doesn’t support all tags.The limitation rule is “FormText control is not, nor will it ever be, a web browser“.
The supported tags are list below. They MUST be used in the required order.
1. <form> as the root tag.
2. <form> tag can contains <p> and <li>.
3. <p> and <li> can contains text, <b>, <span>, <img> and <a> tags.
<img src=”img_key” />
<a href=”href“>link text</a>
<li> supports more attributes as explained below:
- style – can be “text”, “bullet” and “image” (default is “bullet”)
- value – not used for “bullet”; if style is “text”, the value will be rendered instead in place of a bullet; if style is “image”, value represents a key in the image table of an image to be rendered in place of a bullet
- vspace – the same as for the ‘p’ tag.
- indent – the number of pixels to indent text
- bindent – the number of pixels to indent the bullet (this number is independent from ‘indent’ – be careful not to overlap them)