/** * 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. * To do this programmatically, use {@link SwingUtilities#invokeAndWait(Runnable)} and * wrap the source list (or some part of the source list's pipeline) using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventListModel<E> eventListModel(EventList<E> source) { return new DefaultEventListModel<E>(source); }
/** * 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. * To do this programmatically, use {@link SwingUtilities#invokeAndWait(Runnable)} and * wrap the source list (or some part of the source list's pipeline) using * GlazedListsSwing#swingThreadProxyList(EventList). * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventListModel<E> eventListModel(EventList<E> source) { return new DefaultEventListModel<E>(source); }
/** * 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. * To do this programmatically, use {@link SwingUtilities#invokeAndWait(Runnable)} and * wrap the source list (or some part of the source list's pipeline) using * {@link GlazedListsSwing#swingThreadProxyList(EventList)}. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventListModel<E> eventListModel(EventList<E> source) { return new DefaultEventListModel<E>(source); }
/** * 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 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 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); }