Revision 713

View differences:

org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4

  
5
    <modelVersion>4.0.0</modelVersion>
6
    <artifactId>org.gvsig.expressionfield</artifactId>
7
    <name>${project.artifactId}</name>
8
    <version>2.0.135</version>
9
    <description>Field calculator (Expression from assistant or from text file)</description>
10

  
11
    <parent>
12
        <groupId>org.gvsig</groupId>
13
        <artifactId>org.gvsig.desktop</artifactId>
14
        <version>2.0.318</version>
15
    </parent>
16

  
17
    <url>https://devel.gvsig.org/redmine/projects/gvsig-expression-field</url>
18

  
19
    <scm>
20
        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-expression-field/org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135</connection>
21
        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-expression-field/org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135</developerConnection>
22
        <url>scm:svn:https://devel.gvsig.org/svn/gvsig-expression-field/org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135</url>
23
    </scm>
24

  
25
  <repositories>
26
    <repository>
27
      <id>gvsig-public-http-repository</id>
28
      <name>gvSIG maven public HTTP repository</name>
29
      <url>http://devel.gvsig.org/m2repo/j2se</url>
30
      <releases>
31
        <enabled>true</enabled>
32
        <updatePolicy>daily</updatePolicy>
33
        <checksumPolicy>warn</checksumPolicy>
34
      </releases>
35
      <snapshots>
36
        <enabled>true</enabled>
37
        <updatePolicy>daily</updatePolicy>
38
        <checksumPolicy>warn</checksumPolicy>
39
      </snapshots>
40
    </repository>
41
  </repositories>
42
    <dependencyManagement>
43
        <dependencies>
44
            <!-- Adding this dependency because this project is using a jython version
45
            different to the version defined by the parent pom  -->
46
            <dependency>
47
                <groupId>org.python</groupId>
48
                <artifactId>jython</artifactId>
49
                <version>2.2.1</version>
50
            </dependency>
51
        </dependencies>
52
    </dependencyManagement>
53

  
54
    <dependencies>
55
        <dependency>
56
            <groupId>org.gvsig</groupId>
57
            <artifactId>org.gvsig.app.mainplugin</artifactId>
58
            <scope>compile</scope>
59
        </dependency>
60
        <dependency>
61
            <groupId>org.gvsig</groupId>
62
            <artifactId>org.gvsig.app.document.table.app.mainplugin</artifactId>
63
            <scope>compile</scope>
64
        </dependency>
65
        <dependency>
66
            <groupId>bsf</groupId>
67
            <artifactId>bsf</artifactId>
68
            <scope>compile</scope>
69
        </dependency>
70

  
71
        <dependency>
72
            <groupId>bsh</groupId>
73
            <artifactId>bsh</artifactId>
74
            <scope>compile</scope>
75
        </dependency>
76

  
77
        <dependency>
78
            <groupId>org.gvsig</groupId>
79
            <artifactId>org.gvsig.about.api</artifactId>
80
            <scope>compile</scope>
81
        </dependency>
82
        <dependency>
83
            <groupId>org.gvsig</groupId>
84
            <artifactId>org.gvsig.andami</artifactId>
85
            <scope>compile</scope>
86
        </dependency>
87
        <dependency>
88
            <groupId>org.gvsig</groupId>
89
            <artifactId>org.gvsig.fmap.dal.api</artifactId>
90
            <scope>compile</scope>
91
        </dependency>
92
        <dependency>
93
            <groupId>org.gvsig</groupId>
94
            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
95
            <scope>compile</scope>
96
        </dependency>
97
        <dependency>
98
            <groupId>org.gvsig</groupId>
99
            <artifactId>org.gvsig.tools.lib</artifactId>
100
            <scope>compile</scope>
101
        </dependency>
102
        <dependency>
103
            <groupId>org.gvsig</groupId>
104
            <artifactId>org.gvsig.tools.swing.api</artifactId>
105
            <scope>compile</scope>
106
        </dependency>
107
        <dependency>
108
            <groupId>org.gvsig</groupId>
109
            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
110
            <scope>compile</scope>
111
        </dependency>
112
        <dependency>
113
            <groupId>org.gvsig</groupId>
114
            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
115
            <scope>compile</scope>
116
        </dependency>
117
        <dependency>
118
            <groupId>org.gvsig</groupId>
119
            <artifactId>org.gvsig.ui</artifactId>
120
            <scope>compile</scope>
121
        </dependency>
122
        <dependency>
123
            <groupId>org.gvsig</groupId>
124
            <artifactId>org.gvsig.projection.api</artifactId>
125
            <scope>compile</scope>
126
        </dependency>
127
        <dependency>
128
            <groupId>org.gvsig</groupId>
129
            <artifactId>org.gvsig.fmap.control</artifactId>
130
            <scope>compile</scope>
131
        </dependency>
132
        <dependency>
133
            <groupId>org.gvsig</groupId>
134
            <artifactId>org.gvsig.utils</artifactId>
135
            <scope>compile</scope>
136
        </dependency>
137
        <dependency>
138
            <groupId>org.gvsig</groupId>
139
            <artifactId>org.gvsig.timesupport.lib.api</artifactId>
140
            <scope>compile</scope>
141
        </dependency>
142
        <dependency>
143
            <groupId>com.fifesoft</groupId>
144
            <artifactId>rsyntaxtextarea</artifactId>
145
            <scope>compile</scope>
146
        </dependency>
147
        <dependency>
148
            <groupId>org.python</groupId>
149
            <artifactId>jython</artifactId>
150
            <scope>runtime</scope>
151
        </dependency>
152
    </dependencies>
153

  
154

  
155
    <build>
156

  
157
        <plugins>
158
            <plugin>
159
                <groupId>org.apache.maven.plugins</groupId>
160
                <artifactId>maven-surefire-plugin</artifactId>
161
                <configuration>
162
                    <skipTests>true</skipTests>
163
                </configuration>
164
            </plugin>
165

  
166
        </plugins>
167

  
168
    </build>
169

  
170

  
171
    <properties>
172
        <!-- The property svn.tags.folder is used in external projects to override  -->
173
        <!-- configuraction in maven-release-plugin -->
174
        <svn.tags.folder>https://devel.gvsig.org/svn/gvsig-expression-field/org.gvsig.expressionfield/tags/</svn.tags.folder>
175

  
176
        <gvsig.package.info.name>Tools: Field calculator</gvsig.package.info.name>
177
        <gvsig.package.info.dependencies>required: org.gvsig.app.document.table.app.mainplugin -ge 2</gvsig.package.info.dependencies>
178
        <gvsig.package.info.javaVM>j1_6</gvsig.package.info.javaVM>
179
        <gvsig.package.info.state>testing</gvsig.package.info.state>
180
        <gvsig.package.info.official>true</gvsig.package.info.official>
181
        <!-- alpha-devel -->
182
        <gvsig.package.info.categories>Table</gvsig.package.info.categories>
183
        <gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-expression-field/pool</gvsig.package.info.poolURL>
184

  
185
    </properties>
186
</project>
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/buildNumber.properties
1
#Sun Feb 28 00:02:40 CET 2021
2
buildNumber=2214
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/test/java/org/gvsig/expressionfield/AllTests.java
1
package org.gvsig.expressionfield;
2

  
3
import junit.framework.Test;
4
import junit.framework.TestSuite;
5

  
6
public class AllTests {
7

  
8
	public static Test suite() {
9
		TestSuite suite = new TestSuite(
10
				"Test for com.iver.cit.gvsig.expressionField");
11
		//$JUnit-BEGIN$
12

  
13
		//$JUnit-END$
14
		return suite;
15
	}
16

  
17
}
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_it.properties
1
#Translations for language [it]
2
#Mon Aug 13 13:02:41 CEST 2007
3
advanced=Avanzata
4
boolean_value=Valore boleano
5
calculate_expression=Calcola espressione
6
charging_operators=Caricamento operatori
7
clear_expression=Cancella espressione
8
column=Colonna
9
commands=Comandi
10
continue?=Continuare?
11
date=Data
12
date_value=Valore della data
13
description=Descrizione
14
double_value=
15
error=Errore
16
error_expression=Errore nell'espressione
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=L'espressione verr\u00e0 processata ora, \ncon gli attuali dati della tabella
18
evaluate=Processa
19
evaluate_expression_with_errors=Espressione processata con errori
20
explorer=Esplorare
21
expression=Espressione
22
expressions=Espressioni
23
expressions_from_file=Espressioni da un file
24
field=Campo
25
general=Generale
26
incorrect_file=File incorretto
27
information=Informazione
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=E' stato stabilito un limite di righe nelle preferenze, non sar\u00e0 possibile annullare l'operazione. Proseguire?
30
limit_rows_in_memory=Limite di righe in memoria
31
numeric=Numerico
32
numeric_value=Valore numerico
33
operator=
34
parameter=Parametro
35
python=
36
returns=Torna
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=Specifica il numero di righe \n in memoria quando viene processata un'espressione,\n riducendo drasticamente il tempo di esecuzione\n quando viene diminuito.
38
string=Stringa
39
string_value=Valore stringa
40
type=Tipo
41
value=Valore
42
without_limit=Senza limite
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text.properties
1
#Translations for language [es]
2
#Tue Jan 20 18:42:35 CET 2009
3
advanced=Avanzada
4
boolean_value=Valor booleano
5
calculate_expression=Calcular expresi\u00f3n
6
charged_operators=Operadores cargados.
7
charging_operators=Cargando operadores
8
clear_expression=Borrar expresi\u00f3n
9
column=Columna
10
commands=Comandos
11
continue?=\u00bfQuiere continuar?
12
date=Fecha
13
date_value=Valor fecha
14
description=Descripci\u00f3n
15
double_value=
16
error=Error
17
error_expression=Error en la expresi\u00f3n
18
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=El c\u00e1lculo de la expresi\u00f3n se realizar\u00e1 en este momento\nsobre los registros existentes en la tabla.
19
evaluate=Evaluar
20
evaluate_expression_with_errors=Expresiones evaluadas con errores
21
explorer=Explorar
22
expression=Expresi\u00f3n
23
expressions=Expresiones
24
expressions_from_file=Expresiones de fichero
25
field=Campo
26
field_toolbar=
27
format=Formato
28
general=General
29
incorrect_file=Fichero incorrecto
30
information=Informaci\u00f3n
31
integer_value=
32
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=Tiene establecido un l\u00edmite de registros en preferencias, perder\u00e1 la posibilidad de deshacer. \u00bfQuiere continuar?
33
limit_rows_in_memory=L\u00edmite de registros en memoria
34
numeric=Num\u00e9rico
35
numeric_value=Valor num\u00e9rico
36
operator=
37
optional=Opcional
38
parameter=Par\u00e1metro
39
python=
40
returns=Devuelve
41
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=Especifica el n\u00famero de registros\n  en memoria cuando se evalue la expresi\u00f3n,\n  reduciendose dr\u00e1sticamente la velocidad\n cuando se limite.
42
string=Cadena
43
string_value=Valor String
44
type=Tipo
45
value=Valor
46
without_limit=Sin l\u00edmite
47
_Expression_field=Calculadora de campos
48
_Expression_field_old=Calculadora de campos (antigua)
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_ro.properties
1
#Translations for language [ro]
2
#Mon Aug 06 08:50:49 CEST 2007
3
advanced=Inainta
4
boolean_value=
5
calculate_expression=
6
charging_operators=
7
clear_expression=
8
column=
9
commands=
10
continue?=
11
date=
12
date_value=
13
description=Descriere
14
double_value=
15
error=Eroare
16
error_expression=
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
18
evaluate=
19
evaluate_expression_with_errors=
20
explorer=
21
expression=
22
expressions=
23
expressions_from_file=
24
field=Camp
25
general=General
26
incorrect_file=
27
information=
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
30
limit_rows_in_memory=
31
numeric=
32
numeric_value=
33
operator=
34
parameter=
35
python=
36
returns=
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
38
string=
39
string_value=
40
type=Mod
41
value=Valoare
42
without_limit=
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_zh.properties
1
#Translations for language [zh]
2
#Mon Aug 06 08:50:49 CEST 2007
3
advanced=\u9ad8\u7ea7
4
boolean_value=
5
calculate_expression=
6
charging_operators=
7
clear_expression=
8
column=
9
commands=
10
continue?=
11
date=
12
date_value=
13
description=\u63cf\u8ff0
14
double_value=
15
error=\u9519\u8bef
16
error_expression=
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
18
evaluate=
19
evaluate_expression_with_errors=
20
explorer=
21
expression=
22
expressions=
23
expressions_from_file=
24
field=\u5b57\u6bb5
25
general=\u57fa\u672c\u8bbe\u7f6e
26
incorrect_file=
27
information=
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
30
limit_rows_in_memory=
31
numeric=
32
numeric_value=
33
operator=
34
parameter=
35
python=
36
returns=
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
38
string=
39
string_value=
40
type=\u7c7b\u578b
41
value=\u6570\u636e
42
without_limit=
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_en.properties
1
#Translations for language [en]
2
#Tue Jan 20 17:39:04 CET 2009
3
advanced=Advanced
4
boolean_value=Boolean value
5
calculate_expression=Calculate expression
6
charged_operators=
7
charging_operators=Charging operators
8
clear_expression=Clear expression
9
column=Column
10
commands=Commands
11
continue?=Continue?
12
date=Date
13
date_value=Date value
14
description=Description
15
double_value=
16
error=Error
17
error_expression=Error expression
18
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=Eval expression will be carried out right now\nwith current values in table.
19
evaluate=Evaluate
20
evaluate_expression_with_errors=Evaluated expressions with errors
21
explorer=Explorer
22
expression=Expression
23
expressions=Expressions
24
expressions_from_file=Expressions from file
25
field=Field
26
field_toolbar=
27
format=Format
28
general=General
29
incorrect_file=Incorrect file
30
information=Information
31
integer_value=
32
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=It has established a limit of rows in preferences, will lose the possibility to undo.  Wants to continue?
33
limit_rows_in_memory=Limit rows in memory
34
numeric=Numeric
35
numeric_value=Numeric value
36
operator=
37
optional=Optional
38
parameter=Parameter
39
python=
40
returns=Returns
41
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=Speficies the limit rows in memory when the program eval the expression\n The limit down the velocity.
42
string=String
43
string_value=String value
44
type=Type
45
value=Value
46
without_limit=Without limit
47
_Expression_field=Field calculator
48
_Expression_field_old=Field calculator (old)
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_gl.properties
1
#Translations for language [gl]
2
#Mon Aug 06 08:50:49 CEST 2007
3
advanced=Avanzada
4
boolean_value=
5
calculate_expression=
6
charging_operators=
7
clear_expression=
8
column=Columna
9
commands=
10
continue?=
11
date=
12
date_value=
13
description=Descripci\u00f3n
14
double_value=
15
error=Erro
16
error_expression=
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
18
evaluate=
19
evaluate_expression_with_errors=
20
explorer=
21
expression=
22
expressions=
23
expressions_from_file=
24
field=Campo
25
general=Xeral
26
incorrect_file=
27
information=
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
30
limit_rows_in_memory=
31
numeric=
32
numeric_value=
33
operator=
34
parameter=
35
python=
36
returns=
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
38
string=
39
string_value=
40
type=Tipo
41
value=Valor
42
without_limit=
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_ca.properties
1
#Translations for language [ca]
2
#Mon Aug 13 13:40:45 CEST 2007
3
advanced=Avan\u00e7ada
4
boolean_value=Valor boole\u00e0
5
calculate_expression=Calcular l'expressi\u00f3
6
charging_operators=Carregant operadors
7
clear_expression=Esborrar expressi\u00f3
8
column=Columna
9
commands=Comandaments
10
continue?=Vol continuar?
11
date=Data
12
date_value=Valor data
13
description=Descripci\u00f3
14
double_value=
15
error=Error
16
error_expression=Error en l'expressi\u00f3
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=El c\u00e0lcul de l'expressi\u00f3 es realitzar\u00e0 en este moment sobre els registres existents en la taula\n
18
evaluate=Avaluar
19
evaluate_expression_with_errors=Expressions avaluades amb errors
20
explorer=Explorar
21
expression=Expressi\u00f3
22
expressions=Expressions
23
expressions_from_file=Expressions de fitxer
24
field=Camp
25
general=General
26
incorrect_file=Fitxer incorrecte
27
information=Informaci\u00f3
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=T\u00e9 establit un l\u00edmit de registres en prefer\u00e8ncies, perdr\u00e0 la possibilitat de desfer. Vol continuar?\n
30
limit_rows_in_memory=L\u00edmit de registres en mem\u00f2ria
31
numeric=Num\u00e8ric
32
numeric_value=Valor num\u00e8ric
33
operator=
34
parameter=Par\u00e0metre
35
python=
36
returns=Torna
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=en mem\u00f2ria quan s'avalue l'expressi\u00f3, i es redu\u00efx dr\u00e0sticament la velocitat quan es limite
38
string=Cadena
39
string_value=Valor cadena
40
type=Tipus
41
value=Valor
42
without_limit=Sense l\u00edmit
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_pt.properties
1
#Translations for language [pt]
2
#Mon Aug 06 08:50:49 CEST 2007
3
advanced=
4
boolean_value=
5
calculate_expression=
6
charging_operators=
7
clear_expression=
8
column=
9
commands=
10
continue?=
11
date=
12
date_value=
13
description=Descri\u00e7\u00e3o
14
double_value=
15
error=Error
16
error_expression=
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
18
evaluate=
19
evaluate_expression_with_errors=
20
explorer=
21
expression=
22
expressions=
23
expressions_from_file=
24
field=
25
general=Geral
26
incorrect_file=
27
information=
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
30
limit_rows_in_memory=
31
numeric=
32
numeric_value=
33
operator=
34
parameter=
35
python=
36
returns=
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
38
string=
39
string_value=
40
type=Tipo
41
value=Valor
42
without_limit=
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_cs.properties
1
#Translations for language [cs]
2
#Thu Aug 16 08:33:37 CEST 2007
3
advanced=Pokro\u010dil\u00fd
4
boolean_value=Boolean hodnota
5
calculate_expression=Vypo\u010d\u00edtat v\u00fdraz
6
charging_operators=Napln\u011bn\u00ed oper\u00e1tor\u016f
7
clear_expression=Vymazat v\u00fdraz
8
column=Sloupec
9
commands=P\u0159\u00edkazy
10
continue?=Pokra\u010dovat?
11
date=Datum
12
date_value=Datum
13
description=Popis
14
double_value=
15
error=Error
16
error_expression=Chybn\u00fd v\u00fdraz
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=V\u00fdraz bude vyhodnocen te\u010f na z\u00e1klad\u011b\nsou\u010dasn\u00fdch hodnot v tabulce.
18
evaluate=Vyhodnotit
19
evaluate_expression_with_errors=Vyhodnotit v\u00fdraz s chybami
20
explorer=Pr\u016fzkumn\u00edk
21
expression=V\u00fdraz
22
expressions=V\u00fdrazy
23
expressions_from_file=V\u00fdrazy ze souboru
24
field=Polo\u017eka
25
general=Obecn\u00fd
26
incorrect_file=Chybn\u00fd soubor
27
information=Informace
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=Byl dosa\u017een \u0159\u00e1dkov\u00fd limit v nastaven\u00ed, bude ztracena mo\u017enost vracen\u00ed zm\u011bn. Chcete pokra\u010dovat?
30
limit_rows_in_memory=Omezen\u00ed \u0159\u00e1dk\u016f v pam\u011bti
31
numeric=\u010c\u00edseln\u00fd
32
numeric_value=\u010c\u00edseln\u00e1 hodnota
33
operator=
34
parameter=Parametr
35
python=
36
returns=Vr\u00e1tit se
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=Ud\u00e1v\u00e1 \u0159\u00e1dkov\u00e9 omezen\u00ed v pam\u011bti kdy\u017e prokram vyhodnocuje v\u00fdraz\n Omezen\u00ed sni\u017euje v\u00fdkon
38
string=\u0158et\u011bzec
39
string_value=Hodnota \u0159et\u011bzce
40
type=Typ
41
value=Hodnota
42
without_limit=Bez omezen\u00ed
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_ru.properties
1
#text_ru.properties
2
advanced=\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u043D\u044B\u0439
3
boolean_value=\u041B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
4
calculate_expresion=\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
5
charging_operators=\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B
6
clear_expresion=\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
7
column=\u041F\u043E\u043B\u0435
8
commands=\u041A\u043E\u043C\u0430\u043D\u0434\u044B
9
continue?=\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C?
10
date=\u0414\u0430\u0442\u0430
11
date_value=\u0412\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
12
description=\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435
13
error=\u041E\u0448\u0438\u0431\u043A\u0430
14
error_expresion=\u041E\u0448\u0438\u0431\u043E\u0447\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
15
eval_expresion_will_be_carried_out_right_now_with_current_values_in_table=\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E \n\u0441 \u0442\u0435\u043A\u0443\u0449\u0438\u043C\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F\u043C\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435
16
evaluate=\u0412\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C
17
evaluate_expresion_with_errors=\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C\u044B\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442 \u043E\u0448\u0438\u0431\u043A\u0438
18
explorer=\u041E\u0431\u0437\u043E\u0440
19
expresion=\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
20
expresions=\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F
21
expresions_from_file=\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0438\u0437 \u0444\u0430\u0439\u043B\u0430
22
field=\u041F\u043E\u043B\u0435
23
general=\u041E\u0431\u0449\u0438\u0435
24
incorrect_file=\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0444\u0430\u0439\u043B
25
information=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F
26
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0431\u0443\u0434\u0435\u0442 \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E, \u0442.\u043A. \u043B\u0438\u043C\u0438\u0442 \u0441\u0442\u0440\u043E\u043A \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445. \u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C?
27
limit_rows_in_memory=\u041B\u0438\u043C\u0438\u0442 \u0441\u0442\u0440\u043E\u043A \u0432 \u043F\u0430\u043C\u044F\u0442\u0438
28
numeric=\u0427\u0438\u0441\u043B\u043E
29
numeric_value=\u0427\u0438\u0441\u043B\u043E\u0432\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
30
operator=\u041A\u043E\u043C\u0430\u043D\u0434\u0430
31
parameter=\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B
32
returns=\u0412\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442
33
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expresion=\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043B\u0438\u043C\u0438\u0442 \u0441\u0442\u0440\u043E\u043A \u0432 \u043F\u0430\u043C\u044F\u0442\u0438 \u043F\u0440\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0438 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F. \n\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u043B\u0438\u043C\u0438\u0442\u0430 \u0441\u043D\u0438\u0436\u0430\u0435\u0442 \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F.
34
string=\u0422\u0435\u043A\u0441\u0442
35
string_value=\u0422\u0435\u043A\u0441\u0442\u043E\u0432\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
36
type=\u0422\u0438\u043F
37
value=\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435
38
without_limit=\u0411\u0435\u0437 \u043B\u0438\u043C\u0438\u0442\u0430
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_fr.properties
1
#Translations for language [fr]
2
#Mon Aug 06 08:50:49 CEST 2007
3
advanced=
4
boolean_value=
5
calculate_expression=
6
charging_operators=
7
clear_expression=
8
column=
9
commands=
10
continue?=
11
date=
12
date_value=
13
description=Description
14
double_value=
15
error=Error
16
error_expression=
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
18
evaluate=
19
evaluate_expression_with_errors=
20
explorer=
21
expression=
22
expressions=
23
expressions_from_file=
24
field=Colonne
25
general=G\u00e9n\u00e9ral
26
incorrect_file=
27
information=
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
30
limit_rows_in_memory=
31
numeric=
32
numeric_value=
33
operator=
34
parameter=
35
python=
36
returns=
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
38
string=
39
string_value=
40
type=Type
41
value=Valeur
42
without_limit=
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_de.properties
1
#Translations for language [de]
2
#Tue Jan 20 17:39:04 CET 2009
3
advanced=Erweitert
4
boolean_value=Boolscher Wert
5
calculate_expression=
6
charged_operators=
7
charging_operators=Ladezeit Operator
8
clear_expression=
9
column=Spalte
10
commands=Kommandos
11
continue?=Fortfahren?
12
date=Datum
13
date_value=Datums-Wert
14
description=Beschreibung
15
double_value=
16
error=Fehler
17
error_expression=
18
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
19
evaluate=Auswerten
20
evaluate_expression_with_errors=
21
explorer=Durchsuchen
22
expression=
23
expressions=
24
expressions_from_file=
25
field=Feld
26
field_toolbar=
27
format=Format
28
general=Allgemein
29
incorrect_file=Ung\u00fcltige Datei
30
information=Information
31
integer_value=
32
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=Zeilen- Limit wurde erreicht in den Eigenschaften, dieser Schritt kann nicht r\u00fcckg\u00e4ngi gemacht werden. Wollen Sie fortfahren?
33
limit_rows_in_memory=Zeilen- Limit erreicht
34
numeric=Numerisch
35
numeric_value=Numerischer Wert
36
operator=
37
optional=
38
parameter=Parameter
39
python=
40
returns=Ergebnis
41
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
42
string=Zeichenkette
43
string_value=Wert der Zeichenkette
44
type=Typ
45
value=Wert
46
without_limit=Ohne Beschr\u00e4nkung
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_eu.properties
1
#Translations for language [eu]
2
#Mon Aug 06 08:50:49 CEST 2007
3
advanced=Aurreratua
4
boolean_value=
5
calculate_expression=
6
charging_operators=
7
clear_expression=
8
column=Zutabea
9
commands=
10
continue?=
11
date=
12
date_value=
13
description=Deskripzioa
14
double_value=
15
error=Errorea
16
error_expression=
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
18
evaluate=
19
evaluate_expression_with_errors=
20
explorer=
21
expression=
22
expressions=
23
expressions_from_file=
24
field=Eremua
25
general=Orokorra
26
incorrect_file=
27
information=
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
30
limit_rows_in_memory=
31
numeric=
32
numeric_value=
33
operator=
34
parameter=
35
python=
36
returns=
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
38
string=
39
string_value=
40
type=Mota
41
value=Balioa
42
without_limit=
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_nl.properties
1
#Translations for language [nl]
2
#Mon Aug 06 08:50:49 CEST 2007
3
advanced=
4
boolean_value=
5
calculate_expression=
6
charging_operators=
7
clear_expression=
8
column=
9
commands=
10
continue?=
11
date=
12
date_value=
13
description=
14
double_value=
15
error=
16
error_expression=
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
18
evaluate=
19
evaluate_expression_with_errors=
20
explorer=
21
expression=
22
expressions=
23
expressions_from_file=
24
field=
25
general=
26
incorrect_file=
27
information=
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
30
limit_rows_in_memory=
31
numeric=
32
numeric_value=
33
operator=
34
parameter=
35
python=
36
returns=
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
38
string=
39
string_value=
40
type=
41
value=
42
without_limit=
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/i18n/text_pl.properties
1
#Translations for language [pl]
2
#Mon Aug 06 12:43:02 CEST 2007
3
advanced=Zaawansowane
4
boolean_value=
5
calculate_expression=
6
charging_operators=
7
clear_expression=
8
column=
9
commands=
10
continue?=
11
date=
12
date_value=
13
description=Opis
14
double_value=
15
error=B\u0142\u0105d
16
error_expression=
17
eval_expression_will_be_carried_out_right_now_with_current_values_in_table=
18
evaluate=
19
evaluate_expression_with_errors=
20
explorer=
21
expression=
22
expressions=
23
expressions_from_file=
24
field=Kolumna
25
general=Og\u00f3lne
26
incorrect_file=
27
information=
28
integer_value=
29
it_has_established_a_limit_of_rows_will_lose_the_possibility_to_undo_wants_to_continue=
30
limit_rows_in_memory=
31
numeric=
32
numeric_value=
33
operator=
34
parameter=
35
python=
36
returns=
37
specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression=
38
string=
39
string_value=
40
type=Typ
41
value=warto\u015b\u0107
42
without_limit=
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<plugin-config>
3
	<libraries library-dir="lib"/>
4
    <depends plugin-name="org.gvsig.app.document.table.app.mainplugin" />
5
	<resourceBundle name="text"/>
6
	<extensions>
7
		<extension class-name="org.gvsig.expressionfield.ExpressionFieldExtension"
8
			description="Extension that evaluate the expression to a column."
9
			active="true">
10

  
11
            <action
12
                name="table-expression-field"
13
                label="_Expression_field"
14
                tooltip="_Expression_field"
15
                position="501100000"
16
                action-command="table-expression-field"
17
                icon="table-expression-field"
18
                accelerator=""
19
                />
20

  
21
            <menu
22
                name="table-expression-field"
23
                text="Table/_Expression_field_old"
24
                />
25

  
26
<!--            <tool-bar name="table_tools">
27
                <action-tool
28
                    name="table-expression-field"
29
                    />
30
            </tool-bar>-->
31

  
32
		</extension>
33

  
34
		<extension class-name="org.gvsig.expressionfield.AboutExpressionFieldExtension"
35
			description="Extension to add about panel."
36
			active="false"
37
			priority="1">
38
		</extension>
39
	</extensions>
40
</plugin-config>
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/resources-plugin/iver.html
1
<html>
2
<body>
3

  
4
<img src="iver-logo.png"><br>
5

  
6
<h2>IVER</h2>
7
<br>
8

  
9
<p>Expression field</p>
10
<p>EN CONSTRUCCION</p>
11

  
12
</body>
13
</html>
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/assembly/gvsig-plugin-package.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

  
7
    This program is free software; you can redistribute it and/or
8
    modify it under the terms of the GNU General Public License
9
    as published by the Free Software Foundation; either version 3
10
    of the License, or (at your option) any later version.
11

  
12
    This program is distributed in the hope that it will be useful,
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
    GNU General Public License for more details.
16

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<assembly>
27
  <id>gvsig-plugin-package</id>
28
  <formats>
29
    <format>zip</format>
30
  </formats>
31
  <baseDirectory>${project.artifactId}</baseDirectory>
32
  <includeBaseDirectory>true</includeBaseDirectory>
33
  <files>
34
    <file>
35
      <source>target/${project.artifactId}-${project.version}.jar</source>
36
      <outputDirectory>lib</outputDirectory>
37
    </file>
38
    <file>
39
      <source>target/package.info</source>
40
    </file>
41
  </files>
42

  
43
  <fileSets>
44
    <fileSet>
45
      <directory>src/main/resources-plugin</directory>
46
      <outputDirectory>.</outputDirectory>
47
    </fileSet>
48
  </fileSets>
49

  
50
  <dependencySets>
51
    <dependencySet>
52
      <useProjectArtifact>false</useProjectArtifact>
53
      <useTransitiveDependencies>false</useTransitiveDependencies>
54
      <outputDirectory>lib</outputDirectory>
55
      <includes>
56
        <include>bsf:bsf</include>
57
        <include>org.python:jython</include>
58
        <include>com.fifesoft:rsyntaxtextarea</include>
59
      </includes>
60
    </dependencySet>
61
  </dependencySets>
62

  
63
</assembly>
64

  
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/java/org/gvsig/expressionfield/project/documents/table/FeatureIndex.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.expressionfield.project.documents.table;
27

  
28
/**
29
 * Utility class to use in Jython bean
30
 * 
31
 * @author jldominguez
32
 * 
33
 */
34
public class FeatureIndex {
35

  
36
	private long index = -1;
37

  
38
	public void next() {
39
		index++;
40
	}
41

  
42
	public void previous() {
43
		index--;
44
	}
45

  
46
	public long get() {
47
		return index;
48
	}
49

  
50
	public void set(long i) {
51
		index = i;
52
	}
53
}
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/java/org/gvsig/expressionfield/project/documents/table/IOperator.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.expressionfield.project.documents.table;
27

  
28
import org.apache.bsf.BSFException;
29
import org.apache.bsf.BSFManager;
30

  
31
/**
32
 * @author Vicente Caballero Navarro
33
 */
34
public interface IOperator {
35
	int NUMBER = 0;
36
	int STRING = 1;
37
	int DATE = 2;
38
	public String addText(String s);
39
	public String toString();
40
	public void eval(BSFManager interpreter) throws BSFException ;
41
	public boolean isEnable();
42
	public void setType(int fieldType);
43
	public String getTooltip();
44
}
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/FeatureContainer.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.expressionfield.project.documents.table.gui;
27

  
28
import org.gvsig.fmap.dal.feature.Feature;
29

  
30
public class FeatureContainer {
31
private Feature feature = null;
32

  
33
public Feature getFeature() {
34
	return feature;
35
}
36

  
37
public void setFeature(Feature feature) {
38
	this.feature = feature;
39
}
40

  
41
public boolean containsFeature() {
42
	return feature!=null;
43
}
44
}
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/SyntaxtHighlightTextComponent.java
1
package org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight;
2

  
3
import java.awt.event.ActionListener;
4
import java.awt.event.KeyListener;
5

  
6
import javax.swing.JScrollPane;
7
import javax.swing.text.JTextComponent;
8

  
9
public interface SyntaxtHighlightTextComponent {
10

  
11
	public interface UpdateCaretPositionActionEvent {
12
		public int getLine();
13
		public int getColumn();
14
		public boolean hasLineAndColumn();
15
	}
16
	
17
	public JTextComponent getJTextComponent();
18
	
19
	public JScrollPane getJScrollPane();
20
	
21
	public void setText(String text);
22
	
23
	public String getText();
24
	
25
	public void setContentType(String contentType);
26
	
27
	public String getContentType();
28
	
29
	public void addUpdateCaretPositionActionListener(ActionListener updateCaretPosition);
30
	
31
	public void addKeyListener(KeyListener keyListener);
32
	
33
}
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/JRSyntaxTextArea.java
1
package org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight;
2

  
3
import java.awt.event.ActionEvent;
4
import java.awt.event.ActionListener;
5
import java.awt.event.KeyListener;
6

  
7
import javax.swing.JScrollPane;
8
import javax.swing.event.CaretEvent;
9
import javax.swing.event.CaretListener;
10
import javax.swing.text.JTextComponent;
11

  
12
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
13
import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
14
import org.fife.ui.rtextarea.RTextScrollPane;
15

  
16

  
17
public class JRSyntaxTextArea implements SyntaxtHighlightTextComponent {
18

  
19
	public class DefaultUpdateCaretPositionActionEvent extends ActionEvent implements UpdateCaretPositionActionEvent {
20

  
21
		/**
22
		 * 
23
		 */
24
		private static final long serialVersionUID = 8238486105726094074L;
25
		int line = -1;
26
		int column = -1;
27
		
28
		public DefaultUpdateCaretPositionActionEvent(Object source, int id,
29
				String command, int line, int column) {
30
			super(source, id, command);
31
			this.line = line;
32
			this.column = column;
33
		}
34

  
35
		public int getLine() {
36
			return this.line+1;
37
		}
38

  
39
		public int getColumn() {
40
			return this.column;
41
		}
42

  
43
		public boolean hasLineAndColumn() {
44
			return this.line >=0 && this.column >= 0;
45
		}
46
		
47
	}
48
	
49
	protected ActionListener updateCaretPosition = null;
50
	protected RSyntaxTextArea textArea = null;
51
	
52
	public JRSyntaxTextArea() {
53
		this.textArea = new RSyntaxTextArea(20, 60);
54
		this.init();
55
	}
56
	
57
	protected void init() {
58
		textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_PYTHON);
59
		textArea.setCodeFoldingEnabled(true);
60
		textArea.setClearWhitespaceLinesEnabled(true);
61
		textArea.setAutoIndentEnabled(true);
62
		textArea.setCloseCurlyBraces(true);
63
		textArea.setWhitespaceVisible(true);
64
		textArea.setAnimateBracketMatching(true);
65
		textArea.setBracketMatchingEnabled(true);
66
		textArea.setAutoIndentEnabled(true);
67
		textArea.setTabsEmulated(true);
68
		textArea.setTabSize(2);
69
		textArea.setAntiAliasingEnabled(true);
70
		
71
		textArea.addCaretListener(new CaretListener() {
72
			public void caretUpdate(CaretEvent e) {
73
				if( updateCaretPosition== null ) {
74
					return;
75
				}
76
				updateCaretPosition.actionPerformed(
77
						new DefaultUpdateCaretPositionActionEvent(textArea, 1, "position", textArea.getCaretLineNumber(), textArea.getCaretOffsetFromLineStart() ) 
78
				);
79
			}
80
			
81
		});
82
	}
83
	
84
	public void setContentType(String contentType) {
85
		this.textArea.setSyntaxEditingStyle(contentType);
86
	}
87
	
88
	public JScrollPane getJScrollPane() {
89
		return  new RTextScrollPane(this.textArea);
90
	}
91

  
92
	public JTextComponent getJTextComponent() {
93
		return this.textArea;
94
	}
95

  
96
	public String getContentType() {
97
		return this.textArea.getSyntaxEditingStyle();
98
	}
99
	
100
	public void addUpdateCaretPositionActionListener(ActionListener updateCaretPosition) {
101
		this.updateCaretPosition = updateCaretPosition;  
102
	}
103

  
104
	public void setText(String text) {
105
		this.textArea.setText(text);
106
	}
107

  
108
	public String getText() {
109
		return this.textArea.getText();
110
	}
111
	
112
	public void addKeyListener(KeyListener keyListener) {
113
		this.textArea.addKeyListener(keyListener);
114
	}
115
}
org.gvsig.expressionfield/tags/org.gvsig.expressionfield-2.0.135/src/main/java/org/gvsig/expressionfield/project/documents/table/gui/syntaxhighlight/styles/JavaStyledDocument.java
1
package org.gvsig.expressionfield.project.documents.table.gui.syntaxhighlight.styles;
2

  
3
import java.awt.Color;
4
import java.util.HashSet;
5
import java.util.Set;
6

  
7
import javax.swing.text.AttributeSet;
8
import javax.swing.text.BadLocationException;
9
import javax.swing.text.DefaultEditorKit;
10
import javax.swing.text.DefaultStyledDocument;
11
import javax.swing.text.Element;
12
import javax.swing.text.MutableAttributeSet;
13
import javax.swing.text.SimpleAttributeSet;
14
import javax.swing.text.StyleConstants;
15

  
16

  
17
public class JavaStyledDocument extends DefaultStyledDocument {
18
	/**
19
	 * 
20
	 */
21
	private static final long serialVersionUID = 2859530660266127826L;
22
	
23
	private final DefaultStyledDocument doc;
24
	private final Element rootElement;
25

  
26
	private boolean multiLineComment;
27
	private final MutableAttributeSet normal;
28
	private final MutableAttributeSet keyword;
29
	private final MutableAttributeSet comment;
30
	private final MutableAttributeSet quote;
31

  
32
    private final Set<String> keywords;
33

  
34
	public JavaStyledDocument()
35
	{
36
		doc = this;
37
		rootElement = doc.getDefaultRootElement();
38
		putProperty( DefaultEditorKit.EndOfLineStringProperty, "\n" );
39

  
40
		normal = new SimpleAttributeSet();
41
		StyleConstants.setForeground(normal, Color.black);
42

  
43
		comment = new SimpleAttributeSet();
44
		StyleConstants.setForeground(comment, Color.gray);
45
		StyleConstants.setItalic(comment, true);
46

  
47
		keyword = new SimpleAttributeSet();
48
		StyleConstants.setForeground(keyword, Color.blue);
49

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff