Package com.intellij.ui.tabs

Examples of com.intellij.ui.tabs.TabInfo


import java.util.List;

public class EditorUtil {
    public static void selectEditor(DatabaseEditableObjectFile databaseFile, FileEditor fileEditor) {
        JBTabsImpl tabs = getEditorTabComponent(databaseFile);
        TabInfo tabInfo = getEditorTabInfo(tabs, fileEditor);
        if (tabInfo != null) {
            tabs.getJBTabs().select(tabInfo, true);
        }
    }
View Full Code Here


        }
    }

    public static void setEditorIcon(DatabaseEditableObjectFile databaseFile, FileEditor fileEditor, Icon icon) {
        JBTabsImpl tabs = getEditorTabComponent(databaseFile);
        TabInfo tabInfo = getEditorTabInfo(tabs, fileEditor);
        if (tabInfo != null) {
            tabInfo.setIcon(icon);
        }
    }
View Full Code Here

        ConnectionManager connectionManager = ConnectionManager.getInstance(project);
        for (ConnectionBundle connectionBundle : connectionManager.getConnectionBundles()) {
            for (ConnectionHandler connectionHandler: connectionBundle.getConnectionHandlers()) {
                SimpleBrowserForm browserForm = new SimpleBrowserForm(connectionHandler);
                JComponent component = browserForm.getComponent();
                TabInfo tabInfo = new TabInfo(component);
                tabInfo.setText(connectionHandler.getName());
                tabInfo.setObject(browserForm);
                //tabInfo.setIcon(connectionHandler.getIcon());
                connectionTabs.addTab(tabInfo);

                EnvironmentType environmentType = connectionHandler.getEnvironmentType();
                tabInfo.setTabColor(environmentType.getColor());
            }
        }
        if (connectionTabs.getTabCount() == 0) {
            mainPanel.removeAll();
            mainPanel.add(new JBList(new ArrayList()), BorderLayout.CENTER);
View Full Code Here

        return browserForm== null ? null : browserForm.getBrowserTree();
    }

    @Nullable
    public DatabaseBrowserTree getActiveBrowserTree() {
        TabInfo tabInfo = connectionTabs.getSelectedInfo();
        if (tabInfo != null) {
            SimpleBrowserForm browserForm = (SimpleBrowserForm) tabInfo.getObject();
            return browserForm.getBrowserTree();
        }
        return null;
    }
View Full Code Here

        addSettingsPanel(getConfiguration().getPSQLCodeStyleSettings(), Icons.FILE_PLSQL);
    }

    private void addSettingsPanel(Configuration configuration, Icon icon) {
        JComponent component = configuration.createComponent();
        TabInfo tabInfo = new TabInfo(component);
        tabInfo.setText(configuration.getDisplayName());
        tabInfo.setObject(configuration);
        tabInfo.setIcon(icon);
        languageTabs.addTab(tabInfo);
    }
View Full Code Here

        super(connectionSettings);
        ConnectionDatabaseSettings databaseSettings = connectionSettings.getDatabaseSettings();
        configTabbedPane = new TabbedPane(databaseSettings.getProject());
        mainPanel.add(configTabbedPane, BorderLayout.CENTER);

        TabInfo connectionTabInfo = new TabInfo(databaseSettings.createComponent());
        connectionTabInfo.setText("Connection");
        configTabbedPane.addTab(connectionTabInfo);

        ConnectionDetailSettings detailSettings = connectionSettings.getDetailSettings();
        TabInfo detailsTabInfo = new TabInfo(detailSettings.createComponent());
        detailsTabInfo.setText("Details");
        configTabbedPane.addTab(detailsTabInfo);

        ConnectionFilterSettings filterSettings = connectionSettings.getFilterSettings();
        TabInfo filtersTabInfo = new TabInfo(filterSettings.createComponent());
        filtersTabInfo.setText("Filters");
        configTabbedPane.addTab(filtersTabInfo);

        String connectionId = connectionSettings.getId();
        ConnectionDetailSettingsForm detailSettingsForm = detailSettings.getSettingsEditor();
        ConnectionFilterSettingsForm filterSettingsForm = filterSettings.getSettingsEditor();
View Full Code Here

        return -1;
    }
   
   
    public static String getSelectedTabName(TabbedPane tabbedPane) {
        TabInfo selectedInfo = tabbedPane.getSelectedInfo();
        return selectedInfo == null ? null : selectedInfo.getText();
    }
View Full Code Here

    public TabbedPane(@NotNull Project project) {
        super(project);
    }

    public void select(JComponent component, boolean requestFocus) {
        TabInfo tabInfo = findInfo(component);
        if (tabInfo != null) {
            select(tabInfo, requestFocus);
        }
    }
View Full Code Here

                DBArgument argument = argumentValue.getArgument();

                MethodExecutionCursorResultForm cursorResultComponent =
                        new MethodExecutionCursorResultForm(executionResult, argument);

                TabInfo tabInfo = new TabInfo(cursorResultComponent.getComponent());
                tabInfo.setText(argument.getName());
                tabInfo.setIcon(argument.getIcon());
                tabInfo.setObject(argument);
                cursorOutputTabs.addTab(tabInfo);
            }
        }
        cursorOutputTabs.repaint();
    }
View Full Code Here

            getMessagesPanel().select(firstCompilerResult.getCompilerMessages().get(0));   
        }
    }
   
    public ExecutionResult getSelectedExecutionResult() {
        TabInfo selectedInfo = resultTabs.getSelectedInfo();
        return selectedInfo == null ? null : (ExecutionResult) selectedInfo.getObject();
    }
View Full Code Here

TOP

Related Classes of com.intellij.ui.tabs.TabInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.