Interface IProposalSupport

  • All Known Implementing Classes:
    AbstractProposalSupport

    public interface IProposalSupport
    The Interface IProposalSupport.
    • Method Detail

      • getPossibleValues

        IProposal[] getPossibleValues​(IDirectEditingContext context)
        This value will be used if the cell editor is a combo box. This functionality only applies to TYPE_DROPDOWN.
        Parameters:
        context - the context
        Returns:
        the possible values for the combo box.
      • getValueProposals

        IProposal[] getValueProposals​(java.lang.String value,
                                      int caretPosition,
                                      IDirectEditingContext context)
        This proposals will be used for the completion list of a simple text cell editor. This functionality only applies to TYPE_TEXT.
        Parameters:
        value - current value
        caretPosition - current cursor position
        context - the context
        Returns:
        the proposed values
      • completeValue

        java.lang.String completeValue​(java.lang.String value,
                                       int caretPosition,
                                       IProposal choosenValue,
                                       IDirectEditingContext context)
        Framework calls this method to let the feature calculate the new value.
        Parameters:
        value - current value
        caretPosition - current cursor position
        choosenValue - value choosen by user
        context - the context
        Returns:
        the new value
      • checkValueValid

        java.lang.String checkValueValid​(java.lang.String text,
                                         IProposal proposal,
                                         IDirectEditingContext context)
        This method will be called by clients many times to see if current value is valid and could be set.
        Parameters:
        text - the value as text
        proposal - the value as proposal
        context - the context
        Returns:
        null if value is okay and could be set; any text means value is not valid; text is reason for invalidality
      • setValue

        void setValue​(java.lang.String text,
                      IProposal proposal,
                      IDirectEditingContext context)
        Set the new value. The value comes from the text editing UI component.
        Parameters:
        text - the value
        proposal - the selected proposal
        context - the context