Revision 46062

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView2.xml
25 25
    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
26 26
   </super>
27 27
   <at name="id">/home/osc/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView2.xml</at>
28
   <at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
29
   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
28
   <at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
29
   <at name="colspecs">FILL:4DLU:NONE,FILL:PREF:GROW(1.0),FILL:4DLU:NONE</at>
30 30
   <at name="components">
31 31
    <object classname="java.util.LinkedList">
32 32
     <item >
......
39 39
           <at name="row">3</at>
40 40
           <at name="colspan">1</at>
41 41
           <at name="rowspan">1</at>
42
           <at name="halign">default</at>
42
           <at name="halign">fill</at>
43 43
           <at name="valign">default</at>
44 44
           <at name="insets" object="insets">0,0,0,0</at>
45 45
          </object>
......
113 113
                      </at>
114 114
                      <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
115 115
                     </super>
116
                     <at name="id">embedded.144833476</at>
117
                     <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
116
                     <at name="id">embedded.841917527</at>
117
                     <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE</at>
118 118
                     <at name="colspecs">FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
119 119
                     <at name="components">
120 120
                      <object classname="java.util.LinkedList">
......
1562 1562
                           </at>
1563 1563
                           <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
1564 1564
                          </super>
1565
                          <at name="id">embedded.1065650622</at>
1565
                          <at name="id">embedded.828030512</at>
1566 1566
                          <at name="rowspecs">CENTER:DEFAULT:NONE</at>
1567 1567
                          <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at>
1568 1568
                          <at name="components">
......
1791 1791
                                </at>
1792 1792
                               </object>
1793 1793
                              </at>
1794
                              <at name="name"/>
1794
                              <at name="name"></at>
1795 1795
                              <at name="fill">
1796 1796
                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
1797 1797
                                <at name="name">fill</at>
......
1884 1884
                           <at name="name">scollBars</at>
1885 1885
                           <at name="verticalpolicy">21</at>
1886 1886
                           <at name="horizontalpolicy">31</at>
1887
                           <at name="scrollname"></at>
1887 1888
                           <at name="border">
1888 1889
                            <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
1889 1890
                             <super classname="com.jeta.forms.store.properties.BorderProperty">
1890 1891
                              <at name="name">border</at>
1891 1892
                             </super>
1892 1893
                             <at name="borders">
1893
                              <object classname="java.util.LinkedList">
1894
                               <item >
1895
                                <at name="value">
1896
                                 <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
1897
                                  <super classname="com.jeta.forms.store.properties.BorderProperty">
1898
                                   <at name="name">border</at>
1899
                                  </super>
1900
                                 </object>
1901
                                </at>
1902
                               </item>
1903
                              </object>
1894
                              <object classname="java.util.LinkedList"/>
1904 1895
                             </at>
1905 1896
                            </object>
1906 1897
                           </at>
......
1913 1904
                     <at name="cellpainters">
1914 1905
                      <object classname="com.jeta.forms.store.support.Matrix">
1915 1906
                       <at name="rows">
1916
                        <object classname="[Ljava.lang.Object;" size="9">
1907
                        <object classname="[Ljava.lang.Object;" size="8">
1917 1908
                         <at name="item" index="0">
1918 1909
                          <object classname="[Ljava.lang.Object;" size="22"/>
1919 1910
                         </at>
......
1938 1929
                         <at name="item" index="7">
1939 1930
                          <object classname="[Ljava.lang.Object;" size="22"/>
1940 1931
                         </at>
1941
                         <at name="item" index="8">
1942
                          <object classname="[Ljava.lang.Object;" size="22"/>
1943
                         </at>
1944 1932
                        </object>
1945 1933
                       </at>
1946 1934
                      </object>
......
1992 1980
                      </at>
1993 1981
                      <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
1994 1982
                     </super>
1995
                     <at name="id">embedded.2116625043</at>
1983
                     <at name="id">embedded.267765443</at>
1996 1984
                     <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE</at>
1997 1985
                     <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
1998 1986
                     <at name="components">
......
2042 2030
                               </object>
2043 2031
                              </at>
2044 2032
                              <at name="name">lblExpressionDeBusqueda</at>
2045
                              <at name="width">1478</at>
2033
                              <at name="width">1418</at>
2046 2034
                              <at name="text">_Insert_a_search_expression</at>
2047 2035
                              <at name="fill">
2048 2036
                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
......
2281 2269
                              <at name="scrollableTracksViewportHeight">true</at>
2282 2270
                              <at name="scrollableTracksViewportWidth">true</at>
2283 2271
                              <at name="name">txtAdvancedExpression</at>
2284
                              <at name="width">1476</at>
2272
                              <at name="width">1416</at>
2285 2273
                              <at name="scollBars">
2286 2274
                               <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
2287 2275
                                <at name="name">scollBars</at>
......
2309 2297
                                </at>
2310 2298
                               </object>
2311 2299
                              </at>
2312
                              <at name="height">101</at>
2300
                              <at name="height">98</at>
2313 2301
                             </object>
2314 2302
                            </at>
2315 2303
                           </object>
......
2417 2405
              </at>
2418 2406
             </object>
2419 2407
            </at>
2420
            <at name="width">1591</at>
2408
            <at name="width">1531</at>
2421 2409
            <at name="tabCount">2</at>
2422
            <at name="height">215</at>
2410
            <at name="height">212</at>
2423 2411
           </object>
2424 2412
          </at>
2425 2413
         </object>
......
2437 2425
           <at name="row">6</at>
2438 2426
           <at name="colspan">1</at>
2439 2427
           <at name="rowspan">1</at>
2440
           <at name="halign">default</at>
2441
           <at name="valign">default</at>
2428
           <at name="halign">fill</at>
2429
           <at name="valign">fill</at>
2442 2430
           <at name="insets" object="insets">0,0,0,0</at>
2443 2431
          </object>
2444 2432
         </at>
......
2506 2494
                      </at>
2507 2495
                      <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
2508 2496
                     </super>
2509
                     <at name="id">embedded.1156456014</at>
2497
                     <at name="id">embedded.172364792</at>
2510 2498
                     <at name="rowspecs">CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE</at>
2511 2499
                     <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
2512 2500
                     <at name="components">
......
2556 2544
                               </object>
2557 2545
                              </at>
2558 2546
                              <at name="name">tblResults</at>
2559
                              <at name="width">1546</at>
2547
                              <at name="width">1486</at>
2560 2548
                              <at name="scollBars">
2561 2549
                               <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
2562 2550
                                <at name="name">scollBars</at>
......
2609 2597
                           </at>
2610 2598
                          </object>
2611 2599
                         </at>
2612
                         <at name="name"></at>
2600
                         <at name="name"/>
2613 2601
                         <at name="fill">
2614 2602
                          <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
2615 2603
                           <at name="name">fill</at>
......
2710 2698
                      </at>
2711 2699
                      <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
2712 2700
                     </super>
2713
                     <at name="id">embedded.1590943023</at>
2701
                     <at name="id">embedded.309731997</at>
2714 2702
                     <at name="rowspecs">CENTER:2DLU:NONE,FILL:4DLU:GROW(1.0),CENTER:2DLU:NONE</at>
2715 2703
                     <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
2716 2704
                     <at name="components">
......
2760 2748
                               </object>
2761 2749
                              </at>
2762 2750
                              <at name="name">tblSearchPostProcessResults</at>
2763
                              <at name="width">1546</at>
2751
                              <at name="width">1486</at>
2764 2752
                              <at name="scollBars">
2765 2753
                               <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
2766 2754
                                <at name="name">scollBars</at>
......
2813 2801
                           </at>
2814 2802
                          </object>
2815 2803
                         </at>
2816
                         <at name="name"></at>
2804
                         <at name="name"/>
2817 2805
                         <at name="fill">
2818 2806
                          <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
2819 2807
                           <at name="name">fill</at>
......
2890 2878
              </at>
2891 2879
             </object>
2892 2880
            </at>
2893
            <at name="width">1591</at>
2881
            <at name="width">1531</at>
2894 2882
            <at name="tabCount">2</at>
2895
            <at name="height">183</at>
2883
            <at name="height">473</at>
2896 2884
           </object>
2897 2885
          </at>
2898 2886
         </object>
......
2910 2898
           <at name="row">4</at>
2911 2899
           <at name="colspan">1</at>
2912 2900
           <at name="rowspan">1</at>
2913
           <at name="halign">default</at>
2901
           <at name="halign">right</at>
2914 2902
           <at name="valign">default</at>
2915 2903
           <at name="insets" object="insets">0,0,0,0</at>
2916 2904
          </object>
2917 2905
         </at>
2918 2906
         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
2919 2907
        </super>
2920
        <at name="id">embedded.597778654</at>
2908
        <at name="id">embedded.2110383056</at>
2921 2909
        <at name="rowspecs">CENTER:DEFAULT:NONE</at>
2922
        <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at>
2910
        <at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:10PX:NONE</at>
2923 2911
        <at name="components">
2924 2912
         <object classname="java.util.LinkedList">
2925 2913
          <item >
......
3107 3095
              </at>
3108 3096
             </object>
3109 3097
            </at>
3110
            <at name="name"></at>
3098
            <at name="name"/>
3111 3099
            <at name="fill">
3112 3100
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
3113 3101
              <at name="name">fill</at>
......
3149 3137
          <at name="rows">
3150 3138
           <object classname="[Ljava.lang.Object;" size="1">
3151 3139
            <at name="item" index="0">
3152
             <object classname="[Ljava.lang.Object;" size="6"/>
3140
             <object classname="[Ljava.lang.Object;" size="7"/>
3153 3141
            </at>
3154 3142
           </object>
3155 3143
          </at>
......
3179 3167
         <at name="cellconstraints">
3180 3168
          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
3181 3169
           <at name="column">2</at>
3182
           <at name="row">8</at>
3170
           <at name="row">2</at>
3183 3171
           <at name="colspan">1</at>
3184 3172
           <at name="rowspan">1</at>
3185
           <at name="halign">default</at>
3173
           <at name="halign">right</at>
3186 3174
           <at name="valign">default</at>
3187 3175
           <at name="insets" object="insets">0,0,0,0</at>
3188 3176
          </object>
3189 3177
         </at>
3190 3178
         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
3191 3179
        </super>
3192
        <at name="id">embedded.142712284</at>
3180
        <at name="id">embedded.700102769</at>
3193 3181
        <at name="rowspecs">CENTER:DEFAULT:NONE</at>
3194
        <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at>
3182
        <at name="colspecs">FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:10PX:NONE</at>
3195 3183
        <at name="components">
3196 3184
         <object classname="java.util.LinkedList">
3197 3185
          <item >
......
3200 3188
             <super classname="com.jeta.forms.store.memento.ComponentMemento">
3201 3189
              <at name="cellconstraints">
3202 3190
               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
3203
                <at name="column">1</at>
3191
                <at name="column">3</at>
3204 3192
                <at name="row">1</at>
3205 3193
                <at name="colspan">1</at>
3206 3194
                <at name="rowspan">1</at>
......
3212 3200
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
3213 3201
             </super>
3214 3202
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
3215
             <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
3203
             <at name="beanclass">javax.swing.JButton</at>
3216 3204
             <at name="beanproperties">
3217 3205
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
3218
               <at name="classname">com.jeta.forms.components.label.JETALabel</at>
3206
               <at name="classname">javax.swing.JButton</at>
3219 3207
               <at name="properties">
3220 3208
                <object classname="com.jeta.forms.store.support.PropertyMap">
3221 3209
                 <at name="border">
......
3227 3215
                    <object classname="java.util.LinkedList">
3228 3216
                     <item >
3229 3217
                      <at name="value">
3230
                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
3218
                       <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
3231 3219
                        <super classname="com.jeta.forms.store.properties.BorderProperty">
3232 3220
                         <at name="name">border</at>
3233 3221
                        </super>
3222
                        <at name="top">2</at>
3223
                        <at name="left">2</at>
3224
                        <at name="bottom">2</at>
3225
                        <at name="right">2</at>
3234 3226
                       </object>
3235 3227
                      </at>
3236 3228
                     </item>
......
3238 3230
                   </at>
3239 3231
                  </object>
3240 3232
                 </at>
3241
                 <at name="name">lblMsg</at>
3242
                 <at name="width">1564</at>
3243
                 <at name="fill">
3244
                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
3245
                   <at name="name">fill</at>
3233
                 <at name="actionCommand">...</at>
3234
                 <at name="name">btnHistory</at>
3235
                 <at name="width">12</at>
3236
                 <at name="height">12</at>
3237
                </object>
3238
               </at>
3239
              </object>
3240
             </at>
3241
            </object>
3242
           </at>
3243
          </item>
3244
          <item >
3245
           <at name="value">
3246
            <object classname="com.jeta.forms.store.memento.BeanMemento">
3247
             <super classname="com.jeta.forms.store.memento.ComponentMemento">
3248
              <at name="cellconstraints">
3249
               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
3250
                <at name="column">5</at>
3251
                <at name="row">1</at>
3252
                <at name="colspan">1</at>
3253
                <at name="rowspan">1</at>
3254
                <at name="halign">default</at>
3255
                <at name="valign">default</at>
3256
                <at name="insets" object="insets">0,0,0,0</at>
3257
               </object>
3258
              </at>
3259
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
3260
             </super>
3261
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
3262
             <at name="beanclass">javax.swing.JButton</at>
3263
             <at name="beanproperties">
3264
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
3265
               <at name="classname">javax.swing.JButton</at>
3266
               <at name="properties">
3267
                <object classname="com.jeta.forms.store.support.PropertyMap">
3268
                 <at name="border">
3269
                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
3270
                   <super classname="com.jeta.forms.store.properties.BorderProperty">
3271
                    <at name="name">border</at>
3272
                   </super>
3273
                   <at name="borders">
3274
                    <object classname="java.util.LinkedList">
3275
                     <item >
3276
                      <at name="value">
3277
                       <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
3278
                        <super classname="com.jeta.forms.store.properties.BorderProperty">
3279
                         <at name="name">border</at>
3280
                        </super>
3281
                        <at name="top">2</at>
3282
                        <at name="left">2</at>
3283
                        <at name="bottom">2</at>
3284
                        <at name="right">2</at>
3285
                       </object>
3286
                      </at>
3287
                     </item>
3288
                    </object>
3289
                   </at>
3246 3290
                  </object>
3247 3291
                 </at>
3292
                 <at name="actionCommand">...</at>
3293
                 <at name="name">btnBookmarks</at>
3294
                 <at name="width">12</at>
3248 3295
                 <at name="height">12</at>
3249 3296
                </object>
3250 3297
               </at>
......
3259 3306
             <super classname="com.jeta.forms.store.memento.ComponentMemento">
3260 3307
              <at name="cellconstraints">
3261 3308
               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
3262
                <at name="column">3</at>
3309
                <at name="column">7</at>
3263 3310
                <at name="row">1</at>
3264 3311
                <at name="colspan">1</at>
3265 3312
                <at name="rowspan">1</at>
......
3277 3324
               <at name="classname">javax.swing.JPanel</at>
3278 3325
               <at name="properties">
3279 3326
                <object classname="com.jeta.forms.store.support.PropertyMap">
3280
                 <at name="name">pnlActions</at>
3327
                 <at name="opaque">false</at>
3328
                 <at name="name">pnlCfgActions</at>
3281 3329
                 <at name="width">12</at>
3282 3330
                 <at name="height">12</at>
3283 3331
                </object>
......
3346 3394
          <at name="rows">
3347 3395
           <object classname="[Ljava.lang.Object;" size="1">
3348 3396
            <at name="item" index="0">
3349
             <object classname="[Ljava.lang.Object;" size="3"/>
3397
             <object classname="[Ljava.lang.Object;" size="8"/>
3350 3398
            </at>
3351 3399
           </object>
3352 3400
          </at>
......
3376 3424
         <at name="cellconstraints">
3377 3425
          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
3378 3426
           <at name="column">2</at>
3379
           <at name="row">2</at>
3427
           <at name="row">8</at>
3380 3428
           <at name="colspan">1</at>
3381 3429
           <at name="rowspan">1</at>
3382 3430
           <at name="halign">default</at>
......
3386 3434
         </at>
3387 3435
         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
3388 3436
        </super>
3389
        <at name="id">embedded.2083673009</at>
3437
        <at name="id">embedded.21265004</at>
3390 3438
        <at name="rowspecs">CENTER:DEFAULT:NONE</at>
3391
        <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE</at>
3439
        <at name="colspecs">FILL:DEFAULT:NONE,FILL:6PX:NONE,FILL:DEFAULT:NONE,FILL:6PX:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE</at>
3392 3440
        <at name="components">
3393 3441
         <object classname="java.util.LinkedList">
3394 3442
          <item >
......
3397 3445
             <super classname="com.jeta.forms.store.memento.ComponentMemento">
3398 3446
              <at name="cellconstraints">
3399 3447
               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
3400
                <at name="column">7</at>
3448
                <at name="column">1</at>
3401 3449
                <at name="row">1</at>
3402 3450
                <at name="colspan">1</at>
3403 3451
                <at name="rowspan">1</at>
......
3409 3457
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
3410 3458
             </super>
3411 3459
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
3412
             <at name="beanclass">javax.swing.JPanel</at>
3460
             <at name="beanclass">javax.swing.JProgressBar</at>
3413 3461
             <at name="beanproperties">
3414 3462
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
3415
               <at name="classname">javax.swing.JPanel</at>
3463
               <at name="classname">javax.swing.JProgressBar</at>
3416 3464
               <at name="properties">
3417 3465
                <object classname="com.jeta.forms.store.support.PropertyMap">
3418
                 <at name="opaque">false</at>
3419
                 <at name="name">pnlCfgActions</at>
3420
                 <at name="width">12</at>
3421
                 <at name="height">12</at>
3466
                 <at name="border">
3467
                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
3468
                   <super classname="com.jeta.forms.store.properties.BorderProperty">
3469
                    <at name="name">border</at>
3470
                   </super>
3471
                   <at name="borders">
3472
                    <object classname="java.util.LinkedList">
3473
                     <item >
3474
                      <at name="value">
3475
                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
3476
                        <super classname="com.jeta.forms.store.properties.BorderProperty">
3477
                         <at name="name">border</at>
3478
                        </super>
3479
                       </object>
3480
                      </at>
3481
                     </item>
3482
                    </object>
3483
                   </at>
3484
                  </object>
3485
                 </at>
3486
                 <at name="name">pgbStatus</at>
3487
                 <at name="width">148</at>
3488
                 <at name="height">14</at>
3422 3489
                </object>
3423 3490
               </at>
3424 3491
              </object>
......
3444 3511
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
3445 3512
             </super>
3446 3513
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
3447
             <at name="beanclass">javax.swing.JButton</at>
3514
             <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
3448 3515
             <at name="beanproperties">
3449 3516
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
3450
               <at name="classname">javax.swing.JButton</at>
3517
               <at name="classname">com.jeta.forms.components.label.JETALabel</at>
3451 3518
               <at name="properties">
3452 3519
                <object classname="com.jeta.forms.store.support.PropertyMap">
3453 3520
                 <at name="border">
......
3459 3526
                    <object classname="java.util.LinkedList">
3460 3527
                     <item >
3461 3528
                      <at name="value">
3462
                       <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
3529
                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
3463 3530
                        <super classname="com.jeta.forms.store.properties.BorderProperty">
3464 3531
                         <at name="name">border</at>
3465 3532
                        </super>
3466
                        <at name="top">2</at>
3467
                        <at name="left">2</at>
3468
                        <at name="bottom">2</at>
3469
                        <at name="right">2</at>
3470 3533
                       </object>
3471 3534
                      </at>
3472 3535
                     </item>
......
3474 3537
                   </at>
3475 3538
                  </object>
3476 3539
                 </at>
3477
                 <at name="actionCommand">...</at>
3478
                 <at name="name">btnHistory</at>
3540
                 <at name="name">lblStatusTitle</at>
3479 3541
                 <at name="width">12</at>
3542
                 <at name="fill">
3543
                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
3544
                   <at name="name">fill</at>
3545
                  </object>
3546
                 </at>
3480 3547
                 <at name="height">12</at>
3481 3548
                </object>
3482 3549
               </at>
......
3503 3570
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
3504 3571
             </super>
3505 3572
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
3506
             <at name="beanclass">javax.swing.JButton</at>
3573
             <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
3507 3574
             <at name="beanproperties">
3508 3575
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
3509
               <at name="classname">javax.swing.JButton</at>
3576
               <at name="classname">com.jeta.forms.components.label.JETALabel</at>
3510 3577
               <at name="properties">
3511 3578
                <object classname="com.jeta.forms.store.support.PropertyMap">
3512 3579
                 <at name="border">
......
3518 3585
                    <object classname="java.util.LinkedList">
3519 3586
                     <item >
3520 3587
                      <at name="value">
3521
                       <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
3588
                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
3522 3589
                        <super classname="com.jeta.forms.store.properties.BorderProperty">
3523 3590
                         <at name="name">border</at>
3524 3591
                        </super>
3525
                        <at name="top">2</at>
3526
                        <at name="left">2</at>
3527
                        <at name="bottom">2</at>
3528
                        <at name="right">2</at>
3529 3592
                       </object>
3530 3593
                      </at>
3531 3594
                     </item>
......
3533 3596
                   </at>
3534 3597
                  </object>
3535 3598
                 </at>
3536
                 <at name="actionCommand">...</at>
3537
                 <at name="name">btnBookmarks</at>
3599
                 <at name="name">lblMsg</at>
3600
                 <at name="width">1330</at>
3601
                 <at name="fill">
3602
                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
3603
                   <at name="name">fill</at>
3604
                  </object>
3605
                 </at>
3606
                 <at name="height">12</at>
3607
                </object>
3608
               </at>
3609
              </object>
3610
             </at>
3611
            </object>
3612
           </at>
3613
          </item>
3614
          <item >
3615
           <at name="value">
3616
            <object classname="com.jeta.forms.store.memento.BeanMemento">
3617
             <super classname="com.jeta.forms.store.memento.ComponentMemento">
3618
              <at name="cellconstraints">
3619
               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
3620
                <at name="column">6</at>
3621
                <at name="row">1</at>
3622
                <at name="colspan">1</at>
3623
                <at name="rowspan">1</at>
3624
                <at name="halign">default</at>
3625
                <at name="valign">default</at>
3626
                <at name="insets" object="insets">0,0,0,0</at>
3627
               </object>
3628
              </at>
3629
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
3630
             </super>
3631
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
3632
             <at name="beanclass">javax.swing.JPanel</at>
3633
             <at name="beanproperties">
3634
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
3635
               <at name="classname">javax.swing.JPanel</at>
3636
               <at name="properties">
3637
                <object classname="com.jeta.forms.store.support.PropertyMap">
3638
                 <at name="name">pnlActions</at>
3538 3639
                 <at name="width">12</at>
3539 3640
                 <at name="height">12</at>
3540 3641
                </object>
......
3561 3662
              </at>
3562 3663
             </object>
3563 3664
            </at>
3564
            <at name="name"></at>
3665
            <at name="name"/>
3565 3666
            <at name="fill">
3566 3667
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
3567 3668
              <at name="name">fill</at>
......
3603 3704
          <at name="rows">
3604 3705
           <object classname="[Ljava.lang.Object;" size="1">
3605 3706
            <at name="item" index="0">
3606
             <object classname="[Ljava.lang.Object;" size="7"/>
3707
             <object classname="[Ljava.lang.Object;" size="6"/>
3607 3708
            </at>
3608 3709
           </object>
3609 3710
          </at>
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView2.java
7 7
import java.awt.ComponentOrientation;
8 8
import java.awt.Container;
9 9
import java.awt.Dimension;
10
import java.awt.event.WindowAdapter;
11
import java.awt.event.WindowEvent;
10 12
import javax.swing.Box;
11 13
import javax.swing.ImageIcon;
12 14
import javax.swing.JButton;
......
14 16
import javax.swing.JFrame;
15 17
import javax.swing.JLabel;
16 18
import javax.swing.JPanel;
19
import javax.swing.JProgressBar;
17 20
import javax.swing.JScrollPane;
18 21
import javax.swing.JTabbedPane;
19 22
import javax.swing.JTable;
......
55 58
   JButton btnAdvancedExpressionHistory = new JButton();
56 59
   JButton btnAdvancedExpressionBookmarks = new JButton();
57 60
   JTextArea txtAdvancedExpression = new JTextArea();
61
   JTabbedPane tabResults = new JTabbedPane();
62
   JTable tblResults = new JTable();
63
   JTable tblSearchPostProcessResults = new JTable();
58 64
   JButton btnClear = new JButton();
59 65
   JButton btnSearch = new JButton();
60 66
   JButton btnSearchPostProcess = new JButton();
67
   JButton btnHistory = new JButton();
68
   JButton btnBookmarks = new JButton();
69
   JPanel pnlCfgActions = new JPanel();
70
   JProgressBar pgbStatus = new JProgressBar();
71
   JLabel lblStatusTitle = new JLabel();
61 72
   JLabel lblMsg = new JLabel();
62 73
   JPanel pnlActions = new JPanel();
63
   JPanel pnlCfgActions = new JPanel();
64
   JButton btnHistory = new JButton();
65
   JButton btnBookmarks = new JButton();
66
   JTabbedPane tabResults = new JTabbedPane();
67
   JPanel grdView1 = new JPanel();
68
   JTable tblResults = new JTable();
69
   JPanel grdView2 = new JPanel();
70
   JTable tblSearchPostProcessResults = new JTable();
71 74

  
72 75
   /**
73 76
    * Default constructor
......
78 81
   }
79 82

  
80 83
   /**
84
    * Main method for panel
85
    */
86
   public static void main(String[] args)
87
   {
88
      JFrame frame = new JFrame();
89
      frame.setSize(600, 400);
90
      frame.setLocation(100, 100);
91
      frame.getContentPane().add(new DefaultSearchPanelView2());
92
      frame.setVisible(true);
93

  
94
      frame.addWindowListener( new WindowAdapter()
95
      {
96
         public void windowClosing( WindowEvent evt )
97
         {
98
            System.exit(0);
99
         }
100
      });
101
   }
102

  
103
   /**
81 104
    * Adds fill components to empty cells in the first row and first column of the grid.
82 105
    * This ensures that the grid spacing will be the same as shown in the designer.
83 106
    * @param cols an array of column indices in the first row where fill components should be added.
......
159 182
   public JPanel createPanel()
160 183
   {
161 184
      JPanel jpanel1 = new JPanel();
162
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
185
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:PREF:GROW(1.0),FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
163 186
      CellConstraints cc = new CellConstraints();
164 187
      jpanel1.setLayout(formlayout1);
165 188

  
......
169 192
      tabSearchMode.setTabPlacement(JTabbedPane.BOTTOM);
170 193
      tabSearchMode.addTab("_Simplified",null,createPanel1());
171 194
      tabSearchMode.addTab("_Advanced",null,createPanel3());
172
      jpanel1.add(tabSearchMode,cc.xy(2,3));
195
      jpanel1.add(tabSearchMode,new CellConstraints(2,3,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));
173 196

  
174
      jpanel1.add(createPanel4(),new CellConstraints(2,4,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
175
      jpanel1.add(createPanel5(),cc.xy(2,8));
176
      jpanel1.add(createPanel6(),cc.xy(2,2));
177 197
      tabResults.setName("tabResults");
178
      tabResults.addTab("_normalResults",null,creategrdView1());
179
      tabResults.addTab("_searchPostProcessResults",null,creategrdView2());
180
      jpanel1.add(tabResults,new CellConstraints(2,6,1,1,CellConstraints.DEFAULT,CellConstraints.FILL));
198
      tabResults.addTab("_normalResults",null,createPanel4());
199
      tabResults.addTab("_searchPostProcessResults",null,createPanel5());
200
      jpanel1.add(tabResults,new CellConstraints(2,6,1,1,CellConstraints.FILL,CellConstraints.FILL));
181 201

  
202
      jpanel1.add(createPanel6(),new CellConstraints(2,4,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
203
      jpanel1.add(createPanel7(),new CellConstraints(2,2,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
204
      jpanel1.add(createPanel8(),cc.xy(2,8));
182 205
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9 });
183 206
      return jpanel1;
184 207
   }
......
186 209
   public JPanel createPanel1()
187 210
   {
188 211
      JPanel jpanel1 = new JPanel();
189
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
212
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(120PX;DEFAULT):NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
190 213
      CellConstraints cc = new CellConstraints();
191 214
      jpanel1.setLayout(formlayout1);
192 215

  
......
294 317
      jpanel1.add(lblNull4,cc.xy(21,4));
295 318

  
296 319
      jpanel1.add(createPanel2(),cc.xywh(2,8,20,1));
297
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 },new int[]{ 1,2,3,4,5,6,7,8,9 });
320
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 },new int[]{ 1,2,3,4,5,6,7,8 });
298 321
      return jpanel1;
299 322
   }
300 323

  
......
376 399
   public JPanel createPanel4()
377 400
   {
378 401
      JPanel jpanel1 = new JPanel();
379
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:6PX:NONE","CENTER:DEFAULT:NONE");
402
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE");
380 403
      CellConstraints cc = new CellConstraints();
381 404
      jpanel1.setLayout(formlayout1);
382 405

  
406
      tblResults.setName("tblResults");
407
      JScrollPane jscrollpane1 = new JScrollPane();
408
      jscrollpane1.setViewportView(tblResults);
409
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
410
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
411
      jpanel1.add(jscrollpane1,cc.xy(2,2));
412

  
413
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
414
      return jpanel1;
415
   }
416

  
417
   public JPanel createPanel5()
418
   {
419
      JPanel jpanel1 = new JPanel();
420
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:4DLU:GROW(1.0),CENTER:2DLU:NONE");
421
      CellConstraints cc = new CellConstraints();
422
      jpanel1.setLayout(formlayout1);
423

  
424
      tblSearchPostProcessResults.setName("tblSearchPostProcessResults");
425
      JScrollPane jscrollpane1 = new JScrollPane();
426
      jscrollpane1.setViewportView(tblSearchPostProcessResults);
427
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
428
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
429
      jpanel1.add(jscrollpane1,cc.xy(2,2));
430

  
431
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
432
      return jpanel1;
433
   }
434

  
435
   public JPanel createPanel6()
436
   {
437
      JPanel jpanel1 = new JPanel();
438
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:10PX:NONE","CENTER:DEFAULT:NONE");
439
      CellConstraints cc = new CellConstraints();
440
      jpanel1.setLayout(formlayout1);
441

  
383 442
      btnClear.setActionCommand("Limpiar");
384 443
      btnClear.setName("btnClear");
385 444
      btnClear.setText("_Clear");
......
399 458
      return jpanel1;
400 459
   }
401 460

  
402
   public JPanel createPanel5()
461
   public JPanel createPanel7()
403 462
   {
404 463
      JPanel jpanel1 = new JPanel();
405
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
464
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:10PX:NONE","CENTER:DEFAULT:NONE");
406 465
      CellConstraints cc = new CellConstraints();
407 466
      jpanel1.setLayout(formlayout1);
408 467

  
409
      lblMsg.setName("lblMsg");
410
      jpanel1.add(lblMsg,cc.xy(1,1));
411

  
412
      pnlActions.setName("pnlActions");
413
      jpanel1.add(pnlActions,cc.xy(3,1));
414

  
415
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
416
      return jpanel1;
417
   }
418

  
419
   public JPanel createPanel6()
420
   {
421
      JPanel jpanel1 = new JPanel();
422
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
423
      CellConstraints cc = new CellConstraints();
424
      jpanel1.setLayout(formlayout1);
425

  
426
      pnlCfgActions.setName("pnlCfgActions");
427
      pnlCfgActions.setOpaque(false);
428
      jpanel1.add(pnlCfgActions,cc.xy(7,1));
429

  
430 468
      btnHistory.setActionCommand("...");
431 469
      btnHistory.setName("btnHistory");
432 470
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
......
439 477
      btnBookmarks.setBorder(emptyborder2);
440 478
      jpanel1.add(btnBookmarks,cc.xy(5,1));
441 479

  
442
      addFillComponents(jpanel1,new int[]{ 1,2,4,6 },new int[]{ 1 });
480
      pnlCfgActions.setName("pnlCfgActions");
481
      pnlCfgActions.setOpaque(false);
482
      jpanel1.add(pnlCfgActions,cc.xy(7,1));
483

  
484
      addFillComponents(jpanel1,new int[]{ 1,2,4,6,8 },new int[]{ 1 });
443 485
      return jpanel1;
444 486
   }
445 487

  
446
   public JPanel creategrdView1()
488
   public JPanel createPanel8()
447 489
   {
448
      grdView1.setName("grdView1");
449
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE");
490
      JPanel jpanel1 = new JPanel();
491
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:6PX:NONE,FILL:DEFAULT:NONE,FILL:6PX:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
450 492
      CellConstraints cc = new CellConstraints();
451
      grdView1.setLayout(formlayout1);
493
      jpanel1.setLayout(formlayout1);
452 494

  
453
      tblResults.setName("tblResults");
454
      JScrollPane jscrollpane1 = new JScrollPane();
455
      jscrollpane1.setViewportView(tblResults);
456
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
457
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
458
      grdView1.add(jscrollpane1,cc.xy(2,2));
495
      pgbStatus.setName("pgbStatus");
496
      jpanel1.add(pgbStatus,cc.xy(1,1));
459 497

  
460
      addFillComponents(grdView1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
461
      return grdView1;
462
   }
498
      lblStatusTitle.setName("lblStatusTitle");
499
      jpanel1.add(lblStatusTitle,cc.xy(3,1));
463 500

  
464
   public JPanel creategrdView2()
465
   {
466
      grdView2.setName("grdView2");
467
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:4DLU:GROW(1.0),CENTER:2DLU:NONE");
468
      CellConstraints cc = new CellConstraints();
469
      grdView2.setLayout(formlayout1);
501
      lblMsg.setName("lblMsg");
502
      jpanel1.add(lblMsg,cc.xy(5,1));
470 503

  
471
      tblSearchPostProcessResults.setName("tblSearchPostProcessResults");
472
      JScrollPane jscrollpane1 = new JScrollPane();
473
      jscrollpane1.setViewportView(tblSearchPostProcessResults);
474
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
475
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
476
      grdView2.add(jscrollpane1,cc.xy(2,2));
504
      pnlActions.setName("pnlActions");
505
      jpanel1.add(pnlActions,cc.xy(6,1));
477 506

  
478
      addFillComponents(grdView2,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
479
      return grdView2;
507
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]);
508
      return jpanel1;
480 509
   }
481 510

  
482 511
   /**
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanel.java
29 29
import javax.swing.ImageIcon;
30 30
import javax.swing.JButton;
31 31
import javax.swing.JComponent;
32
import javax.swing.JLabel;
33 32
import javax.swing.JMenuItem;
34 33
import javax.swing.JOptionPane;
35 34
import javax.swing.JPopupMenu;
36
import javax.swing.JProgressBar;
37 35
import javax.swing.JTable;
38 36
import javax.swing.ListSelectionModel;
39 37
import javax.swing.SwingUtilities;
......
618 616
        this.pnlCfgActions.add(configurableActions, BorderLayout.CENTER);
619 617
        
620 618
        this.taskStatusController = ToolsSwingLocator.getTaskStatusSwingManager().createTaskStatusController(
621
                new JLabel(), 
622
                new JLabel(), 
623
                new JProgressBar());
619
                this.lblStatusTitle, 
620
                this.lblMsg, 
621
                this.pgbStatus);
622
		this.pgbStatus.setVisible(false);
624 623

  
625 624
        this.conditionPanels.add(
626 625
                new SearchConditionPanelSimplified(
......
855 854

  
856 855
    @Override
857 856
    public void clear() {
858
        this.lblMsg.setText("");
857
        this.taskStatusController.setTitle("");
859 858
        if (this.conditionPanels == null) {
860 859
            return;
861 860
        }
......
911 910
        lblMsg.setText(ToolsLocator.getI18nManager().getTranslation("_Searching")+"...");
912 911
        setEnabled(false);
913 912
        Thread th = new Thread(() -> {
914
            try {
915
            SearchParameters searchParams;
916
            try {
917
                searchParams = this.fetch(this.parameters.getCopy()); // esto lo actualiza a la ultima // decidir si se devuelve clonado
913
        try {
914
				SearchParameters searchParams;
915
				try {
916
					searchParams = this.fetch(this.parameters.getCopy()); // esto lo actualiza a la ultima // decidir si se devuelve clonado
918 917

  
919
                Date date = Calendar.getInstance().getTime();
920
                DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
921
                String strDate = dateFormat.format(date);
922
                searchParams.setName("Params: " + strDate);
923
            } catch (Exception ex) {
924
                LOGGER.warn("Not able to create search parameters.", ex);
925
                lblMsg.setText(ToolsLocator.getI18nManager().getTranslation("_Errors_fetching_new_query")+"...");
926
                resetTable();
927
                return;
928
            }
929
            doSearch(searchParams);
930
                        } catch (Exception ex) {
931
                LOGGER.warn("Search panel has errors during the search", ex);
932
                resetTable();
933
            } finally {
934
                SwingUtilities.invokeLater(() -> {
935
                    setEnabled(true);
936
                });
937
            }
918
					Date date = Calendar.getInstance().getTime();
919
					DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
920
					String strDate = dateFormat.format(date);
921
					searchParams.setName("Params: " + strDate);
922
				} catch (Exception ex) {
923
					LOGGER.warn("Not able to create search parameters.", ex);
924
					this.taskStatusController.setTitle(ToolsLocator.getI18nManager().getTranslation("_Errors_fetching_new_query") + "...");
925
					resetTable();
926
					return;
927
				}
928
				doSearch(searchParams);
929
			} catch (Exception ex) {
930
				LOGGER.warn("Search panel has errors during the search", ex);
931
				resetTable();
932
			} finally {
933
				SwingUtilities.invokeLater(() -> {
934
					setEnabled(true);
935
				});
936
			}
938 937
        });
939 938
        th.start();
940 939
    }
......
942 941
    private void doSearch(SearchParameters searchParams)  {
943 942
            final MutableObject model = new MutableObject(null);       
944 943
            final MutableLong rowCount=new MutableLong();
944
			Cursor savedCursor = this.getCursor();
945
		    SimpleTaskStatus status = ToolsLocator.getTaskStatusManager().createDefaultSimpleTaskStatus("");
946
			status.setAutoremove(true);
947
			status.add();
948
			this.taskStatusController.bind(status);
945 949
            try {
950
				status.setTitle(ToolsLocator.getI18nManager().getTranslation("_Processing_search"));
951
				SwingUtilities.invokeLater(() -> {this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));});
946 952
                final List<Feature> features;
947 953
                 FeatureQuery myQuery;
948 954
//                myQuery = this.getQuery().getCopy();
......
962 968
                rowCount.setValue(tableModel.getRowCount());
963 969
            } catch (Exception ex) {
964 970
                LOGGER.warn("Search not able to be executed. Can't get features or create table model", ex);
965
                lblMsg.setText(ToolsLocator.getI18nManager().getTranslation("_Errors_getting_new_feature_set") + "...");
971
                status.setTitle(ToolsLocator.getI18nManager().getTranslation("_Errors_getting_new_feature_set") + "...");
972
				status.abort();
966 973
                resetTable();
967 974
            } finally {
968 975
                SwingUtilities.invokeLater(() -> {
......
976 983
                            ((SimpleFeaturesTableModelImpl) oldmodel).dispose();
977 984
                        }
978 985
                        if (resultModel.hasErrors()) {
979
                            lblMsg.setText(i18n.getTranslation("_Errors_occurred_during_search"));
986
                            status.setTitle(i18n.getTranslation("_Errors_occurred_during_search"));
980 987
                        } else {
981
                            lblMsg.setText(String.format("%d " + i18n.getTranslation("_elements"), rowCount.getValue()));
988
                            status.setTitle(String.format("%d " + i18n.getTranslation("_elements"), rowCount.getValue()));
982 989
                        }
983 990
                        if (this.parameters != null && this.parameters.getQuery() != null) {
984 991
                            this.history.add(searchParams);                   
985 992
                        }
986 993
                    } catch (Exception ex) {
987 994
                        LOGGER.warn(" Errors occurred during search getting old model", ex);
988
                        lblMsg.setText(i18n.getTranslation("_Errors_occurred_during_search"));
995
                        status.setTitle(i18n.getTranslation("_Errors_occurred_during_search"));
989 996
                    } finally {
990 997
                        setEnabled(true);
998
						status.terminate();
999
						this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
991 1000
                    }
992 1001
                });
993 1002
            }
......
1191 1200
            try {
1192 1201
                this.processing = true;
1193 1202
                this.setEnabled(false);
1203
				status.setTitle(ToolsLocator.getI18nManager().getTranslation("_Copying_rows_to_clipboard"));
1194 1204
                SwingUtilities.invokeLater(() -> {this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));});
1195 1205

  
1196 1206
                SimpleFeaturesTableModel model = null;
......
1224 1234
                }
1225 1235

  
1226 1236
                //from( 0, selection.length)
1227
                
1237

  
1228 1238
                status.setRangeOfValues(0, selection.length);
1229 1239
                excelStr.append(LINE_BREAK);
1230 1240
                for (int i : selection) {
......
1279 1289
            } finally {
1280 1290
                this.processing = false;
1281 1291
                SwingUtilities.invokeLater(() -> {this.setCursor(savedCursor);});
1282
                this.setEnabled(true);
1292
				status.setTitle(ToolsLocator.getI18nManager().getTranslation("_Copy_ended"));
1293
                this.updateComponentState();
1283 1294
            }
1284 1295
        }, "SearchPanelCopyRows");
1285 1296
        task.start();
......
1607 1618
            SearchPostProcessFactory factory,
1608 1619
            DynObject parameters
1609 1620
            ) {
1621
		Cursor savedCursor = this.getCursor();
1622
		SimpleTaskStatus status = ToolsLocator.getTaskStatusManager().createDefaultSimpleTaskStatus("");
1623
        status.setAutoremove(true);
1624
        status.add();
1625
        this.taskStatusController.bind(status);
1610 1626
        Thread task = new Thread(() -> {
1611 1627
            try {
1628
				SwingUtilities.invokeLater(() -> {this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));});
1612 1629
                this.processing = true;
1613
                this.updateComponentState();
1630
                this.updateComponentState();				
1614 1631
                SearchPostProcess process = factory.createProcess(factory, input, query, parameters);
1615 1632

  
1616 1633
                if (parameters != null) {
1617 1634
                    process.setParameters(parameters);
1618 1635
                }
1619 1636
                //Ejecutar el execute en thread para no bloquear el software
1620
                SearchPostProcess.SearchPostProcessResult output = process.execute(input, query, parameters);
1621
                this.postProcessStore = output.getStore();
1622
                this.postProcessQuery = output.getQuery();
1637
                SearchPostProcess.SearchPostProcessResult output = process.execute(input, query, parameters, status);
1638
				if (output != null) {
1639
					this.postProcessStore = output.getStore();
1640
					this.postProcessQuery = output.getQuery();
1641

  
1642
					doLoadSearchPostProccessResults(this.postProcessStore);
1643

  
1644
				}
1623 1645
                this.currentPostProcess = factory.getName();
1624
                SwingUtilities.invokeLater(() -> { // Añade a la cola de eventos un evento a ejecutar de código
1625
                    doLoadSearchPostProccessResults(this.postProcessStore);
1626
                });
1646
				status.terminate();
1647
				
1627 1648
            }catch (Exception ex){
1628 1649
                LOGGER.warn("SearchPostProcess not able to be executed.", ex);
1629 1650
                resetPostProcessTable();
1630
                
1651
				status.setTitle(ToolsLocator.getI18nManager().getTranslation("_Error_in_post_process_operation"));
1652
				status.message("");
1653
				status.abort();
1631 1654
            } finally {
1655
				SwingUtilities.invokeLater(() -> {this.setCursor(savedCursor);});
1632 1656
                this.processing = false;
1633 1657
                this.updateComponentState();
1634 1658
            }
......
1639 1663
    }
1640 1664

  
1641 1665
    private void doLoadSearchPostProccessResults(FeatureStore input) {
1666
		if (!SwingUtilities.isEventDispatchThread()) {
1667
            SwingUtilities.invokeLater(() -> {
1668
				doLoadSearchPostProccessResults(input);
1669
			});
1670
            return;
1671
        }
1642 1672

  
1643 1673
        final List<Feature> featuresSearchPostProccessResults;
1644 1674
        final FeatureQuery finalQuery;
......
1680 1710
            SwingUtilities.invokeLater(this::updateComponentState);
1681 1711
            return;
1682 1712
        }
1713
        this.pgbStatus.setVisible(processing);
1683 1714
        this.setEnabled(!processing);
1684 1715
    }
1685 1716
    
......
1733 1764
        I18nManager i18n = ToolsLocator.getI18nManager();
1734 1765
        
1735 1766
        if (model.hasErrors()) {
1736
            lblMsg.setText(i18n.getTranslation("_Errors_occurred_load_search_post_process"));
1767
            this.taskStatusController.setTitle(i18n.getTranslation("_Errors_occurred_load_search_post_process"));
1737 1768
        } else {
1738
            lblMsg.setText(String.format("%d " + i18n.getTranslation("_elements"), model.getRowCount()));
1769
            this.taskStatusController.setTitle(String.format("%d " + i18n.getTranslation("_elements"), model.getRowCount()));
1739 1770
        }
1740 1771
    }
1741 1772
    
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchPostProcess/distinctOn/DistinctOn.java
5 5
 */
6 6
package org.gvsig.fmap.dal.swing.impl.searchPostProcess.distinctOn;
7 7

  
8

  
9 8
import java.io.File;
10 9
import java.util.Collection;
11 10
import java.util.HashMap;
......
36 35
import org.gvsig.fmap.dal.swing.searchPostProcess.SearchPostProcessFactory;
37 36
import org.gvsig.tools.ToolsLocator;
38 37
import org.gvsig.tools.dataTypes.DataType;
38
import org.gvsig.tools.dispose.DisposeUtils;
39 39
import org.gvsig.tools.dynobject.DynObject;
40 40
import org.gvsig.tools.folders.FoldersManager;
41
import org.gvsig.tools.i18n.I18nManager;
42
import org.gvsig.tools.task.SimpleTaskStatus;
41 43
import org.gvsig.tools.util.HasAFile;
42 44
import org.slf4j.LoggerFactory;
43 45

  
44

  
45 46
/**
46 47
 *
47 48
 * @author jovivas
48 49
 */
49
public class DistinctOn extends AbstractSearchPostProcess{
50
    
51
    private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(DistinctOnFactory.class);
52
    
53
    public DistinctOn (
54
        SearchPostProcessFactory factory,
55
        FeatureStore input,
56
        FeatureQuery query,
57
        DynObject parameters
58
        
59
    ){
60
        super( factory, input, query, parameters);
50
public class DistinctOn extends AbstractSearchPostProcess {
61 51

  
62
    }
52
	private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(DistinctOnFactory.class);
63 53

  
64
    
65
    @Override
66
    public  SearchPostProcessResult execute (FeatureStore inputStore, FeatureQuery query, DynObject parameters){  
67
        String uniqueFieldName;
68
        
69
        uniqueFieldName = (String) parameters.getDynValue("field");
70
        
71
        try {
72
            // crear ruta de archivo temporal
73
            FoldersManager foldersManager = ToolsLocator.getFoldersManager();
74
            File tempFile = foldersManager.getUniqueTemporaryFile("distinctOn_process_"+ UUID.randomUUID().toString());
75
            
76
            // crear SERVER STORE
77
            DataManager dataManager = DALLocator.getDataManager();
78
            JDBCServerExplorerParameters serverParameters = (JDBCServerExplorerParameters) dataManager.createServerExplorerParameters("H2Spatial");
79
            ((HasAFile) serverParameters).setFile(tempFile);
80
            JDBCServerExplorer serverExplorer = (JDBCServerExplorer) dataManager.openServerExplorer("H2Spatial",serverParameters);
54
	public DistinctOn(
55
		SearchPostProcessFactory factory,
56
		FeatureStore input,
57
		FeatureQuery query,
58
		DynObject parameters
59
	) {
60
		super(factory, input, query, parameters);
81 61

  
82
            
83
            //Crear tablas en server store
84
            JDBCNewStoreParameters parametersResults = serverExplorer.getAddParameters();
85
            parametersResults.setDynValue("Table", "results");
86
            FeatureType ft_inputStore = inputStore.getDefaultFeatureType();
87
            EditableFeatureType ft_inputStoreNoContainer = dataManager.createFeatureType();
88
            ft_inputStoreNoContainer.addAll(ft_inputStore);
89
            for (FeatureAttributeDescriptor attr : ft_inputStore) {
90
                DataType dataType = attr.getDataType();
91
                EditableFeatureAttributeDescriptor eattr = ft_inputStoreNoContainer.getEditableAttributeDescriptor(attr.getName());
92
                if (dataType.isContainer()){
93
                    ft_inputStoreNoContainer.remove(attr.getName());
94
                } 
95
                if (eattr.isComputed()){
96
                    eattr.setFeatureAttributeEmulator((FeatureAttributeEmulator) null);  
97
                }    
98
                if (eattr.isPrimaryKey()){
99
                    eattr.setIsPrimaryKey(false); 
100
                }
101
                if (!eattr.allowIndexDuplicateds()){
102
                    eattr.setAllowIndexDuplicateds(true);
103
                }                  
104
            }
105
            Map<String, EditableFeatureAttributeDescriptor> allExtraColumns = new HashMap<>();
106
            for (EditableFeatureAttributeDescriptor column : ft_inputStore.getExtraColumns().getColumns()) {
107
                allExtraColumns.put(column.getName(), column);
108
            }
109
            for (EditableFeatureAttributeDescriptor column : query.getExtraColumn().getColumns()) {
110
                allExtraColumns.put(column.getName(), column);
111
            }
112
            if (allExtraColumns.size()>0) {
113
                for (EditableFeatureAttributeDescriptor column : allExtraColumns.values()) {
114
                    DataType dataType = column.getDataType();
115
                    if (!dataType.isContainer()){
116
                        ft_inputStoreNoContainer.add(column.getName(), column.getType(), column.getSize());
117
                    } 
118
                }
119
            }
62
	}
120 63

  
121
            parametersResults.setDefaultFeatureType(ft_inputStoreNoContainer);     
64
	@Override
65
	public SearchPostProcessResult execute(FeatureStore inputStore, FeatureQuery query, DynObject parameters, SimpleTaskStatus status) {
66
		String uniqueFieldName;
122 67

  
123
            serverExplorer.add("H2Spatial", parametersResults, true);
68
		uniqueFieldName = (String) parameters.getDynValue("field");
124 69

  
125
            
126
            DataStoreParameters storeParametersResults = dataManager.createStoreParameters("H2Spatial");
127
            storeParametersResults.setDynValue("database_file",tempFile);
128
            storeParametersResults.setDynValue("Table","results");
129
            
130
            //Creaci?n del store con los resultados
131
            FeatureStore storeResults = (FeatureStore) dataManager.openStore("H2Spatial",storeParametersResults);
70
		I18nManager i18n = ToolsLocator.getI18nManager();
71
		if (status == null) {
72
			status = ToolsLocator.getTaskStatusManager().createDefaultSimpleTaskStatus(i18n.getTranslation("_Executing_post_process"));
73
			status.setAutoremove(true);
74
			status.add();
75
		} else {
76
			status.push();
77
			status.setTitle(i18n.getTranslation("_Executing_post_process"));
78
		}
79
		status.message(i18n.getTranslation("_Creating_data_base"));
132 80

  
133
            // Creaci?n del Map con las funciones de agragado
134
            Map <String, AggregateOperation> aggregates = new HashMap <>();
135
            for (FeatureAttributeDescriptor attr : ft_inputStoreNoContainer) {
136
                if (parameters.hasDynValue(attr.getName())){
137
                    String operation = (String) parameters.getDynValue(attr.getName());
138
                    aggregates.put(
139
                            attr.getName(),
140
                            (AggregateOperation) aggregatesOperationFactories.get(operation).create()
141
                    );
142
                }                 
143
            }
144
            
145
            // distictOn
146
            
147
            storeResults.edit(FeatureStore.MODE_APPEND);
81
		try {
82
			// crear ruta de archivo temporal
83
			FoldersManager foldersManager = ToolsLocator.getFoldersManager();
84
			File tempFile = foldersManager.getUniqueTemporaryFile("distinctOn_process_" + UUID.randomUUID().toString());
148 85

  
149
            FeatureSet features;
150
            if (query != null){
151
                features = inputStore.getFeatureSet(query);
152
            }else{
153
                features = inputStore.getFeatureSet();
154
            }
155
            EditableFeature aggregateFeature = null; 
156
            for (Feature feature : features) {
157
                if (aggregateFeature != null) {
158
                    if (Objects.equals(feature.get(uniqueFieldName), aggregateFeature.get(uniqueFieldName))) {
159
                        for (Map.Entry<String, AggregateOperation> entry : aggregates.entrySet()) {
160
                            String name = entry.getKey();
161
                            AggregateOperation operation = entry.getValue();
162
                            Object value = feature.get(name);
163
                            if (operation.isApplicable(value)) {
164
                                operation.perform(value);
165
                            }
166
                            aggregateFeature.set(name, operation.getValue());
167
                        }
168
                    } else {
169
                        storeResults.insert(aggregateFeature);
170
                        aggregateFeature = null;
171
                    }
172
                }
173
                
174
                if (aggregateFeature == null) {
175
                    aggregateFeature = storeResults.createNewFeature(feature);
176
                    for (Map.Entry<String, AggregateOperation> entry : aggregates.entrySet()) {
177
                        String name = entry.getKey();
178
                        AggregateOperation operation = entry.getValue();
179
                        operation.reset();
180
                        Object value = feature.get(name);
181
                        if (operation.isApplicable(value)) {
182
                            operation.perform(value);
183
                        }
184
                        aggregateFeature.set(name, operation.getValue());
185
                    }
186
                }
86
			// crear SERVER STORE
87
			DataManager dataManager = DALLocator.getDataManager();
88
			JDBCServerExplorerParameters serverParameters = (JDBCServerExplorerParameters) dataManager.createServerExplorerParameters("H2Spatial");
89
			((HasAFile) serverParameters).setFile(tempFile);
90
			JDBCServerExplorer serverExplorer = (JDBCServerExplorer) dataManager.openServerExplorer("H2Spatial", serverParameters);
187 91

  
188
            }
189
            if (aggregateFeature!=null) {
190
                storeResults.insert(aggregateFeature);
191
            }
192
            
193
            storeResults.finishEditing();
92
			//Crear tablas en server store
93
			JDBCNewStoreParameters parametersResults = serverExplorer.getAddParameters();
94
			parametersResults.setDynValue("Table", "results");
95
			FeatureType ft_inputStore = inputStore.getDefaultFeatureType();
96
			EditableFeatureType ft_inputStoreNoContainer = dataManager.createFeatureType();
97
			ft_inputStoreNoContainer.addAll(ft_inputStore);
98
			for (FeatureAttributeDescriptor attr : ft_inputStore) {
99
				DataType dataType = attr.getDataType();
100
				EditableFeatureAttributeDescriptor eattr = ft_inputStoreNoContainer.getEditableAttributeDescriptor(attr.getName());
101
				if (dataType.isContainer()) {
102
					ft_inputStoreNoContainer.remove(attr.getName());
103
				}
104
				if (eattr.isComputed()) {
105
					eattr.setFeatureAttributeEmulator((FeatureAttributeEmulator) null);
106
				}
107
				if (eattr.isPrimaryKey()) {
108
					eattr.setIsPrimaryKey(false);
109
				}
110
				if (!eattr.allowIndexDuplicateds()) {
111
					eattr.setAllowIndexDuplicateds(true);
112
				}
113
			}
114
			Map<String, EditableFeatureAttributeDescriptor> allExtraColumns = new HashMap<>();
115
			for (EditableFeatureAttributeDescriptor column : ft_inputStore.getExtraColumns().getColumns()) {
116
				allExtraColumns.put(column.getName(), column);
117
			}
118
			for (EditableFeatureAttributeDescriptor column : query.getExtraColumn().getColumns()) {
119
				allExtraColumns.put(column.getName(), column);
120
			}
121
			if (allExtraColumns.size() > 0) {
122
				for (EditableFeatureAttributeDescriptor column : allExtraColumns.values()) {
123
					DataType dataType = column.getDataType();
124
					if (!dataType.isContainer()) {
125
						ft_inputStoreNoContainer.add(column.getName(), column.getType(), column.getSize());
126
					}
127
				}
128
			}
129

  
130
			parametersResults.setDefaultFeatureType(ft_inputStoreNoContainer);
131

  
132
			serverExplorer.add("H2Spatial", parametersResults, true);
133

  
134
			DataStoreParameters storeParametersResults = dataManager.createStoreParameters("H2Spatial");
135
			storeParametersResults.setDynValue("database_file", tempFile);
136
			storeParametersResults.setDynValue("Table", "results");
137

  
138
			//Creaci?n del store con los resultados
139
			FeatureStore storeResults = (FeatureStore) dataManager.openStore("H2Spatial", storeParametersResults);
140

  
141
			// Creaci?n del Map con las funciones de agragado
142
			Map<String, AggregateOperation> aggregates = new HashMap<>();
143
			for (FeatureAttributeDescriptor attr : ft_inputStoreNoContainer) {
144
				if (parameters.hasDynValue(attr.getName())) {
145
					String operation = (String) parameters.getDynValue(attr.getName());
146
					aggregates.put(
147
						attr.getName(),
148
						(AggregateOperation) aggregatesOperationFactories.get(operation).create()
149
					);
150
				}
151
			}
152

  
153
			// distictOn
154
			storeResults.edit(FeatureStore.MODE_APPEND);
155

  
156
			FeatureSet features;
157

  
158
			status.message(i18n.getTranslation("_Getting_features_from_query"));
159

  
160
			if (query != null) {
161
				features = inputStore.getFeatureSet(query);
162
			} else {
163
				features = inputStore.getFeatureSet();
164
			}
165
			EditableFeature aggregateFeature = null;
166

  
167
			status.message(i18n.getTranslation("_Processing_features"));
168
			status.setRangeOfValues(0, features.size());
169

  
170
			for (Feature feature : features) {
171
				if (status.isCancellationRequested()) {
172
					DisposeUtils.disposeQuietly(features);
173
					if (storeResults.isEditing()) {
174
						storeResults.cancelEditingQuietly();
175
					}
176

  
177
					status.setTitle(i18n.getTranslation("_Post_process_canceled"));
178
					status.message("");
179
					status.cancel();
180
					return null;
181
				}
182
				if (aggregateFeature != null) {
183
					if (Objects.equals(feature.get(uniqueFieldName), aggregateFeature.get(uniqueFieldName))) {
184
						for (Map.Entry<String, AggregateOperation> entry : aggregates.entrySet()) {
185
							String name = entry.getKey();
186
							AggregateOperation operation = entry.getValue();
187
							Object value = feature.get(name);
188
							if (operation.isApplicable(value)) {
189
								operation.perform(value);
190
							}
191
							aggregateFeature.set(name, operation.getValue());
192
						}
193
					} else {
194
						storeResults.insert(aggregateFeature);
195
						aggregateFeature = null;
196
					}
197
				}
198

  
199
				if (aggregateFeature == null) {
200
					aggregateFeature = storeResults.createNewFeature(feature);
201
					for (Map.Entry<String, AggregateOperation> entry : aggregates.entrySet()) {
202
						String name = entry.getKey();
203
						AggregateOperation operation = entry.getValue();
204
						operation.reset();
205
						Object value = feature.get(name);
206
						if (operation.isApplicable(value)) {
207
							operation.perform(value);
208
						}
209
						aggregateFeature.set(name, operation.getValue());
210
					}
211
				}
212
				status.incrementCurrentValue();
213
			}
214
			if (aggregateFeature != null) {
215
				storeResults.insert(aggregateFeature);
216
			}
217

  
218
			storeResults.finishEditing();
194 219
//            storeUValues.finishEditing();
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff