new Point2D.Double(140, 268),
AlignmentXEnum.Right,
AlignmentYEnum.Middle,
0
);
ListBox field = new ListBox(
"myList",
new Widget(
page,
new Rectangle(150, 250, 200, 70)
)
); // 4.1. Field instantiation.
field.setItems(items); // List items assignment.
field.setMultiSelect(false); // Multiple items may not be selected simultaneously.
field.setValue("Carmen Consoli"); // Selected item.
fields.add(field); // 4.2. Field insertion into the fields collection.
fieldStyle.apply(field); // 4.3. Appearance style applied.
}
// 4.e2. Combo box.
{
composer.showText(
"ComboBox:",
new Point2D.Double(140, 350),
AlignmentXEnum.Right,
AlignmentYEnum.Middle,
0
);
ComboBox field = new ComboBox(
"myCombo",
new Widget(
page,
new Rectangle(150, 334, 200, 36)
)
); // 4.1. Field instantiation.
field.setItems(items); // Combo items assignment.
field.setEditable(true); // Text may be edited.
field.setSpellChecked(false); // Avoids text spell check.
field.setValue("Carmen Consoli"); // Selected item.
fields.add(field); // 4.2. Field insertion into the fields collection.
fieldStyle.apply(field); // 4.3. Appearance style applied.
}
}