Class TerraSuggestionPopupSkin

    • Constructor Detail

      • TerraSuggestionPopupSkin

        public TerraSuggestionPopupSkin()
    • Method Detail

      • install

        public void install​(Component component)
        Description copied from class: ComponentSkin
        Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.
        Specified by:
        install in interface Skin
        Overrides:
        install in class WindowSkin
        Parameters:
        component - The component to which the skin is being attached.
      • getFont

        public java.awt.Font getFont()
      • setFont

        public void setFont​(java.awt.Font font)
      • setFont

        public final void setFont​(java.lang.String font)
      • setFont

        public final void setFont​(Dictionary<java.lang.String,​?> font)
      • getColor

        public java.awt.Color getColor()
      • setColor

        public void setColor​(java.awt.Color color)
      • setColor

        public final void setColor​(java.lang.String color)
      • getBorderColor

        public java.awt.Color getBorderColor()
      • setBorderColor

        public void setBorderColor​(java.awt.Color borderColor)
      • setBorderColor

        public final void setBorderColor​(java.lang.String borderColor)
      • getCloseTransitionDuration

        public int getCloseTransitionDuration()
      • setCloseTransitionDuration

        public void setCloseTransitionDuration​(int closeTransitionDuration)
      • getCloseTransitionRate

        public int getCloseTransitionRate()
      • setCloseTransitionRate

        public void setCloseTransitionRate​(int closeTransitionRate)
      • isVariableItemHeight

        public boolean isVariableItemHeight()
      • setVariableItemHeight

        public void setVariableItemHeight​(boolean variableItemHeight)
      • mouseClick

        public boolean mouseClick​(Component component,
                                  Mouse.Button button,
                                  int x,
                                  int y,
                                  int count)
        Description copied from interface: ComponentMouseButtonListener
        Called when a mouse button is clicked over a component.
        Specified by:
        mouseClick in interface ComponentMouseButtonListener
        Overrides:
        mouseClick in class ComponentSkin
        Parameters:
        component - Component user the mouse pointer.
        button - Which mouse button was clicked.
        x - X position of the mouse.
        y - Y position of the mouse.
        count - Number of clicks (1 = single click, 2 = double click, etc.).
        Returns:
        true to consume the event; false to allow it to propagate (default).
      • keyPressed

        public boolean keyPressed​(Component component,
                                  int keyCode,
                                  Keyboard.KeyLocation keyLocation)
        ENTER Close the suggestion popup with a 'result' of true.
        ESCAPE Close the suggestion popup with a 'result' of false.
        Specified by:
        keyPressed in interface ComponentKeyListener
        Overrides:
        keyPressed in class ComponentSkin
        Parameters:
        component - Component that has the focus.
        keyCode - The key code for the key that was pressed.
        keyLocation - Location value for the key (left or right for shift keys, etc.).
        Returns:
        true to consume the event; false to allow it to propagate.
      • windowCloseVetoed

        public void windowCloseVetoed​(Window window,
                                      Vote reason)
        Description copied from interface: WindowStateListener
        Called when a window close event has been vetoed.
        Specified by:
        windowCloseVetoed in interface WindowStateListener
        Parameters:
        window - The window that was to close, but now will not.
        reason - The accumulated vote from all the listeners that vetoed this event.
      • suggestionDataChanged

        public void suggestionDataChanged​(SuggestionPopup suggestionPopup,
                                          List<?> previousSuggestionData)
        Description copied from interface: SuggestionPopupListener
        Called when a suggestion popup's suggestions have changed.
        Specified by:
        suggestionDataChanged in interface SuggestionPopupListener
        Parameters:
        suggestionPopup - The source of this event.
        previousSuggestionData - The previous data that was being shown.
      • listSizeChanged

        public void listSizeChanged​(SuggestionPopup suggestionPopup,
                                    int previousListSize)
        Description copied from interface: SuggestionPopupListener
        Called when a suggestion popup's list size has changed.
        Specified by:
        listSizeChanged in interface SuggestionPopupListener
        Parameters:
        suggestionPopup - The source of this event.
        previousListSize - The previous value of the visible window.
      • selectedSuggestionChanged

        public void selectedSuggestionChanged​(SuggestionPopup suggestionPopup,
                                              java.lang.Object previousSelectedSuggestion)
        Description copied from interface: SuggestionPopupSelectionListener
        Called when a suggestion popup's selected suggestion has changed.
        Specified by:
        selectedSuggestionChanged in interface SuggestionPopupSelectionListener
        Parameters:
        suggestionPopup - The source of the event.
        previousSelectedSuggestion - The item that was previously selected, or null if the previous selection cannot be determined.