Statistics
| Revision:

root / trunk / libraries / libCq_CMS_praster / src / org / cresques / ui / raster / XMLCheck.java @ 8026

History | View | Annotate | Download (1.17 KB)

1
package org.cresques.ui.raster;
2

    
3
import javax.swing.JCheckBox;
4

    
5
/**
6
 * Clase que representa a un checkbox obtenido a partir del XML
7
 * que manda un driver de escritura.
8
 *
9
 * @author Nacho Brodin <brodin_ign@gva.es>
10
 *
11
 */
12
public class XMLCheck extends JCheckBox {
13
    final private static long serialVersionUID = -3370601314380922368L;
14
    public int numPanel = -1;
15
    public int posIntoPanel = -1;
16
    public String position = null;
17
    public String selected = null;
18
    public int sizex = 0;
19
    public int sizey = 0;
20
    public String text = null;
21
    public String id = null;
22

    
23
    /**
24
     * Contructor
25
     * @param text        texto del checkbox
26
     * @param select        true si esta seleccionado y false si no lo est?.
27
     */
28
    public XMLCheck(String text, boolean select) {
29
        super(text, select);
30
        this.text = text;
31

    
32
        if (select) {
33
            selected = new String("yes");
34
        } else {
35
            selected = new String("no");
36
        }
37
    }
38

    
39
    /**
40
     * Inicializaci?n del XMLCheck
41
     */
42
    public void init() {
43
        if ((sizex != 0) && (sizey != 0)) {
44
            this.setPreferredSize(new java.awt.Dimension(sizex, sizey));
45
        }
46
    }
47
}
48

    
49