Interface UI2dComponent.UIDragReorder

All Known Implementing Classes:
UIEffectDevice, UIGlobalModulator, UIPalette.SavedSwatch
Enclosing class:
UI2dComponent

public static interface UI2dComponent.UIDragReorder
Marker interface for components which can be dragged to reorder them within their container.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    isValidDragPosition(float mx, float my)
    Whether this mouse press position is valid to initiate dragging
    default void
    onDragReorder(UI2dContainer container, UI2dComponent child, int dragIndex)
    Callback when an attempt is made to reorder this component in its container
  • Method Details

    • isValidDragPosition

      default boolean isValidDragPosition(float mx, float my)
      Whether this mouse press position is valid to initiate dragging
      Parameters:
      mx - Mouse x position
      my - Mouse y position
      Returns:
      Whether to commence dragging from here
    • onDragReorder

      default void onDragReorder(UI2dContainer container, UI2dComponent child, int dragIndex)
      Callback when an attempt is made to reorder this component in its container
      Parameters:
      container - Parent container
      child - Element being reordered
      dragIndex - Targeted index in parent container