Package com.dci.intellij.dbn.data.model

Examples of com.dci.intellij.dbn.data.model.ColumnInfo


        return columnInfos.get(columnIndex);
    }

    public int getColumnIndex(String name) {
        for (int i=0; i<columnInfos.size(); i++) {
            ColumnInfo columnInfo = columnInfos.get(i);
            if (columnInfo.getName().equalsIgnoreCase(name)) {
                return i;
            }
        }
        return -1;
    }
View Full Code Here


    public ResultSetDataModelHeader(DBObjectBundle objectBundle, ResultSet resultSet) throws SQLException {
        super();
        ResultSetMetaData metaData = resultSet.getMetaData();
        int columnCount = metaData.getColumnCount();
        for (int i = 0; i < columnCount; i++) {
            ColumnInfo columnInfo = new ResultSetColumnInfo(objectBundle, resultSet, i);
            addColumnInfo(columnInfo);
        }
    }
View Full Code Here

    private RegionalSettings regionalSettings;

    public ResultSetRecordViewerColumnForm(ResultSetRecordViewerForm parentForm, ResultSetDataModelCell cell) {
        this.parentForm = parentForm;
        Project project = cell.getRow().getModel().getProject();
        ColumnInfo columnInfo = cell.getColumnInfo();

        DBDataType dataType = columnInfo.getDataType();
        regionalSettings = RegionalSettings.getInstance(project);

        columnLabel.setIcon(Icons.DBO_COLUMN);
        columnLabel.setText(columnInfo.getName());
        dataTypeLabel.setText(dataType.getQualifiedName());
        dataTypeLabel.setForeground(UIUtil.getInactiveTextColor());

        valueTextField = new JTextField();
        valueTextField.setPreferredSize(new Dimension(200, -1));
View Full Code Here

        }
        return columnInfos;
    }

    protected String getElementText(Object o) {
        ColumnInfo columnInfo = (ColumnInfo) o;
        return columnInfo.getName();
    }
View Full Code Here

    }

    public boolean sort(int columnIndex, SortDirection sortDirection, boolean keepExisting) {
        SortableDataModel model = getModel();
        int modelColumnIndex = convertColumnIndexToModel(columnIndex);
        ColumnInfo columnInfo = getModel().getColumnInfo(modelColumnIndex);
        if (columnInfo.isSortable()) {
            boolean sorted = model.sort(modelColumnIndex, sortDirection, keepExisting);
            if (sorted) getTableHeader().repaint();
            return sorted;
        }
        return false;
View Full Code Here

        return table.getModel().getColumnName(realColumnIndex);
    }

    public GenericDataType getGenericDataType(int columnIndex) {
        int realColumnIndex = getRealColumnIndex(columnIndex);
        ColumnInfo columnInfo = table.getModel().getColumnInfo(realColumnIndex);
        DBNativeDataType nativeDataType = columnInfo.getDataType().getNativeDataType();

        return nativeDataType == null ?
                GenericDataType.LITERAL :
                nativeDataType.getDataTypeDefinition().getGenericDataType();
View Full Code Here

        TableColumnModel columnModel = getColumnModel();
        int viewColumnIndex = convertColumnIndexToView(columnIndex);
        TableColumn column = columnModel.getColumn(viewColumnIndex);
        columnModel.removeColumn(column);

        ColumnInfo columnInfo = getModel().getColumnInfo(columnIndex);
        datasetEditor.getState().getColumnSetup().getColumnState(columnInfo.getName()).setVisible(false);
    }
View Full Code Here

        if (isLoading()) {
            return null;
        }

        int modelColumnIndex = getModelColumnIndex(columnIndex);
        ColumnInfo columnInfo = getModel().getColumnInfo(modelColumnIndex);
        return cellEditorFactory.getCellEditor(columnInfo, this);
    }
View Full Code Here

    }

    @Override
    public boolean sort(int columnIndex, SortDirection sortDirection, boolean keepExisting) {
        int modelColumnIndex = convertColumnIndexToModel(columnIndex);
        ColumnInfo columnInfo = getModel().getColumnInfo(modelColumnIndex);
        if (columnInfo.isSortable()) {
            if (!isLoading() && super.sort(columnIndex, sortDirection, keepExisting)) {
                if (!getModel().isResultSetExhausted()) {
                    datasetEditor.loadData(SORT_LOAD_INSTRUCTIONS);
                }
                return true;
View Full Code Here

    @Override
    public void prepareEditor(final DatasetEditorModelCell cell) {
        getEditorComponent().setUserValueHolder(cell);
        setCell(cell);
        ColumnInfo columnInfo = cell.getColumnInfo();
        DBDataType dataType = columnInfo.getDataType();
        if (dataType.isNative()) {
            highlight(cell.hasError() ? HIGHLIGHT_TYPE_ERROR : HIGHLIGHT_TYPE_NONE);
            if (dataType.getNativeDataType().isLOB()) {
                setEditable(false);
            } else {
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.data.model.ColumnInfo

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.