Hello,

J'ai un problème avec le code suivant :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 
package com.odcgroup.page.ui.properties;
 
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.FileDialog;
 
import org.eclipse.jface.viewers.DialogCellEditor;
 
/**
 * Defines a FileChooser for image
 * 
 * @author Alexandre Jaquet
 *
 */
public class ImageCellEditor extends DialogCellEditor {
 
	/**
         * Constructor
         * 
         * @param parent 
         *                      The parent component
         */
    public ImageCellEditor(Composite parent) {
        super(parent);
    }
 
    /**
     * Constructor
     * 
     * @param parent
     *                  The parent component
     * @param style
     *                  The style to set
     */
    public ImageCellEditor(Composite parent, int style) {
        super(parent, style);
    }
 
    /**
     * Open dialog window
     * 
     * @param cellEditorWindow 
     *                  The cell editor window
     */
    protected Object openDialogBox(Control cellEditorWindow) {
        FileDialog dialog = new FileDialog(cellEditorWindow.getShell());
        String [] extensions = new String [4];
        extensions[0] = ".png";
        extensions[1] = ".jpg";
        extensions[2] = ".bmp";
        extensions[3] = ".gif";
        dialog.setFilterExtensions(extensions);
        String path = dialog.open();
        if (path != null) {
            path = path.replaceAll("\\\\", "/");
        }
        return path;
    }
 
 	}
le filtre ne marche pas, aucune image n est disponible pour la séléction

quelqu un aurait une petite idée

d avance merci