Class VFSDirectoryEntryTable.ColumnDragHook
java.lang.Object
org.gjt.sp.jedit.browser.VFSDirectoryEntryTable.ColumnDragHook
- All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, MouseInputListener
- Enclosing class:
VFSDirectoryEntryTable
public static class VFSDirectoryEntryTable.ColumnDragHook
extends Object
implements MouseInputListener
Original code:
https://stackoverflow.com/questions/1155137/how-to-keep-a-single-column-from-being-reordered-in-a-jtable/14480948
A delegating MouseInputListener to be installed instead of
the one registered by the ui-delegate.
It's implemented to prevent dragging the first column or any other
column over the first.
- Since:
- jEdit 4.2pre1
- Version:
- $Id: VFSDirectoryEntryTable.java 24774 2017-10-29 23:31:27Z ezust $
- Author:
- Slava Pestov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidvoidvoidImplemented to pass the event to the original only if the mouseX doesn't lead to dragging the column over the first.voidvoidvoidvoidImplemented to do some tweaks/bookkeeping before/after passing the event to the original - temporarily disallow reordering if hit on first column - calculate the max mouseX that's allowable in dragging to the leftvoidvoidprotected voidprotected void
-
Constructor Details
-
ColumnDragHook
-
-
Method Details
-
mousePressed
Implemented to do some tweaks/bookkeeping before/after passing the event to the original - temporarily disallow reordering if hit on first column - calculate the max mouseX that's allowable in dragging to the left- Specified by:
mousePressedin interfaceMouseListener
-
mouseDragged
Implemented to pass the event to the original only if the mouseX doesn't lead to dragging the column over the first.- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
installHook
protected void installHook() -
installMouseMotionHook
protected void installMouseMotionHook() -
installMouseHook
protected void installMouseHook() -
uninstallHook
public void uninstallHook() -
uninstallMouseMotionHook
protected void uninstallMouseMotionHook() -
uninstallMouseHook
protected void uninstallMouseHook()
-