use of org.eclipse.swt.custom.ScrolledComposite in project tdi-studio-se by Talend.
the class MapperUI method createOutputZoneWithTables.
private void createOutputZoneWithTables(MapperModel mapperModel, final UIManager uiManager, final Display display) {
Control previousControl;
outputsZone = new OutputsZone(datasFlowViewSashForm, SWT.NONE, mapperManager);
outputsZone.createHeaderZoneComponents();
// this.dropTargetOperationListener.addControl(outputsZone);
sc3 = new ScrolledComposite(outputsZone, getBorder() | SWT.H_SCROLL | SWT.V_SCROLL);
// this.dropTargetOperationListener.addControl(sc3);
GridData sc3GridData = new GridData(GridData.FILL_BOTH);
sc3.setLayoutData(sc3GridData);
sc3.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc3.addControlListener(new ControlListener() {
public void controlMoved(ControlEvent e) {
// System.out.println("sc3 controlMoved");
}
public void controlResized(ControlEvent e) {
// System.out.println("sc3 controlResized");
onSashResized(display);
}
});
outputTablesZoneView = new OutputTablesZoneView(sc3, getBorder(), mapperManager);
// this.dropTargetOperationListener.addControl(outputTablesZoneView);
outputTablesZoneView.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc3.setExpandHorizontal(true);
sc3.setContent(outputTablesZoneView);
sc3MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc3);
outputTablesZoneView.initInsertionIndicator();
previousControl = null;
List<OutputTable> tables = mapperModel.getOutputDataMapTables();
Boolean minimizeStateOfTables = getMinimizedButtonState(tables);
if (minimizeStateOfTables != null) {
outputsZone.getToolbar().setMinimizeButtonState(minimizeStateOfTables.booleanValue());
}
for (IDataMapTable abstractDataMapTable : tables) {
OutputDataMapTableView dataMapTableView = uiManager.createNewOutputTableView(previousControl, abstractDataMapTable, outputTablesZoneView);
previousControl = dataMapTableView;
}
outputTablesZoneView.setSize(outputTablesZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
use of org.eclipse.swt.custom.ScrolledComposite in project tdi-studio-se by Talend.
the class UIManager method moveOutputScrollBarZoneAtSelectedTable.
private void moveOutputScrollBarZoneAtSelectedTable() {
Rectangle bounds = currentSelectedOutputTableView.getBounds();
int selection = bounds.y - 30;
ScrolledComposite scrolledCompositeViewOutputs = getScrolledCompositeViewOutputs();
setPositionOfVerticalScrollBarZone(scrolledCompositeViewOutputs, selection);
}
use of org.eclipse.swt.custom.ScrolledComposite in project tdi-studio-se by Talend.
the class ImportCompatibleEcoComponentsComposite method createControls.
public void createControls(Composite parent) {
setLayout(new GridLayout());
setLayoutData(new GridData(GridData.FILL_BOTH));
creatOptions(parent);
Composite tableComposite = new Composite(parent, SWT.NONE);
tableComposite.setLayout(new GridLayout());
GridData layoutData = new GridData(GridData.FILL_BOTH);
layoutData.heightHint = HEIGHT;
layoutData.minimumHeight = HEIGHT;
tableComposite.setLayoutData(layoutData);
scrolledCompositeFileViewer = new ScrolledComposite(tableComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NONE);
scrolledCompositeFileViewer.setExpandHorizontal(true);
scrolledCompositeFileViewer.setExpandVertical(true);
GridData gridData1 = new GridData(GridData.FILL_BOTH);
gridData1.widthHint = 300;
gridData1.heightHint = 325;
gridData1.horizontalSpan = 2;
scrolledCompositeFileViewer.setLayoutData(gridData1);
createTable();
}
use of org.eclipse.swt.custom.ScrolledComposite in project bndtools by bndtools.
the class PluginPropertiesPage method createControl.
public void createControl(Composite parent) {
setTitle("Plug-in Configuration");
setDescription("Set configuration properties for the plug-in.");
// Create controls
mainComposite = new Composite(parent, SWT.NONE);
Group group = new Group(mainComposite, SWT.NONE);
group.setText("Properties");
group.setLayout(new FillLayout());
ScrolledComposite scroller = new ScrolledComposite(group, SWT.V_SCROLL);
fieldContainer = new Composite(scroller, SWT.NONE);
scroller.setMinSize(200, 200);
scroller.setExpandVertical(true);
scroller.setExpandHorizontal(true);
scroller.setContent(fieldContainer);
Label separator = new Label(mainComposite, SWT.SEPARATOR | SWT.HORIZONTAL);
Composite classpathComposite = new Composite(mainComposite, SWT.NONE);
new Label(classpathComposite, SWT.NONE).setText("Classpath:");
txtPath = new Text(classpathComposite, SWT.BORDER);
resetPropertyFields();
String path = properties.get(Constants.PATH_DIRECTIVE);
if (path != null)
txtPath.setText(path);
txtPath.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
String path = txtPath.getText();
if (path == null || path.length() == 0)
properties.remove(Constants.PATH_DIRECTIVE);
else
properties.put(Constants.PATH_DIRECTIVE, path);
changed = true;
}
});
// Layout
GridLayout layout;
GridData gd;
layout = new GridLayout(1, false);
mainComposite.setLayout(layout);
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
group.setLayoutData(gd);
gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
separator.setLayoutData(gd);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
classpathComposite.setLayoutData(gd);
layout = new GridLayout(2, false);
layout.verticalSpacing = 10;
layout.horizontalSpacing = 10;
fieldContainer.setLayout(layout);
layout = new GridLayout(2, false);
classpathComposite.setLayout(layout);
gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
txtPath.setLayoutData(gd);
setControl(mainComposite);
}
use of org.eclipse.swt.custom.ScrolledComposite in project bndtools by bndtools.
the class ErrorDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
Composite c2 = new Composite(composite, SWT.NONE);
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
gridLayout.horizontalSpacing = 0;
gridLayout.verticalSpacing = 5;
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 10;
c2.setLayout(gridLayout);
c2.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
Label label = new Label(c2, SWT.NONE);
label.setText(Messages.project);
Text projName = new Text(c2, SWT.BORDER);
projName.setEditable(false);
projName.setText(name);
ScrolledComposite scrolled = new ScrolledComposite(composite, SWT.H_SCROLL | SWT.V_SCROLL);
gridLayout = new GridLayout();
gridLayout.numColumns = 1;
gridLayout.horizontalSpacing = 0;
gridLayout.verticalSpacing = 5;
gridLayout.marginWidth = 10;
gridLayout.marginHeight = 10;
scrolled.setLayout(gridLayout);
GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
scrolled.setLayoutData(gridData);
errorList.createControl(scrolled);
scrolled.setExpandHorizontal(true);
scrolled.setExpandVertical(true);
scrolled.setContent(errorList.getControl());
// scrolled.setMinSize(500, 500);
scrolled.layout(true);
return composite;
}
Aggregations