Révision 1833
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java (revision 1833) | ||
---|---|---|
767 | 767 |
@Override |
768 | 768 |
public void mousePressed(final MouseEvent e) { |
769 | 769 |
|
770 |
// // SWT thread |
|
771 |
// chartEditor.getComposite().getDisplay().asyncExec(new Runnable() { |
|
772 |
// @Override |
|
773 |
// public void run() { |
|
774 |
// |
|
775 |
// //chartEditor.getComposite().notifyListeners(SWT.MouseDown, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MouseDown)); |
|
776 |
// |
|
777 |
// // FIXME: Debug |
|
778 |
//// System.out.println("SWTChartsComponentProvider.initializeAWTDelegationListeners(...).new MouseListener() {...}.mousePressed(...).new Runnable() {...}.run()"); |
|
779 |
// // Activate the editor part on AWT mouse pressed event |
|
780 |
// //chartEditor.activate(); |
|
781 |
// //chartEditor.getShell().setFocus(); |
|
782 |
// chartEditor.setFocus(); |
|
783 |
// //chartEditor.getParent().setFocus(); |
|
784 |
//// chartEditor.forceFocus(); |
|
785 |
// } |
|
786 |
// }); |
|
770 |
|
|
771 |
// FIXME: fix Linux. On Linux, the focus is never lost when clicking outside the Swing component, so the focus can not be given back again and the EditorPart activation patch code based on |
|
772 |
// windowsFocusGained event is called |
|
773 |
// SWT thread |
|
774 |
chartEditor.getComposite().getDisplay().asyncExec(new Runnable() { |
|
775 |
@Override |
|
776 |
public void run() { |
|
787 | 777 |
|
778 |
//chartEditor.getComposite().notifyListeners(SWT.MouseDown, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MouseDown)); |
|
779 |
|
|
780 |
// FIXME: Debug |
|
781 |
// System.out.println("SWTChartsComponentProvider.initializeAWTDelegationListeners(...).new MouseListener() {...}.mousePressed(...).new Runnable() {...}.run()"); |
|
782 |
// Activate the editor part on AWT mouse pressed event |
|
783 |
//chartEditor.activate(); |
|
784 |
//chartEditor.getShell().setFocus(); |
|
785 |
chartEditor.setFocus(); |
|
786 |
//chartEditor.getParent().setFocus(); |
|
787 |
// chartEditor.forceFocus(); |
|
788 |
} |
|
789 |
}); |
|
790 |
|
|
788 | 791 |
} |
789 | 792 |
|
790 | 793 |
@Override |
Formats disponibles : Unified diff