Java Code Examples for java.awt.dnd.DragSource#getDragThreshold()
The following examples show how to use
java.awt.dnd.DragSource#getDragThreshold() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DragAndDropReorderPane.java From runelite with BSD 2-Clause "Simplified" License | 6 votes |
@Override public void mouseDragged(MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e) && dragStartPoint != null) { Point point = e.getPoint(); if (draggingComponent != null) { drag(point); } else if (point.distance(dragStartPoint) > DragSource.getDragThreshold()) { startDragging(point); } } }
Example 2
Source File: XMouseDragGestureRecognizer.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 3
Source File: DragRecognitionSupport.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Returns whether or not the event is potentially part of a drag sequence. */ private boolean mousePressedImpl(MouseEvent me) { component = (JComponent)me.getSource(); if (mapDragOperationFromModifiers(me, component.getTransferHandler()) != TransferHandler.NONE) { motionThreshold = DragSource.getDragThreshold(); dndArmedEvent = me; return true; } clearState(); return false; }
Example 4
Source File: DragRecognitionSupport.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Returns whether or not the event is potentially part of a drag sequence. */ private boolean mousePressedImpl(MouseEvent me) { component = (JComponent)me.getSource(); if (mapDragOperationFromModifiers(me, component.getTransferHandler()) != TransferHandler.NONE) { motionThreshold = DragSource.getDragThreshold(); dndArmedEvent = me; return true; } clearState(); return false; }
Example 5
Source File: DragRecognitionSupport.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns whether or not the event is potentially part of a drag sequence. */ private boolean mousePressedImpl(MouseEvent me) { component = (JComponent)me.getSource(); if (mapDragOperationFromModifiers(me, component.getTransferHandler()) != TransferHandler.NONE) { motionThreshold = DragSource.getDragThreshold(); dndArmedEvent = me; return true; } clearState(); return false; }
Example 6
Source File: DragRecognitionSupport.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Returns whether or not the event is potentially part of a drag sequence. */ private boolean mousePressedImpl(MouseEvent me) { component = (JComponent)me.getSource(); if (mapDragOperationFromModifiers(me, component.getTransferHandler()) != TransferHandler.NONE) { motionThreshold = DragSource.getDragThreshold(); dndArmedEvent = me; return true; } clearState(); return false; }
Example 7
Source File: XMouseDragGestureRecognizer.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 8
Source File: WMouseDragGestureRecognizer.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ @Override public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 9
Source File: DragRecognitionSupport.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Returns whether or not the event is potentially part of a drag sequence. */ private boolean mousePressedImpl(MouseEvent me) { component = (JComponent)me.getSource(); if (mapDragOperationFromModifiers(me, component.getTransferHandler()) != TransferHandler.NONE) { motionThreshold = DragSource.getDragThreshold(); dndArmedEvent = me; return true; } clearState(); return false; }
Example 10
Source File: WMouseDragGestureRecognizer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ @Override public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 11
Source File: DragRecognitionSupport.java From darklaf with MIT License | 5 votes |
/** * Returns whether or not the event is potentially part of a drag sequence. */ private boolean mousePressedImpl(final MouseEvent me) { component = (JComponent) me.getSource(); if (mapDragOperationFromModifiers(me, component.getTransferHandler()) != TransferHandler.NONE) { motionThreshold = DragSource.getDragThreshold(); dndArmedEvent = me; return true; } clearState(); return false; }
Example 12
Source File: DragRecognitionSupport.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Returns whether or not the event is potentially part of a drag sequence. */ private boolean mousePressedImpl(MouseEvent me) { component = (JComponent)me.getSource(); if (mapDragOperationFromModifiers(me, component.getTransferHandler()) != TransferHandler.NONE) { motionThreshold = DragSource.getDragThreshold(); dndArmedEvent = me; return true; } clearState(); return false; }
Example 13
Source File: XMouseDragGestureRecognizer.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 14
Source File: XMouseDragGestureRecognizer.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 15
Source File: WMouseDragGestureRecognizer.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ @Override public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 16
Source File: XMouseDragGestureRecognizer.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 17
Source File: XMouseDragGestureRecognizer.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 18
Source File: XMouseDragGestureRecognizer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 19
Source File: WMouseDragGestureRecognizer.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Invoked when a mouse button has been pressed on a component. */ @Override public void mousePressed(MouseEvent e) { events.clear(); if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) { try { motionThreshold = DragSource.getDragThreshold(); } catch (Exception exc) { motionThreshold = 5; } appendEvent(e); } }
Example 20
Source File: DragRecognitionSupport.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Returns whether or not the event is potentially part of a drag sequence. */ private boolean mousePressedImpl(MouseEvent me) { component = (JComponent)me.getSource(); if (mapDragOperationFromModifiers(me, component.getTransferHandler()) != TransferHandler.NONE) { motionThreshold = DragSource.getDragThreshold(); dndArmedEvent = me; return true; } clearState(); return false; }