Interface IntelliHints

    • Field Detail

      • CLIENT_PROPERTY_INTELLI_HINTS

        static final java.lang.String CLIENT_PROPERTY_INTELLI_HINTS
        The key of a client property. If a component has IntelliHints registered, you can use this client property to get the IntelliHints instance.
        See Also:
        Constant Field Values
    • Method Detail

      • createHintsComponent

        javax.swing.JComponent createHintsComponent()
        Creates the component which contains hints. At this moment, the content should be empty. Following call updateHints(Object, boolean) will update the content.
        Returns:
        the component which will be used to display the hints.
      • updateHints

        @Deprecated
        boolean updateHints​(java.lang.Object context)
        Deprecated.
        Update hints depending on the context. This method will be triggered for every key typed event in the text component. Subclass can override it to provide your own list of hints and call setListData to set it and returns true after that.
        Parameters:
        context - the current context
        Returns:
        true or false. If it is false, hint popup will not be shown.
      • updateHints

        boolean updateHints​(java.lang.Object context,
                            boolean autoPopup)
        Update hints depending on the context. This method will be triggered for every key typed event in the text component. Subclass can override it to provide your own list of hints and call setListData to set it and returns true after that.
        Parameters:
        context - the current context
        autoPopup - true or false. If true, it means this method was called through the auto-popup feature because of the show hint timer is triggered. If false, it means user pressed the show hint key stroke to show the popup.
        Returns:
        true or false. If it is false, hint popup will not be shown.
      • getSelectedHint

        java.lang.Object getSelectedHint()
        Gets the selected value. This value will be used to complete the text component.
        Returns:
        the selected value.
      • acceptHint

        void acceptHint​(java.lang.Object hint)
        Accepts the selected hint. Subclass can implements to decide how the new hint be set to the text component.
        Parameters:
        hint - the hint to be accepted.