JavaSwingComponents: Mouse gestures


Mouse gestures

Action

Function

Coded in

Remarks

dragged

JComponent.autoscrolls, generates artificial mouseDragged events

Autoscroller, JComponent

all

forwarding etc.

MenuSelectionManager

all

tool tip showing/hiding/changing

ToolTipManager

all except dragged

shouldSelectCell for JComboBox

DefaultCellEditor

clickCount > clickCountToStart

isCellEditable

DefaultCellEditor

left, click count = 1, click count > 2, etc.

isCellEditable

DefaultTreeCellEditor

left pressed - shift (released if last left pressed was consumed before)

set caret, request focus

DefaultCaret

release logic fishy with multiple pressed buttons/modifiers?

left pressed + shift (released if last left pressed was consumed before)

move caret, request focus

DefaultCaret

release logic fishy with multiple pressed buttons/modifiers?

left dragged

move caret

DefaultCaret

left double click (unless consumed)

DefaultEditorKit.SelectWordAction

DefaultCaret

left triple click (unless consumed)

DefaultEditorKit.SelectLineAction

DefaultCaret

middle single click (unless consumed) - shift

if system selection exists: set caret, maybe paste, request focus

DefaultCaret

middle single click (unless consumed) + shift

if system selection exists: move caret, maybe paste, request focus

DefaultCaret

the difference with no-shift is probably unintented and breaks if moving updates the system selection (not reproducible now?)

all

defers firing CaretEvents while button pressed

JTextComponent.MutableCaretEvent

1. dangerous if mouseReleased is lost

2. ineffective with multiple buttons

moved, component not editable

change cursor for links

HTMLEditorKit

clicked, component not editable

possibly fireHyperlinkEvent

HTMLEditorKit

released

submit data (for image buttons)

FormView

Other by LAF


(C) 2001-2009 Christian Kaufhold (swing@chka.de)