Class ColumnFormat


  • public class ColumnFormat
    extends Object
    Fluent API for creating Tables and Trees with the specified columns and layout.
    • Field Detail

      • style

        protected int style
      • linesVisible

        protected boolean linesVisible
      • headerVisible

        protected boolean headerVisible
    • Constructor Detail

      • ColumnFormat

        protected ColumnFormat()
    • Method Detail

      • builder

        public static ColumnFormat builder()
        Creates a `TableFormat` with the given style bits.
      • getStyle

        public int getStyle()
        Returns the style of this format. Allows utilities that require a certain flag (e.g. SWT.VIRTUAL) to do error-checking.
      • setStyle

        public ColumnFormat setStyle​(int style)
        Sets the SWT style flags.
      • setLinesVisible

        public ColumnFormat setLinesVisible​(boolean linesVisible)
        Sets the lines to be visible, defaults to true.
      • setHeaderVisible

        public ColumnFormat setHeaderVisible​(boolean headerVisible)
        Sets the header to be visible, defaults to true.
      • buildTable

        public Table buildTable​(Composite parent)
        Builds a Table with the specified columns and layout.
      • buildTree

        public Tree buildTree​(Composite parent)
        Builds a Tree with the specified columns and layout.
      • buildTable

        protected static Table buildTable​(Composite parent,
                                          int style,
                                          boolean linesVisible,
                                          boolean headerVisible,
                                          List<? extends ColumnFormat.ColumnBuilder> columnBuilders)
        Builds a table with the given columns.
      • buildTree

        protected static Tree buildTree​(Composite parent,
                                        int style,
                                        boolean linesVisible,
                                        boolean headerVisible,
                                        List<? extends ColumnFormat.ColumnBuilder> columnBuilders)
        Builds a table with the given columns.