Package com.dci.intellij.dbn.common.environment.options

Examples of com.dci.intellij.dbn.common.environment.options.EnvironmentVisibilitySettings


        environmentTypesTableScrollPane.setPreferredSize(new Dimension(200, 80));

        updateBorderTitleForeground(environmentTypesPanel);
        updateBorderTitleForeground(environmentApplicabilityPanel);

        EnvironmentVisibilitySettings visibilitySettings = settings.getVisibilitySettings();
        visibilitySettings.getConnectionTabs().resetChanges(connectionTabsCheckBox);
        visibilitySettings.getObjectEditorTabs().resetChanges(objectEditorTabsCheckBox);
        visibilitySettings.getScriptEditorTabs().resetChanges(scriptEditorTabsCheckBox);
        visibilitySettings.getDialogHeaders().resetChanges(dialogHeadersCheckBox);
        visibilitySettings.getExecutionResultTabs().resetChanges(executionResultTabsCheckBox);

        environmentTypesTable.getSelectionModel().addListSelectionListener(selectionListener);
        updateButtons();

        addButton.addActionListener(actionListener);
View Full Code Here


        EnvironmentTypesTableModel model = environmentTypesTable.getModel();
        model.validate();
        EnvironmentTypeBundle environmentTypeBundle = model.getEnvironmentTypes();
        boolean settingsChanged = settings.setEnvironmentTypes(environmentTypeBundle);

        EnvironmentVisibilitySettings visibilitySettings = settings.getVisibilitySettings();
        boolean visibilityChanged =
            visibilitySettings.getConnectionTabs().applyChanges(connectionTabsCheckBox) ||
            visibilitySettings.getObjectEditorTabs().applyChanges(objectEditorTabsCheckBox) ||
            visibilitySettings.getScriptEditorTabs().applyChanges(scriptEditorTabsCheckBox)||
            visibilitySettings.getDialogHeaders().applyChanges(dialogHeadersCheckBox)||
            visibilitySettings.getExecutionResultTabs().applyChanges(executionResultTabsCheckBox);

        if (visibilityChanged) {
            EnvironmentChangeListener listener = EventManager.notify(getConfiguration().getProject(), EnvironmentChangeListener.TOPIC);
            listener.environmentVisibilitySettingsChanged();
        }
View Full Code Here

    public void resetChanges() {
        EnvironmentSettings settings = getConfiguration();
        environmentTypesTable.getModel().setEnvironmentTypes(settings.getEnvironmentTypes());

        EnvironmentVisibilitySettings visibilitySettings = settings.getVisibilitySettings();
        visibilitySettings.getConnectionTabs().resetChanges(connectionTabsCheckBox);
        visibilitySettings.getObjectEditorTabs().resetChanges(objectEditorTabsCheckBox);
        visibilitySettings.getScriptEditorTabs().resetChanges(scriptEditorTabsCheckBox);
        visibilitySettings.getDialogHeaders().resetChanges(dialogHeadersCheckBox);
        visibilitySettings.getExecutionResultTabs().resetChanges(executionResultTabsCheckBox);
    }
View Full Code Here

            ConnectionHandler connectionHandler = getConnectionHandler(file, project);
            if (connectionHandler == null) {
                return null;
            } else {
                EnvironmentSettings environmentSettings = GeneralProjectSettings.getInstance(connectionHandler.getProject()).getEnvironmentSettings();
                EnvironmentVisibilitySettings visibilitySettings = environmentSettings.getVisibilitySettings();
                EnvironmentType environmentType = connectionHandler.getEnvironmentType();
                if (file instanceof SQLConsoleFile || file instanceof DatabaseObjectFile) {
                    if (visibilitySettings.getObjectEditorTabs().value()) {
                        return environmentType == null ? null : environmentType.getColor();
                    }
                } else {
                    if (visibilitySettings.getScriptEditorTabs().value()) {
                        return environmentType == null ? null : environmentType.getColor();
                    }
                }
                return null;
            }
View Full Code Here

        return resultTabs.getTabCount();
    }

    @Override
    public void environmentConfigChanged(String environmentTypeId) {
        EnvironmentVisibilitySettings visibilitySettings = getEnvironmentSettings(project).getVisibilitySettings();
        for (TabInfo tabInfo : resultTabs.getTabs()) {
            ExecutionResult executionResult = (ExecutionResult) tabInfo.getObject();
            if (executionResult != null) {
                ConnectionHandler connectionHandler = executionResult.getConnectionHandler();
                if (connectionHandler.getSettings().getDetailSettings().getEnvironmentTypeId().equals(environmentTypeId)) {
                    if (visibilitySettings.getExecutionResultTabs().value()){
                        tabInfo.setTabColor(connectionHandler.getEnvironmentType().getColor());
                    } else {
                        tabInfo.setTabColor(null);
                    }
                }
View Full Code Here

        }
    }

    @Override
    public void environmentVisibilitySettingsChanged() {
        EnvironmentVisibilitySettings visibilitySettings = getEnvironmentSettings(project).getVisibilitySettings();
        for (TabInfo tabInfo : resultTabs.getTabs()) {
            ExecutionResult browserForm = (ExecutionResult) tabInfo.getObject();
            EnvironmentType environmentType = browserForm.getConnectionHandler().getEnvironmentType();
            if (visibilitySettings.getExecutionResultTabs().value()){
                tabInfo.setTabColor(environmentType.getColor());
            } else {
                tabInfo.setTabColor(null);
            }
        }
View Full Code Here

    public void addResultTab(ExecutionResult executionResult) {
        JComponent component = executionResult.getResultPanel().getComponent();
        TabInfo tabInfo = new TabInfo(component);
        tabInfo.setObject(executionResult);
        EnvironmentVisibilitySettings visibilitySettings = getEnvironmentSettings(project).getVisibilitySettings();
        if (visibilitySettings.getExecutionResultTabs().value()){
            tabInfo.setTabColor(executionResult.getConnectionHandler().getEnvironmentType().getColor());
        } else {
            tabInfo.setTabColor(null);
        }
        tabInfo.setText(executionResult.getResultName());
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.common.environment.options.EnvironmentVisibilitySettings

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.