use of org.talend.commons.ui.swt.formtools.LabelledFileField in project tdi-studio-se by Talend.
the class HeaderComposite method createComponents.
private void createComponents() {
this.setLayout(new GridLayout(3, false));
GridData headerCompositeGridData = new GridData(GridData.FILL_HORIZONTAL);
this.setLayoutData(headerCompositeGridData);
//$NON-NLS-N$
String[] extensions = new String[] { "*.*" };
fileField = new LabelledFileField(this, "File path:", extensions, 1, SWT.BORDER) {
protected void setFileFieldValue(String result) {
if (result != null) {
getTextControl().setText(TalendTextUtils.addQuotes(PathUtils.getPortablePath(result)));
}
}
};
fileField.setText(filePath);
fileField.setEditable(!isRepository);
final Group group = Form.createGroup(this, 4, "File Setting", 30);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
group.setLayoutData(gridData);
startChar = new LabelledText(group, "Start character");
startChar.setText(startCharValue);
startChar.setEditable(!isRepository);
endChar = new LabelledText(group, "End character");
endChar.setText(endCharValue);
endChar.setEditable(!isRepository);
addListeners();
}
use of org.talend.commons.ui.swt.formtools.LabelledFileField in project tdi-studio-se by Talend.
the class JSONFileOutputStep1Form method createOutputFile.
private void createOutputFile(final Composite mainComposite, final int width, final int height) {
Group group = Form.createGroup(mainComposite, 1, "Output File Path", height);
GridData fileData = new GridData(GridData.FILL_HORIZONTAL);
fileData.heightHint = 60;
group.setLayoutData(fileData);
Composite compositeFile = Form.startNewDimensionnedGridLayout(group, 3, WIDTH_GRIDDATA_PIXEL, height);
String[] outputExtensions = new String[] { "*.JSON" };
outputFilePath = new LabelledFileField(compositeFile, "Output file", outputExtensions);
outputFilePath.setText("");
}
use of org.talend.commons.ui.swt.formtools.LabelledFileField in project tdi-studio-se by Talend.
the class GenerateDocAsHTMLWizardPage method createCssDestinationGroup.
protected void createCssDestinationGroup(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
boolean isCheck = CorePlugin.getDefault().getPreferenceStore().getBoolean(ITalendCorePrefConstants.USE_CSS_TEMPLATE);
button = new Button(composite, SWT.CHECK);
//$NON-NLS-1$
button.setText(Messages.getString("GenerateDocAsHTMLWizardPage.custom_css"));
button.setSelection(isCheck);
//$NON-NLS-1$
new Label(composite, SWT.NONE).setText(Messages.getString("GenerateDocAsHTMLWizardPage.default_css_template"));
Composite composite1 = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 3;
composite1.setLayout(layout);
composite1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
String value = CorePlugin.getDefault().getPreferenceStore().getString(ITalendCorePrefConstants.CSS_FILE_PATH);
if (isCheck && value != null && !value.equals("")) {
//$NON-NLS-1$
cssFilePath = value;
}
//$NON-NLS-1$ //$NON-NLS-2$
String[] cssExtensions = { "*.css", "*.*" };
//$NON-NLS-1$
cssField = new LabelledFileField(composite1, Messages.getString("GenerateDocAsHTMLWizardPage.css_file"), cssExtensions);
cssField.setEditable(button.getSelection());
cssField.setText(value);
}
use of org.talend.commons.ui.swt.formtools.LabelledFileField in project tdi-studio-se by Talend.
the class MultiSchemasUI method createFileGroup.
private void createFileGroup(Composite fileGroup) {
fileGroup.setLayout(new GridLayout(3, false));
fileField = new LabelledFileField(fileGroup, ExternalMultiSchemasUIProperties.FILE_LABEL, ExternalMultiSchemasUIProperties.FILE_EXTENSIONS, 1, SWT.BORDER) {
@Override
protected void setFileFieldValue(String result) {
if (result != null) {
getTextControl().setText(TalendTextUtils.addQuotes(PathUtils.getPortablePath(result)));
}
}
};
Composite settings = new Composite(fileGroup, SWT.NONE);
GridData layoutData = new GridData(GridData.FILL_HORIZONTAL);
layoutData.horizontalSpan = 3;
settings.setLayoutData(layoutData);
settings.setLayout(new GridLayout(2, false));
addGroupMultiSchemaSettings(settings);
addGroupEscapeChar(settings);
}
Aggregations