fillSelectedFacts();
return true;
}
});
factsCombo.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
fillSelectedFactFields();
}
});
fieldsCombo.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
fillFieldConstrains();
}
});
Image addNewConstraint = new ImageButton("images/new_item.gif"); // NON-NLS
addNewConstraint.setTitle(constants.AddNewConstraint());
addNewConstraint.addClickListener(new ClickListener() {
public void onClick(Widget w) {
showNewConstrainPop();
}
});
Image removeConstraint = new Image( "images/trash.gif" ); //NON-NLS
removeConstraint.setTitle(constants.removeConstraint());
removeConstraint.addClickListener(new ClickListener() {
public void onClick(Widget arg0) {
removeConstraint();
}
});
final FlexTable table = new FlexTable();
VerticalPanel vp = new VerticalPanel();
vp.add(new SmallLabel(constants.FactTypes()));
vp.add(factsCombo);
table.setWidget(0, 0, vp);
vp = new VerticalPanel();
vp.add(new SmallLabel(constants.Field()));
vp.add(fieldsCombo);
table.setWidget(1, 0, vp);
vp = new VerticalPanel();
HorizontalPanel hp = new HorizontalPanel();
vp.add(new SmallLabel("Constraints")); //TODO i18n
hp.add(constraintsCombo);
VerticalPanel btnPanel = new VerticalPanel();
btnPanel.add(addNewConstraint);
btnPanel.add(removeConstraint);
hp.add(btnPanel);
vp.add(hp);
table.setWidget(2, 0, vp);
table.getFlexCellFormatter().setRowSpan(2, 0, 3);
constraintsCombo.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
showConstraintConfig();
}
});