Search in sources :

Example 1 with ToolbarZone

use of org.talend.designer.mapper.ui.visualmap.zone.toolbar.ToolbarZone 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();
        toolbar.setEnabledMinimizeTablesButton(mapperManager.getUiManager().getInputsTablesView().size() > 0);
    } else if (currentZone == Zone.OUTPUTS) {
        toolbar = getOutputsZone().getToolbar();
        ((ToolbarOutputZone) toolbar).setEnabledRemoveTableButton(currentSelectedOutputTableView != null && currentSelectedOutputTableView.getDataMapTable() instanceof OutputTable && !((OutputTable) currentSelectedOutputTableView.getDataMapTable()).isErrorRejectTable());
        toolbar.setEnabledMinimizeTablesButton(mapperManager.getUiManager().getOutputsTablesView().size() > 0);
    }
    toolbar.setEnabledMoveTableButton(true, isTableViewMoveable(currentZone, true));
    toolbar.setEnabledMoveTableButton(false, isTableViewMoveable(currentZone, false));
}
Also used : ToolbarZone(org.talend.designer.mapper.ui.visualmap.zone.toolbar.ToolbarZone) OutputTable(org.talend.designer.mapper.model.table.OutputTable)

Aggregations

OutputTable (org.talend.designer.mapper.model.table.OutputTable)1 ToolbarZone (org.talend.designer.mapper.ui.visualmap.zone.toolbar.ToolbarZone)1