*/
public SpinnerDemoScreen() {
setTitle("Spinner Demo");
// Initialize a VerticalFieldManager
final VerticalFieldManager fieldManager = new VerticalFieldManager();
final Background background =
BackgroundFactory.createSolidBackground(Color.LIGHTBLUE);
final LabelField dateLabel =
new LabelField("Date Field", Field.FIELD_HCENTER);
dateLabel.setBackground(background);
fieldManager.add(dateLabel);
// Add a typical date field to the VerticalFieldManager
_dateField =
new DateField("Date/time: ", System.currentTimeMillis(),
DateField.DATE_TIME);
fieldManager.add(_dateField);
fieldManager.add(new SeparatorField());
// Add UI elements to the VerticalFieldManager, including fields
// which will allow a user to make selections from date/time and
// custom spinners.
final LabelField dateTimeLabel =
new LabelField("Date Time Picker", Field.FIELD_HCENTER);
dateTimeLabel.setBackground(background);
fieldManager.add(dateTimeLabel);
_editFieldDefault = new SelectionField("Default: ");
fieldManager.add(_editFieldDefault);
_editFieldDate = new SelectionField("Date only: ");
fieldManager.add(_editFieldDate);
_editFieldTime = new SelectionField("Time only: ");
fieldManager.add(_editFieldTime);
_editFieldLong = new SelectionField("Long date: ");
fieldManager.add(_editFieldLong);
_editFieldExpiry = new SelectionField("Expiry date: ");
fieldManager.add(_editFieldExpiry);
fieldManager.add(new SeparatorField());
final LabelField textSpinLabel =
new LabelField("Text Spin Box Field", Field.FIELD_HCENTER);
textSpinLabel.setBackground(background);
fieldManager.add(textSpinLabel);
_editFieldSpinbox = new SelectionField("City: ");
fieldManager.add(_editFieldSpinbox);
// Add the VerticalFieldManager to the screen
add(fieldManager);
}