/** * Creates a new list model that contains all objects located in the given * <code>source</code> and reacts to any changes in the given <code>source</code>. * * <p>The returned selection model is <strong>not thread-safe</strong>. Unless otherwise * noted, all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventListModel<E> eventListModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventListModel<E>(proxySource, true); }
/** * Creates a new combobox model that contains all objects located in the given * <code>source</code> and reacts to any changes in the given <code>source</code>. * * <p>The returned combobox model is <strong>not thread-safe</strong>. Unless otherwise * noted, all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventComboBoxModel<E> eventComboBoxModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventComboBoxModel<E>(proxySource, true); }
/** * Creates a new table model that extracts column data from the given <code>source</code> * using the the given <code>tableFormat</code>. This method wraps the source list using * GlazedListsSwing#swingThreadProxyList(EventList). * <p> * The returned table model is <strong>not thread-safe</strong>. Unless otherwise noted, all * methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the row objects * @param tableFormat the object responsible for extracting column data from the row objects */ public static <E> AdvancedTableModel<E> eventTableModelWithThreadProxyList(EventList<E> source, TableFormat<? super E> tableFormat) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventTableModel<E>(proxySource, true, tableFormat); }
/** * Creates a new list model that contains all objects located in the given * <code>source</code> and reacts to any changes in the given <code>source</code>. * While holding a read lock, it wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. * * <p>The returned selection model is <strong>not thread-safe</strong>. Unless otherwise * noted, all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventListModel<E> eventListModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventListModel<E>(proxySource, true); }
/** * Creates a new combobox model that contains all objects located in the given * <code>source</code> and reacts to any changes in the given <code>source</code>. * While holding a read lock, it wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. * * <p>The returned combobox model is <strong>not thread-safe</strong>. Unless otherwise * noted, all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventComboBoxModel<E> eventComboBoxModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventComboBoxModel<E>(proxySource, true); }
/** * Creates a new combobox model that contains all objects located in the given * <code>source</code> and reacts to any changes in the given <code>source</code>. * While holding a read lock, it wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. * * <p>The returned combobox model is <strong>not thread-safe</strong>. Unless otherwise * noted, all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventComboBoxModel<E> eventComboBoxModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventComboBoxModel<E>(proxySource, true); }
/** * Creates a new list model that contains all objects located in the given * <code>source</code> and reacts to any changes in the given <code>source</code>. * While holding a read lock, it wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. * * <p>The returned selection model is <strong>not thread-safe</strong>. Unless otherwise * noted, all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventListModel<E> eventListModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventListModel<E>(proxySource, true); }
/** * Creates a new table model that extracts column data from the given <code>source</code> * using the the given <code>tableFormat</code>. While holding a read lock, * this method wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. * <p> * The returned table model is <strong>not thread-safe</strong>. Unless otherwise noted, all * methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the row objects * @param tableFormat the object responsible for extracting column data from the row objects */ public static <E> AdvancedTableModel<E> eventTableModelWithThreadProxyList(EventList<E> source, TableFormat<? super E> tableFormat) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventTableModel<E>(proxySource, true, tableFormat); }
/** * Creates a new table model that extracts column data from the given <code>source</code> * using the the given <code>tableFormat</code>. While holding a read lock, * this method wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. * <p> * The returned table model is <strong>not thread-safe</strong>. Unless otherwise noted, all * methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the row objects * @param tableFormat the object responsible for extracting column data from the row objects */ public static <E> AdvancedTableModel<E> eventTableModelWithThreadProxyList(EventList<E> source, TableFormat<? super E> tableFormat) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventTableModel<E>(proxySource, true, tableFormat); }
/** * Creates a new selection model that also presents a list of the selection. * While holding a read lock, it wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. The * {@link AdvancedListSelectionModel} listens to this {@link EventList} in order to adjust * selection when the {@link EventList} is modified. For example, when an element is added to * the {@link EventList}, this may offset the selection of the following elements. * <p> * The returned selection model is <strong>not thread-safe</strong>. Unless otherwise noted, * all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the {@link EventList} whose selection will be managed. This should be the * same {@link EventList} passed to the constructor of your * {@link AdvancedTableModel} or {@link EventListModel}. */ public static <E> AdvancedListSelectionModel<E> eventSelectionModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventSelectionModel<E>(proxySource, true); }
/** * Creates a new selection model that also presents a list of the selection. It wraps the * source list using GlazedListsSwing#swingThreadProxyList(EventList). The * {@link AdvancedListSelectionModel} listens to this {@link EventList} in order to adjust * selection when the {@link EventList} is modified. For example, when an element is added to * the {@link EventList}, this may offset the selection of the following elements. * <p> * The returned selection model is <strong>not thread-safe</strong>. Unless otherwise noted, * all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the {@link EventList} whose selection will be managed. This should be the * same {@link EventList} passed to the constructor of your * {@link AdvancedTableModel} or {@link EventListModel}. */ public static <E> AdvancedListSelectionModel<E> eventSelectionModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventSelectionModel<E>(proxySource, true); }
/** * Creates a new selection model that also presents a list of the selection. * While holding a read lock, it wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. The * {@link AdvancedListSelectionModel} listens to this {@link EventList} in order to adjust * selection when the {@link EventList} is modified. For example, when an element is added to * the {@link EventList}, this may offset the selection of the following elements. * <p> * The returned selection model is <strong>not thread-safe</strong>. Unless otherwise noted, * all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the {@link EventList} whose selection will be managed. This should be the * same {@link EventList} passed to the constructor of your * {@link AdvancedTableModel} or {@link EventListModel}. */ public static <E> AdvancedListSelectionModel<E> eventSelectionModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventSelectionModel<E>(proxySource, true); }
/** * Creates a new table model that extracts column data from the given <code>source</code> * using the the given <code>tableFormat</code>. * * <p>While holding a read lock, this method wraps the source list using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}.</p> * * <p>The <code>eventAdapterFactory</code> is used to create a {@link TableModelEventAdapter}, * which is then used by the created table model to convert list events to table model events.</p> * * <p> * The returned table model is <strong>not thread-safe</strong>. Unless otherwise noted, all * methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the row objects * @param tableFormat the object responsible for extracting column data from the row objects * @param eventAdapterFactory factory for creating a {@link TableModelEventAdapter} */ public static <E> AdvancedTableModel<E> eventTableModelWithThreadProxyList(EventList<E> source, TableFormat<? super E> tableFormat, TableModelEventAdapter.Factory<E> eventAdapterFactory) { final EventList<E> proxySource = createSwingThreadProxyList(source); final DefaultEventTableModel<E> result = new DefaultEventTableModel<E>(proxySource, true, tableFormat); final TableModelEventAdapter<E> eventAdapter = eventAdapterFactory.create(result); result.setEventAdapter(eventAdapter); return result; }