Search in sources :

Example 41 with FormData

use of org.eclipse.swt.layout.FormData 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);
}
Also used : FormData(org.eclipse.swt.layout.FormData) VarsTable(org.talend.designer.mapper.model.table.VarsTable) OutputDataMapTableView(org.talend.designer.mapper.ui.visualmap.table.OutputDataMapTableView) InputDataMapTableView(org.talend.designer.mapper.ui.visualmap.table.InputDataMapTableView) VarsDataMapTableView(org.talend.designer.mapper.ui.visualmap.table.VarsDataMapTableView) DataMapTableView(org.talend.designer.mapper.ui.visualmap.table.DataMapTableView) MouseScrolledListener(org.talend.designer.abstractmap.ui.listener.MouseScrolledListener) SearchZone(org.talend.designer.mapper.ui.visualmap.zone.SearchZone) VarsDataMapTableView(org.talend.designer.mapper.ui.visualmap.table.VarsDataMapTableView) Control(org.eclipse.swt.widgets.Control) GridData(org.eclipse.swt.layout.GridData) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) ControlListener(org.eclipse.swt.events.ControlListener) ControlEvent(org.eclipse.swt.events.ControlEvent) FormAttachment(org.eclipse.swt.layout.FormAttachment) VarsTableZoneView(org.talend.designer.mapper.ui.visualmap.zone.scrollable.VarsTableZoneView)

Example 42 with FormData

use of org.eclipse.swt.layout.FormData 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);
}
Also used : FormData(org.eclipse.swt.layout.FormData) InputDataMapTableView(org.talend.designer.mapper.ui.visualmap.table.InputDataMapTableView) MouseScrolledListener(org.talend.designer.abstractmap.ui.listener.MouseScrolledListener) InputTable(org.talend.designer.mapper.model.table.InputTable) Control(org.eclipse.swt.widgets.Control) InputsZone(org.talend.designer.mapper.ui.visualmap.zone.InputsZone) DragNDrop(org.talend.designer.mapper.ui.dnd.DragNDrop) InputTablesZoneView(org.talend.designer.mapper.ui.visualmap.zone.scrollable.InputTablesZoneView) GridData(org.eclipse.swt.layout.GridData) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) ControlListener(org.eclipse.swt.events.ControlListener) ControlEvent(org.eclipse.swt.events.ControlEvent) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Example 43 with FormData

use of org.eclipse.swt.layout.FormData in project tdi-studio-se by Talend.

the class MemoryRuntimeComposite method createTopGroup.

private Group createTopGroup(Composite parent) {
    Composite topComposite = new Composite(parent, SWT.NULL);
    FormLayout topLayout = new FormLayout();
    FormData topData = new FormData();
    topData.left = new FormAttachment(0, 10);
    topData.right = new FormAttachment(100, 0);
    topData.top = new FormAttachment(0, 0);
    topComposite.setLayout(topLayout);
    topComposite.setLayoutData(topData);
    Group topGroup = new Group(topComposite, SWT.NULL);
    //$NON-NLS-1$
    topGroup.setText("Monitor Control");
    GridLayout groupLayout = new GridLayout(5, false);
    FormData groupData = new FormData();
    groupData.left = new FormAttachment(0, 0);
    groupData.right = new FormAttachment(100, 0);
    groupData.top = new FormAttachment(0, 0);
    groupData.bottom = new FormAttachment(100, 0);
    topGroup.setLayout(groupLayout);
    topGroup.setLayoutData(groupData);
    return topGroup;
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) FormData(org.eclipse.swt.layout.FormData) Group(org.eclipse.swt.widgets.Group) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) AbstractRuntimeGraphcsComposite(org.talend.designer.runtime.visualization.views.AbstractRuntimeGraphcsComposite) RuntimeGraphcsComposite(org.talend.designer.runtime.visualization.views.RuntimeGraphcsComposite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Example 44 with FormData

use of org.eclipse.swt.layout.FormData in project tdi-studio-se by Talend.

the class AdvanceSettingComposite method createLog4jOptions.

private void createLog4jOptions(Composite parent) {
    customLog4j = new Button(parent, SWT.CHECK);
    //$NON-NLS-1$
    customLog4j.setText(Messages.getString("ProcessComposite.log4jLevel"));
    //$NON-NLS-1$
    customLog4j.setToolTipText(Messages.getString("ProcessComposite.log4jToolTip"));
    FormData layouDatale = new FormData();
    layouDatale.left = new FormAttachment(0, 10);
    layouDatale.right = new FormAttachment(0, 200);
    layouDatale.top = new FormAttachment(watchBtn, 0);
    layouDatale.bottom = new FormAttachment(watchBtn, 50);
    customLog4j.setLayoutData(layouDatale);
    log4jLevel = new Combo(parent, SWT.READ_ONLY);
    //$NON-NLS-1$
    log4jLevel.setText(Messages.getString("ProcessComposite.log4jInfo"));
    log4jLevel.setBackground(parent.getBackground());
    log4jLevel.setItems(Log4jPrefsSettingManager.getLevel());
    log4jLevel.select(2);
    FormData layouDatall = new FormData();
    layouDatall.left = new FormAttachment(0, 200);
    layouDatall.right = new FormAttachment(0, 260);
    layouDatall.top = new FormAttachment(watchBtn, 0);
    layouDatall.bottom = new FormAttachment(watchBtn, 50);
    log4jLevel.setLayoutData(layouDatall);
    log4jLevel.setEnabled(false);
}
Also used : FormData(org.eclipse.swt.layout.FormData) Button(org.eclipse.swt.widgets.Button) Combo(org.eclipse.swt.widgets.Combo) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Example 45 with FormData

use of org.eclipse.swt.layout.FormData in project tdi-studio-se by Talend.

the class LoginFirstTimeStartupActionPage method layoutControl.

@Override
protected void layoutControl() {
    super.layoutControl();
    FormData formData = null;
    formData = new FormData();
    formData.left = new FormAttachment(0, 0);
    formData.top = new FormAttachment(0, 0);
    title.setLayoutData(formData);
    formData = new FormData();
    formData.top = new FormAttachment(title, TAB_VERTICAL_PADDING_LEVEL_1, SWT.BOTTOM);
    formData.left = new FormAttachment(title, TAB_HORIZONTAL_PADDING_LEVEL_1, SWT.LEFT);
    createNewProject.setLayoutData(formData);
    formData = new FormData();
    formData.left = new FormAttachment(createNewProject, TAB_HORIZONTAL_PADDING_LEVEL_1, SWT.RIGHT);
    formData.right = new FormAttachment(100, 0);
    formData.top = new FormAttachment(createNewProject, 0, SWT.CENTER);
    formData.bottom = new FormAttachment(createNewProject, 0, SWT.CENTER);
    newProjectName.setLayoutData(formData);
    formData = new FormData();
    formData.left = new FormAttachment(createNewProject, 0, SWT.LEFT);
    formData.top = new FormAttachment(createNewProject, TAB_VERTICAL_PADDING_LEVEL_1, SWT.BOTTOM);
    importDemoProject.setLayoutData(formData);
    formData = new FormData();
    formData.left = new FormAttachment(importDemoProject, 0, SWT.LEFT);
    formData.top = new FormAttachment(importDemoProject, TAB_VERTICAL_PADDING_LEVEL_1, SWT.BOTTOM);
    importExistingProject.setLayoutData(formData);
    formData = new FormData();
    formData.left = new FormAttachment(title, 0, SWT.LEFT);
    formData.width = LoginDialogV2.getNewButtonSize(manageConnections).x;
    formData.bottom = new FormAttachment(navigateArea, -1 * TAB_VERTICAL_PADDING_LEVEL_1, SWT.TOP);
    manageConnections.setLayoutData(formData);
    manageConnections.setBackground(backgroundColor);
}
Also used : FormData(org.eclipse.swt.layout.FormData) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Aggregations

FormData (org.eclipse.swt.layout.FormData)1050 FormAttachment (org.eclipse.swt.layout.FormAttachment)999 FormLayout (org.eclipse.swt.layout.FormLayout)667 Label (org.eclipse.swt.widgets.Label)554 Button (org.eclipse.swt.widgets.Button)550 SelectionEvent (org.eclipse.swt.events.SelectionEvent)477 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)433 Composite (org.eclipse.swt.widgets.Composite)423 Text (org.eclipse.swt.widgets.Text)420 ModifyListener (org.eclipse.swt.events.ModifyListener)360 Shell (org.eclipse.swt.widgets.Shell)358 ModifyEvent (org.eclipse.swt.events.ModifyEvent)356 Listener (org.eclipse.swt.widgets.Listener)356 Event (org.eclipse.swt.widgets.Event)355 Display (org.eclipse.swt.widgets.Display)342 ShellEvent (org.eclipse.swt.events.ShellEvent)331 ShellAdapter (org.eclipse.swt.events.ShellAdapter)324 TextVar (org.pentaho.di.ui.core.widget.TextVar)234 ColumnInfo (org.pentaho.di.ui.core.widget.ColumnInfo)224 TableView (org.pentaho.di.ui.core.widget.TableView)219