Interface ComponentListener

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  ComponentListener.Adapter
      Deprecated.
      Since 2.1 and Java 8 the interface itself has default implementations.
      static class  ComponentListener.Listeners
      Component listeners.
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void cursorChanged​(Component component, Cursor previousCursor)
      Called when a component's cursor has changed.
      default void dragSourceChanged​(Component component, DragSource previousDragSource)
      Called when a component's drag source has changed.
      default void dropTargetChanged​(Component component, DropTarget previousDropTarget)
      Called when a component's drop target has changed.
      default void heightLimitsChanged​(Component component, int previousMinimumHeight, int previousMaximumHeight)
      Called when a component's preferred height limits have changed.
      default void locationChanged​(Component component, int previousX, int previousY)
      Called when a component's location has changed.
      default void menuHandlerChanged​(Component component, MenuHandler previousMenuHandler)
      Called when a component's context menu handler has changed.
      default void nameChanged​(Component component, java.lang.String previousName)
      Called when a component's name has changed.
      default void parentChanged​(Component component, Container previousParent)
      Called when a component's parent has changed (when the component is either added to or removed from a container).
      default void preferredSizeChanged​(Component component, int previousPreferredWidth, int previousPreferredHeight)
      Called when a component's preferred size has changed.
      default void sizeChanged​(Component component, int previousWidth, int previousHeight)
      Called when a component's size has changed.
      default void tooltipDelayChanged​(Component component, int previousTooltipDelay)
      Called when a component's tooltip delay has changed.
      default void tooltipTextChanged​(Component component, java.lang.String previousTooltipText)
      Called when a component's tooltip text has changed.
      default void visibleChanged​(Component component)
      Called when a component's visible flag has changed.
      default void widthLimitsChanged​(Component component, int previousMinimumWidth, int previousMaximumWidth)
      Called when a component's preferred width limits have changed.
    • Method Detail

      • parentChanged

        default void parentChanged​(Component component,
                                   Container previousParent)
        Called when a component's parent has changed (when the component is either added to or removed from a container).
        Parameters:
        component - The component whose parent changed.
        previousParent - Previous parent of this component.
      • sizeChanged

        default void sizeChanged​(Component component,
                                 int previousWidth,
                                 int previousHeight)
        Called when a component's size has changed.
        Parameters:
        component - Component that changed size.
        previousWidth - Previous width of this component.
        previousHeight - Previous height of this component.
      • preferredSizeChanged

        default void preferredSizeChanged​(Component component,
                                          int previousPreferredWidth,
                                          int previousPreferredHeight)
        Called when a component's preferred size has changed.
        Parameters:
        component - Component that changed.
        previousPreferredWidth - Previous value of the preferred width for this component.
        previousPreferredHeight - Previous preferred height for this component.
      • widthLimitsChanged

        default void widthLimitsChanged​(Component component,
                                        int previousMinimumWidth,
                                        int previousMaximumWidth)
        Called when a component's preferred width limits have changed.
        Parameters:
        component - Component that changed.
        previousMinimumWidth - Previously specified preferred minimum width.
        previousMaximumWidth - Previous value of the preferred maximum width.
      • heightLimitsChanged

        default void heightLimitsChanged​(Component component,
                                         int previousMinimumHeight,
                                         int previousMaximumHeight)
        Called when a component's preferred height limits have changed.
        Parameters:
        component - Component that has changed.
        previousMinimumHeight - Previously given minimum height value.
        previousMaximumHeight - Previous maximum height value.
      • locationChanged

        default void locationChanged​(Component component,
                                     int previousX,
                                     int previousY)
        Called when a component's location has changed.
        Parameters:
        component - Component that has moved.
        previousX - The previous X position of the component.
        previousY - The previous Y position.
      • visibleChanged

        default void visibleChanged​(Component component)
        Called when a component's visible flag has changed.
        Parameters:
        component - Component that has changed visibility.
      • cursorChanged

        default void cursorChanged​(Component component,
                                   Cursor previousCursor)
        Called when a component's cursor has changed.
        Parameters:
        component - Component whose cursor has changed.
        previousCursor - Previous cursor for this component.
      • tooltipTextChanged

        default void tooltipTextChanged​(Component component,
                                        java.lang.String previousTooltipText)
        Called when a component's tooltip text has changed.
        Parameters:
        component - Component that changed.
        previousTooltipText - Previous value of this component's tooltip text.
      • tooltipDelayChanged

        default void tooltipDelayChanged​(Component component,
                                         int previousTooltipDelay)
        Called when a component's tooltip delay has changed.
        Parameters:
        component - The component we're dealing with.
        previousTooltipDelay - The previous tooltip delay for this component.
      • dragSourceChanged

        default void dragSourceChanged​(Component component,
                                       DragSource previousDragSource)
        Called when a component's drag source has changed.
        Parameters:
        component - The component in question.
        previousDragSource - The previous value of the DragSource for this component.
      • dropTargetChanged

        default void dropTargetChanged​(Component component,
                                       DropTarget previousDropTarget)
        Called when a component's drop target has changed.
        Parameters:
        component - The component that is changing.
        previousDropTarget - The previous value of the DropTarget for this component.
      • menuHandlerChanged

        default void menuHandlerChanged​(Component component,
                                        MenuHandler previousMenuHandler)
        Called when a component's context menu handler has changed.
        Parameters:
        component - The component that has changed.
        previousMenuHandler - The previous menu handler object for this component.
      • nameChanged

        default void nameChanged​(Component component,
                                 java.lang.String previousName)
        Called when a component's name has changed.
        Parameters:
        component - Component whose name changed.
        previousName - Previous name for this component.