OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 17 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17 Rev 25
Line 14... Line 14...
14
 package org.openconcerto.map.ui;
14
 package org.openconcerto.map.ui;
15
 
15
 
16
import org.openconcerto.map.model.Ville;
16
import org.openconcerto.map.model.Ville;
17
import org.openconcerto.ui.component.ComboLockedMode;
17
import org.openconcerto.ui.component.ComboLockedMode;
18
import org.openconcerto.ui.component.ITextComboCache;
18
import org.openconcerto.ui.component.ITextComboCache;
19
import org.openconcerto.ui.component.ITextSelector;
19
import org.openconcerto.ui.component.combo.ISearchableTextCombo;
-
 
20
import org.openconcerto.utils.model.DefaultIListModel;
20
 
21
 
21
import java.awt.Dimension;
22
import java.awt.Dimension;
22
import java.awt.GridBagConstraints;
23
import java.awt.GridBagConstraints;
23
import java.awt.GridBagLayout;
24
import java.awt.GridBagLayout;
24
import java.awt.Insets;
25
import java.awt.Insets;
Line 35... Line 36...
35
import javax.swing.JSlider;
36
import javax.swing.JSlider;
36
import javax.swing.JToggleButton;
37
import javax.swing.JToggleButton;
37
import javax.swing.event.ChangeEvent;
38
import javax.swing.event.ChangeEvent;
38
import javax.swing.event.ChangeListener;
39
import javax.swing.event.ChangeListener;
39
 
40
 
40
 
-
 
41
public class StatusPanel extends JPanel implements VilleRendererListener, ZoomListener {
41
public class StatusPanel extends JPanel implements VilleRendererListener, ZoomListener {
42
 
42
 
43
    /**
43
    /**
44
     * 
44
     * 
45
     */
45
     */
Line 79... Line 79...
79
            g.add(this.radio2);
79
            g.add(this.radio2);
80
            g.add(this.radio1);
80
            g.add(this.radio1);
81
 
81
 
82
        }
82
        }
83
        /* final JButton button = new JButton("Centrer"); */
83
        /* final JButton button = new JButton("Centrer"); */
84
        ITextSelector txt = new ITextSelector("", ComboLockedMode.ITEMS_LOCKED, 40);
84
        ISearchableTextCombo txt = new ISearchableTextCombo(ComboLockedMode.ITEMS_LOCKED, 1, 40);
85
        txt.addValueListener(new PropertyChangeListener() {
85
        txt.addValueListener(new PropertyChangeListener() {
86
 
86
 
87
            public void propertyChange(PropertyChangeEvent evt) {
87
            public void propertyChange(PropertyChangeEvent evt) {
88
                final String trim = evt.getNewValue().toString().trim();
88
                final String trim = evt.getNewValue().toString().trim();
89
                StatusPanel.this.currentVille = Ville.getVilleFromVilleEtCode(trim);
89
                StatusPanel.this.currentVille = Ville.getVilleFromVilleEtCode(trim);
Line 98... Line 98...
98
 
98
 
99
        });
99
        });
100
        txt.setMinimumSearch(0);
100
        txt.setMinimumSearch(0);
101
        txt.setMaximumResult(200);
101
        txt.setMaximumResult(200);
102
 
102
 
103
        ITextComboCache cache = new ITextComboCacheVille();
103
        txt.initCache(new DefaultIListModel<String>(new ITextComboCacheVille().getCache()));
104
        txt.initCache(cache);
-
 
105
        c.weightx = 1;
104
        c.weightx = 1;
106
        c.gridx++;
105
        c.gridx++;
107
        this.add(txt, c);
106
        this.add(txt, c);
108
 
107
 
109
        c.weightx = 0;
108
        c.weightx = 0;