List of usage examples for com.lowagie.text Rectangle getHeight
public float getHeight()
From source file:tracer.application.TracerFrame.java
License:Open Source License
private void refreshTraceList() { final int[] statsSelRows = statisticTable.getSelectedRows(); Rectangle rect = statisticTable.getVisibleRect(); int firstRow = statisticTable.rowAtPoint(rect.getLocation()); double numberOfRows = rect.getHeight() / statisticTable.getRowHeight(); int lastRow = firstRow + (int) Math.floor(numberOfRows); statisticTableModel.setFirstVisibleRow(firstRow); statisticTableModel.setLastVisibleRow(lastRow); LogFileTraces[] tls = removeTraceList(); if (tls.length > 0) { final LogFileTraces[] newTls = new LogFileTraces[tls.length]; for (int i = 0; i < tls.length; i++) { newTls[i] = new LogFileTraces(tls[i].getName(), tls[i].getFile()); }/* w ww.j a va2s . co m*/ SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() { @Override protected Void doInBackground() throws Exception { processTraces(newTls); return null; } @Override protected void done() { updateCombinedTraces(); statisticTableModel.fireTableDataChanged(); statisticTable.getSelectionModel().clearSelection(); for (int row : statsSelRows) { statisticTable.getSelectionModel().addSelectionInterval(row, row); } traceTableSelectionChanged(); statisticTableSelectionChanged(); } }; worker.execute(); // updateCombinedTraces(); // // statisticTableModel.fireTableDataChanged(); // statisticTable.getSelectionModel().clearSelection(); // for (int row : statsSelRows) { // statisticTable.getSelectionModel().addSelectionInterval(row, row); // } // traceTableSelectionChanged(); // statisticTableSelectionChanged(); } }