Revision 476
org.gvsig.proj/trunk/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/pom.xml | ||
---|---|---|
54 | 54 |
<type>test-jar</type> |
55 | 55 |
<scope>test</scope> |
56 | 56 |
</dependency> |
57 |
<dependency> |
|
58 |
<groupId>commons-io</groupId> |
|
59 |
<artifactId>commons-io</artifactId> |
|
60 |
<scope>compile</scope> |
|
61 |
</dependency> |
|
62 |
<dependency> |
|
63 |
<groupId>com.jeta</groupId> |
|
64 |
<artifactId>formsrt</artifactId> |
|
65 |
<scope>compile</scope> |
|
66 |
</dependency> |
|
67 |
<dependency> |
|
68 |
<groupId>com.jgoodies</groupId> |
|
69 |
<artifactId>jgoodies-forms</artifactId> |
|
70 |
<scope>compile</scope> |
|
71 |
</dependency> |
|
57 | 72 |
</dependencies> |
58 | 73 |
</project> |
org.gvsig.proj/trunk/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/src/main/java/org/gvsig/proj/swing/impl/CodeComboBoxModel.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2012 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 2 |
|
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. |
|
22 |
*/ |
|
23 |
package org.gvsig.proj.swing.impl; |
|
24 |
|
|
25 |
import java.util.List; |
|
26 |
|
|
27 |
import javax.swing.AbstractListModel; |
|
28 |
import javax.swing.ComboBoxModel; |
|
29 |
import javax.swing.event.ListDataEvent; |
|
30 |
import javax.swing.event.ListDataListener; |
|
31 |
|
|
32 |
import org.gvsig.proj.CoordinateReferenceSystemManager; |
|
33 |
|
|
34 |
/** |
|
35 |
* {@link ComboBoxModel} to manage the list of available CRS codes as defined |
|
36 |
* by some authority. |
|
37 |
* |
|
38 |
* @author gvSIG Team |
|
39 |
*/ |
|
40 |
public class CodeComboBoxModel extends AbstractListModel implements |
|
41 |
ComboBoxModel, ListDataListener { |
|
42 |
|
|
43 |
private static final long serialVersionUID = -5594433634336286602L; |
|
44 |
|
|
45 |
private List<String> codes; |
|
46 |
|
|
47 |
private String selectedCode; |
|
48 |
|
|
49 |
private final CoordinateReferenceSystemManager manager; |
|
50 |
|
|
51 |
public CodeComboBoxModel(CoordinateReferenceSystemManager manager, |
|
52 |
AuthorityComboBoxModel authorityModel) { |
|
53 |
this.manager = manager; |
|
54 |
authorityModel.addListDataListener(this); |
|
55 |
} |
|
56 |
|
|
57 |
public int getSize() { |
|
58 |
return codes == null ? 0 : codes.size(); |
|
59 |
} |
|
60 |
|
|
61 |
public Object getElementAt(int index) { |
|
62 |
return codes == null ? null : codes.get(index); |
|
63 |
} |
|
64 |
|
|
65 |
public void setSelectedItem(Object anItem) { |
|
66 |
if ((selectedCode != null && !selectedCode.equals(anItem)) |
|
67 |
|| selectedCode == null && anItem != null) { |
|
68 |
selectedCode = anItem.toString(); |
|
69 |
fireContentsChanged(this, -1, -1); |
|
70 |
} |
|
71 |
} |
|
72 |
|
|
73 |
public Object getSelectedItem() { |
|
74 |
return getSelectedCode(); |
|
75 |
} |
|
76 |
|
|
77 |
public String getSelectedCode() { |
|
78 |
return selectedCode; |
|
79 |
} |
|
80 |
|
|
81 |
public void setSelectedCode(String selectedCode) { |
|
82 |
setSelectedItem(selectedCode); |
|
83 |
} |
|
84 |
|
|
85 |
public void intervalAdded(ListDataEvent e) { |
|
86 |
// Nothing to do |
|
87 |
} |
|
88 |
|
|
89 |
public void intervalRemoved(ListDataEvent e) { |
|
90 |
// Nothing to do |
|
91 |
} |
|
92 |
|
|
93 |
@SuppressWarnings("unchecked") |
|
94 |
public void contentsChanged(ListDataEvent e) { |
|
95 |
// A new authority has been selected |
|
96 |
if (e.getSource() != null |
|
97 |
&& e.getSource() instanceof AuthorityComboBoxModel) { |
|
98 |
AuthorityComboBoxModel authorityModel = |
|
99 |
(AuthorityComboBoxModel) e.getSource(); |
|
100 |
|
|
101 |
String authority = authorityModel.getSelectedAuthority(); |
|
102 |
selectedCode = null; |
|
103 |
codes = manager.getCodes(authority); |
|
104 |
fireContentsChanged(this, -1, -1); |
|
105 |
} |
|
106 |
} |
|
107 |
|
|
108 |
} |
org.gvsig.proj/trunk/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/src/main/java/org/gvsig/proj/swing/impl/DefaultCoordinateReferenceSystemSelectorComponent.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.proj.swing.impl; |
25 | 25 |
|
26 |
import java.awt.GridBagConstraints; |
|
27 |
import java.awt.GridBagLayout; |
|
28 |
import java.awt.Insets; |
|
29 |
|
|
30 |
import javax.swing.BorderFactory; |
|
31 |
import javax.swing.JComboBox; |
|
26 |
import java.awt.Dimension; |
|
27 |
import java.awt.event.ActionEvent; |
|
28 |
import java.awt.event.ActionListener; |
|
32 | 29 |
import javax.swing.JComponent; |
33 |
import javax.swing.JLabel; |
|
34 |
import javax.swing.JPanel; |
|
35 |
import javax.swing.JScrollPane; |
|
36 |
import javax.swing.JTextArea; |
|
37 | 30 |
import javax.swing.event.ListDataEvent; |
38 | 31 |
import javax.swing.event.ListDataListener; |
39 | 32 |
|
... | ... | |
52 | 45 |
* @author gvSIG Team |
53 | 46 |
* @version $Id$ |
54 | 47 |
*/ |
55 |
public class DefaultCoordinateReferenceSystemSelectorComponent extends JPanel
|
|
48 |
public class DefaultCoordinateReferenceSystemSelectorComponent extends DefaultCoordinateReferenceSystemSelectorComponentView
|
|
56 | 49 |
implements CoordinateReferenceSystemSelectorComponent { |
57 | 50 |
|
58 | 51 |
private static final Logger LOG = LoggerFactory |
... | ... | |
60 | 53 |
|
61 | 54 |
private static final long serialVersionUID = 2965442763236823977L; |
62 | 55 |
|
63 |
private CoordinateReferenceSystemSwingManager uimanager; |
|
56 |
private final CoordinateReferenceSystemSwingManager uimanager;
|
|
64 | 57 |
|
65 |
private CodeComboBoxModel codeModel;
|
|
58 |
private CodeListModel codeModel;
|
|
66 | 59 |
|
67 | 60 |
private AuthorityComboBoxModel authorityModel; |
68 | 61 |
|
... | ... | |
70 | 63 |
final DefaultCoordinateReferenceSystemSwingManager uimanager) { |
71 | 64 |
|
72 | 65 |
this.uimanager = uimanager; |
66 |
this.initComponents(); |
|
67 |
} |
|
68 |
|
|
69 |
private void initComponents() { |
|
73 | 70 |
|
74 |
setLayout(new GridBagLayout()); |
|
75 |
GridBagConstraints c = new GridBagConstraints(); |
|
76 |
c.insets = new Insets(4, 4, 4, 4); |
|
77 |
|
|
78 |
setBorder(BorderFactory.createTitledBorder(null, |
|
79 |
uimanager.getTranslation("reference_system"))); |
|
80 |
|
|
81 |
JLabel authorityLabel = |
|
82 |
new JLabel(uimanager.getTranslation("authority") + ":"); |
|
83 |
c.anchor = GridBagConstraints.WEST; |
|
84 |
c.weightx = 0.0d; |
|
85 |
c.gridx = 0; |
|
86 |
c.gridy = 0; |
|
87 |
add(authorityLabel, c); |
|
88 |
|
|
71 |
this.lblAutority.setText(uimanager.getTranslation("authority") + ":"); |
|
72 |
this.lblCode.setText(uimanager.getTranslation("code") + ":"); |
|
73 |
this.lblDefinition.setText(uimanager.getTranslation("definition") + ":"); |
|
74 |
this.btnSearch.setText(uimanager.getTranslation("Search")); |
|
75 |
|
|
89 | 76 |
authorityModel = new AuthorityComboBoxModel(uimanager.getManager()); |
90 |
JComboBox authorityComboBox = new JComboBox(authorityModel); |
|
91 |
c.fill = GridBagConstraints.HORIZONTAL; |
|
92 |
c.weightx = 1.0d; |
|
93 |
c.gridx = 1; |
|
94 |
add(authorityComboBox, c); |
|
95 |
|
|
96 |
JLabel codeLabel = new JLabel(uimanager.getTranslation("code") + ":"); |
|
97 |
c.anchor = GridBagConstraints.WEST; |
|
98 |
c.weightx = 0.0d; |
|
99 |
c.gridx = 0; |
|
100 |
c.gridy++; |
|
101 |
add(codeLabel, c); |
|
102 |
|
|
103 |
codeModel = |
|
104 |
new CodeComboBoxModel(uimanager.getManager(), authorityModel); |
|
105 |
JComboBox codeComboBox = new JComboBox(codeModel); |
|
106 |
c.fill = GridBagConstraints.HORIZONTAL; |
|
107 |
c.weightx = 1.0d; |
|
108 |
c.gridx = 1; |
|
109 |
add(codeComboBox, c); |
|
110 |
|
|
111 |
JLabel definitionLabel = |
|
112 |
new JLabel(uimanager.getTranslation("definition") + ":"); |
|
113 |
c.anchor = GridBagConstraints.WEST; |
|
114 |
c.weightx = 0.0d; |
|
115 |
c.gridx = 0; |
|
116 |
c.gridy++; |
|
117 |
add(definitionLabel, c); |
|
118 |
|
|
119 |
final JTextArea definition = new JTextArea(); |
|
120 |
definition.setEditable(false); |
|
121 |
definition.setColumns(30); |
|
122 |
definition.setRows(5); |
|
123 |
definition.setLineWrap(true); |
|
77 |
this.cboAuthority.setModel(authorityModel); |
|
78 |
|
|
79 |
codeModel = new CodeListModel(uimanager.getManager(), authorityModel); |
|
80 |
this.lstCodes.setModel(codeModel); |
|
124 | 81 |
codeModel.addListDataListener(new ListDataListener() { |
125 | 82 |
|
83 |
@Override |
|
126 | 84 |
public void intervalRemoved(ListDataEvent e) { |
127 | 85 |
// Nothing to do |
128 | 86 |
} |
129 | 87 |
|
88 |
@Override |
|
130 | 89 |
public void intervalAdded(ListDataEvent e) { |
131 | 90 |
// Nothing to do |
132 | 91 |
} |
133 | 92 |
|
93 |
@Override |
|
134 | 94 |
public void contentsChanged(ListDataEvent e) { |
135 | 95 |
// A new code has been selected |
136 |
definition.setText("");
|
|
96 |
txtDefinition.setText("");
|
|
137 | 97 |
CoordinateReferenceSystem crs = |
138 | 98 |
getSelectedCoordinateReferenceSystem(); |
139 | 99 |
if (crs != null) { |
140 |
definition.setText(crs.getDefinition());
|
|
100 |
txtDefinition.setText(crs.getDefinition());
|
|
141 | 101 |
} |
142 | 102 |
} |
143 | 103 |
}); |
144 |
JScrollPane definitionScrollPane = new JScrollPane(definition); |
|
145 |
c.fill = GridBagConstraints.HORIZONTAL; |
|
146 |
c.weightx = 1.0d; |
|
147 |
c.gridx = 0; |
|
148 |
c.gridwidth = 2; |
|
149 |
c.gridy++; |
|
150 |
add(definitionScrollPane, c); |
|
104 |
|
|
105 |
this.btnSearch.addActionListener(new ActionListener() { |
|
106 |
|
|
107 |
@Override |
|
108 |
public void actionPerformed(ActionEvent ae) { |
|
109 |
codeModel.applyFilter(txtCode.getText()); |
|
110 |
} |
|
111 |
}); |
|
112 |
|
|
151 | 113 |
} |
152 | 114 |
|
115 |
@Override |
|
153 | 116 |
public JComponent asJComponent() { |
154 | 117 |
return this; |
155 | 118 |
} |
156 | 119 |
|
120 |
@Override |
|
121 |
public Dimension getPreferredSize() { |
|
122 |
Dimension dim = super.getPreferredSize(); |
|
123 |
if( dim.width<350 ) { |
|
124 |
dim.width = 350; |
|
125 |
} |
|
126 |
return dim; |
|
127 |
} |
|
128 |
|
|
157 | 129 |
public CoordinateReferenceSystem getSelectedCoordinateReferenceSystem() { |
158 | 130 |
CoordinateReferenceSystem crs = null; |
159 | 131 |
String authority = authorityModel.getSelectedAuthority(); |
160 |
String code = codeModel.getSelectedCode();
|
|
132 |
String code = (String) this.lstCodes.getSelectedValue();
|
|
161 | 133 |
if (authority != null && code != null) { |
162 | 134 |
try { |
163 |
crs = |
|
164 |
uimanager.getManager().getCoordinateReferenceSystem(
|
|
165 |
authority, code);
|
|
135 |
crs = uimanager.getManager().getCoordinateReferenceSystem(
|
|
136 |
authority, code
|
|
137 |
); |
|
166 | 138 |
} catch (CoordinateReferenceSystemNotFoundException e) { |
167 | 139 |
LOG.error("Could not find CRS with authority: " + authority |
168 | 140 |
+ " and code: " + code, e); |
... | ... | |
174 | 146 |
public void setCoordinateReferenceSystem(CoordinateReferenceSystem crs) { |
175 | 147 |
if (crs != null) { |
176 | 148 |
authorityModel.setSelectedAuthority(crs.getAuthorityName()); |
177 |
codeModel.setSelectedCode(crs.getCode());
|
|
149 |
this.lstCodes.setSelectedValue(crs.getCode(), true);
|
|
178 | 150 |
} |
179 | 151 |
} |
180 | 152 |
} |
org.gvsig.proj/trunk/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/src/main/java/org/gvsig/proj/swing/impl/CodeListModel.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2012 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 2 |
|
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. |
|
22 |
*/ |
|
23 |
package org.gvsig.proj.swing.impl; |
|
24 |
|
|
25 |
import java.util.ArrayList; |
|
26 |
import java.util.List; |
|
27 |
|
|
28 |
import javax.swing.AbstractListModel; |
|
29 |
import javax.swing.ComboBoxModel; |
|
30 |
import javax.swing.ListModel; |
|
31 |
import javax.swing.event.ListDataEvent; |
|
32 |
import javax.swing.event.ListDataListener; |
|
33 |
import org.apache.commons.io.FilenameUtils; |
|
34 |
import org.apache.commons.io.IOCase; |
|
35 |
|
|
36 |
import org.gvsig.proj.CoordinateReferenceSystemManager; |
|
37 |
|
|
38 |
/** |
|
39 |
* {@link ComboBoxModel} to manage the list of available CRS codes as defined |
|
40 |
* by some authority. |
|
41 |
* |
|
42 |
* @author gvSIG Team |
|
43 |
*/ |
|
44 |
public class CodeListModel extends AbstractListModel implements |
|
45 |
ListModel, ListDataListener { |
|
46 |
|
|
47 |
private static final long serialVersionUID = -5594433634336286602L; |
|
48 |
|
|
49 |
private List<String> allCodes; |
|
50 |
private List<String> filteredCodes; |
|
51 |
private String filterPattern=null; |
|
52 |
|
|
53 |
private String selectedCode; |
|
54 |
|
|
55 |
private final CoordinateReferenceSystemManager manager; |
|
56 |
|
|
57 |
@SuppressWarnings("LeakingThisInConstructor") |
|
58 |
public CodeListModel(CoordinateReferenceSystemManager manager, |
|
59 |
AuthorityComboBoxModel authorityModel) { |
|
60 |
this.manager = manager; |
|
61 |
authorityModel.addListDataListener(this); |
|
62 |
} |
|
63 |
|
|
64 |
@Override |
|
65 |
public int getSize() { |
|
66 |
return filteredCodes == null ? 0 : filteredCodes.size(); |
|
67 |
} |
|
68 |
|
|
69 |
@Override |
|
70 |
public Object getElementAt(int index) { |
|
71 |
return filteredCodes == null ? null : filteredCodes.get(index); |
|
72 |
} |
|
73 |
|
|
74 |
// @Override |
|
75 |
// public void setSelectedItem(Object anItem) { |
|
76 |
// if ((selectedCode != null && !selectedCode.equals(anItem)) |
|
77 |
// || selectedCode == null && anItem != null) { |
|
78 |
// selectedCode = anItem.toString(); |
|
79 |
// fireContentsChanged(this, -1, -1); |
|
80 |
// } |
|
81 |
// } |
|
82 |
// |
|
83 |
// @Override |
|
84 |
// public Object getSelectedItem() { |
|
85 |
// return getSelectedCode(); |
|
86 |
// } |
|
87 |
// |
|
88 |
// public String getSelectedCode() { |
|
89 |
// return selectedCode; |
|
90 |
// } |
|
91 |
// |
|
92 |
// public void setSelectedCode(String selectedCode) { |
|
93 |
// setSelectedItem(selectedCode); |
|
94 |
// } |
|
95 |
|
|
96 |
@Override |
|
97 |
public void intervalAdded(ListDataEvent e) { |
|
98 |
// Nothing to do |
|
99 |
} |
|
100 |
|
|
101 |
@Override |
|
102 |
public void intervalRemoved(ListDataEvent e) { |
|
103 |
// Nothing to do |
|
104 |
} |
|
105 |
|
|
106 |
@SuppressWarnings("unchecked") |
|
107 |
@Override |
|
108 |
public void contentsChanged(ListDataEvent e) { |
|
109 |
// A new authority has been selected |
|
110 |
if (e.getSource() != null |
|
111 |
&& e.getSource() instanceof AuthorityComboBoxModel) { |
|
112 |
AuthorityComboBoxModel authorityModel = |
|
113 |
(AuthorityComboBoxModel) e.getSource(); |
|
114 |
|
|
115 |
String authority = authorityModel.getSelectedAuthority(); |
|
116 |
selectedCode = null; |
|
117 |
allCodes = manager.getCodes(authority); |
|
118 |
this.applyFilter(this.filterPattern); |
|
119 |
fireContentsChanged(this, -1, -1); |
|
120 |
} |
|
121 |
} |
|
122 |
|
|
123 |
public void applyFilter(String pattern) { |
|
124 |
this.filterPattern = pattern; |
|
125 |
if( this.filterPattern == null ) { |
|
126 |
this.filteredCodes = this.allCodes; |
|
127 |
} else { |
|
128 |
if( !this.filterPattern.contains("*") ) { |
|
129 |
this.filterPattern = this.filterPattern + "*"; |
|
130 |
} |
|
131 |
this.filteredCodes = new ArrayList<>(); |
|
132 |
for (String code : allCodes) { |
|
133 |
if( FilenameUtils.wildcardMatch(code, this.filterPattern, IOCase.INSENSITIVE)) { |
|
134 |
this.filteredCodes.add(code); |
|
135 |
} |
|
136 |
} |
|
137 |
} |
|
138 |
fireContentsChanged(this, -1, -1); |
|
139 |
} |
|
140 |
|
|
141 |
} |
org.gvsig.proj/trunk/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/src/main/java/org/gvsig/proj/swing/impl/DefaultCoordinateReferenceSystemSelectorComponentView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/src/main/java/org/gvsig/proj/swing/impl/DefaultCoordinateReferenceSystemSelectorComponentView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at> |
|
29 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE</at> |
|
30 |
<at name="components"> |
|
31 |
<object classname="java.util.LinkedList"> |
|
32 |
<item > |
|
33 |
<at name="value"> |
|
34 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
35 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
36 |
<at name="cellconstraints"> |
|
37 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
38 |
<at name="column">2</at> |
|
39 |
<at name="row">4</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">left</at> |
|
43 |
<at name="valign">center</at> |
|
44 |
<at name="insets" object="insets">0,0,0,0</at> |
|
45 |
</object> |
|
46 |
</at> |
|
47 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
48 |
</super> |
|
49 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
50 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="text">Code:</at> |
|
57 |
<at name="height">14</at> |
|
58 |
<at name="width">33</at> |
|
59 |
<at name="name">lblCode</at> |
|
60 |
<at name="fill"> |
|
61 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
62 |
<at name="name">fill</at> |
|
63 |
</object> |
|
64 |
</at> |
|
65 |
<at name="border"> |
|
66 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
67 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
68 |
<at name="name">border</at> |
|
69 |
</super> |
|
70 |
<at name="borders"> |
|
71 |
<object classname="java.util.LinkedList"> |
|
72 |
<item > |
|
73 |
<at name="value"> |
|
74 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
75 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
76 |
<at name="name">border</at> |
|
77 |
</super> |
|
78 |
</object> |
|
79 |
</at> |
|
80 |
</item> |
|
81 |
</object> |
|
82 |
</at> |
|
83 |
</object> |
|
84 |
</at> |
|
85 |
</object> |
|
86 |
</at> |
|
87 |
</object> |
|
88 |
</at> |
|
89 |
</object> |
|
90 |
</at> |
|
91 |
</item> |
|
92 |
<item > |
|
93 |
<at name="value"> |
|
94 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
95 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
96 |
<at name="cellconstraints"> |
|
97 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
98 |
<at name="column">5</at> |
|
99 |
<at name="row">4</at> |
|
100 |
<at name="colspan">1</at> |
|
101 |
<at name="rowspan">1</at> |
|
102 |
<at name="halign">default</at> |
|
103 |
<at name="valign">default</at> |
|
104 |
<at name="insets" object="insets">0,0,0,0</at> |
|
105 |
</object> |
|
106 |
</at> |
|
107 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
108 |
</super> |
|
109 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
110 |
<at name="beanclass">javax.swing.JButton</at> |
|
111 |
<at name="beanproperties"> |
|
112 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
113 |
<at name="classname">javax.swing.JButton</at> |
|
114 |
<at name="properties"> |
|
115 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
116 |
<at name="text">Search</at> |
|
117 |
<at name="height">22</at> |
|
118 |
<at name="width">72</at> |
|
119 |
<at name="name">btnSearch</at> |
|
120 |
<at name="actionCommand">Search</at> |
|
121 |
<at name="border"> |
|
122 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
123 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
124 |
<at name="name">border</at> |
|
125 |
</super> |
|
126 |
<at name="borders"> |
|
127 |
<object classname="java.util.LinkedList"> |
|
128 |
<item > |
|
129 |
<at name="value"> |
|
130 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
131 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
132 |
<at name="name">border</at> |
|
133 |
</super> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
</item> |
|
137 |
</object> |
|
138 |
</at> |
|
139 |
</object> |
|
140 |
</at> |
|
141 |
</object> |
|
142 |
</at> |
|
143 |
</object> |
|
144 |
</at> |
|
145 |
</object> |
|
146 |
</at> |
|
147 |
</item> |
|
148 |
<item > |
|
149 |
<at name="value"> |
|
150 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
151 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
152 |
<at name="cellconstraints"> |
|
153 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
154 |
<at name="column">4</at> |
|
155 |
<at name="row">4</at> |
|
156 |
<at name="colspan">1</at> |
|
157 |
<at name="rowspan">1</at> |
|
158 |
<at name="halign">default</at> |
|
159 |
<at name="valign">default</at> |
|
160 |
<at name="insets" object="insets">0,0,0,0</at> |
|
161 |
</object> |
|
162 |
</at> |
|
163 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
164 |
</super> |
|
165 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
166 |
<at name="beanclass">javax.swing.JTextField</at> |
|
167 |
<at name="beanproperties"> |
|
168 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
169 |
<at name="classname">javax.swing.JTextField</at> |
|
170 |
<at name="properties"> |
|
171 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
172 |
<at name="height">20</at> |
|
173 |
<at name="width">146</at> |
|
174 |
<at name="name">txtCode</at> |
|
175 |
<at name="border"> |
|
176 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
177 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
178 |
<at name="name">border</at> |
|
179 |
</super> |
|
180 |
<at name="borders"> |
|
181 |
<object classname="java.util.LinkedList"> |
|
182 |
<item > |
|
183 |
<at name="value"> |
|
184 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
185 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
186 |
<at name="name">border</at> |
|
187 |
</super> |
|
188 |
</object> |
|
189 |
</at> |
|
190 |
</item> |
|
191 |
</object> |
|
192 |
</at> |
|
193 |
</object> |
|
194 |
</at> |
|
195 |
</object> |
|
196 |
</at> |
|
197 |
</object> |
|
198 |
</at> |
|
199 |
</object> |
|
200 |
</at> |
|
201 |
</item> |
|
202 |
<item > |
|
203 |
<at name="value"> |
|
204 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
205 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
206 |
<at name="cellconstraints"> |
|
207 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
208 |
<at name="column">4</at> |
|
209 |
<at name="row">5</at> |
|
210 |
<at name="colspan">2</at> |
|
211 |
<at name="rowspan">1</at> |
|
212 |
<at name="halign">default</at> |
|
213 |
<at name="valign">default</at> |
|
214 |
<at name="insets" object="insets">0,0,0,0</at> |
|
215 |
</object> |
|
216 |
</at> |
|
217 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
218 |
</super> |
|
219 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
220 |
<at name="beanclass">javax.swing.JList</at> |
|
221 |
<at name="beanproperties"> |
|
222 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
223 |
<at name="classname">javax.swing.JList</at> |
|
224 |
<at name="properties"> |
|
225 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
226 |
<at name="scrollableTracksViewportWidth">true</at> |
|
227 |
<at name="height">217</at> |
|
228 |
<at name="items"> |
|
229 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
230 |
<at name="name">items</at> |
|
231 |
</object> |
|
232 |
</at> |
|
233 |
<at name="width">220</at> |
|
234 |
<at name="name">lstCodes</at> |
|
235 |
<at name="scollBars"> |
|
236 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
237 |
<at name="name">scollBars</at> |
|
238 |
<at name="verticalpolicy">20</at> |
|
239 |
<at name="horizontalpolicy">30</at> |
|
240 |
<at name="border"> |
|
241 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
242 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
243 |
<at name="name">border</at> |
|
244 |
</super> |
|
245 |
<at name="borders"> |
|
246 |
<object classname="java.util.LinkedList"> |
|
247 |
<item > |
|
248 |
<at name="value"> |
|
249 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
250 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
251 |
<at name="name">border</at> |
|
252 |
</super> |
|
253 |
</object> |
|
254 |
</at> |
|
255 |
</item> |
|
256 |
</object> |
|
257 |
</at> |
|
258 |
</object> |
|
259 |
</at> |
|
260 |
</object> |
|
261 |
</at> |
|
262 |
<at name="border"> |
|
263 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
264 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
265 |
<at name="name">border</at> |
|
266 |
</super> |
|
267 |
<at name="borders"> |
|
268 |
<object classname="java.util.LinkedList"> |
|
269 |
<item > |
|
270 |
<at name="value"> |
|
271 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
272 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
273 |
<at name="name">border</at> |
|
274 |
</super> |
|
275 |
</object> |
|
276 |
</at> |
|
277 |
</item> |
|
278 |
</object> |
|
279 |
</at> |
|
280 |
</object> |
|
281 |
</at> |
|
282 |
<at name="scrollableTracksViewportHeight">true</at> |
|
283 |
</object> |
|
284 |
</at> |
|
285 |
</object> |
|
286 |
</at> |
|
287 |
</object> |
|
288 |
</at> |
|
289 |
</item> |
|
290 |
<item > |
|
291 |
<at name="value"> |
|
292 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
293 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
294 |
<at name="cellconstraints"> |
|
295 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
296 |
<at name="column">2</at> |
|
297 |
<at name="row">2</at> |
|
298 |
<at name="colspan">1</at> |
|
299 |
<at name="rowspan">1</at> |
|
300 |
<at name="halign">left</at> |
|
301 |
<at name="valign">center</at> |
|
302 |
<at name="insets" object="insets">0,0,0,0</at> |
|
303 |
</object> |
|
304 |
</at> |
|
305 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
306 |
</super> |
|
307 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
308 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
309 |
<at name="beanproperties"> |
|
310 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
311 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
312 |
<at name="properties"> |
|
313 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
314 |
<at name="text">Authority:</at> |
|
315 |
<at name="height">14</at> |
|
316 |
<at name="width">54</at> |
|
317 |
<at name="name">lblAutority</at> |
|
318 |
<at name="fill"> |
|
319 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
320 |
<at name="name">fill</at> |
|
321 |
</object> |
|
322 |
</at> |
|
323 |
<at name="border"> |
|
324 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
325 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
326 |
<at name="name">border</at> |
|
327 |
</super> |
|
328 |
<at name="borders"> |
|
329 |
<object classname="java.util.LinkedList"> |
|
330 |
<item > |
|
331 |
<at name="value"> |
|
332 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
333 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
334 |
<at name="name">border</at> |
|
335 |
</super> |
|
336 |
</object> |
|
337 |
</at> |
|
338 |
</item> |
|
339 |
</object> |
|
340 |
</at> |
|
341 |
</object> |
|
342 |
</at> |
|
343 |
</object> |
|
344 |
</at> |
|
345 |
</object> |
|
346 |
</at> |
|
347 |
</object> |
|
348 |
</at> |
|
349 |
</item> |
|
350 |
<item > |
|
351 |
<at name="value"> |
|
352 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
353 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
354 |
<at name="cellconstraints"> |
|
355 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
356 |
<at name="column">4</at> |
|
357 |
<at name="row">2</at> |
|
358 |
<at name="colspan">2</at> |
|
359 |
<at name="rowspan">1</at> |
|
360 |
<at name="halign">default</at> |
|
361 |
<at name="valign">default</at> |
|
362 |
<at name="insets" object="insets">0,0,0,0</at> |
|
363 |
</object> |
|
364 |
</at> |
|
365 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
366 |
</super> |
|
367 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
368 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
369 |
<at name="beanproperties"> |
|
370 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
371 |
<at name="classname">javax.swing.JComboBox</at> |
|
372 |
<at name="properties"> |
|
373 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
374 |
<at name="height">20</at> |
|
375 |
<at name="items"> |
|
376 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
377 |
<at name="name">items</at> |
|
378 |
</object> |
|
379 |
</at> |
|
380 |
<at name="width">222</at> |
|
381 |
<at name="name">cboAuthority</at> |
|
382 |
<at name="border"> |
|
383 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
384 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
385 |
<at name="name">border</at> |
|
386 |
</super> |
|
387 |
<at name="borders"> |
|
388 |
<object classname="java.util.LinkedList"> |
|
389 |
<item > |
|
390 |
<at name="value"> |
|
391 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
392 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
393 |
<at name="name">border</at> |
|
394 |
</super> |
|
395 |
</object> |
|
396 |
</at> |
|
397 |
</item> |
|
398 |
</object> |
|
399 |
</at> |
|
400 |
</object> |
|
401 |
</at> |
|
402 |
</object> |
|
403 |
</at> |
|
404 |
</object> |
|
405 |
</at> |
|
406 |
</object> |
|
407 |
</at> |
|
408 |
</item> |
|
409 |
<item > |
|
410 |
<at name="value"> |
|
411 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
412 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
413 |
<at name="cellconstraints"> |
|
414 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
415 |
<at name="column">2</at> |
|
416 |
<at name="row">7</at> |
|
417 |
<at name="colspan">1</at> |
|
418 |
<at name="rowspan">1</at> |
|
419 |
<at name="halign">left</at> |
|
420 |
<at name="valign">top</at> |
|
421 |
<at name="insets" object="insets">0,0,0,0</at> |
|
422 |
</object> |
|
423 |
</at> |
|
424 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
425 |
</super> |
|
426 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
427 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
428 |
<at name="beanproperties"> |
|
429 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
430 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
431 |
<at name="properties"> |
|
432 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
433 |
<at name="text">Definition:</at> |
|
434 |
<at name="height">14</at> |
|
435 |
<at name="width">57</at> |
|
436 |
<at name="name">lblDefinition</at> |
|
437 |
<at name="fill"> |
|
438 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
439 |
<at name="name">fill</at> |
|
440 |
</object> |
|
441 |
</at> |
|
442 |
<at name="border"> |
|
443 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
444 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
445 |
<at name="name">border</at> |
|
446 |
</super> |
|
447 |
<at name="borders"> |
|
448 |
<object classname="java.util.LinkedList"> |
|
449 |
<item > |
|
450 |
<at name="value"> |
|
451 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
452 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
453 |
<at name="name">border</at> |
|
454 |
</super> |
|
455 |
</object> |
|
456 |
</at> |
|
457 |
</item> |
|
458 |
</object> |
|
459 |
</at> |
|
460 |
</object> |
|
461 |
</at> |
|
462 |
</object> |
|
463 |
</at> |
|
464 |
</object> |
|
465 |
</at> |
|
466 |
</object> |
|
467 |
</at> |
|
468 |
</item> |
|
469 |
<item > |
|
470 |
<at name="value"> |
|
471 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
472 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
473 |
<at name="cellconstraints"> |
|
474 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
475 |
<at name="column">4</at> |
|
476 |
<at name="row">7</at> |
|
477 |
<at name="colspan">2</at> |
|
478 |
<at name="rowspan">1</at> |
|
479 |
<at name="halign">default</at> |
|
480 |
<at name="valign">default</at> |
|
481 |
<at name="insets" object="insets">0,0,0,0</at> |
|
482 |
</object> |
|
483 |
</at> |
|
484 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
485 |
</super> |
|
486 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
487 |
<at name="beanclass">javax.swing.JTextArea</at> |
|
488 |
<at name="beanproperties"> |
|
489 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
490 |
<at name="classname">javax.swing.JTextArea</at> |
|
491 |
<at name="properties"> |
|
492 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
493 |
<at name="lineWrap">true</at> |
|
494 |
<at name="scrollableTracksViewportWidth">true</at> |
|
495 |
<at name="height">78</at> |
|
496 |
<at name="width">220</at> |
|
497 |
<at name="name">txtDefinition</at> |
|
498 |
<at name="scollBars"> |
|
499 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
500 |
<at name="name">scollBars</at> |
|
501 |
<at name="verticalpolicy">20</at> |
|
502 |
<at name="horizontalpolicy">30</at> |
|
503 |
<at name="border"> |
|
504 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
505 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
506 |
<at name="name">border</at> |
|
507 |
</super> |
|
508 |
<at name="borders"> |
|
509 |
<object classname="java.util.LinkedList"> |
|
510 |
<item > |
|
511 |
<at name="value"> |
|
512 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
513 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
514 |
<at name="name">border</at> |
|
515 |
</super> |
|
516 |
</object> |
|
517 |
</at> |
|
518 |
</item> |
|
519 |
</object> |
|
520 |
</at> |
|
521 |
</object> |
|
522 |
</at> |
|
523 |
</object> |
|
524 |
</at> |
|
525 |
<at name="border"> |
|
526 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
527 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
528 |
<at name="name">border</at> |
|
529 |
</super> |
|
530 |
<at name="borders"> |
|
531 |
<object classname="java.util.LinkedList"> |
|
532 |
<item > |
|
533 |
<at name="value"> |
|
534 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
535 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
536 |
<at name="name">border</at> |
|
537 |
</super> |
|
538 |
</object> |
|
539 |
</at> |
|
540 |
</item> |
|
541 |
</object> |
|
542 |
</at> |
|
543 |
</object> |
|
544 |
</at> |
|
545 |
<at name="scrollableTracksViewportHeight">true</at> |
|
546 |
</object> |
|
547 |
</at> |
|
548 |
</object> |
|
549 |
</at> |
|
550 |
</object> |
|
551 |
</at> |
|
552 |
</item> |
|
553 |
</object> |
|
554 |
</at> |
|
555 |
<at name="properties"> |
|
556 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
557 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
558 |
<at name="properties"> |
|
559 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
560 |
<at name="name"></at> |
|
561 |
<at name="fill"> |
|
562 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
563 |
<at name="name">fill</at> |
|
564 |
</object> |
|
565 |
</at> |
|
566 |
<at name="scollBars"> |
|
567 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
568 |
<at name="name">scollBars</at> |
|
569 |
<at name="verticalpolicy">21</at> |
|
570 |
<at name="horizontalpolicy">31</at> |
|
571 |
<at name="border"> |
|
572 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
573 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
574 |
<at name="name">border</at> |
|
575 |
</super> |
|
576 |
<at name="borders"> |
|
577 |
<object classname="java.util.LinkedList"> |
|
578 |
<item > |
|
579 |
<at name="value"> |
|
580 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
581 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
582 |
<at name="name">border</at> |
|
583 |
</super> |
|
584 |
</object> |
|
585 |
</at> |
|
586 |
</item> |
|
587 |
</object> |
|
588 |
</at> |
|
589 |
</object> |
|
590 |
</at> |
|
591 |
</object> |
|
592 |
</at> |
|
593 |
<at name="border"> |
|
594 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
595 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
596 |
<at name="name">border</at> |
|
597 |
</super> |
|
598 |
<at name="borders"> |
|
599 |
<object classname="java.util.LinkedList"/> |
|
600 |
</at> |
|
601 |
</object> |
|
602 |
</at> |
|
603 |
</object> |
|
604 |
</at> |
|
605 |
</object> |
|
606 |
</at> |
|
607 |
<at name="cellpainters"> |
|
608 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
609 |
<at name="rows"> |
|
610 |
<object classname="[Ljava.lang.Object;" size="8"> |
|
611 |
<at name="item" index="0"> |
|
612 |
<object classname="[Ljava.lang.Object;" size="6"/> |
|
613 |
</at> |
|
614 |
<at name="item" index="1"> |
|
615 |
<object classname="[Ljava.lang.Object;" size="6"/> |
|
616 |
</at> |
|
617 |
<at name="item" index="2"> |
|
618 |
<object classname="[Ljava.lang.Object;" size="6"/> |
|
619 |
</at> |
|
620 |
<at name="item" index="3"> |
|
621 |
<object classname="[Ljava.lang.Object;" size="6"/> |
|
622 |
</at> |
|
623 |
<at name="item" index="4"> |
|
624 |
<object classname="[Ljava.lang.Object;" size="6"/> |
|
625 |
</at> |
|
626 |
<at name="item" index="5"> |
|
627 |
<object classname="[Ljava.lang.Object;" size="6"/> |
|
628 |
</at> |
|
629 |
<at name="item" index="6"> |
|
630 |
<object classname="[Ljava.lang.Object;" size="6"/> |
|
631 |
</at> |
|
632 |
<at name="item" index="7"> |
|
633 |
<object classname="[Ljava.lang.Object;" size="6"/> |
|
634 |
</at> |
|
635 |
</object> |
|
636 |
</at> |
|
637 |
</object> |
|
638 |
</at> |
|
639 |
<at name="rowgroups"> |
|
640 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
641 |
<at name="groups"> |
|
642 |
<object classname="java.util.HashMap"/> |
|
643 |
</at> |
|
644 |
</object> |
|
645 |
</at> |
|
646 |
<at name="colgroups"> |
|
647 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
648 |
<at name="groups"> |
|
649 |
<object classname="java.util.HashMap"/> |
|
650 |
</at> |
|
651 |
</object> |
|
652 |
</at> |
|
653 |
</object> |
|
654 |
</at> |
|
655 |
</object> |
org.gvsig.proj/trunk/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/src/main/java/org/gvsig/proj/swing/impl/DefaultCoordinateReferenceSystemSelectorComponentView.java | ||
---|---|---|
1 |
package org.gvsig.proj.swing.impl; |
|
2 |
|
|
3 |
import com.jeta.open.i18n.I18NUtils; |
|
4 |
import com.jgoodies.forms.layout.CellConstraints; |
|
5 |
import com.jgoodies.forms.layout.FormLayout; |
|
6 |
import java.awt.BorderLayout; |
|
7 |
import java.awt.ComponentOrientation; |
|
8 |
import java.awt.Container; |
|
9 |
import java.awt.Dimension; |
|
10 |
import javax.swing.Box; |
|
11 |
import javax.swing.ImageIcon; |
|
12 |
import javax.swing.JButton; |
|
13 |
import javax.swing.JComboBox; |
|
14 |
import javax.swing.JFrame; |
|
15 |
import javax.swing.JLabel; |
|
16 |
import javax.swing.JList; |
|
17 |
import javax.swing.JPanel; |
|
18 |
import javax.swing.JScrollPane; |
|
19 |
import javax.swing.JTextArea; |
|
20 |
import javax.swing.JTextField; |
|
21 |
|
|
22 |
|
|
23 |
public class DefaultCoordinateReferenceSystemSelectorComponentView extends JPanel |
|
24 |
{ |
|
25 |
JLabel lblCode = new JLabel(); |
|
26 |
JButton btnSearch = new JButton(); |
|
27 |
JTextField txtCode = new JTextField(); |
|
28 |
JList lstCodes = new JList(); |
|
29 |
JLabel lblAutority = new JLabel(); |
|
30 |
JComboBox cboAuthority = new JComboBox(); |
|
31 |
JLabel lblDefinition = new JLabel(); |
|
32 |
JTextArea txtDefinition = new JTextArea(); |
|
33 |
|
|
34 |
/** |
|
35 |
* Default constructor |
|
36 |
*/ |
|
37 |
public DefaultCoordinateReferenceSystemSelectorComponentView() |
|
38 |
{ |
|
39 |
initializePanel(); |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
44 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
45 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
46 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
47 |
*/ |
|
48 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
49 |
{ |
|
50 |
Dimension filler = new Dimension(10,10); |
|
51 |
|
|
52 |
boolean filled_cell_11 = false; |
|
53 |
CellConstraints cc = new CellConstraints(); |
|
54 |
if ( cols.length > 0 && rows.length > 0 ) |
|
55 |
{ |
|
56 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
57 |
{ |
|
58 |
/** add a rigid area */ |
|
59 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
60 |
filled_cell_11 = true; |
|
61 |
} |
|
62 |
} |
|
63 |
|
|
64 |
for( int index = 0; index < cols.length; index++ ) |
|
65 |
{ |
|
66 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
67 |
{ |
|
68 |
continue; |
|
69 |
} |
|
70 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
71 |
} |
|
72 |
|
|
73 |
for( int index = 0; index < rows.length; index++ ) |
|
74 |
{ |
|
75 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
76 |
{ |
|
77 |
continue; |
|
78 |
} |
|
79 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
80 |
} |
|
81 |
|
|
82 |
} |
|
83 |
|
|
84 |
/** |
|
85 |
* Helper method to load an image file from the CLASSPATH |
|
86 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
87 |
* @return an ImageIcon instance with the specified image file |
|
88 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
89 |
*/ |
|
90 |
public ImageIcon loadImage( String imageName ) |
|
91 |
{ |
|
92 |
try |
|
93 |
{ |
|
94 |
ClassLoader classloader = getClass().getClassLoader(); |
|
95 |
java.net.URL url = classloader.getResource( imageName ); |
|
96 |
if ( url != null ) |
|
97 |
{ |
|
98 |
ImageIcon icon = new ImageIcon( url ); |
|
99 |
return icon; |
|
100 |
} |
|
101 |
} |
|
102 |
catch( Exception e ) |
|
103 |
{ |
|
104 |
e.printStackTrace(); |
|
105 |
} |
|
106 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
107 |
} |
|
108 |
|
|
109 |
/** |
|
110 |
* Method for recalculating the component orientation for |
|
111 |
* right-to-left Locales. |
|
112 |
* @param orientation the component orientation to be applied |
|
113 |
*/ |
|
114 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
115 |
{ |
|
116 |
// Not yet implemented... |
|
117 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
118 |
super.applyComponentOrientation(orientation); |
|
119 |
} |
|
120 |
|
|
121 |
public JPanel createPanel() |
|
122 |
{ |
|
123 |
JPanel jpanel1 = new JPanel(); |
|
124 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
|
125 |
CellConstraints cc = new CellConstraints(); |
|
126 |
jpanel1.setLayout(formlayout1); |
|
127 |
|
|
128 |
lblCode.setName("lblCode"); |
|
129 |
lblCode.setText("Code:"); |
|
130 |
jpanel1.add(lblCode,new CellConstraints(2,4,1,1,CellConstraints.LEFT,CellConstraints.CENTER)); |
|
131 |
|
|
132 |
btnSearch.setActionCommand("Search"); |
|
133 |
btnSearch.setName("btnSearch"); |
|
134 |
btnSearch.setText("Search"); |
|
135 |
jpanel1.add(btnSearch,cc.xy(5,4)); |
|
136 |
|
|
137 |
txtCode.setName("txtCode"); |
|
138 |
jpanel1.add(txtCode,cc.xy(4,4)); |
|
139 |
|
|
140 |
lstCodes.setName("lstCodes"); |
|
141 |
JScrollPane jscrollpane1 = new JScrollPane(); |
|
142 |
jscrollpane1.setViewportView(lstCodes); |
|
143 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
|
144 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
|
145 |
jpanel1.add(jscrollpane1,cc.xywh(4,5,2,1)); |
|
146 |
|
|
147 |
lblAutority.setName("lblAutority"); |
|
148 |
lblAutority.setText("Authority:"); |
|
149 |
jpanel1.add(lblAutority,new CellConstraints(2,2,1,1,CellConstraints.LEFT,CellConstraints.CENTER)); |
|
150 |
|
|
151 |
cboAuthority.setName("cboAuthority"); |
|
152 |
jpanel1.add(cboAuthority,cc.xywh(4,2,2,1)); |
|
153 |
|
|
154 |
lblDefinition.setName("lblDefinition"); |
|
155 |
lblDefinition.setText("Definition:"); |
|
156 |
jpanel1.add(lblDefinition,new CellConstraints(2,7,1,1,CellConstraints.LEFT,CellConstraints.TOP)); |
|
157 |
|
|
158 |
txtDefinition.setLineWrap(true); |
|
159 |
txtDefinition.setName("txtDefinition"); |
|
160 |
JScrollPane jscrollpane2 = new JScrollPane(); |
|
161 |
jscrollpane2.setViewportView(txtDefinition); |
|
162 |
jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
|
163 |
jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
|
164 |
jpanel1.add(jscrollpane2,cc.xywh(4,7,2,1)); |
|
165 |
|
|
166 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6 },new int[]{ 1,2,3,4,5,6,7,8 }); |
|
167 |
return jpanel1; |
|
168 |
} |
|
169 |
|
|
170 |
/** |
|
171 |
* Initializer |
|
172 |
*/ |
|
173 |
protected void initializePanel() |
|
174 |
{ |
|
175 |
setLayout(new BorderLayout()); |
|
176 |
add(createPanel(), BorderLayout.CENTER); |
|
177 |
} |
|
178 |
|
|
179 |
|
|
180 |
} |
Also available in: Unified diff