use of org.eclipse.scout.rt.client.ui.form.fields.sequencebox.internal.SequenceBoxGrid in project scout.rt by eclipse.
the class AbstractSequenceBox method initConfig.
@Override
protected void initConfig() {
m_labelCompositionLock = new OptimisticLock();
m_grid = new SequenceBoxGrid();
super.initConfig();
setAutoCheckFromTo(getConfiguredAutoCheckFromTo());
setEqualColumnWidths(getConfiguredEqualColumnWidths());
// when range box has visible label, suppress first field's label and append
// to own label
propertySupport.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent e) {
if (e.getPropertyName().equals(IFormField.PROP_LABEL_VISIBLE) || e.getPropertyName().equals(IFormField.PROP_LABEL) || e.getPropertyName().equals(IFormField.PROP_VISIBLE)) {
updateLabelComposition();
}
}
});
// If inner fields change their visibility dynamically, the label of the SequenceBox might change.
for (IFormField field : getFields()) {
field.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent e) {
if (e.getPropertyName().equals(IFormField.PROP_LABEL_VISIBLE) || e.getPropertyName().equals(IFormField.PROP_LABEL) || e.getPropertyName().equals(IFormField.PROP_VISIBLE)) {
updateLabelComposition();
}
}
});
}
updateLabelComposition();
hideFieldStatusOfChildren();
// attach change triggers
attachCheckFromToListeners();
}
Aggregations