Search in sources :

Example 1 with TreeSchemaTableEditor

use of org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor in project tdi-studio-se by Talend.

the class MapperManager method refreshTreeSchemaEditor.

/**
     * 
     * DOC Administrator Comment method "refreshTreeSchemaEditor".
     * 
     * @param outputTree
     */
public void refreshTreeSchemaEditor(AbstractInOutTree outputTree) {
    XmlTreeSchemaTableView outputTreeSchemaEditor = null;
    if (outputTree instanceof InputXmlTree) {
        outputTreeSchemaEditor = mapperUI.getTabFolderEditors().getInputTreeSchemaEditor();
    } else {
        outputTreeSchemaEditor = mapperUI.getTabFolderEditors().getOutputTreeSchemaEditor();
    }
    TreeSchemaTableEditor editor = new TreeSchemaTableEditor(outputTree);
    outputTreeSchemaEditor.setExtendedTableModel(editor);
// editor.setModifiedBeanListenable(outputTreeSchemaEditor.getTableViewerCreator());
}
Also used : InputXmlTree(org.talend.designer.xmlmap.model.emf.xmlmap.InputXmlTree) TreeSchemaTableEditor(org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor) XmlTreeSchemaTableView(org.talend.designer.xmlmap.ui.tabs.table.XmlTreeSchemaTableView)

Example 2 with TreeSchemaTableEditor

use of org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor in project tdi-studio-se by Talend.

the class NextPageButton method handleModelChange.

@Override
protected void handleModelChange() {
    super.handleModelChange();
    TreeSchemaTableEditor extendedControlModel = (TreeSchemaTableEditor) getExtendedControlViewer().getExtendedControlModel();
    if (extendedControlModel.getPageCount() < 2) {
        getButton().setVisible(false);
    }
}
Also used : TreeSchemaTableEditor(org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor)

Example 3 with TreeSchemaTableEditor

use of org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor in project tdi-studio-se by Talend.

the class PreviousPageButton method handleSelectionEvent.

/*
     * (non-Javadoc)
     * 
     * @see
     * org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#handleSelectionEvent(org.eclipse.swt
     * .widgets.Event)
     */
@Override
protected void handleSelectionEvent(Event event) {
    TreeSchemaTableEditor extendedControlModel = (TreeSchemaTableEditor) getExtendedControlViewer().getExtendedControlModel();
    // avoid the selection event ,or it will be slow
    getExtendedControlViewer().getTableViewerCreator().getSelectionHelper().setActiveFireSelectionChanged(false);
    extendedControlModel.setCurrentPage(extendedControlModel.getCurrentPage() - 1);
    getExtendedControlViewer().getTableViewerCreator().getSelectionHelper().setActiveFireSelectionChanged(true);
    // only select the first column if change page
    getExtendedControlViewer().getTableViewerCreator().getSelectionHelper().setSelection(new int[] { 0 });
}
Also used : TreeSchemaTableEditor(org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor)

Example 4 with TreeSchemaTableEditor

use of org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor in project tdi-studio-se by Talend.

the class NextPageButton method handleSelectionEvent.

/*
     * (non-Javadoc)
     * 
     * @see
     * org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#handleSelectionEvent(org.eclipse.swt
     * .widgets.Event)
     */
@Override
protected void handleSelectionEvent(Event event) {
    TreeSchemaTableEditor extendedControlModel = (TreeSchemaTableEditor) getExtendedControlViewer().getExtendedControlModel();
    // avoid the selection event ,or it will be slow
    getExtendedControlViewer().getTableViewerCreator().getSelectionHelper().setActiveFireSelectionChanged(false);
    extendedControlModel.setCurrentPage(extendedControlModel.getCurrentPage() + 1);
    getExtendedControlViewer().getTableViewerCreator().getSelectionHelper().setActiveFireSelectionChanged(true);
    // only select the first column if change page
    getExtendedControlViewer().getTableViewerCreator().getSelectionHelper().setSelection(new int[] { 0 });
}
Also used : TreeSchemaTableEditor(org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor)

Example 5 with TreeSchemaTableEditor

use of org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor in project tdi-studio-se by Talend.

the class PreviousPageButton method handleModelChange.

/*
     * (non-Javadoc)
     * 
     * @see org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton#handleModelChange()
     */
@Override
protected void handleModelChange() {
    super.handleModelChange();
    TreeSchemaTableEditor extendedControlModel = (TreeSchemaTableEditor) getExtendedControlViewer().getExtendedControlModel();
    if (extendedControlModel.getPageCount() < 2) {
        getButton().setVisible(false);
    }
}
Also used : TreeSchemaTableEditor(org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor)

Aggregations

TreeSchemaTableEditor (org.talend.designer.xmlmap.ui.tabs.table.TreeSchemaTableEditor)5 InputXmlTree (org.talend.designer.xmlmap.model.emf.xmlmap.InputXmlTree)1 XmlTreeSchemaTableView (org.talend.designer.xmlmap.ui.tabs.table.XmlTreeSchemaTableView)1