/** * Returns the number of rows in the table. */ public int getRowCount() { return rowKeys.size(); }
/** {@inheritDoc} */ @Override public final int size() { return source.size(); }
/** {@inheritDoc} */ @Override public int size() { return source.size(); }
/** {@inheritDoc} */ @Override public int size() { return source.size(); }
/** * Returns whether or not the item with the given source index * is selected. */ public boolean isSelected(int sourceIndex) { if(sourceIndex < 0 || sourceIndex >= source.size()) { return false; } return barcode.getColourIndex(sourceIndex, SELECTED) != -1; }
/** * Returns whether or not the item with the given source index * is selected. */ public boolean isSelected(int sourceIndex) { if(sourceIndex < 0 || sourceIndex >= source.size()) { return false; } return barcode.getColourIndex(sourceIndex, SELECTED) != -1; }
/** * @param source the List whose size is reported as the value of this * Calculation */ public Count(EventList source) { super(new Integer(source.size())); this.source = source; this.source.addListEventListener(this); }
/** {@inheritDoc} */ @Override public void setTailRange(int startIndex, int endIndex) { // this implementation is slightly inconsistent with the superclass // because the super treats endIndex as exclusive wheras we treat // endIndex as inclusive this.lowerThreshold = sourceIndexToThreshold(source.size() - startIndex); this.upperThreshold = sourceIndexToThreshold(source.size() - endIndex); adjustRange(); }
/** * Rebuild the CompositeMatcher modelled by this editor. */ private Matcher<E> rebuildMatcher() { final Matcher[] matchers = new Matcher[matcherEditors.size()]; for (int i = 0, n = matcherEditors.size(); i < n; i++) { matchers[i] = matcherEditors.get(i).getMatcher(); } if(mode == AND) return Matchers.and(matchers); else if(mode == OR) return Matchers.or(matchers); else throw new IllegalStateException(); }
/** {@inheritDoc} */ @Override protected int getSourceIndex(int index) { if(index == size()) return source.size(); return grouper.getBarcode().getIndex(index, Grouper.UNIQUE); }
/** {@inheritDoc} */ @Override public void add(int index, E value) { if(!isWritable()) throw new IllegalStateException("Non-writable List cannot be modified"); if(index < 0 || index > size()) throw new IndexOutOfBoundsException("Cannot add at " + index + " on list of size " + size()); final int sourceIndex = index < size() ? getSourceIndex(index) : source.size(); source.add(sourceIndex, (S) value); }
/** @inheritDoc */ public void listChanged(ListEvent listChanges) { final Boolean oldValue = getValue(); final int size = listChanges.getSourceList().size(); setValue(new Boolean(size >= min && size <= max)); final Boolean newValue = getValue(); fireValueChange(oldValue, newValue); } }
/** @inheritDoc */ @Override public void listChanged(ListEvent listChanges) { final Boolean oldValue = getValue(); final int size = listChanges.getSourceList().size(); setValue(new Boolean(size >= min && size <= max)); final Boolean newValue = getValue(); fireValueChange(oldValue, newValue); } }
/** @inheritDoc */ @Override public void listChanged(ListEvent<E> listChanges) { final Integer oldValue = getValue(); setValue(new Integer(listChanges.getSourceList().size())); final Integer newValue = getValue(); fireValueChange(oldValue, newValue); } }
/** @inheritDoc */ public void listChanged(ListEvent<E> listChanges) { final Integer oldValue = getValue(); setValue(new Integer(listChanges.getSourceList().size())); final Integer newValue = getValue(); fireValueChange(oldValue, newValue); } }
/** * Cleanup all temporary variables necessary while events are being fired. */ private void cleanup() { eventThread = null; blockSequence.reset(); listDeltas.reset(sourceList.size()); reorderMap = null; listDeltas.setAllowContradictingEvents(false); // force cleanup of iterator which still could reference old data listEvent.reset(); }
/** {@inheritDoc} */ @Override public int size() { getReadWriteLock().readLock().lock(); try { return source.size(); } finally { getReadWriteLock().readLock().unlock(); } }
/** {@inheritDoc} */ @Override public int size() { getReadWriteLock().readLock().lock(); try { return source.size(); } finally { getReadWriteLock().readLock().unlock(); } }
/** * Gets the size of the list. */ @Override public int getSize() { source.getReadWriteLock().readLock().lock(); try { return source.size(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * Gets the size of the list. */ public int getSize() { source.getReadWriteLock().readLock().lock(); try { return source.size(); } finally { source.getReadWriteLock().readLock().unlock(); } }