Search in sources :

Example 1 with ToolbarInputZone

use of org.talend.designer.dbmap.ui.visualmap.zone.toolbar.ToolbarInputZone in project tdi-studio-se by Talend.

the class UIManager method updateToolbarButtonsStates.

/**
     * DOC amaumont Comment method "updateToolbarButtonsStates".
     * 
     * @param currentZone
     */
public void updateToolbarButtonsStates(Zone currentZone) {
    ToolbarZone toolbar = null;
    if (currentZone == Zone.INPUTS) {
        toolbar = getInputsZone().getToolbar();
        ((ToolbarInputZone) toolbar).setEnabledRemoveAliasButton(currentSelectedInputTableView != null);
        toolbar.setEnabledMinimizeTablesButton(getInputsTablesView().size() > 0);
    } else if (currentZone == Zone.OUTPUTS) {
        toolbar = getOutputsZone().getToolbar();
        ((ToolbarOutputZone) toolbar).setEnabledRemoveTableButton(currentSelectedOutputTableView != null);
        toolbar.setEnabledMinimizeTablesButton(getOutputsTablesView().size() > 0);
    }
    toolbar.setEnabledMoveTableButton(true, isTableViewMoveable(currentZone, true));
    toolbar.setEnabledMoveTableButton(false, isTableViewMoveable(currentZone, false));
}
Also used : ToolbarZone(org.talend.designer.dbmap.ui.visualmap.zone.toolbar.ToolbarZone) ToolbarInputZone(org.talend.designer.dbmap.ui.visualmap.zone.toolbar.ToolbarInputZone)

Example 2 with ToolbarInputZone

use of org.talend.designer.dbmap.ui.visualmap.zone.toolbar.ToolbarInputZone in project tdi-studio-se by Talend.

the class InputsZone method createHeaderZoneComponents.

public void createHeaderZoneComponents() {
    toolbar = new ToolbarInputZone(this, SWT.BORDER, this.mapperManager);
    Composite toolBarComposite = toolbar.getComposite();
    toolBarComposite.setBackgroundMode(SWT.INHERIT_NONE);
    toolBarComposite.setBackground(toolBarComposite.getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
    GridData gridDataToolbar = new GridData(GridData.FILL_HORIZONTAL);
    toolBarComposite.setLayoutData(gridDataToolbar);
    gridDataToolbar.grabExcessHorizontalSpace = true;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) ToolbarInputZone(org.talend.designer.dbmap.ui.visualmap.zone.toolbar.ToolbarInputZone)

Aggregations

ToolbarInputZone (org.talend.designer.dbmap.ui.visualmap.zone.toolbar.ToolbarInputZone)2 GridData (org.eclipse.swt.layout.GridData)1 Composite (org.eclipse.swt.widgets.Composite)1 ToolbarZone (org.talend.designer.dbmap.ui.visualmap.zone.toolbar.ToolbarZone)1