_tblAllowedPositions.getTableViewer().setCellEditors(cellEditors);
comboPositioning.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
WGPositioningMetaFieldDefinitionModel model = (WGPositioningMetaFieldDefinitionModel)_subformModels.get(SUBFORM_META_POSITIONING);
if (model.getPositioning().getKey().equals(WGContentType.POSITIONING_FIXEDPARENTS) || model.getPositioning().getKey().equals(WGContentType.POSITIONING_FIXEDPARENTTYPES)) {
_tblAllowedPositions.setVisible(true);
WGContentTypeDefinition cTypeDefinition = _model.findContentTypeDefinition(model.getBean());
((PrimitiveTypeBeanListTableModel<String>)_tblAllowedPositions.getModel()).bind(model.getAllowedPositions(cTypeDefinition));
} else {
_tblAllowedPositions.setVisible(false);
}
}
});
_tblAllowedPositions.getButton(EditableTableControl.BUTTON_ADD).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
handleAdd(_tblAllowedPositions, "<value>");
}
});
_tblAllowedPositions.getButton(EditableTableControl.BUTTON_REMOVE).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
handleRemove(_tblAllowedPositions);
}
});
WGPositioningMetaFieldDefinitionModel positioningMetaFieldDefinitionModel = new WGPositioningMetaFieldDefinitionModel(_model);
positioningMetaFieldDefinitionModel.addListener(new BeanChangedListener<WGMetaFieldDefinition>() {
public void changed(WGMetaFieldDefinition bean) {
_treeViewer.refresh(bean, true);
_model.fireModelChanged();
}
});