use of org.eclipse.jface.fieldassist.IControlCreator in project tesb-studio-se by Talend.
the class RouteResourceController method estimateRowSize.
/*
* (non-Javadoc)
*
* @see org.talend.designer.core.ui.editor.properties.controllers.
* AbstractElementPropertySectionController#estimateRowSize (org.eclipse.swt.widgets.Composite,
* org.talend.core.model.process.IElementParameter)
*/
@Override
public int estimateRowSize(Composite subComposite, IElementParameter param) {
final DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER, new IControlCreator() {
public Control createControl(Composite parent, int style) {
return getWidgetFactory().createButton(parent, EParameterName.ROUTE_RESOURCE_TYPE.getDisplayName(), SWT.None);
}
});
Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
dField.getLayoutControl().dispose();
return initialSize.y + ITabbedPropertyConstants.VSPACE;
}
Aggregations