Lines 25-32
Link Here
|
25 |
import org.eclipse.jface.util.PropertyChangeEvent; |
25 |
import org.eclipse.jface.util.PropertyChangeEvent; |
26 |
import org.eclipse.swt.SWT; |
26 |
import org.eclipse.swt.SWT; |
27 |
import org.eclipse.swt.graphics.GC; |
27 |
import org.eclipse.swt.graphics.GC; |
28 |
import org.eclipse.swt.graphics.Point; |
|
|
29 |
import org.eclipse.swt.graphics.Rectangle; |
30 |
import org.eclipse.swt.widgets.Button; |
28 |
import org.eclipse.swt.widgets.Button; |
31 |
import org.eclipse.swt.widgets.Composite; |
29 |
import org.eclipse.swt.widgets.Composite; |
32 |
import org.eclipse.swt.widgets.Display; |
30 |
import org.eclipse.swt.widgets.Display; |
Lines 516-529
Link Here
|
516 |
// dummy.dispose(); |
514 |
// dummy.dispose(); |
517 |
if (mc != null) { |
515 |
if (mc != null) { |
518 |
Menu m = mc.getMenu(ti.getParent()); |
516 |
Menu m = mc.getMenu(ti.getParent()); |
|
|
517 |
ti.setDropDownMenu(m); |
519 |
if (m != null) { |
518 |
if (m != null) { |
520 |
// position the menu below the drop down item |
519 |
// position the menu below the drop down item |
521 |
Rectangle b = ti.getBounds(); |
520 |
// Rectangle b = ti.getBounds(); |
522 |
Point p = ti.getParent().toDisplay( |
521 |
// Point p = ti.getParent().toDisplay( |
523 |
new Point(b.x, b.y + b.height)); |
522 |
// new Point(b.x, b.y + b.height)); |
524 |
m.setLocation(p.x, p.y); // waiting for SWT |
523 |
// m.setLocation(p.x, p.y); // waiting for SWT |
525 |
// 0.42 |
524 |
// 0.42 |
526 |
m.setVisible(true); |
525 |
// m.setVisible(true); |
527 |
return; // we don't fire the action |
526 |
return; // we don't fire the action |
528 |
} |
527 |
} |
529 |
} |
528 |
} |