Class AbstractUISWTInputReceiver

    • Field Detail

      • select_preentered_text

        protected boolean select_preentered_text
      • select_preentered_text_range

        protected int[] select_preentered_text_range
      • line_height

        protected int line_height
      • width_hint

        protected int width_hint
      • choices

        protected java.lang.String[] choices
      • choices_allow_edit

        protected boolean choices_allow_edit
      • choices_default

        protected int choices_default
    • Constructor Detail

      • AbstractUISWTInputReceiver

        public AbstractUISWTInputReceiver()
    • Method Detail

      • selectPreenteredText

        public void selectPreenteredText​(boolean select)
        Description copied from interface: UISWTInputReceiver
        Indicates whether you want the preentered text to be selected (highlighted) or not. Default is true.
        Specified by:
        selectPreenteredText in interface UISWTInputReceiver
      • selectPreenteredTextRange

        public void selectPreenteredTextRange​(int[] range)
      • setLineHeight

        public void setLineHeight​(int line_height)
        Description copied from interface: UISWTInputReceiver
        Indicates how many lines by default to show the user to enter input.
        Specified by:
        setLineHeight in interface UISWTInputReceiver
      • setPreenteredText

        public void setPreenteredText​(java.lang.String text,
                                      boolean as_suggested)
        Description copied from interface: UIInputReceiver
        This sets a value to be displayed as pre-entered text for the input. This may be called if the caller wants to suggest a value for the user to use, or if the caller wants to provide a previous value (for example).

        The text may appear in the same location as the text should be entered (allowing it to be directly overwritten or submitted immediately) - but some interfaces may not support this.

        A flag should be passed indicating whether the pre-entered text is being entered as a suggestion for a value, or whether it is an old value being currently stored. Some interfaces may choose to differentiate between the two.

        Specified by:
        setPreenteredText in interface UIInputReceiver
        Overrides:
        setPreenteredText in class AbstractUIInputReceiver
        Parameters:
        text - The text to pre-enter.
        as_suggested - true if the value is a suggested input value, false if it is an old value.
      • setSelectableItems

        public void setSelectableItems​(java.lang.String[] choices,
                                       int default_choice,
                                       boolean allow_edit)
        Description copied from interface: UISWTInputReceiver
        Changes the entry box to be a combo box, where the values passed are selectable.
        Specified by:
        setSelectableItems in interface UISWTInputReceiver
        Parameters:
        choices - The list of options to be made available.
        default_choice - Index of the option to present by default.
        allow_edit - true if you still want to allow the user to enter their own text, false if you want to restrict them to the choices here.