/** {@inheritDoc} */ @Override public boolean isEmpty() { beforeReadOperation(); try { return delegate.isEmpty(); } finally { afterReadOperation(); } }
/** {@inheritDoc} */ @Override public boolean isEmpty() { beforeReadOperation(); try { return delegate.isEmpty(); } finally { afterReadOperation(); } }
/** {@inheritDoc} */ @Override public boolean isEmpty() { beforeReadOperation(); try { return delegate.isEmpty(); } finally { afterReadOperation(); } }
/** {@inheritDoc} */ @Override public boolean isEmpty() { getReadWriteLock().readLock().lock(); try { return source.isEmpty(); } finally { getReadWriteLock().readLock().unlock(); } }
/** {@inheritDoc} */ @Override public boolean isEmpty() { getReadWriteLock().readLock().lock(); try { return source.isEmpty(); } finally { getReadWriteLock().readLock().unlock(); } }
public static <E> boolean isEmpty(EventList<E> eventList) { try { eventList.getReadWriteLock().readLock().lock(); return eventList.isEmpty(); } finally { eventList.getReadWriteLock().readLock().unlock(); } } public static <E> boolean contains(EventList<E> eventList, E e) {
/** * {@inheritDoc} */ @Override public boolean isEmpty() { source.getReadWriteLock().readLock().lock(); try { return source.isEmpty(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** {@inheritDoc} */ @Override public boolean isEmpty() { getReadWriteLock().readLock().lock(); try { return source.isEmpty(); } finally { getReadWriteLock().readLock().unlock(); } }
/** * Returns true if no indices are selected. */ public boolean isSelectionEmpty() { source.getReadWriteLock().readLock().lock(); try { return listSelection.getSelected().isEmpty(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive. */ public void removeSelectionInterval(int index0, int index1) { if(!enabled) return; if(index0 == 0 && index1 == 0 && source.isEmpty()) return; // hack for Java 5 compatibility source.getReadWriteLock().writeLock().lock(); try { listSelection.deselect(index0, index1); } finally { source.getReadWriteLock().writeLock().unlock(); } }
/** * Returns true if no indices are selected. */ public boolean isSelectionEmpty() { source.getReadWriteLock().readLock().lock(); try { return listSelection.getSelected().isEmpty(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * Returns true if no indices are selected. */ @Override public boolean isSelectionEmpty() { source.getReadWriteLock().readLock().lock(); try { return listSelection.getSelected().isEmpty(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive. */ public void removeSelectionInterval(int index0, int index1) { if(!enabled) return; if(index0 == 0 && index1 == 0 && source.isEmpty()) return; // hack for Java 5 compatibility source.getReadWriteLock().writeLock().lock(); try { listSelection.deselect(index0, index1); } finally { source.getReadWriteLock().writeLock().unlock(); } }
/** * Returns the optional single value used as the first element in the * {@link ComboBoxModel} or <tt>null</tt> if no first item has been set. * * @return the special first value presented in the {@link ComboBoxModel} * or <tt>null</tt> if no first item has been set */ public E getFirstItem() { firstItem.getReadWriteLock().readLock().lock(); try { return firstItem.isEmpty() ? null : firstItem.get(0); } finally { firstItem.getReadWriteLock().readLock().unlock(); } }
/** * Returns the optional single value used as the first element in the * {@link ComboBoxModel} or <tt>null</tt> if no first item has been set. * * @return the special first value presented in the {@link ComboBoxModel} * or <tt>null</tt> if no first item has been set */ public E getFirstItem() { firstItem.getReadWriteLock().readLock().lock(); try { return firstItem.isEmpty() ? null : firstItem.get(0); } finally { firstItem.getReadWriteLock().readLock().unlock(); } }
/** * Returns the optional single value used as the first element in the * {@link ComboBoxModel} or <tt>null</tt> if no first item has been set. * * @return the special first value presented in the {@link ComboBoxModel} * or <tt>null</tt> if no first item has been set */ public E getFirstItem() { firstItem.getReadWriteLock().readLock().lock(); try { return firstItem.isEmpty() ? null : firstItem.get(0); } finally { firstItem.getReadWriteLock().readLock().unlock(); } }
/** * Removes and returns the optional single value used as the first element * in the {@link ComboBoxModel} or <tt>null</tt> if no first item has been * set. * * @return the special first value presented in the {@link ComboBoxModel} * or <tt>null</tt> if no first item has been set */ public E removeFirstItem() { checkAccessThread(); doNotChangeDocument = true; firstItem.getReadWriteLock().writeLock().lock(); try { return firstItem.isEmpty() ? null : firstItem.remove(0); } finally { firstItem.getReadWriteLock().writeLock().unlock(); doNotChangeDocument = false; } }
/** * Removes and returns the optional single value used as the first element * in the {@link ComboBoxModel} or <tt>null</tt> if no first item has been * set. * * @return the special first value presented in the {@link ComboBoxModel} * or <tt>null</tt> if no first item has been set */ public E removeFirstItem() { checkAccessThread(); doNotChangeDocument = true; firstItem.getReadWriteLock().writeLock().lock(); try { return firstItem.isEmpty() ? null : firstItem.remove(0); } finally { firstItem.getReadWriteLock().writeLock().unlock(); doNotChangeDocument = false; } }
/** * Removes and returns the optional single value used as the first element * in the {@link ComboBoxModel} or <tt>null</tt> if no first item has been * set. * * @return the special first value presented in the {@link ComboBoxModel} * or <tt>null</tt> if no first item has been set */ public E removeFirstItem() { checkAccessThread(); doNotChangeDocument = true; firstItem.getReadWriteLock().writeLock().lock(); try { return firstItem.isEmpty() ? null : firstItem.remove(0); } finally { firstItem.getReadWriteLock().writeLock().unlock(); doNotChangeDocument = false; } }
public final void updateData(Collection<T> list) { try { eventList.getReadWriteLock().writeLock().lock(); eventList.clear(); eventList.addAll(list); } finally { eventList.getReadWriteLock().writeLock().unlock(); } //Can not set strict on empty EventList - so we do it now (if possible) try { eventList.getReadWriteLock().readLock().lock(); if (!eventList.isEmpty()) { autoComplete.setStrict(strict); } } finally { eventList.getReadWriteLock().readLock().unlock(); } }