Class OptionsBuilder<T>

  • Type Parameters:
    T - the row type

    public class OptionsBuilder<T>
    extends GenericOptionsBuilder<OptionsBuilder<T>,​T>
    Builder for data table options. It's highly recommended to use this builder instead of creating and assembling an options instance on your own:
     class FooBar {
         final String foo;
         final String bar;
    
         FooBar() {
             this.foo = "Foo-" + String.valueOf(Random.nextInt(12345));
             this.bar = "Bar-" + String.valueOf(Random.nextInt(12345));
         }
     }
    
     Options<FooBar> options = new OptionsBuilder<FooBar>()
             .button("Click Me", (table) -> Window.alert("Hello"))
             .column("foo", "Foo", (cell, type, row, meta) -> row.foo)
             .column("bar", "Bar", (cell, type, row, meta) -> row.bar)
             .options();
     
    • Constructor Detail

      • OptionsBuilder

        public OptionsBuilder()