From: <ha...@us...> - 2011-09-26 14:15:30
|
Revision: 16124 http://jmol.svn.sourceforge.net/jmol/?rev=16124&view=rev Author: hansonr Date: 2011-09-26 14:15:23 +0000 (Mon, 26 Sep 2011) Log Message: ----------- awt.Event removal from Viewer Modified Paths: -------------- trunk/Jmol/src/org/jmol/api/JmolViewer.java trunk/Jmol/src/org/jmol/applet/Jmol.java trunk/Jmol/src/org/jmol/viewer/MouseManager14.java trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/src/org/jmol/api/JmolViewer.java =================================================================== --- trunk/Jmol/src/org/jmol/api/JmolViewer.java 2011-09-26 14:06:49 UTC (rev 16123) +++ trunk/Jmol/src/org/jmol/api/JmolViewer.java 2011-09-26 14:15:23 UTC (rev 16124) @@ -26,7 +26,6 @@ import java.awt.Container; import java.awt.Dimension; -import java.awt.Event; import java.awt.Graphics; import java.awt.Image; import java.io.OutputStream; @@ -217,8 +216,6 @@ */ abstract public Object getImageAs(String type, int quality, int width, int height, String fileName, OutputStream os); - abstract public boolean handleOldJvm10Event(Event e); - abstract public int getMotionEventNumber(); /** @@ -510,5 +507,8 @@ abstract public void processEvent(int groupID, int eventType, int touchID, int iData, Point3f pt, long time); + abstract public boolean handleOldJvm10Event(int id, int x, int y, int modifiers, + long when); + } Modified: trunk/Jmol/src/org/jmol/applet/Jmol.java =================================================================== --- trunk/Jmol/src/org/jmol/applet/Jmol.java 2011-09-26 14:06:49 UTC (rev 16123) +++ trunk/Jmol/src/org/jmol/applet/Jmol.java 2011-09-26 14:15:23 UTC (rev 16124) @@ -583,7 +583,7 @@ public boolean handleEvent(Event e) { if (viewer == null) return false; - return viewer.handleOldJvm10Event(e); + return viewer.handleOldJvm10Event(e.id, e.x, e.y, e.modifiers, e.when); } // code to record last and average times Modified: trunk/Jmol/src/org/jmol/viewer/MouseManager14.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/MouseManager14.java 2011-09-26 14:06:49 UTC (rev 16123) +++ trunk/Jmol/src/org/jmol/viewer/MouseManager14.java 2011-09-26 14:15:23 UTC (rev 16124) @@ -69,11 +69,9 @@ display.removeKeyListener(this); } - boolean handleOldJvm10Event(Event e) { - int x = e.x, y = e.y, modifiers = e.modifiers; - long time = e.when; + boolean handleOldJvm10Event(int id, int x, int y, int modifiers, long time) { modifiers = applyLeftMouse(modifiers); - switch (e.id) { + switch (id) { case Event.MOUSE_DOWN: xWhenPressed = x; yWhenPressed = y; Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2011-09-26 14:06:49 UTC (rev 16123) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2011-09-26 14:15:23 UTC (rev 16124) @@ -101,7 +101,6 @@ import java.awt.Dimension; import java.awt.MediaTracker; import java.awt.Point; -import java.awt.Event; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.awt.image.MemoryImageSource; @@ -533,8 +532,8 @@ } @Override - public boolean handleOldJvm10Event(Event e) { - return mouseManager.handleOldJvm10Event(e); + public boolean handleOldJvm10Event(int id, int x, int y, int modifiers, long time) { + return mouseManager.handleOldJvm10Event(id, x, y, modifiers, time); } public void reset(boolean includingSpin) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |