public final synchronized void setValueAt(final Object aValue, final long rowIndex, final long columnIndex) { matrix.setAsObject(aValue, rowIndex, columnIndex); fireValueChanged(rowIndex, columnIndex, aValue); }
public final String getColumnName(final int columnIndex) { return getColumnName((long) columnIndex); }
public synchronized Object getValueAt(final int rowIndex, final int columnIndex) { return getValueAt((long) rowIndex, (long) columnIndex); }
if (!matrixGUIObject.isColumnCountUpToDate()) { matrixGUIObject.setColumnCount(matrixGUIObject.getMatrix().getColumnCount()); matrixGUIObject.setColumnCountUpToDate(true); matrixGUIObject.fireValueChanged(TableModelEvent.HEADER_ROW, TableModelEvent.ALL_COLUMNS, null); matrixGUIObject.setColumnCount(0); matrixGUIObject.setColumnCountUpToDate(true); matrixGUIObject.fireValueChanged(TableModelEvent.HEADER_ROW, TableModelEvent.ALL_COLUMNS, null); if (!matrixGUIObject.isRowCountUpToDate()) { matrixGUIObject.setRowCount(matrixGUIObject.getMatrix().getRowCount()); matrixGUIObject.setRowCountUpToDate(true); matrixGUIObject.fireValueChanged(TableModelEvent.HEADER_ROW, TableModelEvent.ALL_COLUMNS, null); matrixGUIObject.setRowCount(0); matrixGUIObject.setRowCountUpToDate(true); matrixGUIObject.fireValueChanged(TableModelEvent.HEADER_ROW, TableModelEvent.ALL_COLUMNS, null); if (matrixGUIObject.isRowCountUpToDate() && matrixGUIObject.isColumnCountUpToDate() && !matrixGUIObject.getTodo().isEmpty()) { long t0 = System.currentTimeMillis(); while (matrixGUIObject.isRowCountUpToDate() && matrixGUIObject.isColumnCountUpToDate() && !matrixGUIObject.getTodo().isEmpty() && System.currentTimeMillis() - t0 < 300) { Coordinates coordinates = matrixGUIObject.getTodo().remove( matrixGUIObject.getTodo().size() - 1); Object object = matrixGUIObject.getMatrix().getAsObject(coordinates.getLongCoordinates()); matrixGUIObject.getDataCache().put(coordinates, new DataItem(object, ColorUtil.fromObject(object)));
public final void fireValueChanged() { iconUpToDate = false; rowCountUpToDate = false; columnCountUpToDate = false; dataCache.clear(); for (final Object o : getListenerList().getListenerList()) { if (o instanceof TableModelListener64) { ((TableModelListener64) o).tableChanged(new TableModelEvent64(this)); } else if (o instanceof TableModelListener) { ((TableModelListener) o).tableChanged(new TableModelEvent(this)); } } super.fireValueChanged(); }
public MatrixPanel(MatrixGUIObject m) { super(m); if (!(m instanceof DefaultMatrixGUIObject)) { m = new DefaultMatrixGUIObject(m.getMatrix());
public void fireValueChanged(Coordinates coordinates, Object value) { iconUpToDate = false; dataCache.put(coordinates, new DataItem(value, ColorUtil.fromObject(value))); for (final Object o : getListenerList().getListenerList()) { if (o instanceof TableModelListener64) { ((TableModelListener64) o).tableChanged(new TableModelEvent64(this, coordinates.getRow(), coordinates .getRow(), coordinates.getColumn(), TableModelEvent64.UPDATE)); } else if (o instanceof TableModelListener) { ((TableModelListener) o).tableChanged(new TableModelEvent(this, MathUtil.longToInt(coordinates.getRow()), MathUtil.longToInt(coordinates.getRow()), MathUtil .longToInt(coordinates.getColumn()), TableModelEvent.UPDATE)); } } super.fireValueChanged(); }
public final synchronized void clear() { matrix.clear(); fireValueChanged(); }
public final void fireValueChanged(final long row, final long column, final Object value) { fireValueChanged(Coordinates.wrap(row, column), value); }