Révision 721

tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 721)
25 25
import org.eclipse.swt.layout.RowLayout;
26 26
import org.eclipse.swt.widgets.Button;
27 27
import org.eclipse.swt.widgets.Composite;
28
import org.eclipse.swt.widgets.Label;
28 29
import org.eclipse.swt.widgets.Menu;
29 30
import org.eclipse.swt.widgets.Spinner;
30 31
import org.eclipse.swt.widgets.TableColumn;
......
44 45
import org.txm.rcp.JobsTimer;
45 46
import org.txm.rcp.StatusLine;
46 47
import org.txm.rcp.TXMWindows;
48
import org.txm.rcp.swt.GLComposite;
47 49
import org.txm.rcp.swt.widget.FloatSpinner;
48 50
import org.txm.rcp.swt.widget.NewNavigationWidget;
49 51
import org.txm.rcp.swt.widget.PropertiesSelector;
......
82 84
	protected TXMEditorToolBar bottomToolBar;
83 85

  
84 86
	/**
85
	 * the parameters groups are added to this composite
87
	 * the parameters groups are added to this composite. contains the sub widgets of the default Top toolbar
86 88
	 */
87
	private Composite parametersGroupsComposite;
89
	private GLComposite parametersGroupsComposite;
88 90

  
89 91
	/**
90 92
	 * The command parameters composite that can be hidden. To add main parameters.
......
99 101
	private Composite topToolBarContainer;
100 102

  
101 103
	/**
102
	 * contains the bottom toolbars
104
	 * contains the default bottom toolbars widget
103 105
	 */
104 106
	protected Composite bottomToolBarContainer;
105 107

  
......
108 110
	 * To keep track of the parameters used for the last computing and updates only the widgets if a parameter has changed. 
109 111
	 */
110 112
	protected HashMap<String, Object> lastComputingParameters = new HashMap<String, Object>();
113

  
114
	/**
115
	 * contains bottom toolbar subwidgets (installed grouped, etc.)
116
	 */
117
	private GLComposite bottomSubWidgetsComposite;
111 118
	
112 119

  
113 120
	
......
139 146
			this.topToolBarContainer = new Composite(parent, SWT.NONE);
140 147
			this.topToolBarContainer.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
141 148
			RowLayout rl = new RowLayout(SWT.HORIZONTAL);
149
			rl = new RowLayout(SWT.HORIZONTAL);
142 150
			rl.marginTop = rl.marginHeight = rl.marginWidth = rl.marginBottom = 0;
151
			rl.center = true;
143 152
			this.topToolBarContainer.setLayout(rl);
144 153

  
145
			this.topToolBar = new TXMEditorToolBar(this, this.topToolBarContainer, SWT.FLAT | SWT.RIGHT, TOP_TOOLBAR_ID);
146
			// FIXME: debug tests for see why there is an empty area at bottom of the toolbar
147
			//this.topToolBar.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_RED));
148

  
149
			this.parametersGroupsComposite = new Composite(parent, SWT.NONE);
150
			GridLayout gl = new GridLayout(1, true);
151
			gl.marginBottom = gl.marginHeight = gl.marginWidth = gl.marginTop = 0;
152
			this.parametersGroupsComposite.setLayout(gl);
154
			this.parametersGroupsComposite = new GLComposite(parent, SWT.NONE);
153 155
			if (parent.getLayout() instanceof GridLayout)	{
154 156
				this.parametersGroupsComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
155 157
			}
156 158
			
159
			this.topToolBar = new TXMEditorToolBar(this, this.topToolBarContainer, this.parametersGroupsComposite, SWT.FLAT | SWT.RIGHT, TOP_TOOLBAR_ID);
160
			// FIXME: debug tests for see why there is an empty area at bottom of the toolbar
161
			//this.topToolBar.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_RED));
157 162
			
158 163
			// computing parameters components
159 164
			boolean showComputingParameters = false;
......
168 173
			this.resultArea = new Composite(parent, SWT.NONE);
169 174
			this.resultArea.setLayoutData(new GridData(GridData.FILL_BOTH));
170 175
			
171
			
172 176
			// create the bottom tool bar
173 177
			this.bottomToolBarContainer = new Composite(parent, SWT.NONE);
174 178
			this.bottomToolBarContainer.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
175 179
			rl = new RowLayout(SWT.HORIZONTAL);
176 180
			rl.marginTop = rl.marginHeight = rl.marginWidth = rl.marginBottom = 0;
181
			rl.center = true;
177 182
			this.bottomToolBarContainer.setLayout(rl);
178

  
179 183
			
184
			this.bottomSubWidgetsComposite = new GLComposite(parent, SWT.NONE);
185
			if (parent.getLayout() instanceof GridLayout)	{
186
				this.bottomSubWidgetsComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
187
			}
180 188
			
181
			this.bottomToolBar = new TXMEditorToolBar(this, this.bottomToolBarContainer, SWT.FLAT, "bottom");
189
			this.bottomToolBar = new TXMEditorToolBar(this, this.bottomToolBarContainer, this.bottomSubWidgetsComposite, SWT.FLAT, "bottom");
182 190
			
183
			//this.__createPartControl(parent); // essentially for the ChartEditor
184 191
			this._createPartControl(parent); // child editor create its parameters and display widgets
185 192
			
186 193
			
......
189 196
			}
190 197
			
191 198
			// remove empty toolbar
192
			//TODO SJ: Hack?
193
			if (this.bottomToolBar.getItems().length == 0) {
194
				this.bottomToolBar.dispose();
195
			}
199
			//TODO SJ: Hack? MD: yeah -> need to find a way to not display the bottom toolbar on Windows instead
200
//			if (this.bottomToolBar.getItems().length == 0) {
201
//				this.bottomToolBar.dispose();
202
//			}
196 203
		}
197 204
		catch(Exception e) {
198 205
			System.err.println("TXMEditor.createPartControl(): can not create the editor.");
......
206 213
	 */
207 214
	public abstract void _createPartControl(Composite parent);
208 215
	
209

  
210
	public Composite getTopToolBarContainer() {
216
	/**
217
	 * Use this method to add widget next to the default Top toolbar
218
	 * 
219
	 * @return the composite that contains the default Top toolbar. 
220
	 */
221
	public Composite getTopToolbarContainer() {
211 222
		return topToolBarContainer;
212 223
	}
213 224

  
225
	/**
226
	 * Use this method to add widget next to the default Bottom toolbar
227
	 * 
228
	 * @return the composite that contains the default Bottom toolbar. 
229
	 */
214 230
	public Composite getBottomToolBarContainer() {
215 231
		return bottomToolBarContainer;
216 232
	}
217 233

  
234
	/**
235
	 * 
236
	 * @return the default Top toolbar of TXMEditors
237
	 */
218 238
	public TXMEditorToolBar getTopToolbar() {
219 239
		return topToolBar;
220 240
	}
......
227 247
		return resultArea;
228 248
	}
229 249

  
250
	/**
251
	 * 
252
	 * @return the default bottom toolbar of editors
253
	 */
230 254
	public TXMEditorToolBar getBottomToolbar() {
231 255
		return bottomToolBar;
232 256
	}
......
888 912
	}
889 913

  
890 914
	/**
891
	 * Gets the parameters composite.
892
	 * @return the composite that contains the TXMEditorToolBar parameters panels
915
	 * Gets the composite of the sub widgets of the Top toolbar.
916
	 * @return the composite that contains the <b>default Top</b> TXMEditorToolBar parameters panels
893 917
	 */
894
	public Composite getParametersGroupsComposite() {
918
	public GLComposite getParametersGroupsComposite() {
895 919
		return parametersGroupsComposite;
896 920
	}
897 921

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java (revision 721)
11 11
import org.eclipse.swt.widgets.Composite;
12 12
import org.eclipse.swt.widgets.Control;
13 13
import org.eclipse.swt.widgets.Group;
14
import org.eclipse.swt.widgets.Label;
14 15
import org.eclipse.swt.widgets.ToolBar;
15 16
import org.eclipse.swt.widgets.ToolItem;
16 17
import org.eclipse.ui.menus.IMenuService;
18
import org.txm.core.results.TXMResult;
17 19
import org.txm.rcp.IImageKeys;
20
import org.txm.rcp.swt.GLComposite;
18 21

  
19 22
/**
20 23
 * 
......
30 33
	/**
31 34
	 * The linked <code>TXMEditor</code>.
32 35
	 */
33
	protected TXMEditor editorPart;
36
	protected TXMEditor<? extends TXMResult> editorPart;
34 37
	
35
	private HashMap<String, Group> groups = new HashMap<String, Group>();
38
	/**
39
	 * contains reference to installed groups and composite
40
	 */
41
	private HashMap<String, Composite> groups = new HashMap<String, Composite>();
36 42

  
43
	private GLComposite subWidgetComposite;
44

  
37 45
	/**
38 46
	 * 
39 47
	 * the parent layout must be a GridLayout
40 48
	 * 
41
	 * @param parent
49
	 * @param parent where the Toolbar will be located
50
	 * @param subWidgetComposite where the installed Widgets will be installed
42 51
	 * @param style
43 52
	 * @param toolbarId
44 53
	 * @param editor
45 54
	 */
46
	public TXMEditorToolBar(TXMEditor editor, Composite parent, int style, String toolbarId) {
55
	public TXMEditorToolBar(TXMEditor<? extends TXMResult> editor, Composite parent, GLComposite subWidgetComposite, int style, String toolbarId) {
47 56
		super(parent, style);
48 57

  
49 58
		this.editorPart = editor;
50

  
59
		this.subWidgetComposite = subWidgetComposite;
51 60
		// permit to contribute via plugin.xml menu extension
52 61
		ToolBarManager manager = new ToolBarManager(this);
53 62
		IMenuService menuService = (IMenuService) this.editorPart.getSite().getService(IMenuService.class);
......
59 68
	}
60 69

  
61 70
	/**
71
	 * 
72
	 * @return the composite that contains the sub widgets of the toolbar : installed groups, composites.
73
	 */
74
	public GLComposite getSubWidgetComposite() {
75
		return subWidgetComposite;
76
	}
77

  
78
	/**
62 79
	 * Gets the <code>TXMEditor</code> linked to this tool bar.
63 80
	 * @return the editorPart
64 81
	 */
65
	public TXMEditor getEditorPart() {
82
	public TXMEditor<? extends TXMResult> getEditorPart() {
66 83
		return editorPart;
67 84
	}
68 85

  
......
82 99
	
83 100

  
84 101
	/**
102
	 * TODO not generic enough and call editorPart.getParametersGroupsComposite()
85 103
	 * Shows/hides the command parameters group.
86 104
	 * @param visible
87 105
	 */
......
102 120
		itemSeparator.setWidth(control.getBounds().width);
103 121
	    itemSeparator.setControl(control);	
104 122
	}
105

  
123
		
124
	/**
125
	 * Creates a <code>GLComposite</code> in the toolbar subwidgets container.
126
	 * @param groupTitle the composite uniq title in the toolbar 
127
	 * @return
128
	 */
129
	public GLComposite installGLComposite(String groupTitle, int numColumns, boolean makeColumnsEqualWidth)	{
130
		if (this.groups.containsKey(groupTitle)) {
131
			return (GLComposite) this.groups.get(groupTitle);
132
		}
133
		final GLComposite comp = new GLComposite(subWidgetComposite, SWT.NONE);
134
		comp.getLayout().numColumns = numColumns;
135
		comp.getLayout().makeColumnsEqualWidth = makeColumnsEqualWidth;
136
		return comp;
137
	}
106 138
	
107 139
	/**
108 140
	 * Creates a <code>Group</code> with some configuration to make it visible/invisible and a <code>ToolItem</code> attached to the specified tool bar to show/hide this group.
......
118 150
	public Group installGroup(String groupTitle, String buttonToolTip, String iconFilePath, boolean showGroup)	{
119 151

  
120 152
		if (this.groups.containsKey(groupTitle)) {
121
			return this.groups.get(groupTitle);
153
			return (Group) this.groups.get(groupTitle);
122 154
		}
123 155
		
124
		final Group group = new Group(this.editorPart.getParametersGroupsComposite(), SWT.NONE);
156
		final Group group = new Group(subWidgetComposite, SWT.NONE);
125 157
		group.setText(groupTitle);
126 158
		
127 159
		RowLayout layout = new RowLayout();
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NavigationWidget.java (revision 721)
38 38
import org.eclipse.swt.widgets.Label;
39 39
import org.eclipse.swt.widgets.Text;
40 40
import org.txm.rcp.messages.TXMUIMessages;
41
import org.txm.rcp.swt.GLComposite;
41 42

  
42 43
// TODO: Auto-generated Javadoc
43 44
/**
44 45
 * [<< |< < label > >| >>] @ author mdecorde.
45 46
 */
46
public class NavigationWidget extends Composite {
47
public class NavigationWidget extends GLComposite {
47 48

  
48 49
	/** The info line. */
49 50
	Label infoLine;
......
73 74
	 */
74 75
	public NavigationWidget(Composite parent, int style) {
75 76
		super(parent, style);
76
		this.setLayout(new GridLayout(6, false));
77
		this.getLayout().numColumns = 6;
78
		this.getLayout().makeColumnsEqualWidth = false;
77 79

  
78 80
		// | [|<] [<] [info] [>] [>|] |
79 81

  
......
91 93
		// [current]
92 94
		currentPosition = new Text(this, SWT.NONE);
93 95
		GridData currentPositionLayoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER, SWT.CENTER, true, false);
96
		currentPositionLayoutData.minimumWidth = 20;
94 97
		currentPosition.setLayoutData(currentPositionLayoutData);
95 98
		currentPosition.setTextLimit(6);
96 99
		currentPosition.setEditable(false);
......
202 205
	public void setInfoLineText(String current, String s) {
203 206
		this.currentPosition.setText(current);
204 207
		this.infoLine.setText(s);
205
		this.layout();
208
		this.layout(true);
209
		this.getParent().layout(true);
206 210
	} 
207 211
	
208 212
	public int getCurrent() {
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/GLComposite.java (revision 721)
1
package org.txm.rcp.swt;
2

  
3
import org.eclipse.swt.layout.GridLayout;
4
import org.eclipse.swt.widgets.Composite;
5
import org.eclipse.swt.widgets.Layout;
6

  
7
/**
8
 * A Composite with a GridLayout set by default. Margins are set to a minimum.
9
 * 
10
 * @author mdecorde
11
 *
12
 */
13
public class GLComposite extends Composite {
14

  
15
	private GridLayout gl;
16

  
17
	public GLComposite(Composite parent, int style) {
18
		super(parent, style);
19
		gl = new GridLayout();
20
		gl.marginBottom = 0;gl.marginHeight = 0;gl.marginWidth = 0;gl.marginTop = 0;
21
		gl.horizontalSpacing = 0;
22
		gl.verticalSpacing = 0;
23
		super.setLayout(gl);
24
	}
25

  
26
	public final GridLayout getLayout() {
27
		return gl;
28
	}
29
	
30
	/**
31
	 * Warning : this composite layout cannot be changed
32
	 */
33
	public final void setLayout(Layout layout) {
34
		//super.setLayout(layout);
35
	}
36
}
0 37

  
tmp/org.txm.rcp/META-INF/MANIFEST.MF (revision 721)
154 154
 org.txm.rcp.preferences,
155 155
 org.txm.rcp.splashHandlers,
156 156
 org.txm.rcp.svg,
157
 org.txm.rcp.swt,
157 158
 org.txm.rcp.swt.dialog,
158 159
 org.txm.rcp.swt.provider,
159 160
 org.txm.rcp.swt.widget,
......
167 168
 org.txm.rcp.views.corpora,
168 169
 org.txm.rcp.views.debug,
169 170
 org.txm.rcp.views.fileexplorer,
170
 org.txm.rcp.wizard
171
 org.txm.rcp.wizard,
172
 swing2swt.layout
171 173
Bundle-ClassPath: bin/,
172 174
 .,
173 175
 lib/commons-cli-1.2.jar,
tmp/org.txm.information.core/src/org/txm/information/core/functions/Information.java (revision 721)
127 127
	 * The maximum number of word property values to display.
128 128
	 */
129 129
	@Parameter(key=InformationPreferences.MAX_PROPERTIES_TO_DISPLAY)
130
	protected int maxPropertiesToDisplay;
130
	protected int pMaxPropertiesToDisplay;
131 131
	
132
	
133
	
134 132
	/**
135 133
	 * Instantiates a new Information.
136 134
	 *
......
146 144
	 * @param maxPropertiesToDisplay
147 145
	 */
148 146
	public void setParameters(int maxPropertiesToDisplay) {
149
		this.maxPropertiesToDisplay = maxPropertiesToDisplay;
150
		if (this.maxPropertiesToDisplay <= 0) {
151
			this.maxPropertiesToDisplay = 10;
147
		this.pMaxPropertiesToDisplay = maxPropertiesToDisplay;
148
		if (this.pMaxPropertiesToDisplay <= 0) {
149
			this.pMaxPropertiesToDisplay = 10;
152 150
		}
153 151
		this.dirty = true;
154 152
	}
......
191 189
				//propertiesCounts.put(p.getName(), size);
192 190
				//List<String> list = Arrays.asList(corpus.getLexicon(p).getForms(this.maxvalue));
193 191

  
194
				int[] positions = new int[Math.min(maxPropertiesToDisplay, T)];
195
				for(int i = 0 ; i < Math.min(maxPropertiesToDisplay, T) ; i++) {
192
				int[] positions = new int[Math.min(pMaxPropertiesToDisplay, T)];
193
				for(int i = 0 ; i < Math.min(pMaxPropertiesToDisplay, T) ; i++) {
196 194
					positions[i] = i;
197 195
				}
198 196
				
......
228 226
				for (StructuralUnitProperty sup : su.getProperties())  {// for each of its property
229 227
					try {
230 228
						List<String> allvalues = sup.getValues(corpus);
231
						internalArchitectureProperties.get(su.getName()).put(sup.getName(), allvalues.subList(0, Math.min(allvalues.size(), maxPropertiesToDisplay)));
229
						internalArchitectureProperties.get(su.getName()).put(sup.getName(), allvalues.subList(0, Math.min(allvalues.size(), pMaxPropertiesToDisplay)));
232 230
						internalArchitecturePropertiesCounts.get(su.getName()).put(sup.getName(), allvalues.size());
233 231
					} catch (Exception e) {
234 232
						ArrayList<String> list = new ArrayList<String>(1);
......
297 295
		buff.append("</ul>\n"); //$NON-NLS-1$
298 296

  
299 297
		// Propriétés d'occurrences
300
		buff.append("<h3 style'font-family:\"Arial\";'>"+NLS.bind(InformationCoreMessages.Diagnostic_14, maxPropertiesToDisplay) + "</h3>\n"); //$NON-NLS-1$ //$NON-NLS-2$ 
298
		buff.append("<h3 style'font-family:\"Arial\";'>"+NLS.bind(InformationCoreMessages.Diagnostic_14, pMaxPropertiesToDisplay) + "</h3>\n"); //$NON-NLS-1$ //$NON-NLS-2$ 
301 299
		ArrayList<String> properties = new ArrayList<String>(propertiesValues.keySet());
302 300
		Collections.sort(properties);
303 301
		buff.append("<ul>\n"); //$NON-NLS-1$
......
315 313
		buff.append("</ul>\n"); //$NON-NLS-1$
316 314

  
317 315
		// Propriété de structures
318
		buff.append("<h3 style'font-family:\"Arial\";'>"+NLS.bind(InformationCoreMessages.Diagnostic_22, maxPropertiesToDisplay)+"</h3>\n"); //$NON-NLS-1$ //$NON-NLS-2$
316
		buff.append("<h3 style'font-family:\"Arial\";'>"+NLS.bind(InformationCoreMessages.Diagnostic_22, pMaxPropertiesToDisplay)+"</h3>\n"); //$NON-NLS-1$ //$NON-NLS-2$
319 317
		buff.append("<ul>\n"); //$NON-NLS-1$
320 318
		for (String s : internalArchitecture) {
321 319
			StringBuffer subbuffer = new StringBuffer();
......
355 353
						else
356 354
							subbuffer.append(", "); //$NON-NLS-1$
357 355
						
358
						if (i >= maxPropertiesToDisplay) {
356
						if (i >= pMaxPropertiesToDisplay) {
359 357
							subbuffer.append("..."); //$NON-NLS-1$
360 358
							break;
361 359
						}
......
648 646

  
649 647
	@Override
650 648
	public boolean setParameters(TXMParameters parameters) {
651
		this.maxPropertiesToDisplay = parameters.getInteger(InformationPreferences.MAX_PROPERTIES_TO_DISPLAY);
649
		this.pMaxPropertiesToDisplay = parameters.getInteger(InformationPreferences.MAX_PROPERTIES_TO_DISPLAY);
652 650
		return true;
653 651
	}
654 652

  
655 653
	@Override
656 654
	public boolean loadParameters() {
657
		// nothing to do
655
		// nothing to do -> all parameters are already managed by autoLoadParameters
658 656
		return true;
659 657
	}
660 658

  
661 659
	
662 660
	@Override
663 661
	public boolean saveParameters() {
664
		// nothing to do
662
		// nothing to do -> all parameters are already managed by autoSaveParameters
665 663
		return true;
666 664
	}
667 665
}
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/rcp/tester/TIGERSearchTester.java (revision 721)
25 25
	@Override
26 26
	public boolean test(Object receiver, String property, Object[] args,
27 27
			Object expectedValue) {
28
		if (receiver == null) {
29
			return false;
30
		}
31
		
28 32
		if (receiver instanceof List) {
29
			receiver = ((List)receiver).get(0);
33
			List l = ((List)receiver);
34
			if (l.size() == 0) {
35
				return false;
36
			}
37
			
38
			receiver = l.get(0);
30 39
			if (TIGERSEARCH_READY.equals(property)) {
31 40
				if (!(receiver instanceof MainCorpus)) {
32 41
					return false;
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartEditorToolBar.java (revision 721)
1 1
package org.txm.chartsengine.rcp.swt;
2 2

  
3 3
import org.eclipse.swt.widgets.Composite;
4
import org.txm.chartsengine.core.results.ChartResult;
4 5
import org.txm.chartsengine.rcp.editors.ChartEditor;
5 6
import org.txm.rcp.editors.TXMEditorToolBar;
7
import org.txm.rcp.swt.GLComposite;
6 8

  
7 9
/**
8 10
 * The default chart editor tool bar shared by every <code>ChartEditor</code>.
......
25 27
	 * @param toolBarId
26 28
	 * @param chartEditor
27 29
	 */
28
	public ChartEditorToolBar(ChartEditor chartEditor, Composite parent, int style) {
29
		this(chartEditor, parent, style, ChartEditorToolBar.ID);
30
	public ChartEditorToolBar(ChartEditor<? extends ChartResult> chartEditor, Composite parent, GLComposite subWidgetsComposite, int style) {
31
		this(chartEditor, parent, subWidgetsComposite, style, ChartEditorToolBar.ID);
30 32
	}
31 33
	
32 34

  
......
36 38
	 * @param style
37 39
	 * @param chartEditorPart
38 40
	 */
39
	public ChartEditorToolBar(ChartEditor chartEditor, Composite parent, int style, String toolbarId) {
40
		super(chartEditor, parent, style, toolbarId);
41
	public ChartEditorToolBar(ChartEditor<? extends ChartResult> chartEditor, Composite parent, GLComposite subWidgetsComposite, int style, String toolbarId) {
42
		super(chartEditor, parent, subWidgetsComposite, style, toolbarId);
41 43

  
42 44
		
43 45
		//FIXME: tests
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java (revision 721)
14 14
import org.txm.chartsengine.core.ChartCreator;
15 15
import org.txm.chartsengine.core.ChartsEngine;
16 16
import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
17
import org.txm.chartsengine.core.results.ChartResult;
17 18
import org.txm.chartsengine.rcp.editors.ChartEditor;
18 19
import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
19 20
import org.txm.rcp.IImageKeys;
21
import org.txm.rcp.swt.GLComposite;
20 22

  
21 23
/**
22 24
 * The default advanced chart editor tool bar shared by every <code>ChartEditor</code>.
......
34 36
	 * @param parent
35 37
	 * @param style
36 38
	 */
37
	public AdvancedChartEditorToolBar(ChartEditor chartEditor, Composite parent, int style) {
38
		super(chartEditor, parent, style, AdvancedChartEditorToolBar.ID);
39
	public AdvancedChartEditorToolBar(ChartEditor<? extends ChartResult> chartEditor, Composite parent, GLComposite subWidgetsComposite, int style) {
40
		super(chartEditor, parent, subWidgetsComposite, style, AdvancedChartEditorToolBar.ID);
39 41
		
40 42
		
41 43
		final ToolItem showTitle = new ToolItem(this, SWT.CHECK);
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java (revision 721)
120 120
	public final void _createPartControl(Composite parent) {
121 121
		
122 122
		// Toolbar
123
		this.chartToolBar = new ChartEditorToolBar(this, this.getTopToolBarContainer(), SWT.FLAT | SWT.RIGHT);
123
		this.chartToolBar = new ChartEditorToolBar(this, this.getTopToolbarContainer(), this.getParametersGroupsComposite(), SWT.FLAT | SWT.RIGHT);
124 124
		//this.chartToolBar.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_RED));
125 125

  
126 126
		// Advanced tool bar
127 127
		//this.advancedToolBarComposite = new Composite(parent, SWT.NONE);
128 128
		Group group = this.topToolBar.installGroup("Rendering parameters", "Show/Hide rendering parameters", "platform:/plugin/org.txm.chartsengine.rcp/icons/show_rendering_parameters.png", false);
129
		this.advancedChartToolBar = new AdvancedChartEditorToolBar(this, group, SWT.FLAT);
129
		this.advancedChartToolBar = new AdvancedChartEditorToolBar(this, group, this.getParametersGroupsComposite(), SWT.FLAT);
130 130
		//this.advancedChartToolBar.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
131 131
//		this.advancedToolBarComposite.pack(true);
132 132

  
tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java (revision 721)
61 61
import org.txm.rcp.editors.TableKeyListener;
62 62
import org.txm.rcp.messages.TXMUIMessages;
63 63
import org.txm.rcp.preferences.RCPPreferences;
64
import org.txm.rcp.swt.GLComposite;
64 65
import org.txm.rcp.swt.widget.NavigationWidget;
65 66
import org.txm.rcp.swt.widget.PropertiesSelector;
66 67
import org.txm.rcp.swt.widget.QueryWidget;
......
288 289
		});
289 290

  
290 291
		//pagination
291
		navigationArea = new NavigationWidget(paramArea, SWT.None);
292
		navigationArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,	true, false,3 ,1));
292
		GLComposite navigationComposite = getBottomToolbar().installGLComposite("navigation", 1, false);
293
		navigationArea = new NavigationWidget(navigationComposite, SWT.None);
294
		navigationArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,	false, false));
293 295

  
294 296
		navigationArea.addFirstListener(new SelectionListener() {
295 297
			@Override
tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java (revision 721)
280 280
		paramArea.setLayout(new FormLayout());
281 281

  
282 282
		// info&navigation panel
283
		final Composite infosArea = this.topToolBar.installGroup("Infos", "Informations and Navigation", null, true);
284

  
283
		final Composite infosArea = this.getBottomToolbar().installGLComposite("Infos", 1, false);
284
		infosArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
285
		
285 286
		Composite resultArea = this.getResultArea();
286 287

  
287 288
		// on créé une Query, ici le pivot de la concordance est "[]"
......
449 450
		infosArea.setLayout(new GridLayout(6, false));
450 451

  
451 452
		navigationArea = new NavigationWidget(infosArea, SWT.NONE);
452
		navigationArea.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true,
453
				false));
453
		//navigationArea.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true,	false));
454 454

  
455 455
		navigationArea.addFirstListener(new SelectionListener() {
456 456
			@Override
......
512 512
			}
513 513
		});
514 514

  
515
		// Labels
516
		lTInfo = new Label(infosArea, SWT.NONE);
515
		// Labels added after the top toolbar
516
		lTInfo = new Label(getTopToolbarContainer(), SWT.NONE);
517 517
		lTInfo.setText(""); //$NON-NLS-1$
518
		lTInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
518
//		lTInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
519 519

  
520
		lVInfo = new Label(infosArea, SWT.NONE);
520
		lVInfo = new Label(getTopToolbarContainer(), SWT.NONE);
521 521
		lVInfo.setText(""); //$NON-NLS-1$
522
		lVInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
522
//		lVInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
523 523

  
524
		lFminInfo = new Label(infosArea, SWT.NONE);
524
		lFminInfo = new Label(getTopToolbarContainer(), SWT.NONE);
525 525
		lFminInfo.setText(""); //$NON-NLS-1$
526
		lFminInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
526
//		lFminInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
527 527

  
528
		lFmaxInfo = new Label(infosArea, SWT.NONE);
528
		lFmaxInfo = new Label(getTopToolbarContainer(), SWT.NONE);
529 529
		lFmaxInfo.setText(""); //$NON-NLS-1$
530
		lFmaxInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
530
//		lFmaxInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
531 531

  
532 532
		// results
533 533
		FormLayout resultLayout = new FormLayout();
tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/editors/InternalViewEditor.java (revision 721)
95 95
		parametersArea.setLayout(new GridLayout(5,false));
96 96
		parametersArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
97 97
		
98
		navigationPanel = getTopToolbar().installGroup("navigation", "Navigation", null, true);
99
		navigationPanel.setLayout(new GridLayout(4,false));
100
		navigationPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
101
		
102 98
		Composite resultPanel = getResultArea();
103 99
		resultPanel.setLayout(new GridLayout(1,true));
104 100
		
......
139 135
		structuralUnitPropertiesSelector.setText(InternalViewUIMessages.InternalViewEditor_5);
140 136
		structuralUnitPropertiesSelector.addSelectionListener(new ComputeSelectionListener(this));
141 137
		
138
		navigationPanel = getBottomToolbar().installGLComposite("navigation", 4 , false);
139
		navigationPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
142 140
		
143 141
		// Navigation widget
144 142
		navigation = new NewNavigationWidget(navigationPanel);
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java (revision 721)
126 126
import org.txm.rcp.editors.TableKeyListener;
127 127
import org.txm.rcp.messages.TXMUIMessages;
128 128
import org.txm.rcp.preferences.RCPPreferences;
129
import org.txm.rcp.swt.GLComposite;
129 130
import org.txm.rcp.swt.dialog.ViewPropertySelectionDialog;
130 131
import org.txm.rcp.swt.widget.AssistedQueryWidget;
131 132
import org.txm.rcp.swt.widget.NavigationWidget;
......
1039 1040

  
1040 1041

  
1041 1042
		// Navigation Area: infoLine and buttons
1042
		navigationWidget = new NavigationWidget(navigationArea, SWT.NONE);
1043
		navigationWidget.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, false, 4, 1));
1043
		GLComposite navigationAreaComposite = getBottomToolbar().installGLComposite("navigation", 1, false);
1044
		navigationWidget = new NavigationWidget(navigationAreaComposite, SWT.NONE);
1045
		navigationWidget.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, false));
1044 1046

  
1045 1047
		// | [|<] [<] infos [>] [>|] |
1046 1048
		// [|<]
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/WordProperty.java (revision 721)
49 49
		return properties;
50 50
	}
51 51

  
52
	/**
53
	 * create a preference String value from a list of Word properties
54
	 * 
55
	 * @param pProperties the list of properties. May be null (return [])
56
	 * @return
57
	 */
52 58
	public static String fromListToPreferenceString(List<Property> pProperties) {
53 59
		if (pProperties == null){
54 60
			return "";

Formats disponibles : Unified diff