Révision 1836
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/SwingChartComposite.java (revision 1836) | ||
---|---|---|
264 | 264 |
((JComponent) rootPanel).setBorder(new LineBorder(Color.red, 1)); |
265 | 265 |
} |
266 | 266 |
|
267 |
// SWT thread |
|
267 |
// // SWT thread
|
|
268 | 268 |
// getDisplay().asyncExec(new Runnable() { |
269 | 269 |
// @Override |
270 | 270 |
// public void run() { |
... | ... | |
427 | 427 |
public boolean setFocus() { |
428 | 428 |
|
429 | 429 |
if (this.isDisposed()) { |
430 |
System.out.println("SwingChartComposite.setFocus(): is disposed."); |
|
430 | 431 |
return false; |
431 | 432 |
} |
432 | 433 |
|
433 | 434 |
// Debug |
434 | 435 |
Log.finest("SwingChartComposite.setFocus(): trying to give focus to SWT composite and AWT component..."); //$NON-NLS-1$ |
435 | 436 |
|
436 |
boolean focusState = super.setFocus(); |
|
437 |
//boolean focusState = super.setFocus(); |
|
438 |
boolean focusState = false; |
|
437 | 439 |
|
438 | 440 |
// Debug |
439 | 441 |
Log.finest(TXMCoreMessages.bind("SwingChartComposite.setFocus(): SWT composite focus given state = {0}.", this.isFocusControl())); //$NON-NLS-1$ |
... | ... | |
585 | 587 |
//chartEditor.getShell().setFocus(); |
586 | 588 |
chartEditor.setFocus(); |
587 | 589 |
//chartEditor.getParent().setFocus(); |
590 |
//chartEditor.getParent().getShell().setActive(); |
|
591 |
|
|
592 |
|
|
593 |
//chartEditor.getParent().setFocus(); |
|
588 | 594 |
// chartEditor.forceFocus(); |
589 | 595 |
} |
590 | 596 |
}); |
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java (revision 1836) | ||
---|---|---|
403 | 403 |
|
404 | 404 |
@Override |
405 | 405 |
public void setFocus() { |
406 |
|
|
406 |
|
|
407 |
//this.getEditorSite().getShell().setActive(); |
|
408 |
this.parent.setFocus(); // FIX for Windows, useless on Linux, AND to check on Mac OS X |
|
407 | 409 |
super.setFocus(); |
408 | 410 |
// Debug |
409 | 411 |
Log.finest("ChartEditor.setFocus(): giving focus to chart composite..."); //$NON-NLS-1$ |
410 | 412 |
|
411 |
//this.parent.setFocus(); |
|
412 | 413 |
this.chartComposite.setFocus(); |
413 | 414 |
|
414 | 415 |
} |
Formats disponibles : Unified diff