use of org.talend.commons.ui.swt.formtools.UtilsButton in project tdi-studio-se by Talend.
the class JSONFileStep2Form method addFields.
@Override
protected void addFields() {
// compositeFile Main Fields
// Composite mainComposite = Form.startNewGridLayout(this, 1);
SashForm mainComposite = new SashForm(this, SWT.VERTICAL | SWT.SMOOTH);
mainComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
if (firstTimeWizardOpened == null) {
firstTimeWizardOpened = Boolean.TRUE;
} else if (firstTimeWizardOpened.equals(Boolean.TRUE)) {
firstTimeWizardOpened = Boolean.FALSE;
}
// Splitter
this.jsonToSchemaSash = new SashForm(mainComposite, SWT.HORIZONTAL | SWT.SMOOTH);
jsonToSchemaSash.setLayoutData(new GridData(GridData.FILL_BOTH));
jsonToSchemaSash.setBackgroundMode(SWT.INHERIT_FORCE);
addGroupJSONFileSettings(jsonToSchemaSash, 400, 110);
addGroupSchemaTarget(jsonToSchemaSash, 300, 110);
jsonToSchemaSash.setWeights(new int[] { 40, 60 });
SashForm sash2 = new SashForm(mainComposite, SWT.HORIZONTAL | SWT.SMOOTH);
sash2.setLayoutData(new GridData(GridData.FILL_BOTH));
addGroupFileViewer(sash2, 400, 210);
if (!isInWizard()) {
// Bottom Button
Composite compositeBottomButton = Form.startNewGridLayout(this, 2, false, SWT.CENTER, SWT.CENTER);
// Button Cancel
cancelButton = new UtilsButton(compositeBottomButton, "Cancel", WIDTH_BUTTON_PIXEL, HEIGHT_BUTTON_PIXEL);
}
addUtilsButtonListeners();
mainComposite.setWeights(new int[] { 60, 40 });
}
use of org.talend.commons.ui.swt.formtools.UtilsButton in project tbd-studio-se by Talend.
the class HCatalogSchemaForm method addTreeNavigator.
private void addTreeNavigator(Composite parent, int width, int height) {
// $NON-NLS-1$
Group group = Form.createGroup(parent, 1, Messages.getString("HCatalogSchemaForm.group.schema.title"), height);
ScrolledComposite scrolledCompositeFileViewer = new ScrolledComposite(group, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NONE);
scrolledCompositeFileViewer.setExpandHorizontal(true);
scrolledCompositeFileViewer.setExpandVertical(true);
GridData gridData1 = new GridData(GridData.FILL_BOTH);
gridData1.widthHint = width + 12;
gridData1.heightHint = height;
gridData1.horizontalSpan = 2;
scrolledCompositeFileViewer.setLayoutData(gridData1);
tableViewerCreator = new TableViewerCreator(scrolledCompositeFileViewer);
tableViewerCreator.setHeaderVisible(false);
tableViewerCreator.setColumnsResizableByDefault(false);
tableViewerCreator.setBorderVisible(false);
tableViewerCreator.setLinesVisible(false);
tableViewerCreator.setLayoutMode(LAYOUT_MODE.NONE);
tableViewerCreator.setCheckboxInFirstColumn(false);
tableViewerCreator.setFirstColumnMasked(false);
tableNavigator = tableViewerCreator.createTable();
tableNavigator.setLayoutData(new GridData(GridData.FILL_BOTH));
TableColumn tableColumn = new TableColumn(tableNavigator, SWT.NONE);
// $NON-NLS-1$
tableColumn.setText(Messages.getString("HCatalogSchemaForm.tableNavigator.tableColumn"));
tableColumn.setWidth(width + 120);
scrolledCompositeFileViewer.setContent(tableNavigator);
scrolledCompositeFileViewer.setSize(width + 12, height);
GC gc = new GC(group);
// $NON-NLS-1$
String displayStr = Messages.getString("HCatalogSchemaForm.button.addSchema");
Point buttonSize = gc.stringExtent(displayStr);
GridData girdData = new GridData(buttonSize.x + 12, HEIGHT_BUTTON_PIXEL);
girdData.horizontalAlignment = SWT.CENTER;
// Button Add metadata Table
addTableBtn = new UtilsButton(group, displayStr, girdData);
// $NON-NLS-1$
displayStr = Messages.getString("HCatalogSchemaForm.button.removeSchema");
buttonSize = gc.stringExtent(displayStr);
if (buttonSize.x + 12 > girdData.widthHint) {
girdData.widthHint = buttonSize.x + 12;
}
girdData = new GridData(buttonSize.x + 12, HEIGHT_BUTTON_PIXEL);
girdData.horizontalAlignment = SWT.CENTER;
removeTableBtn = new UtilsButton(group, displayStr, girdData);
gc.dispose();
}
use of org.talend.commons.ui.swt.formtools.UtilsButton in project tbd-studio-se by Talend.
the class HCatalogTableSelectorForm method addButtonFields.
private void addButtonFields() {
GC gc = new GC(buttonsGroup);
// $NON-NLS-1$
String displayStr = Messages.getString("HCatalogTableSelectorForm.button.selectAll");
Point buttonSize = gc.stringExtent(displayStr);
selectAllBtn = new UtilsButton(buttonsGroup, displayStr, buttonSize.x + 12, HEIGHT_BUTTON_PIXEL);
// $NON-NLS-1$
displayStr = Messages.getString("HCatalogTableSelectorForm.button.selectNone");
buttonSize = gc.stringExtent(displayStr);
selectNoneBtn = new UtilsButton(buttonsGroup, displayStr, buttonSize.x + 12, HEIGHT_BUTTON_PIXEL);
// $NON-NLS-1$
displayStr = Messages.getString("HCatalogTableSelectorForm.button.checkConnection");
buttonSize = gc.stringExtent(displayStr);
checkConnectionBtn = new UtilsButton(buttonsGroup, displayStr, buttonSize.x + 12, HEIGHT_BUTTON_PIXEL);
gc.dispose();
}
use of org.talend.commons.ui.swt.formtools.UtilsButton in project tbd-studio-se by Talend.
the class HDFSFileSelectorForm method addButtonFields.
private void addButtonFields() {
GC gc = new GC(buttonsGroup);
// $NON-NLS-1$
String displayStr = Messages.getString("HDFSFileSelectorForm.button.selectAll");
Point buttonSize = gc.stringExtent(displayStr);
selectAllBtn = new UtilsButton(buttonsGroup, displayStr, buttonSize.x + 12, HEIGHT_BUTTON_PIXEL);
// $NON-NLS-1$
displayStr = Messages.getString("HDFSFileSelectorForm.button.selectNone");
buttonSize = gc.stringExtent(displayStr);
selectNoneBtn = new UtilsButton(buttonsGroup, displayStr, buttonSize.x + 12, HEIGHT_BUTTON_PIXEL);
// $NON-NLS-1$
displayStr = Messages.getString("HDFSFileSelectorForm.button.checkConnection");
buttonSize = gc.stringExtent(displayStr);
checkConnectionBtn = new UtilsButton(buttonsGroup, displayStr, buttonSize.x + 12, HEIGHT_BUTTON_PIXEL);
gc.dispose();
}
use of org.talend.commons.ui.swt.formtools.UtilsButton in project tbd-studio-se by Talend.
the class GoogleDataprocInfoForm method addCheckFields.
private void addCheckFields() {
Composite checkGroup = new Composite(this, SWT.NONE);
GridLayout checkGridLayout = new GridLayout(1, false);
checkGroup.setLayout(checkGridLayout);
GridData checkGridData = new GridData(GridData.FILL_HORIZONTAL);
checkGridData.minimumHeight = 5;
checkGroup.setLayoutData(checkGridData);
Composite checkButtonComposite = Form.startNewGridLayout(checkGroup, 1, false, SWT.CENTER, SWT.BOTTOM);
GridLayout checkButtonLayout = (GridLayout) checkButtonComposite.getLayout();
checkButtonLayout.marginHeight = 0;
checkButtonLayout.marginWidth = 0;
// $NON-NLS-1$
checkServicesBtn = new UtilsButton(checkButtonComposite, Messages.getString("HadoopClusterForm.button.check"), true);
checkServicesBtn.setEnabled(false);
}
Aggregations