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

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


                }

                int index = 0;
                for (DatasetColumnState columnState : columnStates) {
                    DBColumn column = dataset.getColumn(columnState.getName());
                    ColumnInfo columnInfo = new DatasetEditorColumnInfo(column, index, column.getPosition());
                    addColumnInfo(columnInfo);
                    index++;
                }
            } else {
                ResultSetMetaData metaData = resultSet.getMetaData();
                int columnCount = metaData.getColumnCount();
                for (int i = 0; i < columnCount; i++) {
                    String name = metaData.getColumnName(i+1);
                    DBColumn column = dataset.getColumn(name);
                    ColumnInfo columnInfo = new DatasetEditorColumnInfo(column, i, i+1);
                    addColumnInfo(columnInfo);
                }
            }

        }
View Full Code Here


        }
    }

    public int indexOfColumn(DBColumn column) {
        for (int i=0; i<getColumnCount(); i++) {
            ColumnInfo info = getColumnInfo(i);
            DatasetEditorColumnInfo columnInfo = (DatasetEditorColumnInfo) info;
            DBColumn col = columnInfo.getColumn();
            if (col != null && col.equals(column)) return i;
        }
        return -1;
View Full Code Here

        return table;
    }

    public void prepareEditor(DatasetEditorModelCell cell) {
        setCell(cell);
        ColumnInfo columnInfo = cell.getColumnInfo();
        DBDataType dataType = columnInfo.getDataType();
        if (dataType.isNative()) {
            GenericDataType genericDataType = dataType.getNativeDataType().getBasicDataType();
            highlight(cell.hasError() ? HIGHLIGHT_TYPE_ERROR : HIGHLIGHT_TYPE_NONE);
            Object userValue = cell.getUserValue();
            if (genericDataType == GenericDataType.LITERAL) {
View Full Code Here

            Point mousePoint = event.getPoint();
            int tableColumnIndex = table.getTableHeader().columnAtPoint(mousePoint);
            if (tableColumnIndex > -1) {
                int modelColumnIndex = table.convertColumnIndexToModel(tableColumnIndex);
                if (modelColumnIndex > -1) {
                    ColumnInfo columnInfo = table.getModel().getColumnInfo(modelColumnIndex);
                    table.showPopupMenu(event, null, columnInfo);
                }
            }
        }
    }
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.