@@ -157,7 +157,7 @@ protected Point computeMenuLocation(Tree tree) {
157
157
Rectangle bounds = items [0 ].getBounds ();
158
158
Rectangle intersect = clientArea .intersection (bounds );
159
159
if (intersect != null && intersect .height == bounds .height ) {
160
- return new Point (Math .max (0 , bounds .x + getAverageCharWith (tree ) * CHAR_INDENT ),
160
+ return new Point (Math .max (0 , bounds .x + getAverageCharWidth (tree ) * CHAR_INDENT ),
161
161
bounds .y + bounds .height );
162
162
}
163
163
return null ;
@@ -171,7 +171,7 @@ protected Point computeMenuLocation(Tree tree) {
171
171
Point result = findBestLocation (getIncludedPositions (rectangles , clientArea ),
172
172
tree .toControl (cursorLocation ));
173
173
if (result != null ) {
174
- result .x = result .x + getAverageCharWith (tree ) * CHAR_INDENT ;
174
+ result .x = result .x + getAverageCharWidth (tree ) * CHAR_INDENT ;
175
175
}
176
176
return result ;
177
177
}
@@ -198,7 +198,7 @@ protected Point computeMenuLocation(Table table) {
198
198
Rectangle iBounds = items [0 ].getImageBounds (0 );
199
199
Rectangle intersect = clientArea .intersection (bounds );
200
200
if (intersect != null && intersect .height == bounds .height ) {
201
- return new Point (Math .max (0 , bounds .x + iBounds .width + getAverageCharWith (table ) * CHAR_INDENT ),
201
+ return new Point (Math .max (0 , bounds .x + iBounds .width + getAverageCharWidth (table ) * CHAR_INDENT ),
202
202
bounds .y + bounds .height );
203
203
}
204
204
return null ;
@@ -214,7 +214,7 @@ protected Point computeMenuLocation(Table table) {
214
214
Point result = findBestLocation (getIncludedPositions (rectangles , clientArea ),
215
215
table .toControl (cursorLocation ));
216
216
if (result != null ) {
217
- result .x = result .x + iBounds .width + getAverageCharWith (table ) * CHAR_INDENT ;
217
+ result .x = result .x + iBounds .width + getAverageCharWidth (table ) * CHAR_INDENT ;
218
218
}
219
219
return result ;
220
220
}
@@ -257,7 +257,7 @@ private Point findBestLocation(Point[] points, Point relativeCursor) {
257
257
return result ;
258
258
}
259
259
260
- private int getAverageCharWith (Control control ) {
260
+ private int getAverageCharWidth (Control control ) {
261
261
GC gc = null ;
262
262
try {
263
263
gc = new GC (control );
0 commit comments