Révision 1700
| tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/SwingChartComposite.java (revision 1700) | ||
|---|---|---|
| 26 | 26 |
import org.txm.chartsengine.rcp.IChartComponent; |
| 27 | 27 |
import org.txm.chartsengine.rcp.editors.ChartEditor; |
| 28 | 28 |
import org.txm.chartsengine.rcp.events.EventCallBackHandler; |
| 29 |
import org.txm.core.messages.TXMCoreMessages; |
|
| 29 | 30 |
import org.txm.utils.logger.Log; |
| 30 | 31 |
|
| 31 | 32 |
/** |
| ... | ... | |
| 198 | 199 |
public boolean setFocus() {
|
| 199 | 200 |
|
| 200 | 201 |
// Debug |
| 201 |
Log.finest("SwingChartComponent.setFocus().");
|
|
| 202 |
Log.finest("SwingChartComposite.setFocus(): trying to give focus to SWT composite and to the AWT component..."); //$NON-NLS-1$
|
|
| 202 | 203 |
|
| 203 |
super.setFocus(); |
|
| 204 |
boolean focusState = super.setFocus(); |
|
| 205 |
|
|
| 206 |
// Debug |
|
| 207 |
Log.finest(TXMCoreMessages.bind("SwingChartComposite.setFocus(): SWT composite focus given state = {0}.", focusState)); //$NON-NLS-1$
|
|
| 208 |
|
|
| 204 | 209 |
this.requestFocusInComposite(); |
| 205 |
return true; |
|
| 210 |
|
|
| 211 |
return focusState; |
|
| 206 | 212 |
} |
| 207 | 213 |
|
| 208 | 214 |
@Override |
| ... | ... | |
| 210 | 216 |
EventQueue.invokeLater(new Runnable () {
|
| 211 | 217 |
public void run () {
|
| 212 | 218 |
if(chartComponent != null) {
|
| 213 |
((Component) chartComponent).requestFocusInWindow(); |
|
| 219 |
|
|
| 220 |
boolean focusState = ((Component) chartComponent).requestFocusInWindow(); |
|
| 221 |
|
|
| 222 |
// Debug |
|
| 223 |
Log.finest(TXMCoreMessages.bind("SwingChartComposite.requestFocusInComposite(): AWT component focus given state = {0}.", focusState)); //$NON-NLS-1$
|
|
| 224 |
|
|
| 214 | 225 |
} |
| 215 | 226 |
} |
| 216 | 227 |
}); |
Formats disponibles : Unified diff