Revision 43038

View differences:

tags/org.gvsig.desktop-2.0.160/org.gvsig.desktop.library/org.gvsig.fmap.control/src/test/java/org/gvsig/fmap/mapcontrol/tools/AreaListenerTest.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.fmap.mapcontrol.tools;
25

  
26
import java.awt.geom.Point2D;
27

  
28
import org.cresques.cts.IProjection;
29
import org.gvsig.fmap.crs.CRSFactory;
30
import org.gvsig.fmap.mapcontext.MapContext;
31
import org.gvsig.fmap.mapcontext.ViewPort;
32
import org.gvsig.fmap.mapcontrol.MapControl;
33
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
34

  
35

  
36
public class AreaListenerTest extends AbstractLibraryAutoInitTestCase {
37
	private IProjection projectionUTM = CRSFactory.getCRS("EPSG:23030");
38
	private IProjection projectionGeo = CRSFactory.getCRS("EPSG:4230");
39
		
40
	@Override
41
	protected void doSetUp() throws Exception {
42
		// Nothing to do	
43
	}
44

  
45
	public void test1() {
46
		AreaListenerImpl areaListenerUTM=new AreaListenerImpl(newMapControlUTM());
47
		AreaListenerImpl areaListenerGeo=new AreaListenerImpl(newMapControlGeo());
48
		Double[] xsUTM=new Double[] {new Double(731292),new Double(731901),new Double(730138)};
49
		Double[] ysUTM=new Double[] {new Double(4351223),new Double(4350768),new Double(4349232)};
50
		double areaUTM=areaListenerUTM.returnCoordsArea(xsUTM,ysUTM,new Point2D.Double(730138,4349232));
51
		Double[] xsGeo=new Double[] {new Double(-0.31888183),new Double(-0.31173131),new Double(-0.33268401)};
52
		Double[] ysGeo=new Double[] {new Double(39.27871741),new Double(39.27464327),new Double(39.26117368)};
53
		double areaGeo=areaListenerGeo.returnGeoCArea(xsGeo,ysGeo,new Point2D.Double(-0.33268401,39.26117368));
54
		assertTrue("Area UTM igual a Geo",areaUTM<(areaGeo+1000)&& areaUTM>(areaGeo-1000));
55
	}
56
	private MapControl newMapControlUTM() {
57
		ViewPort vp = new ViewPort(projectionUTM);
58
		MapControl mc=new MapControl();
59
		mc.setMapContext(new MapContext(vp));
60
		return mc;
61
	}
62
	private MapControl newMapControlGeo() {
63
		ViewPort vp = new ViewPort(projectionGeo);
64
		MapControl mc=new MapControl();
65
		mc.setMapContext(new MapContext(vp));
66
		return mc;
67
	}
68
}
0 69

  
tags/org.gvsig.desktop-2.0.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/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.160/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/propertypage/impl/DefaultPropertiesPageManager.java
1
package org.gvsig.propertypage.impl;
2

  
3
import java.util.ArrayList;
4
import java.util.Collections;
5
import java.util.Comparator;
6
import java.util.HashMap;
7
import java.util.List;
8
import java.util.Map;
9
import org.gvsig.propertypage.PropertiesPage;
10
import org.gvsig.propertypage.PropertiesPageFactory;
11
import org.gvsig.propertypage.PropertiesPageManager;
12
import org.gvsig.tools.ToolsLocator;
13
import org.gvsig.tools.identitymanagement.SimpleIdentity;
14
import org.gvsig.tools.identitymanagement.SimpleIdentityManager;
15
import org.slf4j.Logger;
16
import org.slf4j.LoggerFactory;
17

  
18
public class DefaultPropertiesPageManager implements PropertiesPageManager {
19

  
20
    public static final String ACCESS_PAGE_AUTHORIZATION = "propertypage-access";
21

  
22
    private static final Logger logger = LoggerFactory.getLogger(DefaultPropertiesPageManager.class);
23

  
24
    private final Map<String, List<PropertiesPageFactory>> groups = new HashMap<>();
25

  
26
    public DefaultPropertiesPageManager() {
27

  
28
    }
29

  
30
    @Override
31
    public void registerFactory(PropertiesPageFactory factory) {
32
        logger.info("Register PropertisPageFactory " + factory.getClass().getName() + " , groupID=" + factory.getGroupID() + " (" + factory.toString() + ").");
33
        List<PropertiesPageFactory> group = this.getFactories(factory.getGroupID());
34
        group.add(factory);
35
    }
36

  
37
    private List<PropertiesPageFactory> getFactories(String groupID) {
38
        logger.info("get propeties page factories for groupID '" + groupID + "'");
39
        List<PropertiesPageFactory> group = this.groups.get(groupID);
40
        if (group == null) {
41
            group = new ArrayList<>();
42
            this.groups.put(groupID, group);
43
        }
44
        return group;
45
    }
46

  
47
    @Override
48
    public List<PropertiesPage> getPages(String groupID, Object obj) {
49
        logger.info("get propeties page for groupID '" + groupID + "', and object '" + obj.toString() + "'.");
50
        List<PropertiesPage> pages = new ArrayList<>();
51
        SimpleIdentityManager identityManager = ToolsLocator.getIdentityManager();
52
        SimpleIdentity currentUser = identityManager.getCurrentIdentity();
53
        if (!currentUser.isAuthorized(ACCESS_PAGE_AUTHORIZATION,null,groupID ) ) {
54
            return pages; // Empty list, no access to pages authoriced
55
        }
56

  
57
        List<PropertiesPageFactory> factories = this.getFactories(groupID);
58
        String authorizationId = ACCESS_PAGE_AUTHORIZATION+"-"+groupID;
59
        for (PropertiesPageFactory factory : factories) {
60
            if (factory.isVisible(obj)) {
61
                PropertiesPage page = factory.create(obj);
62
                if (currentUser.isAuthorized(authorizationId,page, page.getTitle()) ) {
63
                    pages.add(page);
64
                }
65
            }
66
        }
67
        Collections.sort(pages, new Comparator<PropertiesPage>() {
68
            public int compare(PropertiesPage f1, PropertiesPage f2) {
69
                int n = f2.getPriority() - f1.getPriority();
70
                if (n != 0) {
71
                    return n;
72
                }
73
                if (f1.getTitle() == null || f2.getTitle() == null) {
74
                    // Mas que nada para que no pete, y aunque el orden
75
                    // no sea correcto muestre algo al usuario.
76
                    return 0;
77
                }
78
                return f1.getTitle().compareTo(f2.getTitle());
79
            }
80
        });
81
        return pages;
82
    }
83

  
84
}
tags/org.gvsig.desktop-2.0.160/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.160/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.160/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">
503
          <ExpressionOrigin>
504
            <Value type="int" value="22"/>
505
          </ExpressionOrigin>
506
        </CodeExpression>
507
      </Parameters>
508
    </CodeStatement>
509
    <CodeStatement>
510
      <CodeExpression id="26_gridBagConstraints"/>
511
      <StatementProvider type="CodeField">
512
        <CodeField name="weightx" class="java.awt.GridBagConstraints"/>
513
      </StatementProvider>
514
      <Parameters>
515
        <CodeExpression id="31">
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff