use of org.talend.designer.abstractmap.ui.listener.MouseScrolledListener in project tdi-studio-se by Talend.
the class MapperUI method createVarsZoneWithTables.
private void createVarsZoneWithTables(MapperModel mapperModel, final Display display) {
Control previousControl;
// Feature TDI-26691 : Add search option
SearchZone searchZone = new SearchZone(datasFlowViewSashForm, SWT.NONE, mapperManager);
searchZone.createSearchZone();
sc2 = new ScrolledComposite(searchZone, getBorder() | SWT.H_SCROLL | SWT.V_SCROLL);
GridData sc2GridData = new GridData(GridData.FILL_BOTH);
sc2.setLayoutData(sc2GridData);
varsTableZoneView = new VarsTableZoneView(sc2, getBorder(), mapperManager);
sc2.setContent(varsTableZoneView);
sc2.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc2.setExpandHorizontal(true);
sc2.addControlListener(new ControlListener() {
public void controlMoved(ControlEvent e) {
// System.out.println("sc2 controlMoved");
}
public void controlResized(ControlEvent e) {
// System.out.println("sc2 controlResized");
onSashResized(display);
}
});
sc2MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc2);
varsTableZoneView.initInsertionIndicator();
// final Composite finalTablesZoneViewVars = tablesZoneViewVars;
previousControl = null;
for (VarsTable varsTable : mapperModel.getVarsDataMapTables()) {
DataMapTableView dataMapTableView = new VarsDataMapTableView(varsTableZoneView, SWT.BORDER, varsTable, mapperManager);
FormData formData = new FormData();
formData.left = new FormAttachment(0, 0);
formData.right = new FormAttachment(100, 0);
formData.top = new FormAttachment(previousControl);
dataMapTableView.setLayoutData(formData);
previousControl = dataMapTableView;
dataMapTableView.minimizeTable(varsTable.isMinimized());
dataMapTableView.registerStyledExpressionEditor(getTabFolderEditors().getStyledTextHandler());
// dataMapTableView.fillMinimumSize(false);
}
varsTableZoneView.setSize(varsTableZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
sc2MSListener.addMouseWheelListener(sc2);
}
use of org.talend.designer.abstractmap.ui.listener.MouseScrolledListener 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);
outputTablesZoneView.initInsertionIndicator();
previousControl = null;
List<OutputTable> tables = mapperModel.getOutputDataMapTables();
Boolean minimizeStateOfTables = getMinimizedButtonState(tables);
if (minimizeStateOfTables != null) {
outputsZone.getToolbar().setMinimizeButtonState(minimizeStateOfTables.booleanValue());
}
sc3MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc3);
for (OutputTable outputTable : tables) {
OutputDataMapTableView dataMapTableView = uiManager.createNewOutputTableView(previousControl, outputTable, outputTablesZoneView);
previousControl = dataMapTableView;
}
outputTablesZoneView.setSize(outputTablesZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
use of org.talend.designer.abstractmap.ui.listener.MouseScrolledListener in project tdi-studio-se by Talend.
the class MapperUI method createInputZoneWithTables.
private void createInputZoneWithTables(MapperModel mapperModel, final Display display) {
inputsZone = new InputsZone(datasFlowViewSashForm, SWT.NONE, mapperManager);
inputsZone.createHeaderZoneComponents();
sc1 = new ScrolledComposite(inputsZone, getBorder() | SWT.H_SCROLL | SWT.V_SCROLL);
// this.dropTargetOperationListener.addControl(sc1);
GridData sc1GridData = new GridData(GridData.FILL_BOTH);
sc1.setLayoutData(sc1GridData);
sc1.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc1.addControlListener(new ControlListener() {
public void controlMoved(ControlEvent e) {
// System.out.println("sc1 controlMoved");
}
public void controlResized(ControlEvent e) {
// System.out.println("sc1 controlResized");
onSashResized(display);
}
});
// add for auto scroll
new DragNDrop(mapperManager, sc1, true, true);
inputTablesZoneView = new InputTablesZoneView(sc1, getBorder(), mapperManager);
// this.dropTargetOperationListener.addControl(inputTablesZoneView);
inputTablesZoneView.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc1.setExpandHorizontal(true);
sc1.setContent(inputTablesZoneView);
sc1MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc1);
inputTablesZoneView.initInsertionIndicator();
Control previousControl = null;
List<InputTable> tables = mapperModel.getInputDataMapTables();
Boolean minimizeStateOfTables = getMinimizedButtonState(tables);
if (minimizeStateOfTables != null) {
inputsZone.getToolbar().setMinimizeButtonState(minimizeStateOfTables.booleanValue());
}
for (InputTable inputTable : tables) {
InputDataMapTableView dataMapTableView = new InputDataMapTableView(inputTablesZoneView, SWT.BORDER, inputTable, mapperManager);
FormData formData = new FormData();
formData.left = new FormAttachment(0, 0);
formData.right = new FormAttachment(100, 0);
formData.top = new FormAttachment(previousControl);
dataMapTableView.setLayoutData(formData);
previousControl = dataMapTableView;
boolean tableIsMinimized = inputTable.isMinimized();
dataMapTableView.minimizeTable(tableIsMinimized);
dataMapTableView.registerStyledExpressionEditor(getTabFolderEditors().getStyledTextHandler());
dataMapTableView.loaded();
// dataMapTableView.fillMinimumSize(false);
}
inputTablesZoneView.setSize(inputTablesZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
sc1MSListener.addMouseWheelListener(sc1);
}
use of org.talend.designer.abstractmap.ui.listener.MouseScrolledListener in project tdi-studio-se by Talend.
the class MapperUI method createVarsZoneWithTables.
private void createVarsZoneWithTables(MapperModel mapperModel, final Display display) {
Control previousControl;
// Feature TDI-26691 : Add search option
SearchZone searchZone = new SearchZone(datasFlowViewSashForm, SWT.NONE, mapperManager);
searchZone.createSearchZone();
sc2 = new ScrolledComposite(searchZone, getBorder() | SWT.H_SCROLL | SWT.V_SCROLL);
GridData sc2GridData = new GridData(GridData.FILL_BOTH);
sc2.setLayoutData(sc2GridData);
varsTableZoneView = new VarsTableZoneView(sc2, getBorder(), mapperManager);
// this.dropTargetOperationListener.addControl(varsTableZoneView);
sc2.setContent(varsTableZoneView);
sc2.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc2.setExpandHorizontal(true);
sc2.addControlListener(new ControlListener() {
public void controlMoved(ControlEvent e) {
// System.out.println("sc2 controlMoved");
}
public void controlResized(ControlEvent e) {
// System.out.println("sc2 controlResized");
onSashResized(display);
}
});
sc2MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc2);
// varsTableZoneView.initInsertionIndicator();
//
// // final Composite finalTablesZoneViewVars = tablesZoneViewVars;
//
// previousControl = null;
// for (IDataMapTable abstractDataMapTable : mapperModel.getVarsDataMapTables()) {
//
// DataMapTableView dataMapTableView = new VarsDataMapTableView(varsTableZoneView, SWT.BORDER,
// abstractDataMapTable, mapperManager);
//
// FormData formData = new FormData();
// formData.left = new FormAttachment(0, 0);
// formData.right = new FormAttachment(100, 0);
// formData.top = new FormAttachment(previousControl);
// dataMapTableView.setLayoutData(formData);
// previousControl = dataMapTableView;
// dataMapTableView.minimizeTable(abstractDataMapTable.isMinimized());
// // dataMapTableView.registerStyledExpressionEditor(getTabFolderEditors().getStyledTextHandler());
// // dataMapTableView.fillMinimumSize(false);
// }
varsTableZoneView.setSize(varsTableZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
use of org.talend.designer.abstractmap.ui.listener.MouseScrolledListener in project tdi-studio-se by Talend.
the class MapperUI method createInputZoneWithTables.
private void createInputZoneWithTables(MapperModel mapperModel, UIManager uiManager, final Display display) {
inputsZone = new InputsZone(datasFlowViewSashForm, SWT.NONE, mapperManager);
inputsZone.createHeaderZoneComponents();
sc1 = new ScrolledComposite(inputsZone, getBorder() | SWT.H_SCROLL | SWT.V_SCROLL);
// this.dropTargetOperationListener.addControl(sc1);
GridData sc1GridData = new GridData(GridData.FILL_BOTH);
sc1.setLayoutData(sc1GridData);
sc1.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc1.addControlListener(new ControlListener() {
public void controlMoved(ControlEvent e) {
// System.out.println("sc1 controlMoved");
}
public void controlResized(ControlEvent e) {
// System.out.println("sc1 controlResized");
onSashResized(display);
}
});
inputTablesZoneView = new InputTablesZoneView(sc1, getBorder(), mapperManager);
// this.dropTargetOperationListener.addControl(inputTablesZoneView);
inputTablesZoneView.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc1.setExpandHorizontal(true);
sc1.setContent(inputTablesZoneView);
sc1MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc1);
inputTablesZoneView.initInsertionIndicator();
Control previousControl = null;
List<InputTable> tables = mapperModel.getInputDataMapTables();
Boolean minimizeStateOfTables = getMinimizedButtonState(tables);
if (minimizeStateOfTables != null) {
inputsZone.getToolbar().setMinimizeButtonState(minimizeStateOfTables.booleanValue());
}
for (InputTable inputTable : tables) {
InputDataMapTableView dataMapTableView = uiManager.createNewInputTableView(previousControl, inputTable, inputTablesZoneView);
if (previousControl == null) {
uiManager.updateDropDownJoinTypeForInputs();
}
previousControl = dataMapTableView;
}
inputTablesZoneView.setSize(inputTablesZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
Aggregations