root / branches / v2_0_0_prep / extensions / extExpressionField / src / com / iver / cit / gvsig / project / documents / table / operators / Equal.java @ 27752
History | View | Annotate | Download (1.16 KB)
1 |
package com.iver.cit.gvsig.project.documents.table.operators; |
---|---|
2 |
|
3 |
import org.apache.bsf.BSFException; |
4 |
import org.apache.bsf.BSFManager; |
5 |
|
6 |
import com.iver.andami.PluginServices; |
7 |
import com.iver.cit.gvsig.project.documents.table.AbstractOperator; |
8 |
import com.iver.cit.gvsig.project.documents.table.IOperator; |
9 |
|
10 |
/**
|
11 |
* @author Vicente Caballero Navarro
|
12 |
*/
|
13 |
public class Equal extends AbstractOperator{ |
14 |
|
15 |
public String addText(String s) { |
16 |
return s.concat(toString());
|
17 |
} |
18 |
|
19 |
public void eval(BSFManager interpreter) throws BSFException { |
20 |
|
21 |
} |
22 |
public String toString() { |
23 |
return " == "; |
24 |
} |
25 |
public boolean isEnable() { |
26 |
return (getType()==IOperator.DATE || getType()==IOperator.NUMBER || getType()==IOperator.STRING);
|
27 |
} |
28 |
public String getTooltip(){ |
29 |
return PluginServices.getText(this,"operator")+": "+addText("")+"\n"+getDescription(); |
30 |
} |
31 |
public String getDescription() { |
32 |
return PluginServices.getText(this, "returns") + ": " + |
33 |
PluginServices.getText(this, "boolean_value") + "\n" + |
34 |
PluginServices.getText(this, "description") + ": " + |
35 |
"Returns true if the first object value is equals than the second value.";
|
36 |
} |
37 |
} |