Layout l = getLayout();
TextField tf = new TextField("TextField");
l.addComponent(tf);
DateField df = new DateField("DateField");
l.addComponent(df);
ComboBox cb = new ComboBox("ComboBox");
l.addComponent(cb);
Button btn = new Button("Button");
l.addComponent(btn);
NativeButton nbtn = new NativeButton("NativeButton");
l.addComponent(nbtn);
CheckBox chkb = new CheckBox("CheckBox");
l.addComponent(chkb);
OptionGroup og = createOptionGroup("OptionGroup");
og.setMultiSelect(false);
l.addComponent(og);
final OptionGroup ogm = createOptionGroup("OptionGroup (multiselect)");
ogm.setMultiSelect(true);
l.addComponent(ogm);
btn.addListener(new ClickListener() {
private int i;
@Override
public void buttonClick(ClickEvent event) {
ogm.addItem("newItem" + i++);
}
});
tf.addListener(focusListener);
tf.addListener(blurListener);
df.addListener(focusListener);
df.addListener(blurListener);
cb.addListener(focusListener);
cb.addListener(blurListener);
btn.addListener(focusListener);
btn.addListener(blurListener);
nbtn.addListener(focusListener);