Class MultiLineTextCellEditor

    • Constructor Detail

      • MultiLineTextCellEditor

        public MultiLineTextCellEditor()
        Create a new multi line text editor that ensures to not commit the editor value in case enter is typed. The text control will support automatic line wrapping.
      • MultiLineTextCellEditor

        public MultiLineTextCellEditor​(boolean lineWrap)
        Create a new multi line text editor that ensures to not commit the editor value in case enter is typed.
        Parameters:
        lineWrap - Flag to configure whether the text control should enable automatic line wrap behaviour or not.
    • Method Detail

      • createEditorControl

        public org.eclipse.swt.widgets.Text createEditorControl​(org.eclipse.swt.widgets.Composite parent)
        Description copied from interface: ICellEditor
        Creates the editor control that is wrapped by this ICellEditor. Will use the style configurations in ConfigRegistry for styling the control.
        Specified by:
        createEditorControl in interface ICellEditor
        Overrides:
        createEditorControl in class TextCellEditor
        Parameters:
        parent - The Composite that will be the parent of the new editor control. Can not be null
        Returns:
        The created editor control that is wrapped by this ICellEditor.
      • calculateControlBounds

        public org.eclipse.swt.graphics.Rectangle calculateControlBounds​(org.eclipse.swt.graphics.Rectangle cellBounds)
        Description copied from interface: ICellEditor
        This method is used to calculate the bounds of the edit control when opened inline. By default it should return the given cell bounds to match the cell structure in NatTable. For several cases it might be useful to return the preferred size to show all content rather than trimming the control to the cell size.

        Note: By changing the bounds you should ensure to only modify width and height attributes and not x and y coordinate, otherwise the editor control will show up somewhere else and not in place of the cell that is edited.

        Specified by:
        calculateControlBounds in interface ICellEditor
        Overrides:
        calculateControlBounds in class AbstractCellEditor
        Parameters:
        cellBounds - The bounds of the cell for which the editor is opened.
        Returns:
        The bounds of the editor control that should be applied. By default the cell bounds for several cases bigger.
      • setLineWrap

        public void setLineWrap​(boolean lineWrap)
        Parameters:
        lineWrap - true if the text control should enable automatic line wrap behaviour, false if not