Revision 41761

View differences:

tags/org.gvsig.desktop-2.0.61/org.gvsig.desktop.buildtools/src/main/resources/gvsig/checkstyle.xml
1
<?xml version="1.0"?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

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

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

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

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

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

  
26
-->
27
<!DOCTYPE module PUBLIC
28
    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
29
    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
30

  
31
<!--
32

  
33
  Checkstyle configuration that checks the sun coding conventions from:
34

  
35
    - the Java Language Specification at
36
      http://java.sun.com/docs/books/jls/second_edition/html/index.html
37

  
38
    - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
39

  
40
    - the Javadoc guidelines at
41
      http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
42

  
43
    - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
44

  
45
    - some best practices
46

  
47
  Checkstyle is very configurable. Be sure to read the documentation at
48
  http://checkstyle.sf.net (or in your downloaded distribution).
49

  
50
  Most Checks are configurable, be sure to consult the documentation.
51

  
52
  To completely disable a check, just comment it out or delete it from the file.
53

  
54
  Finally, it is worth reading the documentation.
55

  
56
-->
57

  
58
<module name="Checker">
59
    <!--
60
        If you set the basedir property below, then all reported file
61
        names will be relative to the specified directory. See
62
        http://checkstyle.sourceforge.net/5.x/config.html#Checker
63

  
64
        <property name="basedir" value="${basedir}"/>
65
    -->
66
    <!-- gvSIG: All project files have the ISO-8859-1 charset -->
67
	<property name="charset" value="ISO-8859-1" />
68

  
69
    <!-- Checks that a package-info.java file exists for each package.     -->
70
    <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
71
	<module name="JavadocPackage">
72
		<property name="allowLegacy" value="true" />
73
	</module>
74

  
75
    <!-- Checks whether files end with a new line.                        -->
76
    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
77
    <module name="NewlineAtEndOfFile"/>
78

  
79
    <!-- Checks that property files contain the same keys.         -->
80
    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
81
    <module name="Translation"/>
82
    
83
    <!-- Checks for Size Violations.                    -->
84
    <!-- See http://checkstyle.sf.net/config_sizes.html -->
85
    <module name="FileLength"/>
86
    
87
    <!-- Checks for whitespace                               -->
88
    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
89
    <module name="FileTabCharacter"/>
90

  
91

  
92
    <module name="TreeWalker">
93

  
94
	    <!-- Miscellaneous other checks.                   -->
95
	    <!-- See http://checkstyle.sf.net/config_misc.html -->
96
	    <!-- gvSIG: apply only to java files -->
97
	    <module name="RegexpSinglelineJava">
98
	       <property name="format" value="\s+$"/>
99
	       <property name="minimum" value="0"/>
100
	       <property name="maximum" value="0"/>
101
	       <property name="message" value="Line has trailing spaces."/>
102
	       <property name="ignoreComments" value="true"/>
103
	    </module>
104
	    
105
        <!-- Checks for Javadoc comments.                     -->
106
        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
107
		<!--
108
			gvSIG rule 3: All protected or public classes must have a Javadoc comments,
109
			except getters and setters
110
		-->
111
		<module name="JavadocMethod">
112
			<property name="scope" value="protected" />
113
			<property name="allowMissingPropertyJavadoc" value="true" />
114
		</module>
115
		<!--
116
			gvSIG rule 9: All classes must have a Javadoc comment
117
			with the "@author tag" and the "@version $Id$" tag included 
118
		-->
119
		<module name="JavadocType">
120
			<property name="scope" value="private" />
121
			<property name="authorFormat" value="\S" />
122
			<property name="versionFormat" value="\$Id.*\$"/>
123
		</module>
124
        <module name="JavadocVariable">
125
			<property name="scope" value="protected" />
126
		</module>
127
		<!-- gvSIG rule 3: Check correctly formatted Javadoc -->
128
		<module name="JavadocStyle">
129
			<property name="scope" value="protected" />
130
		</module>
131

  
132

  
133
        <!-- Checks for Naming Conventions.                  -->
134
        <!-- See http://checkstyle.sf.net/config_naming.html -->
135
        <module name="ConstantName"/>
136
        <module name="LocalFinalVariableName"/>
137
        <module name="LocalVariableName"/>
138
        <module name="MemberName"/>
139
        <module name="MethodName"/>
140
		<!-- gvSIG rule 15: All packages must begin with org.gvsig.  -->
141
		<module name="PackageName">
142
			<property name="format" value="^org\.gvsig(\.[a-z][a-z0-9]*)+$" />
143
		</module>
144
		<!-- gvSIG advised rule 1: Abstract class names must begin with Abstract. -->
145
		<!-- module name="AbstractClassName" /-->
146
        <module name="ParameterName"/>
147
        <module name="StaticVariableName"/>
148
        <module name="TypeName"/>
149

  
150
        <!-- Checks for imports                              -->
151
        <!-- See http://checkstyle.sf.net/config_import.html -->
152
        <module name="AvoidStarImport"/>
153
        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
154
        <module name="RedundantImport"/>
155
        <module name="UnusedImports"/>
156

  
157

  
158
        <!-- Checks for Size Violations.                    -->
159
        <!-- See http://checkstyle.sf.net/config_sizes.html -->
160
        <module name="LineLength"/>
161
        <module name="MethodLength"/>
162
        <module name="ParameterNumber"/>
163

  
164

  
165
        <!-- Checks for whitespace                               -->
166
        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
167
        <module name="EmptyForIteratorPad"/>
168
        <module name="GenericWhitespace"/>
169
        <module name="MethodParamPad"/>
170
        <module name="NoWhitespaceAfter"/>
171
        <module name="NoWhitespaceBefore"/>
172
        <module name="OperatorWrap"/>
173
        <module name="ParenPad"/>
174
        <module name="TypecastParenPad"/>
175
        <module name="WhitespaceAfter"/>
176
        <module name="WhitespaceAround"/>
177

  
178

  
179
        <!-- Modifier Checks                                    -->
180
        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
181
        <module name="ModifierOrder"/>
182
        <module name="RedundantModifier"/>
183

  
184

  
185
        <!-- Checks for blocks. You know, those {}'s         -->
186
        <!-- See http://checkstyle.sf.net/config_blocks.html -->
187
        <module name="AvoidNestedBlocks"/>
188
        <module name="EmptyBlock"/>
189
        <module name="LeftCurly"/>
190
        <module name="NeedBraces"/>
191
        <module name="RightCurly"/>
192

  
193

  
194
        <!-- Checks for common coding problems               -->
195
        <!-- See http://checkstyle.sf.net/config_coding.html -->
196
        <module name="AvoidInlineConditionals"/>
197
        <module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
198
        <module name="EmptyStatement"/>
199
        <module name="EqualsHashCode"/>
200
        <module name="HiddenField"/>
201
        <module name="IllegalInstantiation"/>
202
        <module name="InnerAssignment"/>
203
        <module name="MagicNumber"/>
204
        <module name="MissingSwitchDefault"/>
205
        <module name="RedundantThrows"/>
206
        <module name="SimplifyBooleanExpression"/>
207
        <module name="SimplifyBooleanReturn"/>
208

  
209
		<!-- gvSIG: Check for some common programming errors -->
210
		<module name="CovariantEquals" />
211
		<module name="StringLiteralEquality" />
212

  
213
        <!-- Checks for class design                         -->
214
        <!-- See http://checkstyle.sf.net/config_design.html -->
215
        <module name="DesignForExtension"/>
216
        <module name="FinalClass"/>
217
        <module name="HideUtilityClassConstructor"/>
218
        <module name="InterfaceIsType"/>
219
        <module name="VisibilityModifier"/>
220

  
221

  
222
        <!-- Miscellaneous other checks.                   -->
223
        <!-- See http://checkstyle.sf.net/config_misc.html -->
224
        <module name="ArrayTypeStyle"/>
225
        <!-- gvSIG: removed -->
226
        <!-- module name="FinalParameters"/-->
227
        <module name="TodoComment"/>
228
        <module name="UpperEll"/>
229
				
230
	    <!-- gvSIG rule 2: Sun style with 4 spaces -->
231
	    <module name="Indentation">
232
	    	<property name="basicOffset" value="4"/>
233
		    <property name="caseIndent" value="0"/>
234
		</module>
235
        
236
        <!-- gvSIG rule 10: Do not use System.out/err to log -->
237
		<module name="Regexp">
238
		    <!-- . matches any character, so we need to escape it and use \. 
239
		    to match dots.-->
240
		    <property name="format" value="System\.[out|err]\.println"/>
241
		    <property name="illegalPattern" value="true"/>
242
		</module>
243
		
244
		<!-- gvSIG rule 11: Try to avoid catching Throwable or 
245
		Exception and catch specific exceptions instead. -->
246
		<module name="IllegalCatch"/>
247
		
248
		<!-- gvSIG rule 13: Use interfaces in the declaration of 
249
		methods and variables.
250
        By default only avoids usage of Classes:
251
			"java.util.GregorianCalendar, java.util.Hashtable, 
252
		  	java.util.HashSet, java.util.HashMap, java.util.ArrayList, 
253
		  	java.util.LinkedList, java.util.LinkedHashMap, 
254
		  	java.util.LinkedHashSet, java.util.TreeSet, 
255
		  	java.util.TreeMap, java.util.Vector" -->
256
		<module name="IllegalType">
257
		    <property name="ignoredMethodNames" value="getInstance"/>
258
		</module>
259
		
260
    </module>
261

  
262
	<!--  gvSIG rule 1: check for the gvSIG header -->
263
    <!-- Uneeded, use the maven-license-plugin instead
264
	<module name="RegexpHeader"> -->
265
		<!-- The follow property value demonstrates the ability     -->
266
		<!-- to have access to ANT properties. In this case it uses -->
267
		<!-- the ${basedir} property to allow Checkstyle to be run  -->
268
		<!-- from any directory within a project. See property      -->
269
		<!-- expansion,                                             -->
270
		<!-- http://checkstyle.sf.net/config.html#properties        -->
271
    <!--
272
		<property name="headerFile" value="${checkstyle.header.file}" />
273
	</module>
274
    -->
275

  
276
</module>
0 277

  
tags/org.gvsig.desktop-2.0.61/org.gvsig.desktop.buildtools/src/main/resources/header.txt
1
gvSIG. Desktop Geographic Information System.
2

  
3
Copyright (C) 2007-2013 gvSIG Association.
4
  
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License
7
as published by the Free Software Foundation; either version 3
8
of the License, or (at your option) any later version.
9
  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14
 
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
18
MA  02110-1301, USA.
19

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

  
tags/org.gvsig.desktop-2.0.61/org.gvsig.desktop.buildtools/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<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">
3
  <modelVersion>4.0.0</modelVersion>
4
  <groupId>org.gvsig</groupId>
5
  <artifactId>org.gvsig.desktop.buildtools</artifactId>
6
  <version>1.0.0</version>
7
  <packaging>jar</packaging>
8
  <name>${project.artifactId}</name>
9
  <description>Resources used for build gvsig desktop</description>
10

  
11

  
12
<!-- No puede ser hijo de org.gvsig.desktop para evitar referencas circulares -->
13
<!--
14
  <parent>
15
    <groupId>org.gvsig</groupId>
16
    <artifactId>org.gvsig.desktop</artifactId>
17
    <version>2.0.10-SNAPSHOT</version>
18
  </parent>  
19
-->
20

  
21

  
22
    <licenses>
23
        <license>
24
            <name>GPLv3</name>
25
            <url>http://www.gnu.org/licenses/gpl.html</url>
26
            <distribution>repo</distribution>
27
            <comments>
28
			"GPL" stands for "General Public License". The most widespread such
29
			license is the GNU General Public License, or GNU GPL for short.
30
			This can be further shortened to "GPL", when it is understood that
31
			the GNU GPL is the one intended.
32
	      	</comments>
33
        </license>
34
    </licenses>
35

  
36
    <organization>
37
        <name>gvSIG Association</name>
38
        <url>http://www.gvsig.com/</url>
39
    </organization>
40

  
41
    <scm>
42
        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/trunk</connection>
43
        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/trunk</developerConnection>
44
        <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/trunk</url>
45
    </scm>
46
    
47
    <repositories>
48
      <repository>
49
        <id>gvsig-public-http-repository</id>
50
        <name>gvSIG maven public HTTP repository</name>
51
        <url>http://devel.gvsig.org/m2repo/j2se</url>
52
        <releases>
53
          <enabled>true</enabled>
54
          <updatePolicy>daily</updatePolicy>
55
          <checksumPolicy>warn</checksumPolicy>
56
        </releases>
57
        <snapshots>
58
          <enabled>true</enabled>
59
          <updatePolicy>daily</updatePolicy>
60
          <checksumPolicy>warn</checksumPolicy>
61
        </snapshots>
62
      </repository>
63
    </repositories>
64

  
65
    <distributionManagement>
66
      <site>
67
        <id>gvsig-repository</id>
68
        <url>dav:https://devel.gvsig.org/sites/${project.artifactId}/${project.version}</url>
69
      </site>
70
      <repository>
71
          <id>gvsig-repository</id>
72
          <name>gvSIG maven repository</name>
73
          <url>dav:https://devel.gvsig.org/m2repo/j2se</url>
74
          <uniqueVersion>false</uniqueVersion>
75
      </repository>
76
      <snapshotRepository>
77
          <id>gvsig-repository</id>
78
          <name>gvSIG maven repository</name>
79
          <url>dav:https://devel.gvsig.org/m2repo/j2se</url>
80
          <uniqueVersion>false</uniqueVersion>
81
      </snapshotRepository>
82
    </distributionManagement>
83
    
84
    <issueManagement>
85
      <system>redmine</system>
86
      <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop</url>
87
    </issueManagement>
88

  
89
    <mailingLists>
90
      <mailingList>
91
        <name>User List</name>
92
        <subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios</subscribe>
93
        <unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios</unsubscribe>
94
        <post>gvsig_usuarios@listserv.gva.es</post>
95
        <archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
96
        <otherArchives>
97
          <otherArchive>http://www.mail-archive.com/gvsig_usuarios@runas.cap.gva.es</otherArchive>
98
          <otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
99
        </otherArchives>
100
      </mailingList>
101
      <mailingList>
102
        <name>Developer List</name>
103
        <subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores</subscribe>
104
        <unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores</unsubscribe>
105
        <post>gvsig_desarrolladores@listserv.gva.es</post>
106
        <archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
107
        <otherArchives>
108
          <otherArchive>http://www.mail-archive.com/gvsig_desarrolladores@runas.cap.gva.es</otherArchive>
109
          <otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
110
        </otherArchives>
111
      </mailingList>
112
      <mailingList>
113
        <name>International List</name>
114
        <subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</subscribe>
115
        <unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</unsubscribe>
116
        <post>gvsig_internacional@listserv.gva.es</post>
117
        <archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
118
        <otherArchives>
119
          <otherArchive>http://www.mail-archive.com/gvsig_internacional@runas.cap.gva.es</otherArchive>
120
          <otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
121
        </otherArchives>
122
      </mailingList>
123
    </mailingLists>
124
    
125
    <build>
126
        <extensions>
127
            <extension>
128
                <groupId>org.apache.maven.wagon</groupId>
129
                <artifactId>wagon-webdav-jackrabbit</artifactId>
130
                <version>1.0-beta-7</version>
131
            </extension>
132
        </extensions>
133
    </build>
134

  
135
</project>
0 136

  
tags/org.gvsig.desktop-2.0.61/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.61/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.61/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

  
15

  
16
public class DefaultPropertiesPageManager implements PropertiesPageManager {
17
    private final Map<String, List<PropertiesPageFactory>> groups = new HashMap<String, List<PropertiesPageFactory>>();
18
    
19
    public DefaultPropertiesPageManager() {
20
        
21
    }
22

  
23
    public void registerFactory(PropertiesPageFactory factory) {
24
        List<PropertiesPageFactory> group = this.getFactories(factory.getGroupID());
25
        group.add(factory);
26
    }
27
    
28
    private List<PropertiesPageFactory> getFactories(String groupID) {
29
        List<PropertiesPageFactory> group = this.groups.get(groupID);
30
        if( group == null ) {
31
            group = new ArrayList<PropertiesPageFactory>();
32
            this.groups.put(groupID, group);
33
        }
34
        return group;
35
    }
36
    
37
    public List<PropertiesPage> getPages(String groupID, Object obj) {
38
        List<PropertiesPageFactory> factories = this.getFactories(groupID);
39
        List<PropertiesPage> pages = new ArrayList<PropertiesPage>();
40
        for ( PropertiesPageFactory factory : factories ) {
41
            if( factory.isVisible(obj) ) {
42
                pages.add(factory.create(obj));
43
            }
44
        }
45
        Collections.sort(pages, new Comparator<PropertiesPage>() {
46
            public int compare(PropertiesPage f1, PropertiesPage f2) {
47
                int n = f2.getPriority() - f1.getPriority();
48
                if( n != 0 ) {
49
                    return n;
50
                }
51
                if( f1.getTitle()==null || f2.getTitle()==null ) {
52
                    // Mas que nada para que no pete, y aunque el orden
53
                    // no sea correcto muestre algo al usuario.
54
                    return 0;
55
                }
56
                return f1.getTitle().compareTo(f2.getTitle());
57
            }
58
        });
59
        return pages;
60
    }
61
    
62
    
63
}
tags/org.gvsig.desktop-2.0.61/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.61/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
    protected void BasePropertiesPagePanel(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("ok"));
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.61/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>
451
        </ExpressionOrigin>
452
      </CodeExpression>
453
      <StatementProvider type="CodeExpression">
454
        <CodeExpression id="26_gridBagConstraints"/>
455
      </StatementProvider>
456
    </CodeStatement>
457
    <CodeStatement>
458
      <CodeExpression id="26_gridBagConstraints"/>
459
      <StatementProvider type="CodeField">
460
        <CodeField name="gridx" class="java.awt.GridBagConstraints"/>
461
      </StatementProvider>
462
      <Parameters>
463
        <CodeExpression id="27">
464
          <ExpressionOrigin>
465
            <Value type="int" value="8"/>
466
          </ExpressionOrigin>
467
        </CodeExpression>
468
      </Parameters>
469
    </CodeStatement>
470
    <CodeStatement>
471
      <CodeExpression id="26_gridBagConstraints"/>
472
      <StatementProvider type="CodeField">
473
        <CodeField name="gridy" class="java.awt.GridBagConstraints"/>
474
      </StatementProvider>
475
      <Parameters>
476
        <CodeExpression id="28">
477
          <ExpressionOrigin>
478
            <Value type="int" value="6"/>
479
          </ExpressionOrigin>
480
        </CodeExpression>
481
      </Parameters>
482
    </CodeStatement>
483
    <CodeStatement>
484
      <CodeExpression id="26_gridBagConstraints"/>
485
      <StatementProvider type="CodeField">
486
        <CodeField name="fill" class="java.awt.GridBagConstraints"/>
487
      </StatementProvider>
488
      <Parameters>
489
        <CodeExpression id="29">
490
          <ExpressionOrigin>
491
            <Value type="int" value="2"/>
492
          </ExpressionOrigin>
493
        </CodeExpression>
494
      </Parameters>
495
    </CodeStatement>
496
    <CodeStatement>
497
      <CodeExpression id="26_gridBagConstraints"/>
498
      <StatementProvider type="CodeField">
499
        <CodeField name="anchor" class="java.awt.GridBagConstraints"/>
500
      </StatementProvider>
501
      <Parameters>
502
        <CodeExpression id="30">
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff