|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.JXTableHeader.SortGestureRecognizer
public static class JXTableHeader.SortGestureRecognizer
Controller for mapping left mouse clicks to sort/-unsort gestures for use in interested mouse listeners. This base class interprets a single click for toggling sort order, and a single SHIFT-left click for unsort.
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 Summary | |
---|---|
JXTableHeader.SortGestureRecognizer()
|
Method Summary | |
---|---|
protected boolean |
isResetModifier(MouseEvent e)
Returns a boolean indicating whether the mouse event's modifier should be interpreted as a unsort or not. |
boolean |
isResetSortOrderGesture(MouseEvent e)
Returns a boolean indicating whether the mouse event should be interpreted as an unsort trigger or not. |
boolean |
isSortOrderGesture(MouseEvent e)
Returns a boolean indicating whether the mouse event should be interpreted as any type of sort change trigger. |
boolean |
isToggleSortOrderGesture(MouseEvent e)
Returns a boolean indicating whether the mouse event should be interpreted as a toggle sort trigger or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JXTableHeader.SortGestureRecognizer()
Method Detail |
---|
public boolean isResetSortOrderGesture(MouseEvent e)
e
- a mouseEvent representing a left mouse click.
public boolean isToggleSortOrderGesture(MouseEvent e)
e
- a mouseEvent representing a left mouse click.
public boolean isSortOrderGesture(MouseEvent e)
e
- a mouseEvent representing a left mouse click.
protected boolean isResetModifier(MouseEvent e)
e
- a mouseEvent representing a left mouse click.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |