mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Rename class. Change empty value.
This commit is contained in:
+3
-4
@@ -37,11 +37,10 @@ import java.util.concurrent.*;
|
||||
/**
|
||||
* @author traff
|
||||
*/
|
||||
public class PagingTableModel extends AbstractTableModel {
|
||||
public class AsyncArrayTableModel extends AbstractTableModel {
|
||||
private static final int CHUNK_COL_SIZE = 2; //TODO set to 100
|
||||
private static final int CHUNK_ROW_SIZE = 2;
|
||||
private static final int DEFAULT_MAX_CACHED_SIZE = 100;
|
||||
public static final String EMPTY_CELL_VALUE = "...";
|
||||
public static final String EMPTY_CELL_VALUE = "";
|
||||
|
||||
private final int myRows;
|
||||
private final int myColumns;
|
||||
@@ -74,7 +73,7 @@ public class PagingTableModel extends AbstractTableModel {
|
||||
}
|
||||
});
|
||||
|
||||
public PagingTableModel(int rows, int columns, NumpyArrayTable provider) {
|
||||
public AsyncArrayTableModel(int rows, int columns, NumpyArrayTable provider) {
|
||||
myRows = rows;
|
||||
myColumns = columns;
|
||||
myProvider = provider;
|
||||
@@ -52,7 +52,7 @@ public class NumpyArrayTable {
|
||||
private String myDtypeKind;
|
||||
private int[] myShape;
|
||||
private ArrayTableCellRenderer myTableCellRenderer;
|
||||
private PagingTableModel myPagingModel;
|
||||
private AsyncArrayTableModel myPagingModel;
|
||||
|
||||
private final static int COLUMNS_IN_DEFAULT_SLICE = 40;
|
||||
private final static int ROWS_IN_DEFAULT_SLICE = 40;
|
||||
@@ -83,14 +83,14 @@ public class NumpyArrayTable {
|
||||
return myComponent;
|
||||
}
|
||||
|
||||
private PagingTableModel createTableModel(@NotNull int[] shape) {
|
||||
private AsyncArrayTableModel createTableModel(@NotNull int[] shape) {
|
||||
final int columns = Math.min(getMaxColumn(shape), COLUMNS_IN_DEFAULT_VIEW);
|
||||
int rows = Math.min(getMaxRow(shape), ROWS_IN_DEFAULT_VIEW);
|
||||
if (columns == 0 || rows == 0) {
|
||||
showError("Slice with zero axis shape.");
|
||||
}
|
||||
|
||||
return new PagingTableModel(rows, columns, this);
|
||||
return new AsyncArrayTableModel(rows, columns, this);
|
||||
}
|
||||
|
||||
private void initComponent() {
|
||||
@@ -439,8 +439,8 @@ public class NumpyArrayTable {
|
||||
JBTableWithRowHeaders.RowHeaderTable rowTable = ((JBTableWithRowHeaders)myTable).getRowHeaderTable();
|
||||
rowTable.setRowShift(0);
|
||||
}
|
||||
((PagingTableModel)myTable.getModel()).fireTableDataChanged();
|
||||
((PagingTableModel)myTable.getModel()).fireTableCellUpdated(0, 0);
|
||||
((AsyncArrayTableModel)myTable.getModel()).fireTableDataChanged();
|
||||
((AsyncArrayTableModel)myTable.getModel()).fireTableCellUpdated(0, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -514,7 +514,7 @@ public class NumpyArrayTable {
|
||||
protected void run(@NotNull Result result) throws Throwable {
|
||||
if (getEditor().getEditor() != null) {
|
||||
getEditor().getEditor().getDocument().setText(corrected);
|
||||
((PagingTableModel)myTable.getModel()).forcedChange(row, col, corrected);
|
||||
((AsyncArrayTableModel)myTable.getModel()).forcedChange(row, col, corrected);
|
||||
cancelEditing();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user