svn-gvsig-desktop / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / castor / Table.java @ 312
History | View | Annotate | Download (2.66 KB)
1 |
package com.iver.cit.gvsig.project.castor; |
---|---|
2 |
|
3 |
import java.text.DateFormat; |
4 |
import java.util.Date; |
5 |
|
6 |
import com.iver.cit.gvsig.project.ProjectTable; |
7 |
|
8 |
/**
|
9 |
* Tabla del proyecto
|
10 |
*
|
11 |
* @author Fernando Gonz?lez Cort?s
|
12 |
*/
|
13 |
public class Table extends DefaultProjectElement implements ProjectTable { |
14 |
private static int numTables = 0; |
15 |
//TODO implementar bien
|
16 |
// private FTable modelo;
|
17 |
|
18 |
/**
|
19 |
* Establece a true el bit index-?simo del bitmap de campos visibles. Los
|
20 |
* campos cuyos bits est?n a true se considerar?n visibles y viceversa
|
21 |
*
|
22 |
* @param index indice del bit que se quiere establecer a true
|
23 |
*/
|
24 |
public void set(int index) { |
25 |
//TODO implementar bien
|
26 |
// modelo.set(index);
|
27 |
change.firePropertyChange("visibles", true, true); |
28 |
} |
29 |
|
30 |
/**
|
31 |
* Obtiene el valor del bit index-?simo del bitmap de campos visibles
|
32 |
*
|
33 |
* @param index indice del bit que se quiere obtener
|
34 |
*
|
35 |
* @return devuelve true si el campo index-?simo es visible y false en caso
|
36 |
* contrario
|
37 |
*/
|
38 |
public boolean get(int index) { |
39 |
//TODO implementar bien
|
40 |
// return modelo.get(index);
|
41 |
return false; |
42 |
} |
43 |
|
44 |
//TODO implementar bien
|
45 |
/*
|
46 |
* Obtiene el modelo de la Tabla. Es decir, una clase con capacidad para
|
47 |
* leer la informaci?n de la tabla
|
48 |
*
|
49 |
* @return
|
50 |
*
|
51 |
public FTable getModelo() {
|
52 |
return modelo;
|
53 |
}
|
54 |
*/
|
55 |
//TODO implementar bien
|
56 |
/*
|
57 |
* Establece el modelo de la tabla. Es decir, una clase con capacidad para
|
58 |
* leer la informaci?n de la tabla
|
59 |
*
|
60 |
* @param model
|
61 |
*
|
62 |
public void setModelo(FTable model) {
|
63 |
modelo = model;
|
64 |
change.firePropertyChange("modelo", modelo, modelo);
|
65 |
}
|
66 |
*/
|
67 |
/**
|
68 |
* Establece el valor del bit index-?simo al valor 'value'
|
69 |
*
|
70 |
* @param bitIndex indice del bit que se quiere tocar
|
71 |
* @param value valor que se quiere establecer en el bit indicado
|
72 |
*/
|
73 |
public void set(int bitIndex, boolean value) { |
74 |
//TODO implementar bien
|
75 |
// modelo.set(bitIndex, value);
|
76 |
change.firePropertyChange("visibles", value, value);
|
77 |
} |
78 |
|
79 |
/**
|
80 |
* @param baseName
|
81 |
* @return
|
82 |
*/
|
83 |
public static ProjectTable createTable(String baseName) { |
84 |
Table t = new Table();
|
85 |
t.setName(baseName + " - " + numTables);
|
86 |
t.setCreationDate(DateFormat.getInstance().format(new Date())); |
87 |
numTables++; |
88 |
return t;
|
89 |
} |
90 |
|
91 |
//TODO implementar bien
|
92 |
/*
|
93 |
* @param baseName
|
94 |
* @return
|
95 |
*
|
96 |
public static ProjectTable createTable(String viewName, FTable ftable) {
|
97 |
Table t = new Table();
|
98 |
t.setName(viewName + " - Datos");
|
99 |
t.setCreationDate(DateFormat.getInstance().format(new Date()));
|
100 |
t.setModelo(ftable);
|
101 |
numTables++;
|
102 |
return t;
|
103 |
}*/
|
104 |
} |