Class ListButtonSkin

    • Field Detail

      • listViewPopup

        protected Window listViewPopup
      • pressed

        protected boolean pressed
    • Constructor Detail

      • ListButtonSkin

        public ListButtonSkin()
    • 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 ButtonSkin
        Parameters:
        component - The component to which the skin is being attached.
      • getTriggerBounds

        public abstract Bounds getTriggerBounds()
      • enabledChanged

        public void enabledChanged​(Component component)
        Description copied from interface: ComponentStateListener
        Called when a component's enabled state has changed.

        Called both when the component is enabled and when it is disabled. The component's enabled flag has already been set when this method is called so the new state can be determined by calling the Component.isEnabled() method.

        Specified by:
        enabledChanged in interface ComponentStateListener
        Overrides:
        enabledChanged in class ButtonSkin
        Parameters:
        component - The component whose enabled state is changing.
      • focusedChanged

        public void focusedChanged​(Component component,
                                   Component obverseComponent)
        Description copied from interface: ComponentStateListener
        Called when a component's focused state has changed.

        This will be called both when a component gains focus and when it loses focus. The currently focused component has already been set when this method is called, so that the new state of the component can be determined by calling the Component.isFocused() method.

        Specified by:
        focusedChanged in interface ComponentStateListener
        Overrides:
        focusedChanged in class ButtonSkin
        Parameters:
        component - The component that is either gaining focus or the one that previously had focus and is now losing it.
        obverseComponent - If the component is gaining focus, this is the component that is losing focus. If the component is losing focus this is the component that is gaining the focus instead.
      • mouseDown

        public boolean mouseDown​(Component component,
                                 Mouse.Button button,
                                 int x,
                                 int y)
        Description copied from interface: ComponentMouseButtonListener
        Called when a mouse button is pressed over a component.
        Specified by:
        mouseDown in interface ComponentMouseButtonListener
        Overrides:
        mouseDown in class ComponentSkin
        Parameters:
        component - Component that is under the mouse pointer.
        button - Which mouse button was pressed.
        x - X position of the mouse.
        y - Y position of the mouse.
        Returns:
        true to consume the event; false to allow it to propagate (default).
      • mouseUp

        public boolean mouseUp​(Component component,
                               Mouse.Button button,
                               int x,
                               int y)
        Description copied from interface: ComponentMouseButtonListener
        Called when a mouse button is released over a component.
        Specified by:
        mouseUp in interface ComponentMouseButtonListener
        Overrides:
        mouseUp in class ComponentSkin
        Parameters:
        component - Component user the mouse pointer.
        button - Which mouse button that was released.
        x - X position of the mouse.
        y - Y position of the mouse.
        Returns:
        true to consume the event; false to allow it to propagate (default).
      • 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).
      • keyReleased

        public boolean keyReleased​(Component component,
                                   int keyCode,
                                   Keyboard.KeyLocation keyLocation)
        SPACE 'presses' the button.
        Specified by:
        keyReleased in interface ComponentKeyListener
        Overrides:
        keyReleased in class ComponentSkin
        Parameters:
        component - Component that has the focus, that is receiving this key event.
        keyCode - Code for the key that was released.
        keyLocation - Location of the key.
        Returns:
        true to consume the event; false to allow it to propagate.
      • keyTyped

        public boolean keyTyped​(Component component,
                                char character)
        Select the next enabled list item where the first character of the rendered text matches the typed key (case insensitive).
        Specified by:
        keyTyped in interface ComponentKeyListener
        Overrides:
        keyTyped in class ComponentSkin
        Parameters:
        component - Component that has the focus, that is receiving this key.
        character - The decoded character that was typed.
        Returns:
        true to consume the event; false to allow it to propagate.
      • listDataChanged

        public void listDataChanged​(ListButton listButton,
                                    List<?> previousListData)
        Description copied from interface: ListButtonListener
        Called when a list button's list data has changed.
        Specified by:
        listDataChanged in interface ListButtonListener
        Parameters:
        listButton - The list button that has changed.
        previousListData - The previous list data.
      • itemRendererChanged

        public void itemRendererChanged​(ListButton listButton,
                                        ListView.ItemRenderer previousItemRenderer)
        Description copied from interface: ListButtonListener
        Called when a list button's item renderer has changed.
        Specified by:
        itemRendererChanged in interface ListButtonListener
        Parameters:
        listButton - The list button that was changed.
        previousItemRenderer - The previous renderer for the button's items.
      • repeatableChanged

        public void repeatableChanged​(ListButton listButton)
        Description copied from interface: ListButtonListener
        Called when a list button's repeatable flag has changed.
        Specified by:
        repeatableChanged in interface ListButtonListener
        Parameters:
        listButton - The list button that has changed.
      • disabledItemFilterChanged

        public void disabledItemFilterChanged​(ListButton listButton,
                                              Filter<?> previousDisabledItemFilter)
        Description copied from interface: ListButtonListener
        Called when a list button's disabled item filter has changed.
        Specified by:
        disabledItemFilterChanged in interface ListButtonListener
        Parameters:
        listButton - The list button that has changed.
        previousDisabledItemFilter - The previous disabled item filter for the list button.
      • listSizeChanged

        public void listSizeChanged​(ListButton listButton,
                                    int previousListSize)
        Description copied from interface: ListButtonListener
        Called when a list button's list size has changed.
        Specified by:
        listSizeChanged in interface ListButtonListener
        Parameters:
        listButton - The list button that has changed.
        previousListSize - The previous value of the visible list size.
      • selectedIndexChanged

        public void selectedIndexChanged​(ListButton listButton,
                                         int previousSelectedIndex)
        Description copied from interface: ListButtonSelectionListener
        Called when a list button's selected index has changed.
        Specified by:
        selectedIndexChanged in interface ListButtonSelectionListener
        Parameters:
        listButton - The source of the event.
        previousSelectedIndex - If the selection changed directly, contains the index that was previously selected. Otherwise, contains the current selection.
      • selectedItemChanged

        public void selectedItemChanged​(ListButton listButton,
                                        java.lang.Object previousSelectedItem)
        Description copied from interface: ListButtonSelectionListener
        Called when a list button's selected item has changed.
        Specified by:
        selectedItemChanged in interface ListButtonSelectionListener
        Parameters:
        listButton - The source of the event.
        previousSelectedItem - The item that was previously selected, or null if the previous selection cannot be determined.