Package heronarts.glx.ui
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 TypeMethodDescriptiondefault boolean
isValidDragPosition
(float mx, float my) Whether this mouse press position is valid to initiate draggingdefault 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 positionmy
- Mouse y position- Returns:
- Whether to commence dragging from here
-
onDragReorder
Callback when an attempt is made to reorder this component in its container- Parameters:
container
- Parent containerchild
- Element being reordereddragIndex
- Targeted index in parent container
-