Revision 13444 trunk/extensions/extExpressionField/src/com/iver/cit/gvsig/project/documents/table/operators/Field.java
Field.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig.project.documents.table.operators; |
2 | 2 |
|
3 |
import java.sql.Types; |
|
4 |
|
|
5 |
import com.iver.andami.PluginServices; |
|
3 | 6 |
import com.iver.cit.gvsig.fmap.drivers.FieldDescription; |
4 | 7 |
/** |
5 | 8 |
* @author Vicente Caballero Navarro |
6 | 9 |
*/ |
7 | 10 |
public class Field extends AbstractField{ |
8 | 11 |
private FieldDescription fd; |
12 |
private String typeField; |
|
9 | 13 |
public Field() { |
10 | 14 |
} |
11 | 15 |
public void setFieldDescription(FieldDescription fd) { |
12 | 16 |
this.fd=fd; |
17 |
switch (fd.getFieldType()) { |
|
18 |
case Types.INTEGER: |
|
19 |
case Types.BIGINT: |
|
20 |
case Types.DECIMAL: |
|
21 |
case Types.DOUBLE: |
|
22 |
case Types.FLOAT: |
|
23 |
case Types.NUMERIC: |
|
24 |
typeField = PluginServices.getText(this, "numeric_value"); |
|
25 |
break; |
|
26 |
case Types.LONGVARCHAR: |
|
27 |
case Types.VARCHAR: |
|
28 |
typeField=PluginServices.getText(this,"string_value"); |
|
29 |
break; |
|
30 |
case Types.BOOLEAN: |
|
31 |
typeField=PluginServices.getText(this,"boolean_value"); |
|
32 |
break; |
|
33 |
case Types.DATE: |
|
34 |
typeField=PluginServices.getText(this,"date_value"); |
|
35 |
break; |
|
36 |
} |
|
37 |
|
|
13 | 38 |
} |
14 | 39 |
public String addText(String s) { |
15 | 40 |
return s.concat(toString()); |
... | ... | |
20 | 45 |
public boolean isEnable() { |
21 | 46 |
return true; |
22 | 47 |
} |
48 |
public String getTooltip(){ |
|
49 |
return PluginServices.getText(this,"field")+": "+fd.getFieldAlias()+"\n"+getDescription(); |
|
50 |
} |
|
51 |
public String getDescription() { |
|
52 |
return PluginServices.getText(this, "type") + ": " + |
|
53 |
typeField; |
|
54 |
} |
|
23 | 55 |
} |
Also available in: Unified diff