Class ControlGridSWTRenderer

    • Method Detail

      • getPixelGridSize

        protected Optional<java.lang.Integer> getPixelGridSize()
        When this returns a non-empty optional all non-spanning/grabbing controls in a spanning/grabbing parent will have a width which is a multiple of this pixel grid size. To be more specific, the preferred size of the control will be rounded up to match this criteria.
        Returns:
        the grid size in pixels
        Since:
        1.16
      • getHorizontalSpacing

        protected int getHorizontalSpacing()
        Returns the hint for the horizontal spacing.
        Returns:
        the spacing
        Since:
        1.8
      • createGridDataForControlWithoutHorizontalGrab

        protected org.eclipse.swt.layout.GridData createGridDataForControlWithoutHorizontalGrab​(SWTGridDescription swtGridDescription,
                                                                                                SWTGridCell swtGridCell,
                                                                                                org.eclipse.swt.widgets.Control control)
        Creates the GridData which will be set on control which will take a span of 1 column an have no horizontal grab.
        Parameters:
        swtGridDescription - the SWTGridDescription
        swtGridCell - the current SWTGridCell of the description
        control - the Control
        Returns:
        the layout data
        Since:
        1.8
      • createGridDataForControlWithHorizontalGrab

        protected org.eclipse.swt.layout.GridData createGridDataForControlWithHorizontalGrab​(SWTGridDescription swtGridDescription,
                                                                                             SWTGridCell swtGridCell,
                                                                                             org.eclipse.swt.widgets.Control control,
                                                                                             int hSpan)
        Creates the GridData which will be set on control which will take up horizontal space an will span over the given amount of columns.
        Parameters:
        swtGridDescription - the SWTGridDescription
        swtGridCell - the current SWTGridCell of the description
        control - the Control
        hSpan - the horizontal span
        Returns:
        the layout data
        Since:
        1.8
      • createGridDescriptionForEmptyCells

        protected SWTGridDescription createGridDescriptionForEmptyCells​(java.util.Collection<SWTGridDescription> values)
        Parameters:
        values - the collected grid description of the renderers
        Returns:
        a SWTGridDescription which will be used to create empty cells. Please note that the renderer of this description will be ignored, so it is fine to pass null as a renderer
        Since:
        1.16