Revision 3408

View differences:

org.gvsig.legend.vectorfilterexpression.app.mainplugin/tags/org.gvsig.legend.vectorfilterexpression.app.mainplugin-1.0.94/buildNumber.properties
1
#Thu Apr 16 10:38:50 CEST 2020
2
buildNumber=97
org.gvsig.legend.vectorfilterexpression.app.mainplugin/tags/org.gvsig.legend.vectorfilterexpression.app.mainplugin-1.0.94/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
<!-- No dependencies
51
  <dependencySets>
52
    <dependencySet>
53
      <useProjectArtifact>false</useProjectArtifact>
54
      <useTransitiveDependencies>false</useTransitiveDependencies>
55
      <outputDirectory>lib</outputDirectory>
56
      <includes>
57
		<include>...</include>
58
      </includes>
59
    </dependencySet>
60
  </dependencySets>
61
-->
62

  
63
</assembly>
64

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

  
26

  
27
import java.util.ArrayList;
28
import org.gvsig.fmap.dal.DALLocator;
29
import org.gvsig.fmap.dal.DataManager;
30
import org.gvsig.fmap.dal.exception.InitializeException;
31

  
32
import org.slf4j.Logger;
33
import org.slf4j.LoggerFactory;
34

  
35
import org.gvsig.fmap.dal.feature.Feature;
36
import org.gvsig.fmap.geom.Geometry;
37
import org.gvsig.fmap.geom.GeometryLocator;
38
import org.gvsig.fmap.geom.GeometryManager;
39
import org.gvsig.fmap.mapcontext.MapContextLocator;
40
import org.gvsig.fmap.mapcontext.MapContextManager;
41
import org.gvsig.fmap.mapcontext.rendering.legend.events.SymbolLegendEvent;
42
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
43
import org.gvsig.i18n.Messages;
44
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend;
45
import org.gvsig.tools.ToolsLocator;
46
import org.gvsig.tools.dynobject.DynStruct;
47
import org.gvsig.tools.evaluator.Evaluator;
48
import org.gvsig.tools.evaluator.EvaluatorData;
49
import org.gvsig.tools.persistence.PersistenceManager;
50
import org.gvsig.tools.persistence.PersistentState;
51
import org.gvsig.tools.persistence.exception.PersistenceException;
52
import org.gvsig.tools.util.Callable;
53

  
54

  
55
/**
56
 *
57
 * Implements a vector legend which represents the elements of a layer
58
 * depending on the value of an expression. That is, if the expression is
59
 * evaluated to true, then the symbol associated to the expression is painted.
60
 * In other case it is not showed.
61
 *
62
 * If the expression result is a string, it is considered false if
63
 * it is the empty string "", true otherwise.
64
 *
65
 * If the expression result is numeric, it is considered false
66
 * if it is zero, and true otherwise.
67
 *
68
 * In other cases, it is considered false if the result is null and true
69
 * otherwise.
70
 *
71
 * @author gvSIG Team
72
 */
73
public class VectorFilterExpressionLegend
74
extends AbstractClassifiedVectorLegend  {
75

  
76
    private static final Logger logger = LoggerFactory.getLogger(
77
        VectorFilterExpressionLegend.class);
78

  
79
    public static final String
80
    FILTER_EXPRESSION_LEGEND_PERSISTENCE_DEFINITION_NAME =
81
    "FILTER_EXPRESSION_LEGEND_PERSISTENCE_DEFINITION_NAME";
82

  
83
    public static final String
84
    FILTER_EXPRESSION_LEGEND_NAME = "FILTER_EXPRESSION_LEGEND_NAME";
85

  
86
    public static final String I18N_DEFAULT = Messages.getText("default_value");
87
    public static final String NON_I18N_DEFAULT = Messages.getText("Default");
88

  
89
	private int shapeType;
90
	private ISymbol defaultSymbol;
91

  
92
	private boolean useDefaultSymbol = false;
93

  
94
	private long error_msg_count = 0;
95

  
96
	private ArrayList<Item> newSymbols = new ArrayList<Item>() {
97
		private static final long serialVersionUID = 1L;
98

  
99
		public int indexOf(String expr) {
100
			return super.indexOf(new Item(expr, null));
101
		}
102
	};
103

  
104

  
105
	private class Item implements Cloneable {
106

  
107
		private ISymbol sym;
108
		private Evaluator evaluator;
109

  
110
		public Item(String expression, ISymbol sym) {
111
			this.sym = sym;
112
      DataManager dataManager = DALLocator.getDataManager();
113
      try {
114
        evaluator = dataManager.createFilter(expression);
115
      } catch (InitializeException ex) {
116
        evaluator = null;
117
      }
118
		}
119

  
120
		public boolean equals(Object obj) {
121
			if (obj == null) return false;
122
			if (!obj.getClass().equals(Item.class)) return false;
123
			return this.evaluator.getSQL().equals(
124
			    ((Item) obj).evaluator.getSQL()
125
			    );
126
		}
127

  
128
		public String getStringExpression() {
129
			return evaluator.getSQL();
130
		}
131

  
132
		public Evaluator getEvaluator() {
133
			return evaluator;
134
		}
135

  
136
		public Object clone() {
137

  
138
		    ISymbol clonesym = null;
139
		    try {
140
                clonesym = (ISymbol) this.sym.clone();
141
            } catch (CloneNotSupportedException e) {
142
                logger.info("Error: unable to clone symbol.", e);
143
                clonesym = this.sym;
144
            }
145
		    return new Item(getStringExpression(), clonesym);
146
		}
147
	}
148

  
149
    public VectorFilterExpressionLegend() {
150
        this.setClassifyingFieldNames(new String[0]);
151
        this.setClassifyingFieldTypes(new int[0]);
152
    }
153

  
154
	public ISymbol getSymbolByFeature(Feature featu) {
155

  
156
	    EvaluatorData evda = featu.getEvaluatorData();
157

  
158
		ISymbol returnSymbol = null;
159
		Object result = null;
160
		String expr = null;
161

  
162
		try {
163

  
164
			for (int i = 0; i < newSymbols.size(); i++) {
165

  
166
				Evaluator eval = newSymbols.get(i).getEvaluator();
167
				expr = eval.getSQL();
168

  
169
                if (expr.equalsIgnoreCase(VectorFilterExpressionLegend.I18N_DEFAULT)){
170
                    /*
171
                     * Skip default item
172
                     */
173
                    continue;
174
                }
175

  
176
				result = eval.evaluate(evda);
177
				if (isConsideredTrue(result)) {
178
                    returnSymbol = newSymbols.get(i).sym;
179
                    if (returnSymbol != null) {
180
                        return returnSymbol;
181
                    }
182
				}
183
			}
184
		} catch (Exception e) {
185

  
186
		    if (error_msg_count % 1000 == 0) {
187
		        logger.info("Error (msg every 1000 occurrences) while getting symbol in VectorFilterExpressionLegend", e);
188
		        error_msg_count = 0;
189
		    }
190
		    error_msg_count++;
191
		}
192

  
193
		if (useDefaultSymbol)
194
			return getDefaultSymbol();
195

  
196
		return null;
197
	}
198

  
199
	/**
200
	 * Tells whether the input object is considered true.
201
	 * Basically, it is false if it has an empty value
202
	 * (FALSE, null, 0, "")
203
	 *
204
     * @param result
205
     * @return
206
     */
207
    private boolean isConsideredTrue(Object res) {
208

  
209
        if (res == null) {
210
            return false;
211
        }
212

  
213
        if (res instanceof Boolean) {
214
            return ((Boolean) res).booleanValue();
215
        }
216

  
217
        if (res instanceof Number) {
218
            return ((Number) res).doubleValue() != 0d;
219
        }
220

  
221
        if (res instanceof String) {
222
            return ((String) res).length() > 0;
223
        }
224

  
225
        // Because it is not null
226
        return true;
227
    }
228

  
229
	public void addSymbol(Object key, ISymbol symbol) {
230
		newSymbols.add(new Item((String)key.toString(),
231
				symbol));
232
	}
233

  
234
	public void clear() {
235
		newSymbols.clear();
236
	}
237

  
238
	public void resetItems() {
239
	    newSymbols = new ArrayList<Item>() {
240
            private static final long serialVersionUID = 1L;
241

  
242
            public int indexOf(String expr) {
243
                return super.indexOf(new Item(expr, null));
244
            }
245
	    };
246
	}
247

  
248
	public void delSymbol(Object key) {
249
		ISymbol mySymbol = null;
250
		for (int i = 0; i < newSymbols.size(); i++) {
251
			if (newSymbols.get(i).evaluator.getSQL().equals(key))
252
				newSymbols.remove(i);
253
		}
254
		fireClassifiedSymbolChangeEvent(new SymbolLegendEvent(mySymbol,null));
255
	}
256

  
257

  
258
	public void replace(ISymbol oldSymbol, ISymbol newSymbol) {
259

  
260
		for (int i = 0; i < newSymbols.size(); i++) {
261
			if (newSymbols.get(i).sym.equals(oldSymbol))
262
				newSymbols.get(i).sym = newSymbol;
263
		}
264

  
265
		fireClassifiedSymbolChangeEvent(new SymbolLegendEvent(oldSymbol,newSymbol));
266
	}
267

  
268

  
269
	public String[] getDescriptions() {
270
		String[] descriptions = new String[newSymbols.size()];
271
		ISymbol[] auxSym = getSymbols();
272

  
273
		for (int i = 0; i < descriptions.length; i++)
274
			descriptions[i] = auxSym[i].getDescription();
275

  
276
		return descriptions;
277
	}
278

  
279
	public ISymbol[] getSymbols() {
280

  
281
		if (newSymbols != null) {
282
			ISymbol[] mySymbols = new ISymbol[newSymbols.size()];
283
			for (int i = 0; i < newSymbols.size(); i++) {
284
				mySymbols[i] = newSymbols.get(i).sym;
285
			}
286
			return mySymbols;
287
		}
288
		return null;
289
	}
290

  
291

  
292

  
293
	public ISymbol getDefaultSymbol() {
294
		if(defaultSymbol==null) {
295

  
296
		    defaultSymbol = MapContextLocator.getSymbolManager(
297
		        ).createSymbol(shapeType);
298
			fireDefaultSymbolChangedEvent(new SymbolLegendEvent(null, defaultSymbol));
299
		}
300
		return defaultSymbol;
301
	}
302

  
303

  
304
	public String getClassName() {
305
		return getClass().getName();
306
	}
307

  
308

  
309
	public int getShapeType() {
310
		return shapeType;
311
	}
312

  
313
	public boolean isUseDefaultSymbol() {
314
		return useDefaultSymbol;
315
	}
316

  
317
	public void setDefaultSymbol(ISymbol s) throws IllegalArgumentException {
318
		if (s == null) throw new NullPointerException("Default symbol cannot be null");
319
		ISymbol old = defaultSymbol;
320
		defaultSymbol = s;
321
		fireDefaultSymbolChangedEvent(new SymbolLegendEvent(old, defaultSymbol));
322
	}
323

  
324
	public void setShapeType(int shapeType) {
325
		if (this.shapeType != shapeType) {
326

  
327
		    ISymbol sym = MapContextLocator.getSymbolManager(
328
		        ).createSymbol(shapeType);
329
			setDefaultSymbol(sym);
330
			this.shapeType = shapeType;
331
		}
332
	}
333

  
334
	public void useDefaultSymbol(boolean b) {
335
		useDefaultSymbol = b;
336
	}
337

  
338
	public Object[] getValues() {
339
		if (newSymbols != null) {
340
			Object[] myObjects = new Object[newSymbols.size()];
341
			for (int i = 0; i < newSymbols.size(); i++) {
342
				myObjects[i] = newSymbols.get(i).getStringExpression();
343
			}
344
			return myObjects;
345
		}
346
		return null;
347
	}
348

  
349
    public static boolean isPolygonal(int ty) {
350
        GeometryManager geomManager = GeometryLocator.getGeometryManager();
351
        return geomManager.isSubtype(Geometry.TYPES.MULTISURFACE, ty) || 
352
            geomManager.isSubtype(Geometry.TYPES.SURFACE, ty);
353
    }
354

  
355

  
356
    public static boolean isLinear(int ty) {
357
        GeometryManager geomManager = GeometryLocator.getGeometryManager();
358
        return geomManager.isSubtype(Geometry.TYPES.MULTICURVE, ty) || 
359
            geomManager.isSubtype(Geometry.TYPES.CURVE, ty);
360
    }
361
    
362
    public static boolean isPoint(int ty) {
363
        GeometryManager geomManager = GeometryLocator.getGeometryManager();
364
        return geomManager.isSubtype(Geometry.TYPES.MULTIPOINT, ty) || 
365
            geomManager.isSubtype(Geometry.TYPES.POINT, ty);
366
    }
367
    
368
    public void removeDefaultSymbol() {
369

  
370
    }
371

  
372
    // =============================
373

  
374
    public static class RegisterPersistence implements Callable {
375

  
376
        public Object call() throws Exception {
377

  
378
            PersistenceManager manager = ToolsLocator.getPersistenceManager();
379
            if (manager.getDefinition(
380
                FILTER_EXPRESSION_LEGEND_PERSISTENCE_DEFINITION_NAME) == null) {
381
                DynStruct definition = manager
382
                    .addDefinition(VectorFilterExpressionLegend.class,
383
                        FILTER_EXPRESSION_LEGEND_PERSISTENCE_DEFINITION_NAME,
384
                        FILTER_EXPRESSION_LEGEND_PERSISTENCE_DEFINITION_NAME
385
                        + " Persistence definition", null, null);
386

  
387
                definition.extend(manager.getDefinition(
388
                    AbstractClassifiedVectorLegend
389
                    .CLASSIFIED_VECTOR_LEGEND_PERSISTENCE_DEFINITION_NAME));
390

  
391
                definition.addDynFieldBoolean("useDefaultSymbol")
392
                .setMandatory(true);
393
                definition.addDynFieldObject("defaultSymbol")
394
                .setClassOfValue(ISymbol.class).setMandatory(true);
395
                definition.addDynFieldInt("shapeType")
396
                .setMandatory(true);
397

  
398
                definition.addDynFieldArray("itemSymbolArray")
399
                .setClassOfItems(ISymbol.class);
400
                definition.addDynFieldArray("itemStringArray")
401
                .setClassOfItems(String.class);
402

  
403
            }
404
            return Boolean.TRUE;
405
        }
406

  
407
    }
408

  
409
    public static class RegisterLegend implements Callable {
410

  
411
        public Object call() throws Exception {
412
            MapContextManager manager =
413
                MapContextLocator.getMapContextManager();
414

  
415
            manager.registerLegend(
416
                FILTER_EXPRESSION_LEGEND_NAME,
417
                VectorFilterExpressionLegend.class);
418

  
419
            return Boolean.TRUE;
420
        }
421

  
422
    }
423

  
424
    public void saveToState(PersistentState state) throws PersistenceException {
425

  
426
        super.saveToState(state);
427
        state.set("useDefaultSymbol", this.isUseDefaultSymbol());
428
        state.set("defaultSymbol", this.getDefaultSymbol());
429
        state.set("shapeType", this.getShapeType());
430

  
431
        ISymbol[] syms = this.getSymbols();
432
        if (syms == null) {
433
            syms = new ISymbol[0];
434
        }
435
        Object[] vals = this.getValues();
436
        String[] vals_str = null;
437
        if (vals == null) {
438
            vals_str = new String[0];
439
        } else {
440
            vals_str = new String[vals.length];
441
            for (int i=0; i<vals.length; i++) {
442
                String aux = ((vals[i] == null) ? null : vals[i].toString());
443
                // Prevents saving localized version of 'Default'
444
                aux = translateDefault(aux, false);
445
                vals_str[i] = aux;
446
            }
447
        }
448

  
449
        state.set("itemSymbolArray", syms);
450
        state.set("itemStringArray", vals_str);
451

  
452
    }
453

  
454
    public void loadFromState(PersistentState state)
455
        throws PersistenceException {
456

  
457
        super.loadFromState(state);
458

  
459
        this.setShapeType(state.getInt("shapeType"));
460
        Boolean b = state.getBoolean("useDefaultSymbol");
461
        this.useDefaultSymbol(b);
462
        ISymbol defsym = (ISymbol) state.get("defaultSymbol");
463
        this.setDefaultSymbol(defsym);
464

  
465
        String[] strs = state.getStringArray("itemStringArray");
466
        ISymbol[] syms = (ISymbol[]) state.getArray("itemSymbolArray",
467
            ISymbol.class);
468

  
469
        if (strs.length != syms.length) {
470
            logger.info("VectorFilterExpressionLegend - load state - Different size in arrays: " + strs.length + ", " + syms.length);
471
        }
472
        int nmin = Math.min(strs.length, syms.length);
473
        for (int i=0; i<nmin; i++) {
474
            String aux = strs[i];
475
            aux = translateDefault(aux, true);
476
            this.addSymbol(aux, syms[i]);
477
        }
478
    }
479

  
480
    /**
481
     * Utility method to (un)translate the word 'Default'
482
     * @param aux
483
     * @param forward
484
     * If TRUE, then translate (Default -> Por defecto)
485
     * If FALSE then untranslate (Por defecto -> Default)
486
     * @return
487
     */
488
    private String translateDefault(String aux, boolean forward) {
489

  
490
        if (aux == null) {
491
            return null;
492
        }
493
        if (forward && aux.compareTo(NON_I18N_DEFAULT) == 0) {
494
            return I18N_DEFAULT;
495
        }
496
        if (!forward && aux.compareTo(I18N_DEFAULT) == 0) {
497
            return NON_I18N_DEFAULT;
498
        }
499
        return aux;
500
    }
501

  
502

  
503
    public Object clone() throws CloneNotSupportedException {
504

  
505
        VectorFilterExpressionLegend resp =
506
            (VectorFilterExpressionLegend) super.clone();
507

  
508
        Object[] vals = this.getValues();
509
        ISymbol[] syms = this.getSymbols();
510
        if (vals != null && syms != null) {
511

  
512
            resp.resetItems();
513

  
514
            int n = Math.min(vals.length, syms.length);
515
            for (int i=0; i<n; i++) {
516
                resp.addSymbol(
517
                    vals[i],
518
                    (ISymbol) syms[i].clone());
519
            }
520
        }
521
        ISymbol sym = this.getDefaultSymbol();
522
        sym = (ISymbol) sym.clone();
523
        resp.setDefaultSymbol(sym);
524
        return resp;
525
    }
526

  
527

  
528

  
529
}
org.gvsig.legend.vectorfilterexpression.app.mainplugin/tags/org.gvsig.legend.vectorfilterexpression.app.mainplugin-1.0.94/src/main/java/org/gvsig/symbology/gui/layerproperties/ExpressionSymbolPanelView.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<object classname="com.jeta.forms.store.memento.FormPackage">
4
 <at name="fileversion">
5
  <object classname="com.jeta.forms.store.memento.FormsVersion2">
6
   <at name="major">2</at>
7
   <at name="minor">0</at>
8
   <at name="sub">0</at>
9
  </object>
10
 </at>
11
 <at name="form">
12
  <object classname="com.jeta.forms.store.memento.FormMemento">
13
   <super classname="com.jeta.forms.store.memento.ComponentMemento">
14
    <at name="cellconstraints">
15
     <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
16
      <at name="column">1</at>
17
      <at name="row">1</at>
18
      <at name="colspan">1</at>
19
      <at name="rowspan">1</at>
20
      <at name="halign">default</at>
21
      <at name="valign">default</at>
22
      <at name="insets" object="insets">0,0,0,0</at>
23
     </object>
24
    </at>
25
    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
26
   </super>
27
   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.legend.vectorfilterexpression.app.mainplugin/src/main/java/org/gvsig/symbology/gui/layerproperties/ExpressionSymbolPanelView.xml</at>
28
   <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:50PX:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE</at>
29
   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
30
   <at name="components">
31
    <object classname="java.util.LinkedList">
32
     <item >
33
      <at name="value">
34
       <object classname="com.jeta.forms.store.memento.BeanMemento">
35
        <super classname="com.jeta.forms.store.memento.ComponentMemento">
36
         <at name="cellconstraints">
37
          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
38
           <at name="column">2</at>
39
           <at name="row">2</at>
40
           <at name="colspan">1</at>
41
           <at name="rowspan">1</at>
42
           <at name="halign">default</at>
43
           <at name="valign">default</at>
44
           <at name="insets" object="insets">0,0,0,0</at>
45
          </object>
46
         </at>
47
         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
48
        </super>
49
        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
50
        <at name="beanclass">com.jeta.forms.components.separator.TitledSeparator</at>
51
        <at name="beanproperties">
52
         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
53
          <at name="classname">com.jeta.forms.components.separator.TitledSeparator</at>
54
          <at name="properties">
55
           <object classname="com.jeta.forms.store.support.PropertyMap">
56
            <at name="border">
57
             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
58
              <super classname="com.jeta.forms.store.properties.BorderProperty">
59
               <at name="name">border</at>
60
              </super>
61
              <at name="borders">
62
               <object classname="java.util.LinkedList">
63
                <item >
64
                 <at name="value">
65
                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
66
                   <super classname="com.jeta.forms.store.properties.BorderProperty">
67
                    <at name="name">border</at>
68
                   </super>
69
                  </object>
70
                 </at>
71
                </item>
72
               </object>
73
              </at>
74
             </object>
75
            </at>
76
            <at name="name">lblExpression</at>
77
            <at name="width">885</at>
78
            <at name="text">_Expression</at>
79
            <at name="height">15</at>
80
           </object>
81
          </at>
82
         </object>
83
        </at>
84
       </object>
85
      </at>
86
     </item>
87
     <item >
88
      <at name="value">
89
       <object classname="com.jeta.forms.store.memento.BeanMemento">
90
        <super classname="com.jeta.forms.store.memento.ComponentMemento">
91
         <at name="cellconstraints">
92
          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
93
           <at name="column">2</at>
94
           <at name="row">6</at>
95
           <at name="colspan">1</at>
96
           <at name="rowspan">1</at>
97
           <at name="halign">default</at>
98
           <at name="valign">default</at>
99
           <at name="insets" object="insets">0,0,0,0</at>
100
          </object>
101
         </at>
102
         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
103
        </super>
104
        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
105
        <at name="beanclass">com.jeta.forms.components.separator.TitledSeparator</at>
106
        <at name="beanproperties">
107
         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
108
          <at name="classname">com.jeta.forms.components.separator.TitledSeparator</at>
109
          <at name="properties">
110
           <object classname="com.jeta.forms.store.support.PropertyMap">
111
            <at name="border">
112
             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
113
              <super classname="com.jeta.forms.store.properties.BorderProperty">
114
               <at name="name">border</at>
115
              </super>
116
              <at name="borders">
117
               <object classname="java.util.LinkedList">
118
                <item >
119
                 <at name="value">
120
                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
121
                   <super classname="com.jeta.forms.store.properties.BorderProperty">
122
                    <at name="name">border</at>
123
                   </super>
124
                  </object>
125
                 </at>
126
                </item>
127
               </object>
128
              </at>
129
             </object>
130
            </at>
131
            <at name="name">lblSymbolAndDescriptor</at>
132
            <at name="width">885</at>
133
            <at name="text">_Symbol_and_description</at>
134
            <at name="height">15</at>
135
           </object>
136
          </at>
137
         </object>
138
        </at>
139
       </object>
140
      </at>
141
     </item>
142
     <item >
143
      <at name="value">
144
       <object classname="com.jeta.forms.store.memento.BeanMemento">
145
        <super classname="com.jeta.forms.store.memento.ComponentMemento">
146
         <at name="cellconstraints">
147
          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
148
           <at name="column">2</at>
149
           <at name="row">4</at>
150
           <at name="colspan">1</at>
151
           <at name="rowspan">1</at>
152
           <at name="halign">default</at>
153
           <at name="valign">default</at>
154
           <at name="insets" object="insets">0,0,0,0</at>
155
          </object>
156
         </at>
157
         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
158
        </super>
159
        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
160
        <at name="beanclass">javax.swing.JPanel</at>
161
        <at name="beanproperties">
162
         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
163
          <at name="classname">javax.swing.JPanel</at>
164
          <at name="properties">
165
           <object classname="com.jeta.forms.store.support.PropertyMap">
166
            <at name="name">pnlExpression</at>
167
            <at name="width">885</at>
168
            <at name="height">429</at>
169
           </object>
170
          </at>
171
         </object>
172
        </at>
173
       </object>
174
      </at>
175
     </item>
176
     <item >
177
      <at name="value">
178
       <object classname="com.jeta.forms.store.memento.FormMemento">
179
        <super classname="com.jeta.forms.store.memento.ComponentMemento">
180
         <at name="cellconstraints">
181
          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
182
           <at name="column">2</at>
183
           <at name="row">8</at>
184
           <at name="colspan">1</at>
185
           <at name="rowspan">1</at>
186
           <at name="halign">default</at>
187
           <at name="valign">default</at>
188
           <at name="insets" object="insets">0,0,0,0</at>
189
          </object>
190
         </at>
191
         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
192
        </super>
193
        <at name="id">embedded.797425495</at>
194
        <at name="rowspecs">FILL:35PX:NONE</at>
195
        <at name="colspecs">FILL:35PX:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)</at>
196
        <at name="components">
197
         <object classname="java.util.LinkedList">
198
          <item >
199
           <at name="value">
200
            <object classname="com.jeta.forms.store.memento.BeanMemento">
201
             <super classname="com.jeta.forms.store.memento.ComponentMemento">
202
              <at name="cellconstraints">
203
               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
204
                <at name="column">1</at>
205
                <at name="row">1</at>
206
                <at name="colspan">1</at>
207
                <at name="rowspan">1</at>
208
                <at name="halign">fill</at>
209
                <at name="valign">fill</at>
210
                <at name="insets" object="insets">0,0,0,0</at>
211
               </object>
212
              </at>
213
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
214
             </super>
215
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
216
             <at name="beanclass">javax.swing.JButton</at>
217
             <at name="beanproperties">
218
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
219
               <at name="classname">javax.swing.JButton</at>
220
               <at name="properties">
221
                <object classname="com.jeta.forms.store.support.PropertyMap">
222
                 <at name="border">
223
                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
224
                   <super classname="com.jeta.forms.store.properties.BorderProperty">
225
                    <at name="name">border</at>
226
                   </super>
227
                   <at name="borders">
228
                    <object classname="java.util.LinkedList">
229
                     <item >
230
                      <at name="value">
231
                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
232
                        <super classname="com.jeta.forms.store.properties.BorderProperty">
233
                         <at name="name">border</at>
234
                        </super>
235
                       </object>
236
                      </at>
237
                     </item>
238
                    </object>
239
                   </at>
240
                  </object>
241
                 </at>
242
                 <at name="name">btnSymbolPreview</at>
243
                 <at name="width">31</at>
244
                 <at name="height">31</at>
245
                </object>
246
               </at>
247
              </object>
248
             </at>
249
            </object>
250
           </at>
251
          </item>
252
          <item >
253
           <at name="value">
254
            <object classname="com.jeta.forms.store.memento.BeanMemento">
255
             <super classname="com.jeta.forms.store.memento.ComponentMemento">
256
              <at name="cellconstraints">
257
               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
258
                <at name="column">3</at>
259
                <at name="row">1</at>
260
                <at name="colspan">1</at>
261
                <at name="rowspan">1</at>
262
                <at name="halign">default</at>
263
                <at name="valign">default</at>
264
                <at name="insets" object="insets">0,0,0,0</at>
265
               </object>
266
              </at>
267
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
268
             </super>
269
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
270
             <at name="beanclass">javax.swing.JTextArea</at>
271
             <at name="beanproperties">
272
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
273
               <at name="classname">javax.swing.JTextArea</at>
274
               <at name="properties">
275
                <object classname="com.jeta.forms.store.support.PropertyMap">
276
                 <at name="border">
277
                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
278
                   <super classname="com.jeta.forms.store.properties.BorderProperty">
279
                    <at name="name">border</at>
280
                   </super>
281
                   <at name="borders">
282
                    <object classname="java.util.LinkedList">
283
                     <item >
284
                      <at name="value">
285
                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
286
                        <super classname="com.jeta.forms.store.properties.BorderProperty">
287
                         <at name="name">border</at>
288
                        </super>
289
                       </object>
290
                      </at>
291
                     </item>
292
                    </object>
293
                   </at>
294
                  </object>
295
                 </at>
296
                 <at name="scrollableTracksViewportHeight">true</at>
297
                 <at name="scrollableTracksViewportWidth">true</at>
298
                 <at name="name">txtSymbolDescription</at>
299
                 <at name="width">836</at>
300
                 <at name="scollBars">
301
                  <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
302
                   <at name="name">scollBars</at>
303
                   <at name="verticalpolicy">20</at>
304
                   <at name="horizontalpolicy">30</at>
305
                   <at name="border">
306
                    <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
307
                     <super classname="com.jeta.forms.store.properties.BorderProperty">
308
                      <at name="name">border</at>
309
                     </super>
310
                     <at name="borders">
311
                      <object classname="java.util.LinkedList">
312
                       <item >
313
                        <at name="value">
314
                         <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
315
                          <super classname="com.jeta.forms.store.properties.BorderProperty">
316
                           <at name="name">border</at>
317
                          </super>
318
                         </object>
319
                        </at>
320
                       </item>
321
                      </object>
322
                     </at>
323
                    </object>
324
                   </at>
325
                  </object>
326
                 </at>
327
                 <at name="height">29</at>
328
                </object>
329
               </at>
330
              </object>
331
             </at>
332
            </object>
333
           </at>
334
          </item>
335
         </object>
336
        </at>
337
        <at name="properties">
338
         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
339
          <at name="classname">com.jeta.forms.gui.form.GridView</at>
340
          <at name="properties">
341
           <object classname="com.jeta.forms.store.support.PropertyMap">
342
            <at name="border">
343
             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
344
              <super classname="com.jeta.forms.store.properties.BorderProperty">
345
               <at name="name">border</at>
346
              </super>
347
              <at name="borders">
348
               <object classname="java.util.LinkedList"/>
349
              </at>
350
             </object>
351
            </at>
352
            <at name="name"></at>
353
            <at name="fill">
354
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
355
              <at name="name">fill</at>
356
             </object>
357
            </at>
358
            <at name="scollBars">
359
             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
360
              <at name="name">scollBars</at>
361
              <at name="verticalpolicy">21</at>
362
              <at name="horizontalpolicy">31</at>
363
              <at name="border">
364
               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
365
                <super classname="com.jeta.forms.store.properties.BorderProperty">
366
                 <at name="name">border</at>
367
                </super>
368
                <at name="borders">
369
                 <object classname="java.util.LinkedList">
370
                  <item >
371
                   <at name="value">
372
                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
373
                     <super classname="com.jeta.forms.store.properties.BorderProperty">
374
                      <at name="name">border</at>
375
                     </super>
376
                    </object>
377
                   </at>
378
                  </item>
379
                 </object>
380
                </at>
381
               </object>
382
              </at>
383
             </object>
384
            </at>
385
           </object>
386
          </at>
387
         </object>
388
        </at>
389
        <at name="cellpainters">
390
         <object classname="com.jeta.forms.store.support.Matrix">
391
          <at name="rows">
392
           <object classname="[Ljava.lang.Object;" size="1">
393
            <at name="item" index="0">
394
             <object classname="[Ljava.lang.Object;" size="3"/>
395
            </at>
396
           </object>
397
          </at>
398
         </object>
399
        </at>
400
        <at name="rowgroups">
401
         <object classname="com.jeta.forms.store.memento.FormGroupSet">
402
          <at name="groups">
403
           <object classname="java.util.HashMap"/>
404
          </at>
405
         </object>
406
        </at>
407
        <at name="colgroups">
408
         <object classname="com.jeta.forms.store.memento.FormGroupSet">
409
          <at name="groups">
410
           <object classname="java.util.HashMap"/>
411
          </at>
412
         </object>
413
        </at>
414
       </object>
415
      </at>
416
     </item>
417
    </object>
418
   </at>
419
   <at name="properties">
420
    <object classname="com.jeta.forms.store.memento.PropertiesMemento">
421
     <at name="classname">com.jeta.forms.gui.form.GridView</at>
422
     <at name="properties">
423
      <object classname="com.jeta.forms.store.support.PropertyMap">
424
       <at name="border">
425
        <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
426
         <super classname="com.jeta.forms.store.properties.BorderProperty">
427
          <at name="name">border</at>
428
         </super>
429
         <at name="borders">
430
          <object classname="java.util.LinkedList"/>
431
         </at>
432
        </object>
433
       </at>
434
       <at name="name"/>
435
       <at name="fill">
436
        <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
437
         <at name="name">fill</at>
438
        </object>
439
       </at>
440
       <at name="scollBars">
441
        <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
442
         <at name="name">scollBars</at>
443
         <at name="verticalpolicy">21</at>
444
         <at name="horizontalpolicy">31</at>
445
         <at name="border">
446
          <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
447
           <super classname="com.jeta.forms.store.properties.BorderProperty">
448
            <at name="name">border</at>
449
           </super>
450
           <at name="borders">
451
            <object classname="java.util.LinkedList">
452
             <item >
453
              <at name="value">
454
               <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
455
                <super classname="com.jeta.forms.store.properties.BorderProperty">
456
                 <at name="name">border</at>
457
                </super>
458
               </object>
459
              </at>
460
             </item>
461
            </object>
462
           </at>
463
          </object>
464
         </at>
465
        </object>
466
       </at>
467
      </object>
468
     </at>
469
    </object>
470
   </at>
471
   <at name="cellpainters">
472
    <object classname="com.jeta.forms.store.support.Matrix">
473
     <at name="rows">
474
      <object classname="[Ljava.lang.Object;" size="9">
475
       <at name="item" index="0">
476
        <object classname="[Ljava.lang.Object;" size="3"/>
477
       </at>
478
       <at name="item" index="1">
479
        <object classname="[Ljava.lang.Object;" size="3"/>
480
       </at>
481
       <at name="item" index="2">
482
        <object classname="[Ljava.lang.Object;" size="3"/>
483
       </at>
484
       <at name="item" index="3">
485
        <object classname="[Ljava.lang.Object;" size="3"/>
486
       </at>
487
       <at name="item" index="4">
488
        <object classname="[Ljava.lang.Object;" size="3"/>
489
       </at>
490
       <at name="item" index="5">
491
        <object classname="[Ljava.lang.Object;" size="3"/>
492
       </at>
493
       <at name="item" index="6">
494
        <object classname="[Ljava.lang.Object;" size="3"/>
495
       </at>
496
       <at name="item" index="7">
497
        <object classname="[Ljava.lang.Object;" size="3"/>
498
       </at>
499
       <at name="item" index="8">
500
        <object classname="[Ljava.lang.Object;" size="3"/>
501
       </at>
502
      </object>
503
     </at>
504
    </object>
505
   </at>
506
   <at name="rowgroups">
507
    <object classname="com.jeta.forms.store.memento.FormGroupSet">
508
     <at name="groups">
509
      <object classname="java.util.HashMap"/>
510
     </at>
511
    </object>
512
   </at>
513
   <at name="colgroups">
514
    <object classname="com.jeta.forms.store.memento.FormGroupSet">
515
     <at name="groups">
516
      <object classname="java.util.HashMap"/>
517
     </at>
518
    </object>
519
   </at>
520
  </object>
521
 </at>
522
</object>
org.gvsig.legend.vectorfilterexpression.app.mainplugin/tags/org.gvsig.legend.vectorfilterexpression.app.mainplugin-1.0.94/src/main/java/org/gvsig/symbology/gui/layerproperties/ExpressionSymbolPanelView.java
1
package org.gvsig.symbology.gui.layerproperties;
2

  
3
import com.jeta.forms.components.separator.TitledSeparator;
4
import com.jeta.open.i18n.I18NUtils;
5
import com.jgoodies.forms.layout.CellConstraints;
6
import com.jgoodies.forms.layout.FormLayout;
7
import java.awt.BorderLayout;
8
import java.awt.ComponentOrientation;
9
import java.awt.Container;
10
import java.awt.Dimension;
11
import javax.swing.Box;
12
import javax.swing.ImageIcon;
13
import javax.swing.JButton;
14
import javax.swing.JFrame;
15
import javax.swing.JPanel;
16
import javax.swing.JScrollPane;
17
import javax.swing.JTextArea;
18

  
19

  
20
public class ExpressionSymbolPanelView extends JPanel
21
{
22
   TitledSeparator lblExpression = new TitledSeparator();
23
   TitledSeparator lblSymbolAndDescriptor = new TitledSeparator();
24
   JPanel pnlExpression = new JPanel();
25
   JButton btnSymbolPreview = new JButton();
26
   JTextArea txtSymbolDescription = new JTextArea();
27

  
28
   /**
29
    * Default constructor
30
    */
31
   public ExpressionSymbolPanelView()
32
   {
33
      initializePanel();
34
   }
35

  
36
   /**
37
    * Adds fill components to empty cells in the first row and first column of the grid.
38
    * This ensures that the grid spacing will be the same as shown in the designer.
39
    * @param cols an array of column indices in the first row where fill components should be added.
40
    * @param rows an array of row indices in the first column where fill components should be added.
41
    */
42
   void addFillComponents( Container panel, int[] cols, int[] rows )
43
   {
44
      Dimension filler = new Dimension(10,10);
45

  
46
      boolean filled_cell_11 = false;
47
      CellConstraints cc = new CellConstraints();
48
      if ( cols.length > 0 && rows.length > 0 )
49
      {
50
         if ( cols[0] == 1 && rows[0] == 1 )
51
         {
52
            /** add a rigid area  */
53
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
54
            filled_cell_11 = true;
55
         }
56
      }
57

  
58
      for( int index = 0; index < cols.length; index++ )
59
      {
60
         if ( cols[index] == 1 && filled_cell_11 )
61
         {
62
            continue;
63
         }
64
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
65
      }
66

  
67
      for( int index = 0; index < rows.length; index++ )
68
      {
69
         if ( rows[index] == 1 && filled_cell_11 )
70
         {
71
            continue;
72
         }
73
         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
74
      }
75

  
76
   }
77

  
78
   /**
79
    * Helper method to load an image file from the CLASSPATH
80
    * @param imageName the package and name of the file to load relative to the CLASSPATH
81
    * @return an ImageIcon instance with the specified image file
82
    * @throws IllegalArgumentException if the image resource cannot be loaded.
83
    */
84
   public ImageIcon loadImage( String imageName )
85
   {
86
      try
87
      {
88
         ClassLoader classloader = getClass().getClassLoader();
89
         java.net.URL url = classloader.getResource( imageName );
90
         if ( url != null )
91
         {
92
            ImageIcon icon = new ImageIcon( url );
93
            return icon;
94
         }
95
      }
96
      catch( Exception e )
97
      {
98
         e.printStackTrace();
99
      }
100
      throw new IllegalArgumentException( "Unable to load image: " + imageName );
101
   }
102

  
103
   /**
104
    * Method for recalculating the component orientation for 
105
    * right-to-left Locales.
106
    * @param orientation the component orientation to be applied
107
    */
108
   public void applyComponentOrientation( ComponentOrientation orientation )
109
   {
110
      // Not yet implemented...
111
      // I18NUtils.applyComponentOrientation(this, orientation);
112
      super.applyComponentOrientation(orientation);
113
   }
114

  
115
   public JPanel createPanel()
116
   {
117
      JPanel jpanel1 = new JPanel();
118
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:50PX:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE");
119
      CellConstraints cc = new CellConstraints();
120
      jpanel1.setLayout(formlayout1);
121

  
122
      lblExpression.setName("lblExpression");
123
      lblExpression.setText("_Expression");
124
      jpanel1.add(lblExpression,cc.xy(2,2));
125

  
126
      lblSymbolAndDescriptor.setName("lblSymbolAndDescriptor");
127
      lblSymbolAndDescriptor.setText("_Symbol_and_description");
128
      jpanel1.add(lblSymbolAndDescriptor,cc.xy(2,6));
129

  
130
      pnlExpression.setName("pnlExpression");
131
      jpanel1.add(pnlExpression,cc.xy(2,4));
132

  
133
      jpanel1.add(createPanel1(),cc.xy(2,8));
134
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9 });
135
      return jpanel1;
136
   }
137

  
138
   public JPanel createPanel1()
139
   {
140
      JPanel jpanel1 = new JPanel();
141
      FormLayout formlayout1 = new FormLayout("FILL:35PX:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","FILL:35PX:NONE");
142
      CellConstraints cc = new CellConstraints();
143
      jpanel1.setLayout(formlayout1);
144

  
145
      btnSymbolPreview.setName("btnSymbolPreview");
146
      jpanel1.add(btnSymbolPreview,new CellConstraints(1,1,1,1,CellConstraints.FILL,CellConstraints.FILL));
147

  
148
      txtSymbolDescription.setName("txtSymbolDescription");
149
      JScrollPane jscrollpane1 = new JScrollPane();
150
      jscrollpane1.setViewportView(txtSymbolDescription);
151
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
152
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
153
      jpanel1.add(jscrollpane1,cc.xy(3,1));
154

  
155
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
156
      return jpanel1;
157
   }
158

  
159
   /**
160
    * Initializer
161
    */
162
   protected void initializePanel()
163
   {
164
      setLayout(new BorderLayout());
165
      add(createPanel(), BorderLayout.CENTER);
166
   }
167

  
168

  
169
}
org.gvsig.legend.vectorfilterexpression.app.mainplugin/tags/org.gvsig.legend.vectorfilterexpression.app.mainplugin-1.0.94/src/main/java/org/gvsig/symbology/gui/layerproperties/VectorFilterExpressionPanelView.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<object classname="com.jeta.forms.store.memento.FormPackage">
4
 <at name="fileversion">
5
  <object classname="com.jeta.forms.store.memento.FormsVersion2">
6
   <at name="major">2</at>
7
   <at name="minor">0</at>
8
   <at name="sub">0</at>
9
  </object>
10
 </at>
11
 <at name="form">
12
  <object classname="com.jeta.forms.store.memento.FormMemento">
13
   <super classname="com.jeta.forms.store.memento.ComponentMemento">
14
    <at name="cellconstraints">
15
     <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
16
      <at name="column">1</at>
17
      <at name="row">1</at>
18
      <at name="colspan">1</at>
19
      <at name="rowspan">1</at>
20
      <at name="halign">default</at>
21
      <at name="valign">default</at>
22
      <at name="insets" object="insets">0,0,0,0</at>
23
     </object>
24
    </at>
25
    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
26
   </super>
27
   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.legend.vectorfilterexpression.app.mainplugin/src/main/java/org/gvsig/symbology/gui/layerproperties/VectorFilterExpressionPanelView.xml</at>
28
   <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL: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,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
30
   <at name="components">
31
    <object classname="java.util.LinkedList">
32
     <item >
33
      <at name="value">
34
       <object classname="com.jeta.forms.store.memento.BeanMemento">
35
        <super classname="com.jeta.forms.store.memento.ComponentMemento">
36
         <at name="cellconstraints">
37
          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
38
           <at name="column">2</at>
39
           <at name="row">4</at>
40
           <at name="colspan">1</at>
41
           <at name="rowspan">1</at>
42
           <at name="halign">default</at>
43
           <at name="valign">default</at>
44
           <at name="insets" object="insets">0,0,0,0</at>
45
          </object>
46
         </at>
47
         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
48
        </super>
49
        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
50
        <at name="beanclass">javax.swing.JTable</at>
51
        <at name="beanproperties">
52
         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
53
          <at name="classname">javax.swing.JTable</at>
54
          <at name="properties">
55
           <object classname="com.jeta.forms.store.support.PropertyMap">
56
            <at name="border">
57
             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
58
              <super classname="com.jeta.forms.store.properties.BorderProperty">
59
               <at name="name">border</at>
60
              </super>
61
              <at name="borders">
62
               <object classname="java.util.LinkedList">
63
                <item >
64
                 <at name="value">
65
                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
66
                   <super classname="com.jeta.forms.store.properties.BorderProperty">
67
                    <at name="name">border</at>
68
                   </super>
69
                  </object>
70
                 </at>
71
                </item>
72
               </object>
73
              </at>
74
             </object>
75
            </at>
76
            <at name="name">tblSymbols</at>
77
            <at name="width">832</at>
78
            <at name="scollBars">
79
             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
80
              <at name="name">scollBars</at>
81
              <at name="verticalpolicy">20</at>
82
              <at name="horizontalpolicy">30</at>
83
              <at name="border">
84
               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
85
                <super classname="com.jeta.forms.store.properties.BorderProperty">
86
                 <at name="name">border</at>
87
                </super>
88
                <at name="borders">
89
                 <object classname="java.util.LinkedList">
90
                  <item >
91
                   <at name="value">
92
                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
93
                     <super classname="com.jeta.forms.store.properties.BorderProperty">
94
                      <at name="name">border</at>
95
                     </super>
96
                    </object>
97
                   </at>
98
                  </item>
99
                 </object>
100
                </at>
101
               </object>
102
              </at>
103
             </object>
104
            </at>
105
            <at name="height">32</at>
106
           </object>
107
          </at>
108
         </object>
109
        </at>
110
       </object>
111
      </at>
112
     </item>
113
     <item >
114
      <at name="value">
115
       <object classname="com.jeta.forms.store.memento.FormMemento">
116
        <super classname="com.jeta.forms.store.memento.ComponentMemento">
117
         <at name="cellconstraints">
118
          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
119
           <at name="column">2</at>
120
           <at name="row">2</at>
121
           <at name="colspan">1</at>
122
           <at name="rowspan">1</at>
123
           <at name="halign">default</at>
124
           <at name="valign">default</at>
125
           <at name="insets" object="insets">0,0,0,0</at>
126
          </object>
127
         </at>
128
         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
129
        </super>
130
        <at name="id">embedded.1564275243</at>
131
        <at name="rowspecs">CENTER:MAX(22PX;MIN):NONE</at>
132
        <at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:100PX:NONE</at>
133
        <at name="components">
134
         <object classname="java.util.LinkedList">
135
          <item >
136
           <at name="value">
137
            <object classname="com.jeta.forms.store.memento.BeanMemento">
138
             <super classname="com.jeta.forms.store.memento.ComponentMemento">
139
              <at name="cellconstraints">
140
               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
141
                <at name="column">1</at>
142
                <at name="row">1</at>
143
                <at name="colspan">1</at>
144
                <at name="rowspan">1</at>
145
                <at name="halign">default</at>
146
                <at name="valign">default</at>
147
                <at name="insets" object="insets">0,0,0,0</at>
148
               </object>
149
              </at>
150
              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
151
             </super>
152
             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
153
             <at name="beanclass">javax.swing.JCheckBox</at>
154
             <at name="beanproperties">
155
              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
156
               <at name="classname">javax.swing.JCheckBox</at>
157
               <at name="properties">
158
                <object classname="com.jeta.forms.store.support.PropertyMap">
159
                 <at name="border">
160
                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
161
                   <super classname="com.jeta.forms.store.properties.BorderProperty">
162
                    <at name="name">border</at>
163
                   </super>
164
                   <at name="borders">
165
                    <object classname="java.util.LinkedList">
166
                     <item >
167
                      <at name="value">
168
                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
169
                        <super classname="com.jeta.forms.store.properties.BorderProperty">
170
                         <at name="name">border</at>
171
                        </super>
172
                       </object>
173
                      </at>
174
                     </item>
175
                    </object>
176
                   </at>
177
                  </object>
178
                 </at>
179
                 <at name="actionCommand">_Resto_de_valores</at>
180
                 <at name="name">chkDefaultValues</at>
181
                 <at name="width">97</at>
182
                 <at name="text">resto_valores</at>
183
                 <at name="height">16</at>
184
                </object>
185
               </at>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff