GUI Object Converters

The following interpolating converters create objects that are used mostly by GUI components.


Atomic Converters

These converters are singleton instance fields in com.taco.swinger.text2gui.ICommonGUIConverters. The converter for each field is named from the type created, in all capital letters, suffixed with _CONVERTER. For example, the converter to type Font is ICommonGUI.Converters.FONT_CONVERTER.

Type Created
String Syntax
Note
Color
Any static field name in Color, e.g. RED, or a  number parseable by Color.decode().

Font
Same as for Font.getFont(String), e.g. Monospaced-PLAIN-14.

Cursor
One of  crosshair, default, eastResize, hand, move, northResize, northeastResize, northwestResize, southResize, southeastResize, southwestResize, text, westResize, or wait.

KeyStroke
Same as for KeyStroke.getKeyStroke(String), e.g. ctrl B.

KeyCode
The part after the VK_ of the static field names of KeyEvent. For example, F5.
Case sensitive!
Range
{start-end}
where start and end have the syntax for the integer converter.
Represents the start and end index (inclusive) of a range. The object created is a two element int array.


Composite Converters

The following converters all have the braced property syntax.

Dimension (dim)
Type
Map Consistency
Note
Creation Properties



<None>



Properties



width
Integer
No

height
Integer No


Point (point)
Type
Map Consistency
Note
Creation Properties



<None>



Properties



x
Integer
No

y
Integer No


Rectangle (rect)
Type
Map Consistency
Note
Creation Properties



<None>



Properties



x
Integer
No

y
Integer No

width
Integer
No

height
Integer No


Insets (insets)
Type
Map Consistency
Note
Creation Properties



top
Integer No
left
Integer No
bottom
Integer
No

right
Integer No

Properties



<None>




ImageIcon (icon)
Type
Map Consistency
Note
Creation Properties



location
Quoted String No Should be a string representation of a URL.
description
Quoted String No
Properties



<None>