Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/nonpublic/external/MouseEvent.java

Diff revisions: vs.
  @@ -16,19 +16,18 @@
16 16 * the License.
17 17 */
18 18
19 - import java.util.*;
20 -
21 19 import com.google.gwt.user.client.*;
22 20 import com.google.gwt.user.client.ui.*;
23 21
22 + import java.util.*;
23 +
24 24 /**
25 25 * Contains information used by drag operations to position elements in the UI.
26 26 * Different drag operations require different coordinates, so we pass all
27 27 * coordinates to operations using this object. Also encapsulates coordinate
28 28 * calulations.
29 29 */
30 - public class MouseEvent extends EventObject
31 - {
30 + public class MouseEvent extends EventObject {
32 31 private static final long serialVersionUID = 2294143695886173892L;
33 32
34 33 private final Event m_domEvent;
  @@ -38,8 +37,7 @@
38 37 private final int m_widgetLeft, m_widgetTop;
39 38 private final int m_widgetX, m_widgetY;
40 39
41 - protected MouseEvent( MouseEvent e )
42 - {
40 + protected MouseEvent( MouseEvent e ) {
43 41 super( e.getSource() );
44 42 m_domEvent = e.m_domEvent;
45 43 m_target = e.m_target;
  @@ -58,8 +56,7 @@
58 56 * @param mouseEvent a <code>mousedown</code>, <code>mousemove</code> or <code>mouseup</code> event
59 57 * @param previousEvent
60 58 */
61 - public MouseEvent( Widget receiver, Event mouseEvent )
62 - {
59 + public MouseEvent( Widget receiver, Event mouseEvent ) {
63 60 super( receiver );
64 61 m_domEvent = mouseEvent;
65 62 m_target = DOM.eventGetTarget( mouseEvent );
  @@ -78,58 +75,47 @@
78 75 m_widgetY = m_absoluteY - m_widgetTop;
79 76 }
80 77
81 - protected int getWidgetLeft()
82 - {
78 + protected int getWidgetLeft() {
83 79 return m_widgetLeft;
84 80 }
85 81
86 - protected int getWidgetTop()
87 - {
82 + protected int getWidgetTop() {
88 83 return m_widgetTop;
89 84 }
90 85
91 - public int getClientX()
92 - {
86 + public int getClientX() {
93 87 return m_clientX;
94 88 }
95 89
96 - public int getClientY()
97 - {
90 + public int getClientY() {
98 91 return m_clientY;
99 92 }
100 93
101 - public int getWidgetX()
102 - {
94 + public int getWidgetX() {
103 95 return m_widgetX;
104 96 }
105 97
106 - public int getWidgetY()
107 - {
98 + public int getWidgetY() {
108 99 return m_widgetY;
109 100 }
110 101
111 - public Widget getReceiver()
112 - {
102 + public Widget getReceiver() {
113 103 return (Widget) getSource();
114 104 }
115 105
116 - public Element getTarget()
117 - {
106 + public Element getTarget() {
118 107 return m_target;
119 108 }
120 109
121 - public int getAbsoluteX()
122 - {
110 + public int getAbsoluteX() {
123 111 return m_absoluteX;
124 112 }
125 113
126 - public int getAbsoluteY()
127 - {
114 + public int getAbsoluteY() {
128 115 return m_absoluteY;
129 116 }
130 117
131 - public Event getDomEvent()
132 - {
118 + public Event getDomEvent() {
133 119 return m_domEvent;
134 120 }
135 121 }