Révision 3383
TXM/trunk/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCEditor.java (revision 3383) | ||
---|---|---|
97 | 97 |
* To render in 2D or 3D. |
98 | 98 |
*/ |
99 | 99 |
@Parameter(key = AHCPreferences.RENDERING_2D) |
100 |
protected Button rendering2D;
|
|
100 |
protected ToolItem rendering2D;
|
|
101 | 101 |
|
102 | 102 |
|
103 | 103 |
@Override |
... | ... | |
170 | 170 |
|
171 | 171 |
|
172 | 172 |
// 2D/3D rendering |
173 |
this.rendering2D = new Button(this.chartToolBar, SWT.CHECK); |
|
174 |
this.rendering2D.setText("2D");//$NON-NLS-1$ |
|
175 |
this.chartToolBar.addControl(this.rendering2D); |
|
173 |
this.rendering2D = new ToolItem(this.chartToolBar, SWT.CHECK); |
|
174 |
this.rendering2D.setText("2D -> 3D"); //$NON-NLS-1$ |
|
176 | 175 |
this.rendering2D.addSelectionListener(computeSelectionListener); |
177 | 176 |
|
178 | 177 |
// FIXME: temporary fix, later must enable the font, rendering mode, etc. in R calls |
... | ... | |
207 | 206 |
this.numberOfClusters.setSelection(ahc.getNumberOfClusters()); |
208 | 207 |
|
209 | 208 |
this.rowsComputing.setSelection(!ahc.isColumnsComputing()); |
209 |
|
|
210 |
if (this.getResult().isRendering2D()) |
|
211 |
this.rendering2D.setText("2D -> 3D"); //$NON-NLS-1$ |
|
212 |
else |
|
213 |
this.rendering2D.setText("3D -> 2D"); //$NON-NLS-1$ |
|
210 | 214 |
} |
211 | 215 |
|
212 | 216 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorpusViewContentProvider.java (revision 3383) | ||
---|---|---|
39 | 39 |
import org.eclipse.core.runtime.IAdaptable; |
40 | 40 |
import org.eclipse.core.runtime.Platform; |
41 | 41 |
import org.eclipse.jface.viewers.ITreeContentProvider; |
42 |
import org.eclipse.jface.viewers.TreeNodeContentProvider; |
|
42 | 43 |
import org.eclipse.jface.viewers.Viewer; |
43 | 44 |
import org.eclipse.ui.model.IWorkbenchAdapter; |
44 | 45 |
import org.txm.Toolbox; |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java (revision 3383) | ||
---|---|---|
37 | 37 |
import org.eclipse.core.runtime.IStatus; |
38 | 38 |
import org.eclipse.core.runtime.Status; |
39 | 39 |
import org.eclipse.jface.action.MenuManager; |
40 |
import org.eclipse.jface.viewers.CellLabelProvider; |
|
41 |
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; |
|
40 | 42 |
import org.eclipse.jface.viewers.DecoratingLabelProvider; |
41 | 43 |
import org.eclipse.jface.viewers.DoubleClickEvent; |
42 | 44 |
import org.eclipse.jface.viewers.IDoubleClickListener; |
... | ... | |
47 | 49 |
import org.eclipse.jface.viewers.TreeViewer; |
48 | 50 |
import org.eclipse.jface.viewers.Viewer; |
49 | 51 |
import org.eclipse.jface.viewers.ViewerSorter; |
52 |
import org.eclipse.jface.window.ToolTip; |
|
50 | 53 |
import org.eclipse.swt.SWT; |
51 | 54 |
import org.eclipse.swt.SWTException; |
52 | 55 |
import org.eclipse.swt.events.KeyAdapter; |
... | ... | |
169 | 172 |
if (Toolbox.isInitialized()) { |
170 | 173 |
|
171 | 174 |
treeViewer.setContentProvider(new CorpusViewContentProvider(this)); |
172 |
treeViewer.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()) { |
|
173 |
|
|
174 |
@Override |
|
175 |
public String getText(Object element) { // cut label if too long |
|
176 |
String txt = super.getText(element); |
|
177 |
if (txt != null && txt.length() > TXMEditor.MAX_NAME_LENGTH) { |
|
178 |
txt = txt.substring(0, TXMEditor.MAX_NAME_LENGTH - 1) + "..."; |
|
179 |
} |
|
180 |
return txt; |
|
181 |
} |
|
182 |
}); |
|
175 |
ColumnViewerToolTipSupport.enableFor(treeViewer); |
|
183 | 176 |
|
177 |
treeViewer.setLabelProvider(new CorpusViewLabelProvider(new WorkbenchLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())); |
|
178 |
|
|
184 | 179 |
Workspace w = Toolbox.workspace; |
185 | 180 |
if (w == null) { |
186 | 181 |
return; |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorpusViewLabelProvider.java (revision 3383) | ||
---|---|---|
1 |
package org.txm.rcp.views.corpora; |
|
2 |
|
|
3 |
import org.eclipse.jface.viewers.DecoratingLabelProvider; |
|
4 |
import org.eclipse.jface.viewers.ILabelDecorator; |
|
5 |
import org.eclipse.jface.viewers.ILabelProvider; |
|
6 |
import org.eclipse.jface.viewers.IToolTipProvider; |
|
7 |
import org.txm.core.results.TXMResult; |
|
8 |
import org.txm.rcp.editors.TXMEditor; |
|
9 |
|
|
10 |
public class CorpusViewLabelProvider extends DecoratingLabelProvider implements IToolTipProvider { |
|
11 |
|
|
12 |
public CorpusViewLabelProvider(ILabelProvider provider, ILabelDecorator decorator) { |
|
13 |
|
|
14 |
super(provider, decorator); |
|
15 |
// TODO Auto-generated constructor stub |
|
16 |
} |
|
17 |
|
|
18 |
@Override |
|
19 |
public String getText(Object element) { // cut label if too long |
|
20 |
|
|
21 |
String txt = super.getText(element); |
|
22 |
if (txt != null && txt.length() > TXMEditor.MAX_NAME_LENGTH) { |
|
23 |
txt = txt.substring(0, TXMEditor.MAX_NAME_LENGTH - 1) + "..."; |
|
24 |
} |
|
25 |
|
|
26 |
return txt; |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
public String getToolTipText(Object element) { |
|
31 |
|
|
32 |
if (element == null) return null; |
|
33 |
if (element instanceof TXMResult) return ((TXMResult) element).getDetails(); |
|
34 |
return element.toString(); |
|
35 |
} |
|
36 |
} |
|
0 | 37 |
TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesSelectionEditor.java (revision 3383) | ||
---|---|---|
55 | 55 |
// Banality |
56 | 56 |
Composite extendedParametersArea = this.getExtendedParametersGroup(); |
57 | 57 |
|
58 |
LabeledSpinner banality = new LabeledSpinner(extendedParametersArea, this, new Label(extendedParametersArea, SWT.NONE), new FloatSpinner(extendedParametersArea, SWT.BORDER), "Banality", "Banality threshold", true);
|
|
58 |
LabeledSpinner banality = new LabeledSpinner(extendedParametersArea, this, new Label(extendedParametersArea, SWT.NONE), new FloatSpinner(extendedParametersArea, SWT.BORDER), SpecificitiesUIMessages.banality, SpecificitiesUIMessages.banalityThreshold, true);
|
|
59 | 59 |
this.banalitySpinner = (FloatSpinner) banality.getSpinner(); |
60 | 60 |
this.banalitySpinner.setMaximumAsFloat(200); |
61 | 61 |
this.banalitySpinner.addSelectionListener(computeSelectionListener); |
TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesLinesViewerComparator.java (revision 3383) | ||
---|---|---|
86 | 86 |
viewer.getTable().setSortColumn(column); |
87 | 87 |
|
88 | 88 |
TXMEditor.packColumns(viewer); |
89 |
|
|
90 | 89 |
} |
91 | 90 |
}); |
92 | 91 |
} |
TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java (revision 3383) | ||
---|---|---|
210 | 210 |
specificitesTable.setSortDirection(SWT.UP); |
211 | 211 |
|
212 | 212 |
if (!this.getResult().isParentVisible()) { |
213 |
|
|
213 | 214 |
ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), SWT.NONE, this, true, true); |
214 | 215 |
this.fMinSpinner = thresholdsGroup.getFMinSpinner(); |
215 | 216 |
this.fMaxSpinner = thresholdsGroup.getFMaxSpinner(); |
... | ... | |
222 | 223 |
this.fMinSpinner.setMaximum(corpus.getSize()); |
223 | 224 |
} |
224 | 225 |
} |
225 |
|
|
226 | 226 |
} |
227 | 227 |
catch (Exception e) { |
228 | 228 |
Log.severe(NLS.bind(SpecificitiesUIMessages.failedToComputeSpecificities, e.getMessage())); |
... | ... | |
292 | 292 |
// lexicalTableColumn.setToolTipText(lexicalTableColumnNames[i] + " t=" + lexicalTableColumnTotalFrequencies[i]); //$NON-NLS-1$ |
293 | 293 |
// System.out.println("create column "+partNames[i]); |
294 | 294 |
lexicalTableColumn.setAlignment(SWT.RIGHT); |
295 |
lexicalTableColumn.pack(); |
|
295 |
//lexicalTableColumn.pack();
|
|
296 | 296 |
|
297 | 297 |
viewerComparator.addSelectionAdapter(viewer, lexicalTableColumn, (firstLexicalTableColumnIndex + 1)); |
298 | 298 |
} |
... | ... | |
336 | 336 |
} |
337 | 337 |
typeFrequencyColumn.setText(text); |
338 | 338 |
typeFrequencyColumn.setToolTipText(typeFrequencyColumn.getText()); |
339 |
typeFrequencyColumn.pack(); |
|
339 |
//typeFrequencyColumn.pack();
|
|
340 | 340 |
|
341 | 341 |
// Updating the table headers from lexical table values |
342 | 342 |
for (int i = 0, firstLexicalTableColumnIndex = 3; i < len; i++, firstLexicalTableColumnIndex += 2) { |
TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/messages/messages.properties (revision 3383) | ||
---|---|---|
1 | 1 |
#TXM messages generated by the PluginMessagesManager class |
2 | 2 |
#Tue Dec 18 10:24:08 CET 2018 |
3 | 3 |
banality=Banality |
4 |
banalityThreshold=Banality threshold |
|
4 | 5 |
drawBars=Show bars |
5 | 6 |
drawLines=Show lines |
6 | 7 |
failedToComputeSpecificities=** Failed to compute specificities\: {0}. |
TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/messages/SpecificitiesUIMessages.java (revision 3383) | ||
---|---|---|
18 | 18 |
public static String groupBarsByLines; |
19 | 19 |
public static String drawLines; |
20 | 20 |
public static String drawBars; |
21 |
public static String banality; |
|
21 |
public static String banality; |
|
22 |
public static String banalityThreshold; |
|
22 | 23 |
|
23 | 24 |
public static String maximumScore; |
24 | 25 |
public static String failedToComputeSpecificities; |
TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/messages/messages_fr.properties (revision 3383) | ||
---|---|---|
1 | 1 |
#TXM messages generated by the PluginMessagesManager class |
2 | 2 |
#Tue Dec 18 10:24:08 CET 2018 |
3 | 3 |
banality=Banalité |
4 |
banalityThreshold=Seuil de banalité |
|
4 | 5 |
drawBars=Afficher les barres |
5 | 6 |
drawLines=Afficher les lignes |
6 | 7 |
failedToComputeSpecificities=** Le calcul des spécificités a échoué \: {0}. |
Formats disponibles : Unified diff