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

Examples of com.dci.intellij.dbn.editor.data.model.DatasetEditorModelRow


        private FirstRecordAction() {
            super("First record", null, Icons.DATA_EDITOR_FIRST_RECORD);
        }

        public void actionPerformed(AnActionEvent e) {
            DatasetEditorModelRow firstRow = row.getModel().getRowAtIndex(0);
            setRow(firstRow);
            row.getModel().getEditorTable().selectRow(0);
        }
View Full Code Here


        }

        public void actionPerformed(AnActionEvent e) {
            if (row.getIndex() > 0) {
                int index = row.getIndex() - 1;
                DatasetEditorModelRow previousRow = row.getModel().getRowAtIndex(index);
                setRow(previousRow);
                row.getModel().getEditorTable().selectRow(index);
            }
        }
View Full Code Here

        }

        public void actionPerformed(AnActionEvent e) {
            if (row.getIndex() < row.getModel().getSize() -1) {
                int index = row.getIndex() + 1;
                DatasetEditorModelRow nextRow = row.getModel().getRowAtIndex(index);
                setRow(nextRow);
                row.getModel().getEditorTable().selectRow(index);
            }
        }
View Full Code Here

            super("Last record", null, Icons.DATA_EDITOR_LAST_RECORD);
        }

        public void actionPerformed(AnActionEvent e) {
            int index = row.getModel().getSize() - 1 ;
            DatasetEditorModelRow lastRow = row.getModel().getRowAtIndex(index);
            setRow(lastRow);
            row.getModel().getEditorTable().selectRow(index);
        }
View Full Code Here

        acquireState(table, isSelected, false, rowIndex, columnIndex);
        DatasetEditorModelCell cell = (DatasetEditorModelCell) value;
        DatasetEditorTable datasetEditorTable = (DatasetEditorTable) table;

        if (cell != null && !cell.isDisposed()) {
            DatasetEditorModelRow row = cell.getRow();
            DatasetEditorColumnInfo columnInfo = cell.getColumnInfo();
            boolean isLoading = datasetEditorTable.isLoading();
            boolean isInserting = datasetEditorTable.isInserting();

            boolean isDeletedRow = row.isDeleted();
            boolean isInsertRow = row.isInsert();
            boolean isCaretRow = !isInsertRow && table.getCellSelectionEnabled() && table.getSelectedRow() == rowIndex && table.getSelectedRowCount() == 1;
            boolean isModified = cell.isModified();

            DataGridTextAttributes attributes = getAttributes();
            SimpleTextAttributes textAttributes = attributes.getPlainData(isModified, isCaretRow);
View Full Code Here

        DatasetEditorModel model = getTableModel();

        if (editorTable != null && model != null) {
            int index = editorTable.getSelectedRow();
            if (index == -1) index = 0;
            DatasetEditorModelRow row = model.getRowAtIndex(index);
            editorTable.stopCellEditing();
            editorTable.selectRow(row.getIndex());
            DatasetRecordEditorDialog editorDialog = new DatasetRecordEditorDialog(row);
            editorDialog.show();
        }
    }
View Full Code Here

    public void openRecordEditor(int index) {
        DatasetEditorTable editorTable = getEditorTable();
        DatasetEditorModel model = getTableModel();

        if (editorTable != null && model != null) {
            DatasetEditorModelRow row = model.getRowAtIndex(index);
            DatasetRecordEditorDialog editorDialog = new DatasetRecordEditorDialog(row);
            editorDialog.show();
        }
    }
View Full Code Here

    public void setCell(DatasetEditorModelCell cell) {
        if (this.cell != null) updateUserValue(false);
        this.cell = cell;

        DatasetEditorModelRow row = cell.getRow();
        boolean editable = !row.isDeleted() && row.getModel().isEditable();
        editorComponent.setEnabled(editable);
        editorComponent.setUserValueHolder(cell);

        Formatter formatter = regionalSettings.getFormatter();
        if (cell.getUserValue() instanceof String) {
View Full Code Here

            } else {
                DatasetEditorTable editorTable = datasetEditor.getEditorTable();
                if (editorTable != null && editorTable.getSelectedRows() != null && editorTable.getSelectedRows().length > 0) {
                    for (int selectedRow : editorTable.getSelectedRows()) {
                        if (selectedRow < editorTable.getModel().getRowCount()) {
                            DatasetEditorModelRow row = editorTable.getModel().getRowAtIndex(selectedRow);
                            if (!row.isDeleted()) {
                                presentation.setEnabled(true);
                                return;
                            }
                        }
                    }
View Full Code Here

    }

    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        BasicTableGutter tableGutter = (BasicTableGutter) list;
        DatasetEditorModel model = (DatasetEditorModel) list.getModel();
        DatasetEditorModelRow row = model.getRowAtIndex(index);
        DatasetEditorTable table = (DatasetEditorTable) tableGutter.getTable();
        if (row != null) {
            Icon icon =
                    row.isNew() ? Icons.DATA_EDITOR_ROW_NEW :
                            row.isInsert() ? Icons.DATA_EDITOR_ROW_INSERT :
                                    row.isDeleted() ? Icons.DATA_EDITOR_ROW_DELETED :
                                            row.isModified() ? Icons.DATA_EDITOR_ROW_MODIFIED :
                                                    table.getModel().isModified() ? Icons.DATA_EDITOR_ROW_DEFAULT : null;

            textLabel.setText(Integer.toString(row.getIndex() + 1));
            if (imageLabel.getIcon() != icon) {
                imageLabel.setIcon(icon);
            }
        }
        //lText.setFont(isSelected ? BOLD_FONT : REGULAR_FONT);
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.editor.data.model.DatasetEditorModelRow

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.