Class PasswordTextPainter

All Implemented Interfaces:
ICellPainter

public class PasswordTextPainter extends TextPainter
Specialized TextPainter that will paint the text that should be showed within a cell anonymized. Like in PasswordCellEditor every character will be replaced with another echo character. The echo character can be configured by setting the attribute CellStyleAttributes.PASSWORD_ECHO_CHAR to the cell style to use. If no echo character is configured, the bullet character will be used as echo character.
See Also:
  • Constructor Details

    • PasswordTextPainter

      public PasswordTextPainter()
    • PasswordTextPainter

      public PasswordTextPainter(boolean wrapText, boolean paintBg)
    • PasswordTextPainter

      public PasswordTextPainter(boolean wrapText, boolean paintBg, int spacing)
    • PasswordTextPainter

      public PasswordTextPainter(boolean wrapText, boolean paintBg, boolean calculate)
    • PasswordTextPainter

      public PasswordTextPainter(boolean wrapText, boolean paintBg, int spacing, boolean calculate)
  • Method Details

    • paintCell

      public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configRegistry)
      Specified by:
      paintCell in interface ICellPainter
      Overrides:
      paintCell in class TextPainter
    • getTextToDisplay

      protected String getTextToDisplay(ILayerCell cell, org.eclipse.swt.graphics.GC gc, int availableLength, String text)
      Description copied from class: AbstractTextPainter
      Computes dependent on the configuration of the TextPainter the text to display. If word wrapping is enabled new lines are inserted if the available space is not enough. If calculation of available space is enabled, the space is automatically widened for the text to display, and if no calculation is enabled the text is cut and modified to end with "..." to fit into the available space
      Overrides:
      getTextToDisplay in class AbstractTextPainter
      Parameters:
      cell - the current cell to paint
      gc - the current GC
      availableLength - the available space for the text to display
      text - the text that should be modified for display
      Returns:
      the modified text