Révision 1430
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAEditor.java (revision 1430) | ||
---|---|---|
165 | 165 |
|
166 | 166 |
// Initialize the editor parts and editor inputs |
167 | 167 |
this.initCAFactorialMapEditor(); |
168 |
// this.initCASingularValuesTableEditor();
|
|
168 |
this.initCASingularValuesTableEditor(); |
|
169 | 169 |
// this.initRowsTableEditor(); |
170 | 170 |
// this.initColumnsTableEditor(); |
171 | 171 |
this.initCASingularValuesBarChartEditor(); |
... | ... | |
322 | 322 |
// Editor input |
323 | 323 |
inputs.add(caFactorialMapEditorPart.getEditorInput()); |
324 | 324 |
|
325 |
// try { |
|
326 |
// this.addPage(caFactorialMapEditorPart, caFactorialMapEditorPart.getEditorInput()); |
|
327 |
// } |
|
328 |
// catch (PartInitException e) { |
|
329 |
// // TODO Auto-generated catch block |
|
330 |
// e.printStackTrace(); |
|
331 |
// } |
|
332 |
|
|
333 | 325 |
} |
334 | 326 |
|
335 | 327 |
/** |
... | ... | |
344 | 336 |
} |
345 | 337 |
|
346 | 338 |
// Editor part |
347 |
//EigenvaluesChartEditor eigenvaluesEditor = new EigenvaluesChartEditor(SWTChartsComponentsProvider.getCurrent().createChartEditorInput(eigenvalues)); |
|
348 | 339 |
EigenvaluesChartEditor eigenvaluesEditor = new EigenvaluesChartEditor(new ChartEditorInput<Eigenvalues>(eigenvalues)); |
349 | 340 |
|
350 | 341 |
//eigenvaluesEditor.compute(false); |
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/SingularValuesEditor.java (revision 1430) | ||
---|---|---|
339 | 339 |
|
340 | 340 |
viewer.setSorter(tableSorter); |
341 | 341 |
|
342 |
viewer.refresh();
|
|
343 |
createContextMenu(viewer);
|
|
342 |
// Register the context menu
|
|
343 |
TXMEditor.initContextMenu(this.viewer.getTable(), this.getSite(), this.viewer);
|
|
344 | 344 |
|
345 |
// createContextMenu(viewer); |
|
346 |
|
|
345 | 347 |
tableSorter.setColumn(0); |
346 | 348 |
int dir = viewer.getTable().getSortDirection(); |
347 | 349 |
if (viewer.getTable().getSortColumn() == columns.get(0).getColumn()) { |
... | ... | |
353 | 355 |
viewer.getTable().setSortColumn(columns.get(0).getColumn()); |
354 | 356 |
|
355 | 357 |
|
356 |
viewer.refresh(); |
|
357 |
|
|
358 |
// Pack the columns except the bar plot column |
|
359 |
for(int i = 0; i < viewer.getTable().getColumnCount(); i++) { |
|
360 |
if(i != 4) { |
|
361 |
viewer.getTable().getColumn(i).pack(); |
|
362 |
} |
|
363 |
} |
|
364 |
|
|
365 | 358 |
} |
366 | 359 |
|
367 | 360 |
|
368 | 361 |
@Override |
369 |
public void setFocus() { |
|
370 |
viewer.getControl().setFocus(); |
|
371 |
} |
|
372 |
|
|
373 |
|
|
374 |
@Override |
|
375 |
public void updateResultFromEditor() { |
|
376 |
// TODO Auto-generated method stub |
|
377 |
|
|
378 |
} |
|
379 |
|
|
380 |
@Override |
|
381 | 362 |
public void updateEditorFromResult(boolean update) throws Exception { |
382 | 363 |
|
383 | 364 |
try { |
... | ... | |
388 | 369 |
e.printStackTrace(); |
389 | 370 |
this.viewer.setInput(null); |
390 | 371 |
} |
372 |
|
|
373 |
this.viewer.refresh(); |
|
374 |
|
|
375 |
// Pack the columns except the bar plot column |
|
376 |
for(int i = 0; i < viewer.getTable().getColumnCount(); i++) { |
|
377 |
if(i != 4) { |
|
378 |
this.viewer.getTable().getColumn(i).pack(); |
|
379 |
} |
|
380 |
} |
|
391 | 381 |
} |
392 | 382 |
|
383 |
|
|
393 | 384 |
|
394 |
/** |
|
395 |
* Creates the context menu. |
|
396 |
* |
|
397 |
* @param tableViewer the table viewer |
|
398 |
*/ |
|
399 |
private void createContextMenu(TableViewer tableViewer) { |
|
385 |
@Override |
|
386 |
public void setFocus() { |
|
387 |
viewer.getControl().setFocus(); |
|
388 |
} |
|
400 | 389 |
|
401 |
MenuManager menuManager = new MenuManager(); |
|
402 |
Menu menu = menuManager.createContextMenu(tableViewer.getTable()); |
|
403 | 390 |
|
404 |
// Set the MenuManager |
|
405 |
tableViewer.getTable().setMenu(menu); |
|
406 |
getSite().registerContextMenu(menuManager, tableViewer); |
|
407 |
// Make the selection available |
|
408 |
getSite().setSelectionProvider(tableViewer); |
|
391 |
@Override |
|
392 |
public void updateResultFromEditor() { |
|
393 |
// TODO Auto-generated method stub |
|
394 |
|
|
409 | 395 |
} |
410 | 396 |
|
397 |
|
|
411 | 398 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1430) | ||
---|---|---|
18 | 18 |
import org.eclipse.core.runtime.SafeRunner; |
19 | 19 |
import org.eclipse.core.runtime.Status; |
20 | 20 |
import org.eclipse.core.runtime.jobs.Job; |
21 |
import org.eclipse.jface.action.IContributionItem; |
|
22 | 21 |
import org.eclipse.jface.action.MenuManager; |
23 |
import org.eclipse.jface.action.ToolBarManager; |
|
24 | 22 |
import org.eclipse.jface.dialogs.MessageDialog; |
25 | 23 |
import org.eclipse.jface.viewers.ISelectionProvider; |
26 | 24 |
import org.eclipse.jface.viewers.IStructuredSelection; |
... | ... | |
36 | 34 |
import org.eclipse.swt.layout.RowLayout; |
37 | 35 |
import org.eclipse.swt.widgets.Button; |
38 | 36 |
import org.eclipse.swt.widgets.Composite; |
39 |
import org.eclipse.swt.widgets.Control; |
|
40 | 37 |
import org.eclipse.swt.widgets.Display; |
41 | 38 |
import org.eclipse.swt.widgets.Group; |
42 | 39 |
import org.eclipse.swt.widgets.Menu; |
... | ... | |
70 | 67 |
import org.txm.rcp.TXMWindows; |
71 | 68 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
72 | 69 |
import org.txm.rcp.messages.TXMUIMessages; |
73 |
import org.txm.rcp.preferences.RCPPreferences; |
|
74 | 70 |
import org.txm.rcp.swt.GLComposite; |
75 | 71 |
import org.txm.rcp.swt.widget.AssistedChoiceQueryWidget; |
76 | 72 |
import org.txm.rcp.swt.widget.AssistedQueryWidget; |
... | ... | |
189 | 185 |
*/ |
190 | 186 |
protected boolean dirty; |
191 | 187 |
|
192 |
public int compareTo(TXMEditor other) { |
|
193 |
return 1; |
|
194 |
} |
|
195 | 188 |
|
196 | 189 |
/** |
197 | 190 |
* |
... | ... | |
208 | 201 |
this(); |
209 | 202 |
this.setInput(new TXMResultEditorInput<TXMResult>(result)); |
210 | 203 |
} |
204 |
|
|
205 |
|
|
211 | 206 |
@Override |
212 | 207 |
public void init(IEditorSite site, IEditorInput input) throws PartInitException { |
213 | 208 |
this.setSite(site); |
... | ... | |
738 | 733 |
this.autoUpdateResultFromEditorParameters(); // auto updating result from Parameter annotations in result <=> editor |
739 | 734 |
|
740 | 735 |
// Stores the last parameters before the computing to later auto-update the Widgets only if some parameters have changed |
741 |
setLastComputingParameters(this.getResult().getLastParametersFromHistory()); |
|
736 |
this.setLastComputingParameters(this.getResult().getLastParametersFromHistory());
|
|
742 | 737 |
|
743 | 738 |
} |
744 | 739 |
|
... | ... | |
1651 | 1646 |
return editors; |
1652 | 1647 |
} |
1653 | 1648 |
|
1649 |
public int compareTo(TXMEditor other) { |
|
1650 |
return 1; |
|
1651 |
} |
|
1652 |
|
|
1653 |
|
|
1654 | 1654 |
} |
Formats disponibles : Unified diff