Revision 42546
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
|
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>org.gvsig.desktop.library</artifactId> |
|
13 |
<version>2.0.115</version> |
|
14 |
</parent> |
|
15 |
|
|
16 |
<dependencies> |
|
17 |
|
|
18 |
<dependency> |
|
19 |
<groupId>org.gvsig</groupId> |
|
20 |
<artifactId>org.gvsig.fmap.dal.db.jdbc</artifactId> |
|
21 |
<scope>compile</scope> |
|
22 |
</dependency> |
|
23 |
<dependency> |
|
24 |
<groupId>org.gvsig</groupId> |
|
25 |
<artifactId>org.gvsig.projection.cresques.ui</artifactId> |
|
26 |
<scope>compile</scope> |
|
27 |
</dependency> |
|
28 |
<dependency> |
|
29 |
<groupId>org.gvsig</groupId> |
|
30 |
<artifactId>org.gvsig.tools.dynform.api</artifactId> |
|
31 |
<scope>compile</scope> |
|
32 |
</dependency> |
|
33 |
<dependency> |
|
34 |
<groupId>org.gvsig</groupId> |
|
35 |
<artifactId>org.gvsig.tools.dynform.spi</artifactId> |
|
36 |
<scope>compile</scope> |
|
37 |
</dependency> |
|
38 |
<dependency> |
|
39 |
<groupId>org.gvsig</groupId> |
|
40 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
41 |
<scope>compile</scope> |
|
42 |
</dependency> |
|
43 |
<dependency> |
|
44 |
<groupId>org.gvsig</groupId> |
|
45 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
46 |
<scope>compile</scope> |
|
47 |
</dependency> |
|
48 |
<dependency> |
|
49 |
<groupId>org.gvsig</groupId> |
|
50 |
<artifactId>org.gvsig.tools.swing.impl</artifactId> |
|
51 |
<scope>runtime</scope> |
|
52 |
</dependency> |
|
53 |
<dependency> |
|
54 |
<groupId>org.gvsig</groupId> |
|
55 |
<artifactId>org.gvsig.utils</artifactId> |
|
56 |
<scope>compile</scope> |
|
57 |
</dependency> |
|
58 |
<dependency> |
|
59 |
<groupId>org.gvsig</groupId> |
|
60 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
61 |
<scope>compile</scope> |
|
62 |
</dependency> |
|
63 |
<dependency> |
|
64 |
<groupId>org.gvsig</groupId> |
|
65 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
66 |
<scope>compile</scope> |
|
67 |
</dependency> |
|
68 |
<dependency> |
|
69 |
<groupId>org.gvsig</groupId> |
|
70 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
71 |
<scope>compile</scope> |
|
72 |
</dependency> |
|
73 |
<dependency> |
|
74 |
<groupId>org.gvsig</groupId> |
|
75 |
<artifactId>org.gvsig.projection.api</artifactId> |
|
76 |
<scope>compile</scope> |
|
77 |
</dependency> |
|
78 |
<dependency> |
|
79 |
<groupId>org.gvsig</groupId> |
|
80 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
81 |
<scope>compile</scope> |
|
82 |
</dependency> |
|
83 |
<dependency> |
|
84 |
<groupId>org.gvsig</groupId> |
|
85 |
<artifactId>org.gvsig.fmap.mapcontext.operation</artifactId> |
|
86 |
<scope>compile</scope> |
|
87 |
</dependency> |
|
88 |
<dependency> |
|
89 |
<groupId>org.gvsig</groupId> |
|
90 |
<artifactId>org.gvsig.i18n</artifactId> |
|
91 |
<scope>compile</scope> |
|
92 |
</dependency> |
|
93 |
<dependency> |
|
94 |
<groupId>org.slf4j</groupId> |
|
95 |
<artifactId>slf4j-api</artifactId> |
|
96 |
<scope>compile</scope> |
|
97 |
</dependency> |
|
98 |
<dependency> |
|
99 |
<groupId>org.gvsig</groupId> |
|
100 |
<artifactId>org.gvsig.timesupport.lib.api</artifactId> |
|
101 |
<scope>compile</scope> |
|
102 |
</dependency> |
|
103 |
|
|
104 |
<!-- TEST --> |
|
105 |
|
|
106 |
<dependency> |
|
107 |
<groupId>org.gvsig</groupId> |
|
108 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
109 |
<type>test-jar</type> |
|
110 |
<scope>test</scope> |
|
111 |
</dependency> |
|
112 |
</dependencies> |
|
113 |
|
|
114 |
<build> |
|
115 |
<plugins> |
|
116 |
|
|
117 |
<plugin> |
|
118 |
<!-- Skip compilation tests --> |
|
119 |
<groupId>org.apache.maven.plugins</groupId> |
|
120 |
<artifactId>maven-compiler-plugin</artifactId> |
|
121 |
<executions> |
|
122 |
<execution> |
|
123 |
<id>default-testCompile</id> |
|
124 |
<phase>process-test-sources</phase> |
|
125 |
<goals> |
|
126 |
<goal>testCompile</goal> |
|
127 |
</goals> |
|
128 |
<configuration> |
|
129 |
<skip>true</skip> |
|
130 |
</configuration> |
|
131 |
</execution> |
|
132 |
</executions> |
|
133 |
</plugin> |
|
134 |
|
|
135 |
<plugin> |
|
136 |
<!-- Skip test execution --> |
|
137 |
<groupId>org.apache.maven.plugins</groupId> |
|
138 |
<artifactId>maven-surefire-plugin</artifactId> |
|
139 |
<configuration> |
|
140 |
<skipTests>true</skipTests> |
|
141 |
</configuration> |
|
142 |
</plugin> |
|
143 |
|
|
144 |
</plugins> |
|
145 |
</build> |
|
146 |
|
|
147 |
</project> |
|
0 | 148 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.fmap.mapcontrol.MapControlLibrary |
|
2 |
org.gvsig.fmap.mapcontrol.impl.DefaultMapControlLibrary |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text.properties | ||
---|---|---|
1 |
Visible=Visible |
|
2 |
Nombre=Nombre |
|
3 |
Alias=Alias |
|
4 |
|
|
5 |
Error_editar_geometria=Error al editar la geometr?a |
|
6 |
Geometria_no_editable_WKT=Geometr?a no editable en formato WKT, valor demasiado grande. |
|
7 |
|
|
8 |
geometry_to_wkt_exception=Error al convertir la geometr?a de la celda a formato WKT |
|
9 |
features_data_reload_exception=Error al recargar los fen?menos (features) |
|
10 |
get_feature_at_exception=Error al obtener el fen?meno de la fila = %(rowIndex) |
|
11 |
get_row_count_exception=Error al obtener el n?mero total de filas en la tabla |
|
12 |
set_feature_value_exception=Error al establecer el valor de la celda en la fila = %(rowIndex) y columna = %(columnIndex) con el valor = %(value) |
|
13 |
wkt_to_geometry_exception=Error al convertir a geometr?a el valor en WKT: %(wkt) |
|
14 |
table_selection_change_exception=Error al cambiar la selecci?n en la tabla de fen?menos (features) |
|
15 |
|
|
16 |
registros_seleccionados_total=Total registros seleccionados |
|
17 |
up=Subir |
|
18 |
down=Bajar |
|
19 |
remove=Eliminar |
|
20 |
|
|
21 |
_Invalid_value=Valor no v?lido |
|
22 |
_Unable_to_show_value=No se ha podido mostrar valor |
|
23 |
_Show_as_text=Mostrar como texto |
|
24 |
|
|
25 |
_Pixels=P?xeles |
|
26 |
|
|
0 | 27 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_zh.properties | ||
---|---|---|
1 |
registros_seleccionados_total=\u5df2\u9009\u5b9a\u8bb0\u5f55\u603b\u6570 |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_en.properties | ||
---|---|---|
1 |
Visible=Visible |
|
2 |
Nombre=Name |
|
3 |
Alias=Alias |
|
4 |
|
|
5 |
Error_editar_geometria=Error while editing the geometry |
|
6 |
Geometria_no_editable_WKT=Geometry not editable on WKT format, text value too big. |
|
7 |
|
|
8 |
geometry_to_wkt_exception=Error getting the geometry value of the cell as WKT |
|
9 |
features_data_reload_exception=Error reloading the features |
|
10 |
get_feature_at_exception=Error getting the feature at row = %(rowIndex) |
|
11 |
get_row_count_exception=Error getting the total table row count |
|
12 |
set_feature_value_exception=Error setting the value of the cell at row = %(rowIndex) and column = %(columnIndex) with the value = %(value) |
|
13 |
wkt_to_geometry_exception=Error getting the geometry value of the WKT value %(wkt) |
|
14 |
table_selection_change_exception=Error while changing the selection on the list of Features |
|
15 |
|
|
16 |
registros_seleccionados_total=Total of selected records |
|
17 |
up=Up |
|
18 |
down=Down |
|
19 |
|
|
20 |
_Invalid_value=Invalid Value |
|
21 |
_Unable_to_show_value=Unable to show value |
|
22 |
_Show_as_text=Show as text |
|
23 |
|
|
24 |
_Pixels=Pixels |
|
0 | 25 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_gl.properties | ||
---|---|---|
1 |
registros_seleccionados_total=Total rexistros seleccionados |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_ca.properties | ||
---|---|---|
1 |
registros_seleccionados_total=Total registres seleccionats |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_pt.properties | ||
---|---|---|
1 |
registros_seleccionados_total=Total de registos seleccionados |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_cs.properties | ||
---|---|---|
1 |
registros_seleccionados_total=Celkem zvolen\u00fdch z\u00e1znam\u016f |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_fr.properties | ||
---|---|---|
1 |
registros_seleccionados_total=Total registres s\u00e9lectionn\u00e9s |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_de.properties | ||
---|---|---|
1 |
registros_seleccionados_total=Alle ausgew\u00e4hlten register |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_eu.properties | ||
---|---|---|
1 |
registros_seleccionados_total=Hautatutako erregistroak guztira |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/resources/org/gvsig/fmap/mapcontrol/i18n/text_it.properties | ||
---|---|---|
1 |
registros_seleccionados_total=Totale registri selezionati |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/app/gui/JComboBoxUnits.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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.app.gui; |
|
25 |
|
|
26 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
27 |
import org.gvsig.i18n.Messages; |
|
28 |
import org.gvsig.utils.swing.JComboBox; |
|
29 |
|
|
30 |
|
|
31 |
/** |
|
32 |
* <p>Class representing a JComboBox with the measure units handled by the application. |
|
33 |
* It takes values from Attributes.NAMES and Attributes.CHANGE static fields. So, to |
|
34 |
* add more measure units, you must edit Attributes class and change will be automatically |
|
35 |
* reflected in the combo box.</p> |
|
36 |
* |
|
37 |
* <p>The internatiolanization of the field is automatically handled by the system</p> |
|
38 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
|
39 |
*/ |
|
40 |
public class JComboBoxUnits extends JComboBox { |
|
41 |
private static final long serialVersionUID = 8015263853737441433L; |
|
42 |
|
|
43 |
/** |
|
44 |
* Creates a new instance of JUnitComboBox including "pixel" units and |
|
45 |
* setting them as automatically pre-selected. |
|
46 |
*/ |
|
47 |
public JComboBoxUnits() { |
|
48 |
this(true); |
|
49 |
} |
|
50 |
|
|
51 |
/** |
|
52 |
* |
|
53 |
* Creates a new instance of JUnitComboBox. If includePixel is true |
|
54 |
* then pixel units are included in the list and they are automatically |
|
55 |
* pre-selected. Otherwise, meters are preselected. |
|
56 |
* |
|
57 |
*/ |
|
58 |
public JComboBoxUnits(boolean includePixel) { |
|
59 |
super(); |
|
60 |
String[] names=MapContext.getDistanceNames(); |
|
61 |
|
|
62 |
for (int i = 0; i < names.length; i++) { |
|
63 |
super.addItem(Messages.getText(names[i])); |
|
64 |
} |
|
65 |
if (includePixel) { |
|
66 |
super.addItem(Messages.getText("_Pixels")); |
|
67 |
setSelectedItem(Messages.getText("_Pixels")); |
|
68 |
} else { |
|
69 |
setSelectedIndex(1); |
|
70 |
} |
|
71 |
setMaximumRowCount(10); |
|
72 |
} |
|
73 |
|
|
74 |
|
|
75 |
/** |
|
76 |
* Returns the conversion factor from the <b>unit selected in the combo box</b> |
|
77 |
* to <b>meters</b> or <b>0</b> if pixels have been selected as the size unit. |
|
78 |
* @return |
|
79 |
*/ |
|
80 |
public double getUnitConversionFactor() { |
|
81 |
double unitFactor; |
|
82 |
try { |
|
83 |
unitFactor = MapContext.getDistanceTrans2Meter()[getSelectedIndex()]; |
|
84 |
} catch (ArrayIndexOutOfBoundsException aioobEx) { //jijiji |
|
85 |
unitFactor = 0; // which represents size in pixel |
|
86 |
} |
|
87 |
return unitFactor; |
|
88 |
|
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* the use of this method is not allowed in this combo box. |
|
93 |
* @deprecated |
|
94 |
*/ |
|
95 |
public void addItem(Object anObject) { |
|
96 |
throw new Error("Operation not allowed"); |
|
97 |
} |
|
98 |
|
|
99 |
/** |
|
100 |
* the use of this method is not allowed for this combo box. |
|
101 |
* @deprecated |
|
102 |
*/ |
|
103 |
public void removeAllItems() { |
|
104 |
throw new Error("Operation not allowed"); |
|
105 |
} |
|
106 |
|
|
107 |
public int getSelectedUnitIndex() { |
|
108 |
int i = getSelectedIndex(); |
|
109 |
if (i>MapContext.getDistanceNames().length-1) |
|
110 |
return -1; |
|
111 |
else return i; |
|
112 |
} |
|
113 |
|
|
114 |
public void setSelectedUnitIndex(int unitIndex) { |
|
115 |
if (unitIndex == -1) { |
|
116 |
setSelectedIndex(getItemCount()-1); |
|
117 |
} else { |
|
118 |
setSelectedIndex(unitIndex); |
|
119 |
} |
|
120 |
} |
|
121 |
|
|
122 |
|
|
123 |
|
|
124 |
} |
|
0 | 125 |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/propertypage/PropertiesPage.java | ||
---|---|---|
1 |
package org.gvsig.propertypage; |
|
2 |
|
|
3 |
import org.gvsig.tools.swing.api.Component; |
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
public interface PropertiesPage extends Component { |
|
9 |
|
|
10 |
/** |
|
11 |
* Title of the properties page |
|
12 |
* |
|
13 |
* @return the title. |
|
14 |
*/ |
|
15 |
public String getTitle(); |
|
16 |
|
|
17 |
/** |
|
18 |
* The priority of this properties page. |
|
19 |
* When more high is the priority more to the left are set properties page. |
|
20 |
* |
|
21 |
* @return the priority of the properties page |
|
22 |
*/ |
|
23 |
public int getPriority(); |
|
24 |
|
|
25 |
/** |
|
26 |
* Called when the button accept is presed by the user. |
|
27 |
* If return false the panel is not hidden and do not call whenAccept of |
|
28 |
* other properties pages. |
|
29 |
* |
|
30 |
* @return false to cancel the user action. |
|
31 |
*/ |
|
32 |
public boolean whenAccept(); |
|
33 |
|
|
34 |
/** |
|
35 |
* Called when the button apply is presed by the user. |
|
36 |
* If return false the panel do not call whenApply of |
|
37 |
* other properties pages. |
|
38 |
* |
|
39 |
* @return false to cancel the user action. |
|
40 |
*/ |
|
41 |
public boolean whenApply(); |
|
42 |
|
|
43 |
/** |
|
44 |
* Called when the button accept is presed by the user. |
|
45 |
* If return false the panel is not hidden and do not call whenCancel of |
|
46 |
* other properties pages. |
|
47 |
* |
|
48 |
* @return false to cancel the user action. |
|
49 |
*/ |
|
50 |
public boolean whenCancel(); |
|
51 |
|
|
52 |
} |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/propertypage/PropertiesPageFactory.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.propertypage; |
|
3 |
|
|
4 |
public interface PropertiesPageFactory { |
|
5 |
|
|
6 |
/** |
|
7 |
* Return the group identifier. |
|
8 |
* The group identifier identify the object that store the properties that |
|
9 |
* this property page handle. Bty excample: |
|
10 |
* - Project |
|
11 |
* - View |
|
12 |
* - Layer |
|
13 |
* |
|
14 |
* @return the group identifier |
|
15 |
*/ |
|
16 |
public String getGroupID(); |
|
17 |
|
|
18 |
/** |
|
19 |
* Return true if this propeties page is enabled for the object. |
|
20 |
* |
|
21 |
* @param obj object that store the properties of this properties page. |
|
22 |
* @return true if the page is enabled |
|
23 |
*/ |
|
24 |
public boolean isVisible(Object obj); |
|
25 |
|
|
26 |
/** |
|
27 |
* Create a instance of the propeties page for the object. |
|
28 |
* |
|
29 |
* @param obj object that store the properties of this properties page. |
|
30 |
* @return the properties page |
|
31 |
*/ |
|
32 |
public PropertiesPage create(Object obj); |
|
33 |
} |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/propertypage/impl/DefaultPropertiesPageManager.java | ||
---|---|---|
1 |
|
|
2 |
|
|
3 |
package org.gvsig.propertypage.impl; |
|
4 |
|
|
5 |
import java.util.ArrayList; |
|
6 |
import java.util.Collections; |
|
7 |
import java.util.Comparator; |
|
8 |
import java.util.HashMap; |
|
9 |
import java.util.List; |
|
10 |
import java.util.Map; |
|
11 |
import org.gvsig.propertypage.PropertiesPage; |
|
12 |
import org.gvsig.propertypage.PropertiesPageFactory; |
|
13 |
import org.gvsig.propertypage.PropertiesPageManager; |
|
14 |
import org.slf4j.Logger; |
|
15 |
import org.slf4j.LoggerFactory; |
|
16 |
|
|
17 |
|
|
18 |
public class DefaultPropertiesPageManager implements PropertiesPageManager { |
|
19 |
private static final Logger logger = LoggerFactory.getLogger(DefaultPropertiesPageManager.class); |
|
20 |
|
|
21 |
private final Map<String, List<PropertiesPageFactory>> groups = new HashMap<String, List<PropertiesPageFactory>>(); |
|
22 |
|
|
23 |
public DefaultPropertiesPageManager() { |
|
24 |
|
|
25 |
} |
|
26 |
|
|
27 |
public void registerFactory(PropertiesPageFactory factory) { |
|
28 |
logger.info("Register PropertisPageFactory "+factory.getClass().getName()+" , groupID="+factory.getGroupID()+" ("+factory.toString()+")."); |
|
29 |
List<PropertiesPageFactory> group = this.getFactories(factory.getGroupID()); |
|
30 |
group.add(factory); |
|
31 |
} |
|
32 |
|
|
33 |
private List<PropertiesPageFactory> getFactories(String groupID) { |
|
34 |
logger.info("get propeties page factories for groupID '"+groupID+"'"); |
|
35 |
List<PropertiesPageFactory> group = this.groups.get(groupID); |
|
36 |
if( group == null ) { |
|
37 |
group = new ArrayList<PropertiesPageFactory>(); |
|
38 |
this.groups.put(groupID, group); |
|
39 |
} |
|
40 |
return group; |
|
41 |
} |
|
42 |
|
|
43 |
public List<PropertiesPage> getPages(String groupID, Object obj) { |
|
44 |
logger.info("get propeties page for groupID '"+groupID+"', and object '"+obj.toString()+"'."); |
|
45 |
List<PropertiesPageFactory> factories = this.getFactories(groupID); |
|
46 |
List<PropertiesPage> pages = new ArrayList<PropertiesPage>(); |
|
47 |
for ( PropertiesPageFactory factory : factories ) { |
|
48 |
if( factory.isVisible(obj) ) { |
|
49 |
pages.add(factory.create(obj)); |
|
50 |
} |
|
51 |
} |
|
52 |
Collections.sort(pages, new Comparator<PropertiesPage>() { |
|
53 |
public int compare(PropertiesPage f1, PropertiesPage f2) { |
|
54 |
int n = f2.getPriority() - f1.getPriority(); |
|
55 |
if( n != 0 ) { |
|
56 |
return n; |
|
57 |
} |
|
58 |
if( f1.getTitle()==null || f2.getTitle()==null ) { |
|
59 |
// Mas que nada para que no pete, y aunque el orden |
|
60 |
// no sea correcto muestre algo al usuario. |
|
61 |
return 0; |
|
62 |
} |
|
63 |
return f1.getTitle().compareTo(f2.getTitle()); |
|
64 |
} |
|
65 |
}); |
|
66 |
return pages; |
|
67 |
} |
|
68 |
|
|
69 |
|
|
70 |
} |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/propertypage/BasePropertiesPagePanelLayout.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
|
|
7 |
package org.gvsig.propertypage; |
|
8 |
|
|
9 |
import java.awt.Dimension; |
|
10 |
import java.awt.GridBagConstraints; |
|
11 |
import java.awt.GridBagLayout; |
|
12 |
import javax.swing.BorderFactory; |
|
13 |
import javax.swing.Box; |
|
14 |
import javax.swing.JButton; |
|
15 |
import javax.swing.JLabel; |
|
16 |
import javax.swing.JPanel; |
|
17 |
import javax.swing.JScrollPane; |
|
18 |
import javax.swing.JTextArea; |
|
19 |
import javax.swing.border.BevelBorder; |
|
20 |
import javax.swing.border.SoftBevelBorder; |
|
21 |
import org.jdesktop.layout.GroupLayout; |
|
22 |
|
|
23 |
/** |
|
24 |
* |
|
25 |
* @author usuario |
|
26 |
*/ |
|
27 |
public class BasePropertiesPagePanelLayout extends javax.swing.JPanel { |
|
28 |
|
|
29 |
/** |
|
30 |
* Creates new form BasePropertiesPagePanelLayout |
|
31 |
*/ |
|
32 |
public BasePropertiesPagePanelLayout() { |
|
33 |
initComponents(); |
|
34 |
} |
|
35 |
|
|
36 |
/** |
|
37 |
* This method is called from within the constructor to |
|
38 |
* initialize the form. |
|
39 |
* WARNING: Do NOT modify this code. The content of this method is |
|
40 |
* always regenerated by the Form Editor. |
|
41 |
*/ |
|
42 |
@SuppressWarnings("unchecked") |
|
43 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents |
|
44 |
private void initComponents() { |
|
45 |
GridBagConstraints gridBagConstraints; |
|
46 |
|
|
47 |
titleLabel = new JLabel(); |
|
48 |
applyButton = new JButton(); |
|
49 |
cancelButton = new JButton(); |
|
50 |
acceptButton = new JButton(); |
|
51 |
content = new JPanel(); |
|
52 |
filler1 = new Box.Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(32767, 0)); |
|
53 |
|
|
54 |
GridBagLayout layout = new GridBagLayout(); |
|
55 |
layout.columnWidths = new int[] {0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0}; |
|
56 |
layout.rowHeights = new int[] {0, 4, 0, 4, 0, 4, 0, 4, 0}; |
|
57 |
setLayout(layout); |
|
58 |
|
|
59 |
titleLabel.setText("jLabel1"); |
|
60 |
gridBagConstraints = new GridBagConstraints(); |
|
61 |
gridBagConstraints.gridx = 2; |
|
62 |
gridBagConstraints.gridy = 2; |
|
63 |
gridBagConstraints.gridwidth = 7; |
|
64 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
65 |
gridBagConstraints.anchor = GridBagConstraints.LINE_START; |
|
66 |
add(titleLabel, gridBagConstraints); |
|
67 |
|
|
68 |
applyButton.setText("Apply"); |
|
69 |
gridBagConstraints = new GridBagConstraints(); |
|
70 |
gridBagConstraints.gridx = 6; |
|
71 |
gridBagConstraints.gridy = 6; |
|
72 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
73 |
gridBagConstraints.anchor = GridBagConstraints.LINE_END; |
|
74 |
gridBagConstraints.weightx = 0.1; |
|
75 |
add(applyButton, gridBagConstraints); |
|
76 |
|
|
77 |
cancelButton.setText("Cancel"); |
|
78 |
gridBagConstraints = new GridBagConstraints(); |
|
79 |
gridBagConstraints.gridx = 4; |
|
80 |
gridBagConstraints.gridy = 6; |
|
81 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
82 |
gridBagConstraints.anchor = GridBagConstraints.LINE_END; |
|
83 |
gridBagConstraints.weightx = 0.1; |
|
84 |
add(cancelButton, gridBagConstraints); |
|
85 |
|
|
86 |
acceptButton.setText("Accept"); |
|
87 |
gridBagConstraints = new GridBagConstraints(); |
|
88 |
gridBagConstraints.gridx = 8; |
|
89 |
gridBagConstraints.gridy = 6; |
|
90 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
91 |
gridBagConstraints.anchor = GridBagConstraints.LINE_END; |
|
92 |
gridBagConstraints.weightx = 0.1; |
|
93 |
add(acceptButton, gridBagConstraints); |
|
94 |
|
|
95 |
content.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); |
|
96 |
|
|
97 |
GroupLayout contentLayout = new GroupLayout(content); |
|
98 |
content.setLayout(contentLayout); |
|
99 |
contentLayout.setHorizontalGroup( |
|
100 |
contentLayout.createParallelGroup(GroupLayout.LEADING) |
|
101 |
.add(0, 388, Short.MAX_VALUE) |
|
102 |
); |
|
103 |
contentLayout.setVerticalGroup( |
|
104 |
contentLayout.createParallelGroup(GroupLayout.LEADING) |
|
105 |
.add(0, 234, Short.MAX_VALUE) |
|
106 |
); |
|
107 |
|
|
108 |
gridBagConstraints = new GridBagConstraints(); |
|
109 |
gridBagConstraints.gridx = 2; |
|
110 |
gridBagConstraints.gridy = 4; |
|
111 |
gridBagConstraints.gridwidth = 7; |
|
112 |
gridBagConstraints.fill = GridBagConstraints.BOTH; |
|
113 |
gridBagConstraints.weightx = 1.0; |
|
114 |
gridBagConstraints.weighty = 1.0; |
|
115 |
add(content, gridBagConstraints); |
|
116 |
gridBagConstraints = new GridBagConstraints(); |
|
117 |
gridBagConstraints.gridx = 2; |
|
118 |
gridBagConstraints.gridy = 6; |
|
119 |
gridBagConstraints.weightx = 1.0; |
|
120 |
add(filler1, gridBagConstraints); |
|
121 |
}// </editor-fold>//GEN-END:initComponents |
|
122 |
|
|
123 |
|
|
124 |
// Variables declaration - do not modify//GEN-BEGIN:variables |
|
125 |
protected JButton acceptButton; |
|
126 |
protected JButton applyButton; |
|
127 |
protected JButton cancelButton; |
|
128 |
protected JPanel content; |
|
129 |
protected Box.Filler filler1; |
|
130 |
protected JLabel titleLabel; |
|
131 |
// End of variables declaration//GEN-END:variables |
|
132 |
} |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/propertypage/BasePropertiesPageDialog.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.propertypage; |
|
3 |
|
|
4 |
import java.awt.BorderLayout; |
|
5 |
import java.awt.Component; |
|
6 |
import java.awt.event.ActionEvent; |
|
7 |
import java.awt.event.ActionListener; |
|
8 |
import java.util.List; |
|
9 |
import javax.swing.JComponent; |
|
10 |
import javax.swing.JTabbedPane; |
|
11 |
import org.gvsig.fmap.mapcontrol.MapControlLocator; |
|
12 |
import org.gvsig.tools.ToolsLocator; |
|
13 |
import org.gvsig.tools.i18n.I18nManager; |
|
14 |
|
|
15 |
|
|
16 |
public class BasePropertiesPageDialog extends BasePropertiesPagePanelLayout implements org.gvsig.tools.swing.api.Component { |
|
17 |
public static final int ACTION_CANCEL = 0; |
|
18 |
public static final int ACTION_ACCEPT = 1; |
|
19 |
public static final int ACTION_APPLY = 2; |
|
20 |
|
|
21 |
private Object obj; |
|
22 |
private String groupID; |
|
23 |
private List<PropertiesPage> pages = null; |
|
24 |
private int userAction = ACTION_ACCEPT; |
|
25 |
|
|
26 |
public BasePropertiesPageDialog() { |
|
27 |
} |
|
28 |
|
|
29 |
public BasePropertiesPageDialog(Object obj, String groupID) { |
|
30 |
init(groupID, obj); |
|
31 |
} |
|
32 |
|
|
33 |
protected void init(String groupID, Object obj) { |
|
34 |
this.obj = obj; |
|
35 |
this.groupID = groupID; |
|
36 |
PropertiesPageManager manager = MapControlLocator.getPropertiesPageManager(); |
|
37 |
this.pages = manager.getPages(this.groupID,this.obj); |
|
38 |
initComponents(); |
|
39 |
} |
|
40 |
|
|
41 |
protected void initComponents() { |
|
42 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
43 |
|
|
44 |
this.content.setLayout(new BorderLayout()); |
|
45 |
this.content.add(createPropertiesPagesPanel(), BorderLayout.CENTER ); |
|
46 |
|
|
47 |
this.titleLabel.setText(""); |
|
48 |
|
|
49 |
this.acceptButton.setText(i18nManager.getTranslation("accept")); |
|
50 |
this.acceptButton.addActionListener( new ActionListener() { |
|
51 |
public void actionPerformed(ActionEvent ae) { |
|
52 |
whenAccept(); |
|
53 |
} |
|
54 |
}); |
|
55 |
this.applyButton.setText(i18nManager.getTranslation("apply")); |
|
56 |
this.applyButton.addActionListener( new ActionListener() { |
|
57 |
public void actionPerformed(ActionEvent ae) { |
|
58 |
whenApply(); |
|
59 |
} |
|
60 |
}); |
|
61 |
this.cancelButton.setText(i18nManager.getTranslation("cancel")); |
|
62 |
this.cancelButton.addActionListener( new ActionListener() { |
|
63 |
public void actionPerformed(ActionEvent ae) { |
|
64 |
whenCancel(); |
|
65 |
} |
|
66 |
}); |
|
67 |
|
|
68 |
} |
|
69 |
|
|
70 |
protected Component createPropertiesPagesPanel() { |
|
71 |
if( this.pages.size()==1 && !useTabsAlwais() ) { |
|
72 |
PropertiesPage page = this.pages.get(0); |
|
73 |
return page.asJComponent(); |
|
74 |
} else { |
|
75 |
JTabbedPane tabbedPane = new JTabbedPane(); |
|
76 |
for( int i=0; i<this.pages.size(); i++ ) { |
|
77 |
PropertiesPage page = this.pages.get(i); |
|
78 |
tabbedPane.addTab(page.getTitle(), page.asJComponent()); |
|
79 |
} |
|
80 |
return tabbedPane; |
|
81 |
} |
|
82 |
} |
|
83 |
|
|
84 |
protected boolean useTabsAlwais() { |
|
85 |
return false; |
|
86 |
} |
|
87 |
|
|
88 |
public void whenAccept() { |
|
89 |
for( int i=0; i<this.pages.size(); i++ ) { |
|
90 |
PropertiesPage page = this.pages.get(i); |
|
91 |
if( ! page.whenAccept() ) { |
|
92 |
return; |
|
93 |
} |
|
94 |
} |
|
95 |
this.userAction = ACTION_ACCEPT; |
|
96 |
this.closeDialog(); |
|
97 |
} |
|
98 |
|
|
99 |
public void whenApply() { |
|
100 |
for( int i=0; i<this.pages.size(); i++ ) { |
|
101 |
PropertiesPage page = this.pages.get(i); |
|
102 |
if( ! page.whenApply() ) { |
|
103 |
return; |
|
104 |
} |
|
105 |
} |
|
106 |
this.userAction = ACTION_APPLY; |
|
107 |
} |
|
108 |
|
|
109 |
public void whenCancel() { |
|
110 |
for( int i=0; i<this.pages.size(); i++ ) { |
|
111 |
PropertiesPage page = this.pages.get(i); |
|
112 |
if( ! page.whenCancel() ) { |
|
113 |
return; |
|
114 |
} |
|
115 |
} |
|
116 |
this.userAction = ACTION_CANCEL; |
|
117 |
this.closeDialog(); |
|
118 |
} |
|
119 |
|
|
120 |
public int getUserAction() { |
|
121 |
return this.userAction; |
|
122 |
} |
|
123 |
|
|
124 |
protected void closeDialog() { |
|
125 |
this.setVisible(false); |
|
126 |
} |
|
127 |
|
|
128 |
public JComponent asJComponent() { |
|
129 |
return this; |
|
130 |
} |
|
131 |
|
|
132 |
|
|
133 |
} |
tags/org.gvsig.desktop-2.0.115/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/propertypage/BasePropertiesPagePanelLayout.form | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
|
|
3 |
<Form version="1.8" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> |
|
4 |
<AuxValues> |
|
5 |
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> |
|
6 |
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> |
|
7 |
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="false"/> |
|
8 |
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> |
|
9 |
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> |
|
10 |
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/> |
|
11 |
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> |
|
12 |
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> |
|
13 |
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="4"/> |
|
14 |
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/> |
|
15 |
</AuxValues> |
|
16 |
<SubComponents> |
|
17 |
<Component class="javax.swing.JLabel" name="titleLabel"> |
|
18 |
<Properties> |
|
19 |
<Property name="text" type="java.lang.String" value="jLabel1"/> |
|
20 |
</Properties> |
|
21 |
<Constraints> |
|
22 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
23 |
<GridBagConstraints gridX="2" gridY="2" gridWidth="7" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/> |
|
24 |
</Constraint> |
|
25 |
</Constraints> |
|
26 |
</Component> |
|
27 |
<Component class="javax.swing.JButton" name="applyButton"> |
|
28 |
<Properties> |
|
29 |
<Property name="text" type="java.lang.String" value="Apply"/> |
|
30 |
</Properties> |
|
31 |
<Constraints> |
|
32 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
33 |
<GridBagConstraints gridX="6" gridY="6" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.1" weightY="0.0"/> |
|
34 |
</Constraint> |
|
35 |
</Constraints> |
|
36 |
</Component> |
|
37 |
<Component class="javax.swing.JButton" name="cancelButton"> |
|
38 |
<Properties> |
|
39 |
<Property name="text" type="java.lang.String" value="Cancel"/> |
|
40 |
</Properties> |
|
41 |
<Constraints> |
|
42 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
43 |
<GridBagConstraints gridX="4" gridY="6" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.1" weightY="0.0"/> |
|
44 |
</Constraint> |
|
45 |
</Constraints> |
|
46 |
</Component> |
|
47 |
<Component class="javax.swing.JButton" name="acceptButton"> |
|
48 |
<Properties> |
|
49 |
<Property name="text" type="java.lang.String" value="Accept"/> |
|
50 |
</Properties> |
|
51 |
<Constraints> |
|
52 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
53 |
<GridBagConstraints gridX="8" gridY="6" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.1" weightY="0.0"/> |
|
54 |
</Constraint> |
|
55 |
</Constraints> |
|
56 |
</Component> |
|
57 |
<Container class="javax.swing.JPanel" name="content"> |
|
58 |
<Properties> |
|
59 |
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> |
|
60 |
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> |
|
61 |
<EmptyBorder/> |
|
62 |
</Border> |
|
63 |
</Property> |
|
64 |
</Properties> |
|
65 |
<Constraints> |
|
66 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
67 |
<GridBagConstraints gridX="2" gridY="4" gridWidth="7" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/> |
|
68 |
</Constraint> |
|
69 |
</Constraints> |
|
70 |
|
|
71 |
<Layout> |
|
72 |
<DimensionLayout dim="0"> |
|
73 |
<Group type="103" groupAlignment="0" attributes="0"> |
|
74 |
<EmptySpace min="0" pref="388" max="32767" attributes="0"/> |
|
75 |
</Group> |
|
76 |
</DimensionLayout> |
|
77 |
<DimensionLayout dim="1"> |
|
78 |
<Group type="103" groupAlignment="0" attributes="0"> |
|
79 |
<EmptySpace min="0" pref="234" max="32767" attributes="0"/> |
|
80 |
</Group> |
|
81 |
</DimensionLayout> |
|
82 |
</Layout> |
|
83 |
</Container> |
|
84 |
<Component class="javax.swing.Box$Filler" name="filler1"> |
|
85 |
<Properties> |
|
86 |
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> |
|
87 |
<Dimension value="[32767, 0]"/> |
|
88 |
</Property> |
|
89 |
</Properties> |
|
90 |
<AuxValues> |
|
91 |
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> |
|
92 |
</AuxValues> |
|
93 |
<Constraints> |
|
94 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
95 |
<GridBagConstraints gridX="2" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/> |
|
96 |
</Constraint> |
|
97 |
</Constraints> |
|
98 |
</Component> |
|
99 |
</SubComponents> |
|
100 |
<LayoutCode> |
|
101 |
<CodeStatement> |
|
102 |
<CodeExpression id="1_layout"> |
|
103 |
<CodeVariable name="layout" type="4096" declaredType="java.awt.GridBagLayout"/> |
|
104 |
<ExpressionOrigin> |
|
105 |
<ExpressionProvider type="CodeConstructor"> |
|
106 |
<CodeConstructor class="java.awt.GridBagLayout" parameterTypes=""/> |
|
107 |
</ExpressionProvider> |
|
108 |
</ExpressionOrigin> |
|
109 |
</CodeExpression> |
|
110 |
<StatementProvider type="CodeExpression"> |
|
111 |
<CodeExpression id="1_layout"/> |
|
112 |
</StatementProvider> |
|
113 |
</CodeStatement> |
|
114 |
<CodeStatement> |
|
115 |
<CodeExpression id="1_layout"/> |
|
116 |
<StatementProvider type="CodeField"> |
|
117 |
<CodeField name="columnWidths" class="java.awt.GridBagLayout"/> |
|
118 |
</StatementProvider> |
|
119 |
<Parameters> |
|
120 |
<CodeExpression id="2"> |
|
121 |
<ExpressionOrigin> |
|
122 |
<Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor"> |
|
123 |
<PropertyValue value="[0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0]"/> |
|
124 |
</Value> |
|
125 |
</ExpressionOrigin> |
|
126 |
</CodeExpression> |
|
127 |
</Parameters> |
|
128 |
</CodeStatement> |
|
129 |
<CodeStatement> |
|
130 |
<CodeExpression id="1_layout"/> |
|
131 |
<StatementProvider type="CodeField"> |
|
132 |
<CodeField name="rowHeights" class="java.awt.GridBagLayout"/> |
|
133 |
</StatementProvider> |
|
134 |
<Parameters> |
|
135 |
<CodeExpression id="3"> |
|
136 |
<ExpressionOrigin> |
|
137 |
<Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor"> |
|
138 |
<PropertyValue value="[0, 4, 0, 4, 0, 4, 0, 4, 0]"/> |
|
139 |
</Value> |
|
140 |
</ExpressionOrigin> |
|
141 |
</CodeExpression> |
|
142 |
</Parameters> |
|
143 |
</CodeStatement> |
|
144 |
<CodeStatement> |
|
145 |
<CodeExpression id="4"> |
|
146 |
<ExpressionOrigin> |
|
147 |
<ExpressionProvider type="ComponentRef"> |
|
148 |
<ComponentRef name="."/> |
|
149 |
</ExpressionProvider> |
|
150 |
</ExpressionOrigin> |
|
151 |
</CodeExpression> |
|
152 |
<StatementProvider type="CodeMethod"> |
|
153 |
<CodeMethod name="setLayout" class="java.awt.Container" parameterTypes="java.awt.LayoutManager"/> |
|
154 |
</StatementProvider> |
|
155 |
<Parameters> |
|
156 |
<CodeExpression id="1_layout"/> |
|
157 |
</Parameters> |
|
158 |
</CodeStatement> |
|
159 |
<CodeStatement> |
|
160 |
<CodeExpression id="5_gridBagConstraints"> |
|
161 |
<CodeVariable name="gridBagConstraints" type="20480" declaredType="java.awt.GridBagConstraints"/> |
|
162 |
<ExpressionOrigin> |
|
163 |
<ExpressionProvider type="CodeConstructor"> |
|
164 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
165 |
</ExpressionProvider> |
|
166 |
</ExpressionOrigin> |
|
167 |
</CodeExpression> |
|
168 |
<StatementProvider type="CodeExpression"> |
|
169 |
<CodeExpression id="5_gridBagConstraints"/> |
|
170 |
</StatementProvider> |
|
171 |
</CodeStatement> |
|
172 |
<CodeStatement> |
|
173 |
<CodeExpression id="5_gridBagConstraints"/> |
|
174 |
<StatementProvider type="CodeField"> |
|
175 |
<CodeField name="gridx" class="java.awt.GridBagConstraints"/> |
|
176 |
</StatementProvider> |
|
177 |
<Parameters> |
|
178 |
<CodeExpression id="6"> |
|
179 |
<ExpressionOrigin> |
|
180 |
<Value type="int" value="2"/> |
|
181 |
</ExpressionOrigin> |
|
182 |
</CodeExpression> |
|
183 |
</Parameters> |
|
184 |
</CodeStatement> |
|
185 |
<CodeStatement> |
|
186 |
<CodeExpression id="5_gridBagConstraints"/> |
|
187 |
<StatementProvider type="CodeField"> |
|
188 |
<CodeField name="gridy" class="java.awt.GridBagConstraints"/> |
|
189 |
</StatementProvider> |
|
190 |
<Parameters> |
|
191 |
<CodeExpression id="7"> |
|
192 |
<ExpressionOrigin> |
|
193 |
<Value type="int" value="2"/> |
|
194 |
</ExpressionOrigin> |
|
195 |
</CodeExpression> |
|
196 |
</Parameters> |
|
197 |
</CodeStatement> |
|
198 |
<CodeStatement> |
|
199 |
<CodeExpression id="5_gridBagConstraints"/> |
|
200 |
<StatementProvider type="CodeField"> |
|
201 |
<CodeField name="gridwidth" class="java.awt.GridBagConstraints"/> |
|
202 |
</StatementProvider> |
|
203 |
<Parameters> |
|
204 |
<CodeExpression id="8"> |
|
205 |
<ExpressionOrigin> |
|
206 |
<Value type="int" value="7"/> |
|
207 |
</ExpressionOrigin> |
|
208 |
</CodeExpression> |
|
209 |
</Parameters> |
|
210 |
</CodeStatement> |
|
211 |
<CodeStatement> |
|
212 |
<CodeExpression id="5_gridBagConstraints"/> |
|
213 |
<StatementProvider type="CodeField"> |
|
214 |
<CodeField name="fill" class="java.awt.GridBagConstraints"/> |
|
215 |
</StatementProvider> |
|
216 |
<Parameters> |
|
217 |
<CodeExpression id="9"> |
|
218 |
<ExpressionOrigin> |
|
219 |
<Value type="int" value="2"/> |
|
220 |
</ExpressionOrigin> |
|
221 |
</CodeExpression> |
|
222 |
</Parameters> |
|
223 |
</CodeStatement> |
|
224 |
<CodeStatement> |
|
225 |
<CodeExpression id="5_gridBagConstraints"/> |
|
226 |
<StatementProvider type="CodeField"> |
|
227 |
<CodeField name="anchor" class="java.awt.GridBagConstraints"/> |
|
228 |
</StatementProvider> |
|
229 |
<Parameters> |
|
230 |
<CodeExpression id="10"> |
|
231 |
<ExpressionOrigin> |
|
232 |
<Value type="int" value="21"/> |
|
233 |
</ExpressionOrigin> |
|
234 |
</CodeExpression> |
|
235 |
</Parameters> |
|
236 |
</CodeStatement> |
|
237 |
<CodeStatement> |
|
238 |
<CodeExpression id="4"/> |
|
239 |
<StatementProvider type="CodeMethod"> |
|
240 |
<CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/> |
|
241 |
</StatementProvider> |
|
242 |
<Parameters> |
|
243 |
<CodeExpression id="11_titleLabel"> |
|
244 |
<CodeVariable name="titleLabel" type="8196" declaredType="javax.swing.JLabel"/> |
|
245 |
<ExpressionOrigin> |
|
246 |
<ExpressionProvider type="ComponentRef"> |
|
247 |
<ComponentRef name="titleLabel"/> |
|
248 |
</ExpressionProvider> |
|
249 |
</ExpressionOrigin> |
|
250 |
</CodeExpression> |
|
251 |
<CodeExpression id="5_gridBagConstraints"/> |
|
252 |
</Parameters> |
|
253 |
</CodeStatement> |
|
254 |
<CodeStatement> |
|
255 |
<CodeExpression id="12_gridBagConstraints"> |
|
256 |
<CodeVariable name="gridBagConstraints"/> |
|
257 |
<ExpressionOrigin> |
|
258 |
<ExpressionProvider type="CodeConstructor"> |
|
259 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
260 |
</ExpressionProvider> |
|
261 |
</ExpressionOrigin> |
|
262 |
</CodeExpression> |
|
263 |
<StatementProvider type="CodeExpression"> |
|
264 |
<CodeExpression id="12_gridBagConstraints"/> |
|
265 |
</StatementProvider> |
|
266 |
</CodeStatement> |
|
267 |
<CodeStatement> |
|
268 |
<CodeExpression id="12_gridBagConstraints"/> |
|
269 |
<StatementProvider type="CodeField"> |
|
270 |
<CodeField name="gridx" class="java.awt.GridBagConstraints"/> |
|
271 |
</StatementProvider> |
|
272 |
<Parameters> |
|
273 |
<CodeExpression id="13"> |
|
274 |
<ExpressionOrigin> |
|
275 |
<Value type="int" value="6"/> |
|
276 |
</ExpressionOrigin> |
|
277 |
</CodeExpression> |
|
278 |
</Parameters> |
|
279 |
</CodeStatement> |
|
280 |
<CodeStatement> |
|
281 |
<CodeExpression id="12_gridBagConstraints"/> |
|
282 |
<StatementProvider type="CodeField"> |
|
283 |
<CodeField name="gridy" class="java.awt.GridBagConstraints"/> |
|
284 |
</StatementProvider> |
|
285 |
<Parameters> |
|
286 |
<CodeExpression id="14"> |
|
287 |
<ExpressionOrigin> |
|
288 |
<Value type="int" value="6"/> |
|
289 |
</ExpressionOrigin> |
|
290 |
</CodeExpression> |
|
291 |
</Parameters> |
|
292 |
</CodeStatement> |
|
293 |
<CodeStatement> |
|
294 |
<CodeExpression id="12_gridBagConstraints"/> |
|
295 |
<StatementProvider type="CodeField"> |
|
296 |
<CodeField name="fill" class="java.awt.GridBagConstraints"/> |
|
297 |
</StatementProvider> |
|
298 |
<Parameters> |
|
299 |
<CodeExpression id="15"> |
|
300 |
<ExpressionOrigin> |
|
301 |
<Value type="int" value="2"/> |
|
302 |
</ExpressionOrigin> |
|
303 |
</CodeExpression> |
|
304 |
</Parameters> |
|
305 |
</CodeStatement> |
|
306 |
<CodeStatement> |
|
307 |
<CodeExpression id="12_gridBagConstraints"/> |
|
308 |
<StatementProvider type="CodeField"> |
|
309 |
<CodeField name="anchor" class="java.awt.GridBagConstraints"/> |
|
310 |
</StatementProvider> |
|
311 |
<Parameters> |
|
312 |
<CodeExpression id="16"> |
|
313 |
<ExpressionOrigin> |
|
314 |
<Value type="int" value="22"/> |
|
315 |
</ExpressionOrigin> |
|
316 |
</CodeExpression> |
|
317 |
</Parameters> |
|
318 |
</CodeStatement> |
|
319 |
<CodeStatement> |
|
320 |
<CodeExpression id="12_gridBagConstraints"/> |
|
321 |
<StatementProvider type="CodeField"> |
|
322 |
<CodeField name="weightx" class="java.awt.GridBagConstraints"/> |
|
323 |
</StatementProvider> |
|
324 |
<Parameters> |
|
325 |
<CodeExpression id="17"> |
|
326 |
<ExpressionOrigin> |
|
327 |
<Value type="double" value="0.1"/> |
|
328 |
</ExpressionOrigin> |
|
329 |
</CodeExpression> |
|
330 |
</Parameters> |
|
331 |
</CodeStatement> |
|
332 |
<CodeStatement> |
|
333 |
<CodeExpression id="4"/> |
|
334 |
<StatementProvider type="CodeMethod"> |
|
335 |
<CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/> |
|
336 |
</StatementProvider> |
|
337 |
<Parameters> |
|
338 |
<CodeExpression id="18_applyButton"> |
|
339 |
<CodeVariable name="applyButton" type="8196" declaredType="javax.swing.JButton"/> |
|
340 |
<ExpressionOrigin> |
|
341 |
<ExpressionProvider type="ComponentRef"> |
|
342 |
<ComponentRef name="applyButton"/> |
|
343 |
</ExpressionProvider> |
|
344 |
</ExpressionOrigin> |
|
345 |
</CodeExpression> |
|
346 |
<CodeExpression id="12_gridBagConstraints"/> |
|
347 |
</Parameters> |
|
348 |
</CodeStatement> |
|
349 |
<CodeStatement> |
|
350 |
<CodeExpression id="19_gridBagConstraints"> |
|
351 |
<CodeVariable name="gridBagConstraints"/> |
|
352 |
<ExpressionOrigin> |
|
353 |
<ExpressionProvider type="CodeConstructor"> |
|
354 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
355 |
</ExpressionProvider> |
|
356 |
</ExpressionOrigin> |
|
357 |
</CodeExpression> |
|
358 |
<StatementProvider type="CodeExpression"> |
|
359 |
<CodeExpression id="19_gridBagConstraints"/> |
|
360 |
</StatementProvider> |
|
361 |
</CodeStatement> |
|
362 |
<CodeStatement> |
|
363 |
<CodeExpression id="19_gridBagConstraints"/> |
|
364 |
<StatementProvider type="CodeField"> |
|
365 |
<CodeField name="gridx" class="java.awt.GridBagConstraints"/> |
|
366 |
</StatementProvider> |
|
367 |
<Parameters> |
|
368 |
<CodeExpression id="20"> |
|
369 |
<ExpressionOrigin> |
|
370 |
<Value type="int" value="4"/> |
|
371 |
</ExpressionOrigin> |
|
372 |
</CodeExpression> |
|
373 |
</Parameters> |
|
374 |
</CodeStatement> |
|
375 |
<CodeStatement> |
|
376 |
<CodeExpression id="19_gridBagConstraints"/> |
|
377 |
<StatementProvider type="CodeField"> |
|
378 |
<CodeField name="gridy" class="java.awt.GridBagConstraints"/> |
|
379 |
</StatementProvider> |
|
380 |
<Parameters> |
|
381 |
<CodeExpression id="21"> |
|
382 |
<ExpressionOrigin> |
|
383 |
<Value type="int" value="6"/> |
|
384 |
</ExpressionOrigin> |
|
385 |
</CodeExpression> |
|
386 |
</Parameters> |
|
387 |
</CodeStatement> |
|
388 |
<CodeStatement> |
|
389 |
<CodeExpression id="19_gridBagConstraints"/> |
|
390 |
<StatementProvider type="CodeField"> |
|
391 |
<CodeField name="fill" class="java.awt.GridBagConstraints"/> |
|
392 |
</StatementProvider> |
|
393 |
<Parameters> |
|
394 |
<CodeExpression id="22"> |
|
395 |
<ExpressionOrigin> |
|
396 |
<Value type="int" value="2"/> |
|
397 |
</ExpressionOrigin> |
|
398 |
</CodeExpression> |
|
399 |
</Parameters> |
|
400 |
</CodeStatement> |
|
401 |
<CodeStatement> |
|
402 |
<CodeExpression id="19_gridBagConstraints"/> |
|
403 |
<StatementProvider type="CodeField"> |
|
404 |
<CodeField name="anchor" class="java.awt.GridBagConstraints"/> |
|
405 |
</StatementProvider> |
|
406 |
<Parameters> |
|
407 |
<CodeExpression id="23"> |
|
408 |
<ExpressionOrigin> |
|
409 |
<Value type="int" value="22"/> |
|
410 |
</ExpressionOrigin> |
|
411 |
</CodeExpression> |
|
412 |
</Parameters> |
|
413 |
</CodeStatement> |
|
414 |
<CodeStatement> |
|
415 |
<CodeExpression id="19_gridBagConstraints"/> |
|
416 |
<StatementProvider type="CodeField"> |
|
417 |
<CodeField name="weightx" class="java.awt.GridBagConstraints"/> |
|
418 |
</StatementProvider> |
|
419 |
<Parameters> |
|
420 |
<CodeExpression id="24"> |
|
421 |
<ExpressionOrigin> |
|
422 |
<Value type="double" value="0.1"/> |
|
423 |
</ExpressionOrigin> |
|
424 |
</CodeExpression> |
|
425 |
</Parameters> |
|
426 |
</CodeStatement> |
|
427 |
<CodeStatement> |
|
428 |
<CodeExpression id="4"/> |
|
429 |
<StatementProvider type="CodeMethod"> |
|
430 |
<CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/> |
|
431 |
</StatementProvider> |
|
432 |
<Parameters> |
|
433 |
<CodeExpression id="25_cancelButton"> |
|
434 |
<CodeVariable name="cancelButton" type="8196" declaredType="javax.swing.JButton"/> |
|
435 |
<ExpressionOrigin> |
|
436 |
<ExpressionProvider type="ComponentRef"> |
|
437 |
<ComponentRef name="cancelButton"/> |
|
438 |
</ExpressionProvider> |
|
439 |
</ExpressionOrigin> |
|
440 |
</CodeExpression> |
|
441 |
<CodeExpression id="19_gridBagConstraints"/> |
|
442 |
</Parameters> |
|
443 |
</CodeStatement> |
|
444 |
<CodeStatement> |
|
445 |
<CodeExpression id="26_gridBagConstraints"> |
|
446 |
<CodeVariable name="gridBagConstraints"/> |
|
447 |
<ExpressionOrigin> |
|
448 |
<ExpressionProvider type="CodeConstructor"> |
|
449 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
450 |
</ExpressionProvider> |
Also available in: Unified diff