/** * Replace this model's list with the specified list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the model's new list * * @see #getList() */ public void setList(List<T> listToWrap) { listWrapper = new ListWrapper(listToWrap); listWrapper.minModified = 0; listWrapper.maxModified = listWrapper.size(); listWrapper.modified = true; flush(); }
/** * Replace this model's list with the specified list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the model's new list * * @see #getList() */ public void setList(List<T> listToWrap) { listWrapper = new ListWrapper(listToWrap); listWrapper.minModified = 0; listWrapper.maxModified = listWrapper.size(); listWrapper.modified = true; flush(); }
/** * Creates a list model that wraps the given list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the List to be wrapped * @param keyProvider an instance of ProvidesKey<T>, or null if the record * object should act as its own key */ public ListDataProvider(List<T> listToWrap, ProvidesKey<T> keyProvider) { super(keyProvider); listWrapper = new ListWrapper(listToWrap); }
/** * Creates a list model that wraps the given list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the List to be wrapped * @param keyProvider an instance of ProvidesKey<T>, or null if the record * object should act as its own key */ public ListDataProvider(List<T> listToWrap, ProvidesKey<T> keyProvider) { super(keyProvider); listWrapper = new ListWrapper(listToWrap); }
/** * Replace this model's list with the specified list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the model's new list * * @see #getList() */ public void setList(List<T> listToWrap) { listWrapper = new ListWrapper(listToWrap); listWrapper.minModified = 0; listWrapper.maxModified = listWrapper.size(); listWrapper.modified = true; flush(); }
/** * Creates a list model that wraps the given list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the List to be wrapped * @param keyProvider an instance of ProvidesKey<T>, or null if the record * object should act as its own key */ public ListDataProvider(List<T> listToWrap, ProvidesKey<T> keyProvider) { super(keyProvider); listWrapper = new ListWrapper(listToWrap); }