/** @inheritDoc */ public int getColumnCount() { swingThreadSource.getReadWriteLock().readLock().lock(); try { return swingThreadSource.size(); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** @inheritDoc */ @Override public void removeColumn(TableColumn column) { swingThreadSource.getReadWriteLock().writeLock().lock(); try { swingThreadSource.remove(column); } finally { swingThreadSource.getReadWriteLock().writeLock().unlock(); } }
/** @inheritDoc */ public void addColumn(TableColumn column) { swingThreadSource.getReadWriteLock().writeLock().lock(); try { swingThreadSource.add((T) column); } finally { swingThreadSource.getReadWriteLock().writeLock().unlock(); } }
/** @inheritDoc */ public int getColumnCount() { swingThreadSource.getReadWriteLock().readLock().lock(); try { return swingThreadSource.size(); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** @inheritDoc */ public void addColumn(TableColumn column) { swingThreadSource.getReadWriteLock().writeLock().lock(); try { swingThreadSource.add((T) column); } finally { swingThreadSource.getReadWriteLock().writeLock().unlock(); } }
/** @inheritDoc */ public void removeColumn(TableColumn column) { swingThreadSource.getReadWriteLock().writeLock().lock(); try { swingThreadSource.remove(column); } finally { swingThreadSource.getReadWriteLock().writeLock().unlock(); } }
/** @inheritDoc */ @Override public void addColumn(TableColumn column) { swingThreadSource.getReadWriteLock().writeLock().lock(); try { swingThreadSource.add((T) column); } finally { swingThreadSource.getReadWriteLock().writeLock().unlock(); } }
/** @inheritDoc */ public TableColumn getColumn(int columnIndex) { swingThreadSource.getReadWriteLock().readLock().lock(); try { return swingThreadSource.get(columnIndex); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** @inheritDoc */ @Override public int getColumnCount() { swingThreadSource.getReadWriteLock().readLock().lock(); try { return swingThreadSource.size(); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** @inheritDoc */ @Override public TableColumn getColumn(int columnIndex) { swingThreadSource.getReadWriteLock().readLock().lock(); try { return swingThreadSource.get(columnIndex); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** @inheritDoc */ public void removeColumn(TableColumn column) { swingThreadSource.getReadWriteLock().writeLock().lock(); try { swingThreadSource.remove(column); } finally { swingThreadSource.getReadWriteLock().writeLock().unlock(); } }
/** @inheritDoc */ public TableColumn getColumn(int columnIndex) { swingThreadSource.getReadWriteLock().readLock().lock(); try { return swingThreadSource.get(columnIndex); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** @inheritDoc */ public int getColumnIndex(Object identifier) { if (identifier == null) throw new IllegalArgumentException("identifier is null"); swingThreadSource.getReadWriteLock().readLock().lock(); try { for (int i = 0, n = swingThreadSource.size(); i < n; i++) { if (identifier.equals(swingThreadSource.get(i).getIdentifier())) return i; } throw new IllegalArgumentException("Identifier not found"); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** * Provides access to an {@link EventList} that contains items from the * viewed Table that are not currently selected. */ public EventList<E> getDeselected() { swtThreadSource.getReadWriteLock().readLock().lock(); try { return selection.getSelectionList().getDeselected(); } finally { swtThreadSource.getReadWriteLock().readLock().unlock(); } }
/** {@inheritDoc} */ public int getRowCount() { // a row for every list element, plus the headers swtThreadSource.getReadWriteLock().readLock().lock(); try { return swtThreadSource.size() + getFixedHeaderRowCount(); } finally { swtThreadSource.getReadWriteLock().readLock().unlock(); } }
/** * Provides access to an {@link EventList} that contains items from the * viewed Table that are currently selected. */ public EventList<E> getSelected() { swtThreadSource.getReadWriteLock().readLock().lock(); try { return selection.getSelectionList().getSelected(); } finally { swtThreadSource.getReadWriteLock().readLock().unlock(); } }
/** * Recalculates the total combined width of all columns. */ private void recalcWidthCache() { swingThreadSource.getReadWriteLock().readLock().lock(); try { totalColumnWidth = 0; for (int i = 0, n = swingThreadSource.size(); i < n; i++) totalColumnWidth += swingThreadSource.get(i).getWidth(); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** * Recalculates the total combined width of all columns. */ private void recalcWidthCache() { swingThreadSource.getReadWriteLock().readLock().lock(); try { totalColumnWidth = 0; for (int i = 0, n = swingThreadSource.size(); i < n; i++) totalColumnWidth += swingThreadSource.get(i).getWidth(); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** * Recalculates the total combined width of all columns. */ private void recalcWidthCache() { swingThreadSource.getReadWriteLock().readLock().lock(); try { totalColumnWidth = 0; for (int i = 0, n = swingThreadSource.size(); i < n; i++) totalColumnWidth += swingThreadSource.get(i).getWidth(); } finally { swingThreadSource.getReadWriteLock().readLock().unlock(); } }
/** {@inheritDoc} */ public boolean isRowResizable(int row) { // header rows are not resizable if(row < getFixedHeaderRowCount()) { return false; // regular rows may be resizable } else { swtThreadSource.getReadWriteLock().readLock().lock(); try { return kTableFormat.isRowResizable(swtThreadSource.get(row - getFixedHeaderRowCount())); } finally { swtThreadSource.getReadWriteLock().readLock().unlock(); } } }