Java Code Examples for sun.awt.dnd.SunDropTargetEvent#getY()
The following examples show how to use
sun.awt.dnd.SunDropTargetEvent#getY() .
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: Container.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 2
Source File: Container.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 3
Source File: Container.java From jdk-1.7-annotated with Apache License 2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 4
Source File: Container.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 5
Source File: Container.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 6
Source File: Container.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 7
Source File: Container.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 8
Source File: Container.java From hottub with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 9
Source File: Container.java From Java8CN with Apache License 2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 10
Source File: Container.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 11
Source File: Container.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 12
Source File: Container.java From Bytecoder with Apache License 2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 13
Source File: Container.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 14
Source File: Container.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 15
Source File: Container.java From JDKSourceCode1.8 with MIT License | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 16
Source File: Container.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 17
Source File: Container.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }
Example 18
Source File: Container.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
private boolean processDropTargetEvent(SunDropTargetEvent e) { int id = e.getID(); int x = e.getX(); int y = e.getY(); /* * Fix for BugTraq ID 4395290. * It is possible that SunDropTargetEvent's Point is outside of the * native container bounds. In this case we truncate coordinates. */ if (!nativeContainer.contains(x, y)) { final Dimension d = nativeContainer.getSize(); if (d.width <= x) { x = d.width - 1; } else if (x < 0) { x = 0; } if (d.height <= y) { y = d.height - 1; } else if (y < 0) { y = 0; } } Component mouseOver = // not necessarily sensitive to mouse events nativeContainer.getDropTargetEventTarget(x, y, Container.INCLUDE_SELF); trackMouseEnterExit(mouseOver, e); if (mouseOver != nativeContainer && mouseOver != null) { switch (id) { case SunDropTargetEvent.MOUSE_ENTERED: case SunDropTargetEvent.MOUSE_EXITED: break; default: retargetMouseEvent(mouseOver, id, e); e.consume(); break; } } return e.isConsumed(); }