use of org.eclipse.jface.fieldassist.TextControlCreator in project tdi-studio-se by Talend.
the class CommandController method estimateRowSize.
@Override
public int estimateRowSize(Composite subComposite, IElementParameter param) {
DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER, new TextControlCreator());
Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
dField.getLayoutControl().dispose();
return initialSize.y + ITabbedPropertyConstants.VSPACE;
}
use of org.eclipse.jface.fieldassist.TextControlCreator in project tdi-studio-se by Talend.
the class TextController 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) {
if (!estimateInitialized) {
final DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER, new TextControlCreator());
Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
dField.getLayoutControl().dispose();
rowSize = initialSize.y + ITabbedPropertyConstants.VSPACE;
estimateInitialized = true;
}
return rowSize;
}
use of org.eclipse.jface.fieldassist.TextControlCreator in project tdi-studio-se by Talend.
the class VersionController 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) {
DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER, new TextControlCreator());
Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
dField.getLayoutControl().dispose();
Button btnUp, btnDown;
//$NON-NLS-1$
btnUp = getWidgetFactory().createButton(subComposite, "M", SWT.PUSH);
Point btnUpSize = btnUp.computeSize(SWT.DEFAULT, SWT.DEFAULT);
btnUp.dispose();
//$NON-NLS-1$
btnDown = getWidgetFactory().createButton(subComposite, "m", SWT.PUSH);
Point btnDownSize = btnDown.computeSize(SWT.DEFAULT, SWT.DEFAULT);
btnDown.dispose();
Point btnSize = new Point(Math.max(btnUpSize.x, btnDownSize.x), Math.max(btnUpSize.y, btnDownSize.y));
return Math.max(btnSize.y, initialSize.y) + ITabbedPropertyConstants.VSPACE;
}
use of org.eclipse.jface.fieldassist.TextControlCreator in project tdi-studio-se by Talend.
the class PasswordController method estimateRowSize.
/*
* (non-Javadoc)
*
* @see
* org.talend.designer.core.ui.editor.properties.controllers.TextController#estimateRowSize(org.eclipse.swt.widgets
* .Composite, org.talend.core.model.process.IElementParameter)
*/
@Override
public int estimateRowSize(Composite subComposite, IElementParameter param) {
if (!estimateInitialized) {
final DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER, new TextControlCreator());
Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
dField.getLayoutControl().dispose();
//$NON-NLS-1$
Button btn = getWidgetFactory().createButton(subComposite, "", SWT.PUSH);
int buttonSize = btn.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
btn.dispose();
rowSize = Math.max(initialSize.y, buttonSize) + ITabbedPropertyConstants.VSPACE;
estimateInitialized = true;
}
return rowSize;
}
use of org.eclipse.jface.fieldassist.TextControlCreator in project tdi-studio-se by Talend.
the class DirectoryController 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) {
DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER, new TextControlCreator());
Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
dField.getLayoutControl().dispose();
return initialSize.y + ITabbedPropertyConstants.VSPACE;
}
Aggregations