public class JXTreeTable.TreeTableHackerExt4 extends JXTreeTable.TreeTableHackerExt
The methods previously used are abandoned as they would be misnomers to the behavior as implemented in this class.
Changes:
processMouseEvent(MouseEvent)
consumed events was incompatible with the way this
class does things. As a consequence,
hitHandleDetectionFromProcessMouse(MouseEvent)
always returns false so that processMoueEvent(MouseEvent)
will not
doing anything other than call its super
method.isPopupTrigger()
returns true, are sent to
the JTree. This has the added benefit of not having to piggy back a mouse
released event as we can just use the real mouse released event. This
keeps the look and feel consistent for the user of UI's that
expand/collapse nodes on the release of the mouse.isTreeHandleEventType(MouseEvent)
method. This
implementation sends all events regardless of the modifiers.expansionChangedFlag
Constructor and Description |
---|
TreeTableHackerExt4() |
Modifier and Type | Method and Description |
---|---|
protected MouseEvent |
getEventForTreeRenderer(MouseEvent e)
This method checks if the location of the event is in the tree handle
margin and translates the coordinates for the JTree.
|
boolean |
hitHandleDetectionFromProcessMouse(MouseEvent e)
Entry point for hit handle detection called from processMouse.
|
protected boolean |
isTreeHandleEventType(MouseEvent e)
Filter to find mouse events that are candidates for node expansion/
collapse.
|
protected boolean |
shouldDisableMouseMotionOnTable(MouseEvent e)
Returns a boolean indicating whether mouseMotionEvents to the
table should be disabled.
|
isHitDetectionFromProcessMouse
completeEditing, expandOrCollapseNode, expansionChanged, hitHandleDetectionFromEditCell, mightBeExpansionTrigger
protected boolean isTreeHandleEventType(MouseEvent e)
e
- the currently dispatching mouse eventprotected MouseEvent getEventForTreeRenderer(MouseEvent e)
e
- the currently dispatching mouse eventpublic boolean hitHandleDetectionFromProcessMouse(MouseEvent e)
JXTreeTable.TreeTableHacker
hitHandleDetectionFromProcessMouse
in class JXTreeTable.TreeTableHacker
JXTreeTable.TreeTableHacker.isHitDetectionFromProcessMouse()
protected boolean shouldDisableMouseMotionOnTable(MouseEvent e)
NOTE JW: this was extracted to from the calling method to fix Issue #1527-swingx (no tooltips on JXTreeTable after expand/collapse) and at the same time allow subclasses to further hack around ...
e
- the mouseEvent that was routed to the renderer.Copyright © 2017. All rights reserved.