Class PasswordCellEditor

  • All Implemented Interfaces:
    ICellEditor

    public class PasswordCellEditor
    extends TextCellEditor
    Specialised TextCellEditor that sets the echo char of the text control used by this editor to a configured character. You can configure the echo character by setting the attribute CellStyleAttributes.PASSWORD_ECHO_CHAR to the cell style to use. If there is no echo character configured, the bullet character will be used.

    As the anonymization of the inserted value only relates to the Text control, ensure to also register the PasswordTextPainter so the value is not shown in clear text after commit.

    See Also:
    PasswordTextPainter
    • Constructor Detail

      • PasswordCellEditor

        public PasswordCellEditor()
        Creates a PasswordCellEditor that will not commit a value on pressing the up or the down key.
      • PasswordCellEditor

        public PasswordCellEditor​(boolean commitOnUpDown)
        Creates a PasswordCellEditor.
        Parameters:
        commitOnUpDown - Flag to configure whether the editor should commit and move the selection in the corresponding way if the up or down key is pressed.
    • 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.