Examples of EnvironmentType


Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

        Element environmentTypesElement = element.getChild("environment-types");
        if (environmentTypesElement != null) {
            environmentTypes.clear();
            for (Object o : environmentTypesElement.getChildren()) {
                Element environmentTypeElement = (Element) o;
                EnvironmentType environmentType = new EnvironmentType();
                environmentType.readConfiguration(environmentTypeElement);
                environmentTypes.add(environmentType);
            }
        }

        Element visibilitySettingsElement = element.getChild("visibility-settings");
View Full Code Here

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

    public boolean isCellEditable(int rowIndex, int columnIndex) {
        return true;
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        EnvironmentType environmentType = getEnvironmentType(rowIndex);
        return
           columnIndex == 0 ? environmentType.getName() :
           columnIndex == 1 ? environmentType.getDescription() :
           columnIndex == 2 ? environmentType.getColor() : null;
    }
View Full Code Here

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

    }

    public void setValueAt(Object o, int rowIndex, int columnIndex) {
        Object actualValue = getValueAt(rowIndex, columnIndex);
        if (!CommonUtil.safeEqual(actualValue, o)) {
            EnvironmentType environmentType = environmentTypes.get(rowIndex);
            if (columnIndex == 0) {
                environmentType.setName((String) o);

            } else if (columnIndex == 1) {
                environmentType.setDescription((String) o);
            } else if (columnIndex == 2) {
                Color color = (Color) o;
                DBNColor environmentColor = environmentType.getColor();
                if (environmentColor == null) {
                    environmentColor = new DBNColor(color, color);
                } else {
                    environmentColor = environmentColor.set(color);
                }
                environmentType.setColor(environmentColor);
            }

            notifyListeners(rowIndex, rowIndex, columnIndex);
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

                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

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

        tableModelListeners.remove(l);
    }

    private EnvironmentType getEnvironmentType(int rowIndex) {
        while (environmentTypes.size() <= rowIndex) {
            environmentTypes.add(new EnvironmentType());
        }
        return environmentTypes.get(rowIndex);
    }
View Full Code Here

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

        }
        return environmentTypes.get(rowIndex);
    }

    public void insertRow(int rowIndex) {
        environmentTypes.add(rowIndex, new EnvironmentType());
        notifyListeners(rowIndex, environmentTypes.size()-1, -1);
    }
View Full Code Here

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

            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

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

        return FileConnectionMappingManager.getInstance(project).getActiveConnection(file);
    }

    private Color getColor(ConnectionHandler connectionHandler) {
        EnvironmentType environmentType = connectionHandler.getEnvironmentType();
        if (environmentType != null) {
            return environmentType.getColor();
        }
        return DEFAULT_COLOR;
    }
View Full Code Here

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

    }

    public void notifyPresentationChanges() {
        Project project = getConfiguration().getProject();
        ConnectionPresentationChangeListener listener = EventManager.notify(project, ConnectionPresentationChangeListener.TOPIC);
        EnvironmentType environmentType = (EnvironmentType) environmentTypesComboBox.getSelectedItem();
        Color color = environmentType == null ? null : environmentType.getColor();
        listener.presentationChanged(null, null, color, connectionId);
    }
View Full Code Here

Examples of com.dci.intellij.dbn.common.environment.EnvironmentType

        Map<String, String> newProperties = propertiesEditorForm.getProperties();
        Charset newCharset = (Charset) encodingComboBox.getSelectedItem();
        boolean newAutoCommit = autoCommitCheckBox.isSelected();
        boolean newDdlFileBinding = ddlFileBindingCheckBox.isSelected();
        EnvironmentType newEnvironmentType = (EnvironmentType) environmentTypesComboBox.getSelectedItem();
        String newEnvironmentTypeId = newEnvironmentType.getId();

        boolean settingsChanged =
                !configuration.getProperties().equals(newProperties) ||
                !configuration.getCharset().equals(newCharset) ||
                configuration.isAutoCommit() != newAutoCommit ||
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.