Class RichTextControlSWTRenderer

  • All Implemented Interfaces:
    RootDomainModelChangeListener

    public class RichTextControlSWTRenderer
    extends TextControlSWTRenderer
    The multi line text control renderer displays the text in a read only fashion. Once the user starts editing (pressing any key except tab), a popupcontrol is displayed allowing the user to edit the contents.
    Author:
    Jonas Helming
    • Method Detail

      • getPreferrredPopupHeight

        protected int getPreferrredPopupHeight()
        Specifies the preferred size of the popup window.
        Returns:
        the size in pixel
      • createPopupWindow

        protected PopupWindow createPopupWindow()
        creates the popup window.
        Returns:
        a new PopupWindow
      • isOpenKey

        protected boolean isOpenKey​(org.eclipse.swt.events.KeyEvent e)
        Determines, whether the popup shall be opened on a specific KeyEvent on the regular Text Control. By default the popup opens on any key except SHIFT and ALT, but additional keys can be added by overriding the method.
        Parameters:
        e - the KeyEvent on the regular Text
        Returns:
        whether the popup should open
        Since:
        1.14
      • getTextHeightHint

        protected int getTextHeightHint()
        The preferred height in pixels for the text control.
        Returns:
        the height hint
        See Also:
        GridData.heightHint
      • getMaxTextHeight

        protected int getMaxTextHeight()
        The maximum height in pixels for the text control.
        Returns:
        the maximum height
      • getMinTextHeight

        protected int getMinTextHeight()
        The minimum height in pixels for the text control.
        Returns:
        the minimum height
      • getMinVisibleLines

        protected int getMinVisibleLines()
        The minimum number of visible lines in the text control.
        Returns:
        the minimum visible lines
      • getMaxVisibleLines

        protected int getMaxVisibleLines()
        The maximum number of visible lines in the text control.
        Returns:
        the maximum visible lines