Package swingtree
Class ComponentDragEventDelegate<C extends JComponent>
java.lang.Object
swingtree.AbstractDelegate<C>
swingtree.ComponentDelegate<C,MouseEvent>
swingtree.ComponentMouseEventDelegate<C>
swingtree.ComponentDragEventDelegate<C>
public final class ComponentDragEventDelegate<C extends JComponent>
extends ComponentMouseEventDelegate<C>
A
JComponent
and MouseEvent
delegate providing useful context information to various Action
listeners
used by UIForAnySwing.onMouseDrag(Action)
like for example the ComponentMouseEventDelegate.mouseX()
and
ComponentMouseEventDelegate.mouseY()
of the event as well as more drag specific information like
dragEvents()
and dragPositions()
.-
Method Summary
Modifier and TypeMethodDescriptionProvides a list of allMouseEvent
s of a continuous mouse drag performed on the component.SwingTree keeps track of the most recent mouse drag events of a continuous drag.Methods inherited from class swingtree.ComponentMouseEventDelegate
clickCount, isAltDown, isCtrlDown, isLeftMouseButton, isMetaDown, isMiddleMouseButton, isRightMouseButton, isShiftDown, mousePosition, mousePositionOnScreen, mouseX, mouseXOnScreen, mouseY, mouseYOnScreen
Methods inherited from class swingtree.ComponentDelegate
forComponent, forSiblinghood, forSiblinghoodOfType, forSiblings, forSiblingsOfType, getComponent, getEvent, getSiblinghood, getSiblinghoodOfType, getSiblings, getSiblingsOfType
Methods inherited from class swingtree.AbstractDelegate
_component, _isUndefinedColor, _isUndefinedFont, _siblingsSource, animateFor, animateFor, animateFor, animateFor, animateStyleFor, animateStyleFor, find, find, find, findAll, findAllByGroup, findAllByGroup, findAllByGroup, findAllByGroup, get, getBackground, getBorder, getBounds, getCursor, getFont, getForeground, getHeight, getLocation, getMaxSize, getMinSize, getParent, getPrefSize, getScale, getSize, getTooltip, getWidth, getX, getY, isEnabled, isOpaque, isVisible, paint, paint, paint, paint, parentDelegate, scale, scale, scale, scale, setBackground, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorder, setBounds, setBounds, setBounds, setCursor, setCursor, setEnabled, setFont, setForeground, setForegroundColor, setForegroundColor, setForegroundColor, setForegroundColor, setHeight, setMaxHeight, setMaxSize, setMaxSize, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinSize, setMinSize, setMinWidth, setOpaque, setPrefHeight, setPrefSize, setPrefSize, setPrefSize, setPrefWidth, setSize, setSize, setSize, setTooltip, setVisible, setWidth, shapeOf, style
-
Method Details
-
dragEvents
Provides a list of allMouseEvent
s of a continuous mouse drag performed on the component. When a drag ends, the list is cleared.- Returns:
- A list of all
MouseEvent
s of a continuous mouse drag performed on the component.
-
dragPositions
SwingTree keeps track of the most recent mouse drag events of a continuous drag. This method returns a list of all mousePosition
s of a continuous mouse drag performed on the component.
Note that this mehod returns an unmodifiable list consisting of immutablePosition
objects instead of mutablePoint
objects, to protect the client from side effects.- Returns:
- A list of all mouse
Position
s of a continuous mouse drag performed on the component. The points of this list represent the mouse movement track since the start of a continuous drag.
-