Most Java™ Objects specified in .xxe_gui
files may be parameterized using property
child elements. A property child element specifies a Bean (that is, a Java™ Object) property.
Example:
<property name="columns" type="int" value="40" />
implies that the bean to be parametrized has a public method which resembles:
setColumns(int number)
Such properties are completely specific to the bean they parametrize and therefore, cannot be described in this manual.
type | Corresponding Java™ type | Syntax of value | Example |
---|---|---|---|
boolean | boolean | true, false | true |
byte | byte | integer: -128 to 127 inclusive | 100 |
char | char | a single character | a |
short | short | integer: -32768 to 32767 inclusive | 1000 |
int | int | integer: -2147483648 to 2147483647 inclusive | -1 |
long | long | integer: -9223372036854775808 to 9223372036854775807, inclusive | 255 |
float | float | single-precision 32-bit format IEEE 754 | -0.5 |
double | double | double-precision 64-bit format IEEE 754 | 1.0 |
String | java.lang.String | a string | Hello, world! |
Color | java.awt.Color |
|
|
Font | java.awt.Font |
Default Default |
|
URL | java.net.URL | any URL supported by XXE. A relative URL is resolved against the location of the .xxe_gui file containing the bean property specification. |
|
Example (a StatusTool
is a kind of JTextField
):
<tool name="heavilyParametrizedStatusTool"> <class>com.xmlmind.xmleditapp.desktop.part.StatusTool</class> <property name="text" type="String" value=" Hello, world! " /> <property name="editable" type="boolean" value="true" /> <property name="focusable" type="boolean" value="true" /> <property name="horizontalAlignment" type="int" value="RIGHT" /> <property name="font" type="Font" value="Serif-BOLD-16" /> <property name="foreground" type="Color" value="#000080" /> <property name="background" type="Color" value="silver" /> <property name="selectedTextColor" type="Color" value="rgb(255,0,0)" /> <property name="caretPosition" type="int" value="5" /> <property name="alignmentX" type="float" value="0.5" /> </tool>