public static class JXTableHeader.SortGestureRecognizer
extends java.lang.Object
A custom implementation which doesn't allow unsort.
<code> public class CustomRecognizer extends SortGestureRecognizer { // Disable reset gesture. @Override public boolean isResetSortOrderGesture(MouseEvent e) { return false; } } tableHeader.setSortGestureRecognizer(new CustomRecognizer()); </code>Note: Unsort as of SwingX means to reset the sort of all columns. Which currently doesn't make a difference because it supports single column sorts only. Might become significant after switching to JDK 1.6 which supports multiple column sorting (if we can keep up the pluggable control).
Constructor and Description |
---|
SortGestureRecognizer() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isResetModifier(java.awt.event.MouseEvent e)
Returns a boolean indicating whether the mouse event's modifier should be interpreted
as a unsort or not.
|
boolean |
isResetSortOrderGesture(java.awt.event.MouseEvent e)
Returns a boolean indicating whether the mouse event should be interpreted
as an unsort trigger or not.
|
boolean |
isSortOrderGesture(java.awt.event.MouseEvent e)
Returns a boolean indicating whether the mouse event should be interpreted
as any type of sort change trigger.
|
boolean |
isToggleSortOrderGesture(java.awt.event.MouseEvent e)
Returns a boolean indicating whether the mouse event should be interpreted
as a toggle sort trigger or not.
|
public boolean isResetSortOrderGesture(java.awt.event.MouseEvent e)
e
- a mouseEvent representing a left mouse click.public boolean isToggleSortOrderGesture(java.awt.event.MouseEvent e)
e
- a mouseEvent representing a left mouse click.public boolean isSortOrderGesture(java.awt.event.MouseEvent e)
e
- a mouseEvent representing a left mouse click.protected boolean isResetModifier(java.awt.event.MouseEvent e)
e
- a mouseEvent representing a left mouse click.