Index: TXM/trunk/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java
===================================================================
--- TXM/trunk/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java	(revision 3379)
+++ TXM/trunk/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java	(revision 3380)
@@ -8,8 +8,12 @@
 import org.eclipse.swt.custom.CLabel;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swt.widgets.Spinner;
 import org.eclipse.swt.widgets.ToolItem;
 import org.txm.ca.core.functions.CA;
@@ -174,94 +178,169 @@
 		showPointShapes.addSelectionListener(computeSelectionListener);
 		
 		
-		// Factors plane selection
-		CLabel factorsLabel = new CLabel(this.chartToolBar, SWT.CENTER);
-		factorsLabel.setText(CAUIMessages.axesColon);
-		this.chartToolBar.addControl(factorsLabel);
-		
-		final Combo plansCombo = new Combo(this.chartToolBar, SWT.READ_ONLY);
-		
-		// FIXME: commented because the infos panel is not ready to manage more axes
-		// ArrayList<String> planes = null;
-		// try {
-		// int nbsv = ((CA) editorPart.getResultData()).getSingularValues().length;
-		// planes = new ArrayList<String>();
-		// for(int i = 1 ; i < nbsv ; i ++) {
-		// for(int j = i ; j < nbsv ; j++) {
-		// if(i != j) {
-		// planes.add("("+i+","+j+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		// }
-		// }
-		// }
-		// }
-		// catch (StatException e1) {
-		// // TODO Auto-generated catch block
-		// org.txm.utils.logger.Log.printStackTrace(e1);
-		// }
-		// String [] items = planes.toArray(new String[planes.size()]);
-		
-		String items[] = { "(1,2)", "(1,3)", "(2,3)" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		
-		// TODO : commented because the infos panel is not ready to manage more axes
-		// if(couples != null && couples.size() > 3) {
-		// items = couples.toArray(new String[couples.size()]);
-		// }
-		
-		plansCombo.setItems(items);
-		
-		// Preselect the plan from the CA data
-		if (this.getIntParameterValue(CAPreferences.FIRST_DIMENSION) == 2) {
-			plansCombo.select(2);
-		}
-		else if (this.getIntParameterValue(CAPreferences.SECOND_DIMENSION) == 3) {
-			plansCombo.select(1);
-		}
-		else {
-			plansCombo.select(0);
-		}
-		
-		this.chartToolBar.addControl(plansCombo);
-		
-		// Listeners
-		SelectionListener listener = new SelectionListener() {
+		final ToolItem item = new ToolItem (this.chartToolBar, SWT.PUSH);
+		final Menu menu = new Menu (this.chartToolBar.getShell(), SWT.POP_UP);
+		MenuItem item12 = new MenuItem (menu, SWT.PUSH);
+		item12.setText ("(1,2)"); // , "(1,3)", "(2,3)"
+		item12.addSelectionListener(new SelectionListener() {
 			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				
-				boolean resetView = false;
-				
-				// Change factors
-				if (e.getSource() == plansCombo) {
-					
-					Combo plans = (Combo) e.getSource();
-					
-					int dimension1 = 1;
-					int dimension2 = 2;
-					
-					String str = plans.getItem(plans.getSelectionIndex());
-					str = str.substring(1, str.length() - 1); // remove ( and )
-					String[] split = str.split(","); // 2 items //$NON-NLS-1$
-					dimension1 = Integer.parseInt(split[0]);
-					dimension2 = Integer.parseInt(split[1]);
-					
-					getResult().setFirstDimension(dimension1);
-					getResult().setSecondDimension(dimension2);
-					
-					resetView = true;
-				}
+				getResult().setFirstDimension(1);
+				getResult().setSecondDimension(2);
 				getResult().setChartDirty();
-				getResult().setNeedsToResetView(resetView);
+				getResult().setNeedsToResetView(true);
+				item.setText(CAUIMessages.axesColon+" (1,2)");
 				compute(true);
-				// forceFocus();
 			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		MenuItem item13 = new MenuItem (menu, SWT.PUSH);
+		item13.setText ("(1,3)"); // "(1,2)", "(1,3)", "(2,3)"
+		item13.addSelectionListener(new SelectionListener() {
 			
 			@Override
-			public void widgetDefaultSelected(SelectionEvent e) {
-				// TODO Auto-generated method stub
+			public void widgetSelected(SelectionEvent e) {
+				getResult().setFirstDimension(1);
+				getResult().setSecondDimension(3);
+				getResult().setChartDirty();
+				getResult().setNeedsToResetView(true);
+				item.setText(CAUIMessages.axesColon+" (1,3)");
+				compute(true);
 			}
-		};
-		plansCombo.addSelectionListener(listener);
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		MenuItem item23 = new MenuItem (menu, SWT.PUSH);
+		item23.setText ("(2,3)"); // "(1,2)", "(1,3)", "(2,3)"
+		item23.addSelectionListener(new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				getResult().setFirstDimension(2);
+				getResult().setSecondDimension(3);
+				getResult().setChartDirty();
+				getResult().setNeedsToResetView(true);
+				item.setText(CAUIMessages.axesColon+" (2,3)");
+				compute(true);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
 		
+		item.setText(CAUIMessages.axesColon+" (1,2)");
+		item.addListener (SWT.Selection, event -> {
+//			if (event.detail == SWT.PUSH) {
+				Rectangle rect = item.getBounds ();
+				Point pt = new Point (rect.x, rect.y + rect.height);
+				pt = this.chartToolBar.toDisplay (pt);
+				menu.setLocation (pt.x, pt.y);
+				menu.setVisible (true);
+//			}
+		});
+		
+//		// Factors plane selection
+//		ToolItem factorsLabelItem = new ToolItem(this.chartToolBar, SWT.SEPARATOR);
+//		
+//		CLabel factorsLabel = new CLabel(this.chartToolBar, SWT.CENTER);
+//		factorsLabel.setText(CAUIMessages.axesColon);
+//		
+//		ToolItem plansComboItem = new ToolItem(this.chartToolBar, SWT.SEPARATOR);
+//		final Combo plansCombo = new Combo(this.chartToolBar, SWT.READ_ONLY);
+//		
+//		// FIXME: commented because the infos panel is not ready to manage more axes
+//		// ArrayList<String> planes = null;
+//		// try {
+//		// int nbsv = ((CA) editorPart.getResultData()).getSingularValues().length;
+//		// planes = new ArrayList<String>();
+//		// for(int i = 1 ; i < nbsv ; i ++) {
+//		// for(int j = i ; j < nbsv ; j++) {
+//		// if(i != j) {
+//		// planes.add("("+i+","+j+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+//		// }
+//		// }
+//		// }
+//		// }
+//		// catch (StatException e1) {
+//		// // TODO Auto-generated catch block
+//		// org.txm.utils.logger.Log.printStackTrace(e1);
+//		// }
+//		// String [] items = planes.toArray(new String[planes.size()]);
+//		
+//		String items[] = { "(1,2)", "(1,3)", "(2,3)" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+//		
+//		// TODO : commented because the infos panel is not ready to manage more axes
+//		// if(couples != null && couples.size() > 3) {
+//		// items = couples.toArray(new String[couples.size()]);
+//		// }
+//		
+//		plansCombo.setItems(items);
+//		
+//		// Preselect the plan from the CA data
+//		if (this.getIntParameterValue(CAPreferences.FIRST_DIMENSION) == 2) {
+//			plansCombo.select(2);
+//		}
+//		else if (this.getIntParameterValue(CAPreferences.SECOND_DIMENSION) == 3) {
+//			plansCombo.select(1);
+//		}
+//		else {
+//			plansCombo.select(0);
+//		}
+//		
+//		//this.chartToolBar.addControl(plansCombo);
+//		
+//		// Listeners
+//		SelectionListener listener = new SelectionListener() {
+//			
+//			@Override
+//			public void widgetSelected(SelectionEvent e) {
+//				
+//				boolean resetView = false;
+//				
+//				// Change factors
+//				if (e.getSource() == plansCombo) {
+//					
+//					Combo plans = (Combo) e.getSource();
+//					
+//					int dimension1 = 1;
+//					int dimension2 = 2;
+//					
+//					String str = plans.getItem(plans.getSelectionIndex());
+//					str = str.substring(1, str.length() - 1); // remove ( and )
+//					String[] split = str.split(","); // 2 items //$NON-NLS-1$
+//					dimension1 = Integer.parseInt(split[0]);
+//					dimension2 = Integer.parseInt(split[1]);
+//					
+//					getResult().setFirstDimension(dimension1);
+//					getResult().setSecondDimension(dimension2);
+//					
+//					resetView = true;
+//				}
+//				getResult().setChartDirty();
+//				getResult().setNeedsToResetView(resetView);
+//				compute(true);
+//				// forceFocus();
+//			}
+//			
+//			@Override
+//			public void widgetDefaultSelected(SelectionEvent e) {
+//				// TODO Auto-generated method stub
+//			}
+//		};
+//		plansCombo.addSelectionListener(listener);
+//		factorsLabel.pack();
+//
+//		factorsLabelItem.setControl(factorsLabel);
+//		factorsLabelItem.setWidth(factorsLabel.getSize().x);
+//		plansCombo.pack();
+//		
+//		plansComboItem.setControl(plansCombo);
+//		plansComboItem.setWidth(plansCombo.getSize().x);
+		
 		// parent parameters
 		// thresholds
 		if (!this.getResult().getParent().isVisible()  // the LT parent is not visible
@@ -280,7 +359,6 @@
 		}
 		
 		this.chartToolBar.pack();
-		
 	}
 	
 	@Override
