Package com.dci.intellij.dbn.object

Examples of com.dci.intellij.dbn.object.DBColumn


        return null;
    }

    @Override
    public Icon getIcon() {
        DBColumn column = getColumn();
        return column == null ? Icons.DBO_COLUMN : column.getIcon();
    }
View Full Code Here


        return column == null ? Icons.DBO_COLUMN : column.getIcon();
    }


    public int getOriginalPosition() {
        DBColumn column = getColumn();
        if (column != null) {
            return column.getPosition();
        }
        return 0;
    }
View Full Code Here

        return columnIndex;
    }

    @Nullable
    public DBDataType getDataType() {
        DBColumn column = getColumn();
        return column == null ? null : column.getDataType();
    }
View Full Code Here

    public synchronized List<String> getPossibleValues() {
        if (possibleValues == null) {
            setPossibleValues(EMPTY_LIST);
            List<String> values;
            DBColumn column = getColumn();
            if (column != null) {
                if (column.isForeignKey()) {
                    DBColumn foreignKeyColumn = column.getForeignKeyColumn();
                    values = DatasetEditorUtils.loadDistinctColumnValues(foreignKeyColumn);
                } else {
                    values = DatasetEditorUtils.loadDistinctColumnValues(column);
                }
View Full Code Here

    public void dispose() {
        if (possibleValues != null) possibleValues.clear();
    }

    public boolean isSortable() {
        DBColumn column = getColumn();
        DBDataType type = column == null ? null : column.getDataType();
        return type != null && type.isNative() &&
                type.getNativeDataType().getBasicDataType().is(
                        GenericDataType.LITERAL,
                        GenericDataType.NUMERIC,
                        GenericDataType.DATE_TIME);
View Full Code Here

        }

        nameLabel.setText(columnName);
        DBDataset dataset = model.getDataset();
        if (dataset != null) {
            DBColumn column = dataset.getColumn(columnName);
            if (column != null) {
                boolean primaryKey = column.isPrimaryKey();
                boolean foreignKey = column.isForeignKey();
                Icon icon = null;
                if (primaryKey && foreignKey) {
                    icon = Icons.DBO_LABEL_PK_FK;
                } else if (primaryKey) {
                    icon = Icons.DBO_LABEL_PK;
View Full Code Here

    public void notifyError(DatasetEditorError error, boolean startEditing, boolean showPopup) {
        DBObject messageObject = error.getMessageObject();
        if (messageObject != null) {
            if (messageObject instanceof DBColumn) {
                DBColumn column = (DBColumn) messageObject;
                DatasetEditorModelCell cell = getCellForColumn(column);
                boolean isErrorNew = cell.notifyError(error, true);
                if (isErrorNew && startEditing) cell.edit();
            } else if (messageObject instanceof DBConstraint) {
                DBConstraint constraint = (DBConstraint) messageObject;
View Full Code Here

    }

    public void mouseClicked(MouseEvent event) {
        if (MouseUtil.isNavigationEvent(event)) {
            DatasetEditorModelCell cell = (DatasetEditorModelCell) table.getCellAtLocation(event.getPoint());
            DBColumn column = cell.getColumnInfo().getColumn();

            if (column!= null && column.isForeignKey() && cell.getUserValue() != null) {
                table.clearSelection();
                DatasetFilterInput filterInput = table.getModel().resolveForeignKeyRecord(cell);
                if (filterInput.getColumns().size() > 0) {
                    DatasetEditorManager datasetEditorManager = DatasetEditorManager.getInstance(column.getProject());
                    datasetEditorManager.navigateToRecord(filterInput, event);
                    event.consume();
                }
            }
        }
View Full Code Here

                DatasetTableCellEditorWithPopup tableCellEditor = new DatasetTableCellEditorWithPopup(table);

                tableCellEditor.getEditorComponent().createTextAreaPopup(true);

                final DatasetEditorColumnInfo dseColumnInfo = (DatasetEditorColumnInfo) columnInfo;
                DBColumn column = dseColumnInfo.getColumn();
                DataEditorValueListPopupSettings valueListPopupSettings = dataEditorSettings.getValueListPopupSettings();

                if (column.isForeignKey() || (dataLength <= valueListPopupSettings.getDataLengthThreshold() &&
                        (!column.isSinglePrimaryKey() || valueListPopupSettings.isActiveForPrimaryKeyColumns()))) {

                    ListPopupValuesProvider valuesProvider = new ListPopupValuesProvider() {
                        public List<String> getValues() {
                            return dseColumnInfo.getPossibleValues();
                        }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.object.DBColumn

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.