Statistics
| Revision:

root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / table / ObjectSelectionStep.java @ 7304

History | View | Annotate | Download (948 Bytes)

1
package com.iver.cit.gvsig.project.documents.table;
2

    
3
import com.iver.utiles.swing.objectSelection.ObjectSelection;
4
import com.iver.utiles.swing.wizard.Step;
5
import com.iver.utiles.swing.wizard.Wizard;
6
import com.iver.utiles.swing.wizard.WizardControl;
7

    
8

    
9
/**
10
 * Control ObjectSelection como paso de un asistente
11
 *
12
 * @author Fernando Gonz?lez Cort?s
13
 */
14
public class ObjectSelectionStep extends ObjectSelection implements Step {
15

    
16
    private WizardControl w;
17

    
18
        /**
19
         * @see com.iver.utiles.swing.wizard.Step#init(com.iver.utiles.swing.wizard.Wizard)
20
         */
21
        public void init(WizardControl w) {
22
                this.w = w;
23
        }
24

    
25
        /**
26
         * @see com.iver.utiles.swing.objectSelection.ObjectSelection#seleccion()
27
         */
28
        protected void seleccion() {
29
                if (w != null) {
30
                        w.enableNext(getCombo().getSelectedIndex() != -1);
31
                }
32
        }
33

    
34
        /**
35
         * Obtiene el elemento seleccionado
36
         *
37
         * @return
38
         */
39
        public Object getSelectedItem() {
40
                return getCombo().getSelectedItem();
41
        }
42
}