FlowingCode / TwinColGridAddon

TwinColGrid Vaadin Add-on
https://www.flowingcode.com/en/open-source/
Apache License 2.0
7 stars 7 forks source link

Deprecate the constructor that receives a ListDataProvider and caption #98

Closed javier-godoy closed 2 years ago

javier-godoy commented 2 years ago

The constructor is TwinColGrid(ListDataProvider<T>, String caption) is redundant and can be replaced with a call to TwinColGrid(String caption) followed by setDataProvider(ListDataProvider<T>).

In addition, my proposal for #96 requires two new constructors

TwinColGrid(Grid<T> availableGrid, Grid<T> selectionGrid) 
TwinColGrid(Supplier<Grid<T>>) 

And two redundant overloads with caption (because of #97)

TwinColGrid(String caption, Grid<T> availableGrid, Grid<T> selectionGrid) 
TwinColGrid(String caption, Supplier<Grid<T>>) 

If instantiating TwinColGrid with a data provider is a feature we want to mantain, then #96 would require eight constructors instead of "only" four.

TwinColGrid(ListDataProvider<T>, Grid<T> availableGrid, Grid<T> selectionGrid) 
TwinColGrid(ListDataProvider<T>, Supplier<Grid<T>>) 
TwinColGrid(ListDataProvider<T>, String caption, Grid<T> availableGrid, Grid<T> selectionGrid) 
TwinColGrid(ListDataProvider<T>, String caption, Supplier<Grid<T>>) 

Therefore: deprecate TwinColGrid(ListDataProvider<T>, String caption)

javier-godoy commented 2 years ago

Released in v2.7.0