Révision 1503
| tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java (revision 1503) | ||
|---|---|---|
| 405 | 405 |
*/ |
| 406 | 406 |
@Override |
| 407 | 407 |
public void setFocus() {
|
| 408 |
querywidget.setFocus(); |
|
| 408 |
super.setFocus(); |
|
| 409 |
//querywidget.setFocus(); |
|
| 409 | 410 |
} |
| 410 | 411 |
|
| 411 | 412 |
/** |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1503) | ||
|---|---|---|
| 909 | 909 |
IEditorPart e = page.openEditor(editorInput, editorId, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID); |
| 910 | 910 |
if (e instanceof TXMEditor) {
|
| 911 | 911 |
editor = (TXMEditor<? extends TXMResult>) e; |
| 912 |
} else {
|
|
| 912 |
} |
|
| 913 |
else {
|
|
| 913 | 914 |
return null; |
| 914 | 915 |
} |
| 915 | 916 |
|
| ... | ... | |
| 962 | 963 |
//} |
| 963 | 964 |
|
| 964 | 965 |
// Hide the computing parameter area if the editor wasn't open and the result is computed |
| 965 |
if (!update) {
|
|
| 966 |
if (!result.isDirty() && !this.topToolBar.isDisposed()) {
|
|
| 967 |
this.topToolBar.setComputingParametersVisible(false); |
|
| 968 |
} |
|
| 966 |
if (!update && !result.isDirty() && !this.topToolBar.isDisposed()) {
|
|
| 967 |
this.topToolBar.setComputingParametersVisible(false); |
|
| 969 | 968 |
} |
| 970 | 969 |
|
| 971 | 970 |
topToolBar.redraw(); |
| tmp/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java (revision 1503) | ||
|---|---|---|
| 347 | 347 |
*/ |
| 348 | 348 |
public String getName() {
|
| 349 | 349 |
try {
|
| 350 |
return getCorpus().getName() + ": " + pQuery; //$NON-NLS-1$
|
|
| 350 |
return getCorpus().getName() + ": " + this.getSimpleName(); //$NON-NLS-1$
|
|
| 351 | 351 |
} |
| 352 | 352 |
catch (Exception e) {
|
| 353 | 353 |
return this.getEmptyName(); |
| 354 | 354 |
} |
| 355 | 355 |
} |
| 356 | 356 |
|
| 357 |
|
|
| 358 |
@Override |
|
| 359 |
public String getSimpleName() {
|
|
| 360 |
try {
|
|
| 361 |
return this.pQuery.toString(); |
|
| 362 |
} |
|
| 363 |
catch (Exception e) {
|
|
| 364 |
return this.getEmptyName(); |
|
| 365 |
} |
|
| 366 |
} |
|
| 367 |
|
|
| 368 |
|
|
| 357 | 369 |
/** |
| 358 | 370 |
* Gets the n lines. |
| 359 | 371 |
* |
| ... | ... | |
| 428 | 440 |
return true; |
| 429 | 441 |
} |
| 430 | 442 |
|
| 431 |
@Override |
|
| 432 |
public String getSimpleName() {
|
|
| 433 |
try {
|
|
| 434 |
return pQuery.toString(); |
|
| 435 |
} |
|
| 436 |
catch (Exception e) {
|
|
| 437 |
return this.getEmptyName(); |
|
| 438 |
} |
|
| 439 |
} |
|
| 440 |
|
|
| 441 | 443 |
/** |
| 442 | 444 |
* Gets the symbol. |
| 443 | 445 |
* |
| tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java (revision 1503) | ||
|---|---|---|
| 53 | 53 |
import org.txm.chartsengine.rcp.swt.AdvancedChartEditorToolBar; |
| 54 | 54 |
import org.txm.chartsengine.rcp.swt.ChartComposite; |
| 55 | 55 |
import org.txm.chartsengine.rcp.swt.ChartEditorToolBar; |
| 56 |
import org.txm.core.preferences.TBXPreferences; |
|
| 56 | 57 |
import org.txm.core.preferences.TXMPreferences; |
| 57 | 58 |
import org.txm.rcp.editors.TXMMultiPageEditor; |
| 59 |
import org.txm.rcp.preferences.RCPPreferences; |
|
| 58 | 60 |
import org.txm.rcp.preferences.TXMPreferencePage; |
| 59 | 61 |
import org.txm.rcp.preferences.TXMPreferenceStore; |
| 60 | 62 |
import org.txm.utils.logger.Log; |
| ... | ... | |
| 931 | 933 |
|
| 932 | 934 |
|
| 933 | 935 |
// FIXME: For Swing focus debug |
| 934 |
swingComponent.addFocusListener(new FocusListener() {
|
|
| 935 |
|
|
| 936 |
@Override |
|
| 937 |
public void focusLost(FocusEvent e) {
|
|
| 938 |
// TODO Auto-generated method stub |
|
| 939 |
swingComponent.setBorder(javax.swing.BorderFactory.createEmptyBorder()); |
|
| 940 |
Display.getDefault().asyncExec(new Runnable() {
|
|
| 941 |
|
|
| 942 |
@Override |
|
| 943 |
public void run() {
|
|
| 944 |
// TODO Auto-generated method stub |
|
| 945 |
chartEditor.deactivateContext(); |
|
| 946 |
} |
|
| 947 |
}); |
|
| 948 |
} |
|
| 949 |
|
|
| 950 |
@Override |
|
| 951 |
public void focusGained(FocusEvent e) {
|
|
| 952 |
// TODO Auto-generated method stub |
|
| 953 |
swingComponent.setBorder(new LineBorder(Color.red, 1)); |
|
| 936 |
if(RCPPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER)) {
|
|
| 937 |
swingComponent.addFocusListener(new FocusListener() {
|
|
| 954 | 938 |
|
| 955 |
Display.getDefault().asyncExec(new Runnable() {
|
|
| 939 |
@Override |
|
| 940 |
public void focusLost(FocusEvent e) {
|
|
| 941 |
// TODO Auto-generated method stub |
|
| 942 |
swingComponent.setBorder(javax.swing.BorderFactory.createEmptyBorder()); |
|
| 943 |
Display.getDefault().asyncExec(new Runnable() {
|
|
| 944 |
|
|
| 945 |
@Override |
|
| 946 |
public void run() {
|
|
| 947 |
// TODO Auto-generated method stub |
|
| 948 |
chartEditor.deactivateContext(); |
|
| 949 |
} |
|
| 950 |
}); |
|
| 951 |
} |
|
| 952 |
|
|
| 953 |
@Override |
|
| 954 |
public void focusGained(FocusEvent e) {
|
|
| 955 |
swingComponent.setBorder(new LineBorder(Color.red, 1)); |
|
| 956 | 956 |
|
| 957 |
@Override |
|
| 958 |
public void run() {
|
|
| 959 |
// TODO Auto-generated method stub |
|
| 960 |
chartEditor.activateContext(); |
|
| 961 |
} |
|
| 962 |
}); |
|
| 963 |
} |
|
| 964 |
}); |
|
| 957 |
Display.getDefault().asyncExec(new Runnable() {
|
|
| 958 |
|
|
| 959 |
@Override |
|
| 960 |
public void run() {
|
|
| 961 |
// TODO Auto-generated method stub |
|
| 962 |
chartEditor.activateContext(); |
|
| 963 |
} |
|
| 964 |
}); |
|
| 965 |
} |
|
| 966 |
}); |
|
| 967 |
} |
|
| 965 | 968 |
|
| 966 | 969 |
|
| 967 | 970 |
// FIXME: SWT tool tips test rather than using Swing |
Formats disponibles : Unified diff