Class SuggesterConnector

java.lang.Object
com.vaadin.client.ui.AbstractConnector
com.vaadin.client.extensions.AbstractExtensionConnector
io.jmix.ui.widget.client.addon.aceeditor.SuggesterConnector
All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler, com.vaadin.client.communication.StateChangeEvent.StateChangeHandler, com.vaadin.client.ServerConnector, com.vaadin.shared.Connector, AceEditorWidget.SelectionChangeListener, GwtAceKeyboardHandler, SuggestPopup.SuggestionSelectedListener, Serializable
Direct Known Subclasses:
JmixSuggesterConnector

public class SuggesterConnector extends com.vaadin.client.extensions.AbstractExtensionConnector implements GwtAceKeyboardHandler, SuggestPopup.SuggestionSelectedListener, AceEditorWidget.SelectionChangeListener
See Also:
  • Field Details

    • CURSOR_LINE_HEIGHT

      protected static final int CURSOR_LINE_HEIGHT
      See Also:
    • connector

      protected AceEditorConnector connector
    • widget

      protected AceEditorWidget widget
    • serverRpc

      protected SuggesterServerRpc serverRpc
    • suggStartText

      protected String suggStartText
    • suggStartCursor

      protected AceRange suggStartCursor
    • suggesting

      protected boolean suggesting
    • suggestionStartId

      protected Integer suggestionStartId
    • startSuggestingOnNextSelectionChange

      protected boolean startSuggestingOnNextSelectionChange
    • suggestOnDot

      protected boolean suggestOnDot
    • showDescriptions

      protected boolean showDescriptions
  • Constructor Details

    • SuggesterConnector

      public SuggesterConnector()
  • Method Details

    • onStateChanged

      public void onStateChanged(com.vaadin.client.communication.StateChangeEvent stateChangeEvent)
      Specified by:
      onStateChanged in interface com.vaadin.client.communication.StateChangeEvent.StateChangeHandler
      Overrides:
      onStateChanged in class com.vaadin.client.ui.AbstractConnector
    • getState

      public SuggesterState getState()
      Specified by:
      getState in interface com.vaadin.client.ServerConnector
      Overrides:
      getState in class com.vaadin.client.ui.AbstractConnector
    • setSuggs

      protected void setSuggs(List<TransportSuggestion> suggs)
    • createSuggestionPopup

      protected SuggestPopup createSuggestionPopup()
    • extend

      protected void extend(com.vaadin.client.ServerConnector target)
      Specified by:
      extend in class com.vaadin.client.extensions.AbstractExtensionConnector
    • handleKeyboard

      public GwtAceKeyboardHandler.Command handleKeyboard(com.google.gwt.core.client.JavaScriptObject data, int hashId, String keyString, int keyCode, GwtAceKeyboardEvent e)
      Description copied from interface: GwtAceKeyboardHandler
      Called on key press.
      Specified by:
      handleKeyboard in interface GwtAceKeyboardHandler
      Returns:
      command
    • startSuggesting

      protected void startSuggesting()
    • suggestionSelected

      public void suggestionSelected(TransportSuggestion s)
      Specified by:
      suggestionSelected in interface SuggestPopup.SuggestionSelectedListener
    • noSuggestionSelected

      public void noSuggestionSelected()
      Specified by:
      noSuggestionSelected in interface SuggestPopup.SuggestionSelectedListener
    • stopAskingForSuggestions

      protected void stopAskingForSuggestions()
    • stopSuggesting

      protected void stopSuggesting()
    • keyPressWhileSuggesting

      protected GwtAceKeyboardHandler.Command keyPressWhileSuggesting(int keyCode)
    • getWord

      protected String getWord(String text, int row, int col1, int col2)
    • selectionChanged

      public void selectionChanged()
      Specified by:
      selectionChanged in interface AceEditorWidget.SelectionChangeListener
    • setPopupPosition

      protected void setPopupPosition(SuggestPopup popup)
    • updatePopupPosition

      protected void updatePopupPosition()