Revision 44408
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/ExpressionUtils.java | ||
---|---|---|
170 | 170 |
return symbolTable; |
171 | 171 |
} |
172 | 172 |
|
173 |
public static String surroundByDynamicTextTag(String source) { |
|
174 |
return surroundByDynamicTextTag(source, true); |
|
175 |
} |
|
176 |
|
|
177 |
public static String surroundByDynamicTextTag(String source, boolean insert) { |
|
178 |
if( source==null ) { |
|
179 |
return null; |
|
180 |
} |
|
181 |
if( insert ) { |
|
182 |
return "<%=" + source + "%>"; |
|
183 |
} |
|
184 |
return "<%" + source + "%>"; |
|
185 |
} |
|
186 |
|
|
173 | 187 |
public static boolean isDynamicText(String source) { |
174 | 188 |
String[] sources = StringUtils.substringsBetween(source, "<%", "%>"); |
175 | 189 |
if( ArrayUtils.isEmpty(sources) ) { |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/foldersmanager/UniqueTemporaryFileFunction.java | ||
---|---|---|
19 | 19 |
"Return a unique file with the specified relative path to the temporary folder.\n" + |
20 | 20 |
"The base name of the file is modified to be unique.\n" + |
21 | 21 |
"The file will be deleted when the application exits.\n" + |
22 |
" "+NAME+"('folder','name.txt')\n",
|
|
22 |
" "+NAME+"('folder','name.txt')\n" +
|
|
23 | 23 |
"For this call, the return value will have the form:\n" + |
24 |
" <PATH>/folder/name-<HEX1>-<HEX2>.txt" +
|
|
24 |
" {PATH}/folder/name-{HEX1}-{HEX2}.txt",
|
|
25 | 25 |
NAME+"({{pathComponents...}})", |
26 | 26 |
new String[] { |
27 | 27 |
"pathComponents - relative pathname" |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionEvaluatorSwingManager.java | ||
---|---|---|
3 | 3 |
|
4 | 4 |
import java.util.Collection; |
5 | 5 |
import java.util.List; |
6 |
import javax.lang.model.element.VariableElement;
|
|
6 |
import javax.swing.Action;
|
|
7 | 7 |
import javax.swing.JButton; |
8 | 8 |
import javax.swing.text.JTextComponent; |
9 | 9 |
import org.gvsig.expressionevaluator.Function; |
... | ... | |
15 | 15 |
public interface ExpressionEvaluatorSwingManager { |
16 | 16 |
|
17 | 17 |
|
18 |
// public List<Element> createElements(Collection<SymbolTable> symbolTables); |
|
19 |
|
|
20 | 18 |
public List<Element> createElements(Collection<SymbolTable> symbolTables); |
21 | 19 |
|
22 | 20 |
public JExpressionBuilder createJExpressionBuilder(); |
23 | 21 |
|
22 |
public Action createJExpressionBuilderAction(JTextComponent jtext); |
|
23 |
|
|
24 | 24 |
public JExpressionPicker createJExpressionPicker(); |
25 | 25 |
|
26 | 26 |
public void registerElement(ElementFactory factory); |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionEvaluatorSwingManager.java | ||
---|---|---|
1 | 1 |
package org.gvsig.expressionevaluator.swing.impl; |
2 | 2 |
|
3 |
import java.awt.event.ActionEvent; |
|
4 |
import java.awt.event.ActionListener; |
|
3 | 5 |
import java.util.ArrayList; |
4 | 6 |
import java.util.Collection; |
5 | 7 |
import java.util.Collections; |
... | ... | |
7 | 9 |
import java.util.HashMap; |
8 | 10 |
import java.util.List; |
9 | 11 |
import java.util.Map; |
12 |
import javax.swing.AbstractAction; |
|
13 |
import javax.swing.Action; |
|
10 | 14 |
import javax.swing.JButton; |
11 | 15 |
import javax.swing.text.JTextComponent; |
12 | 16 |
import org.apache.commons.lang3.StringUtils; |
17 |
import org.gvsig.expressionevaluator.ExpressionUtils; |
|
13 | 18 |
import org.gvsig.expressionevaluator.Function; |
14 | 19 |
import org.gvsig.expressionevaluator.SymbolTable; |
15 | 20 |
import org.gvsig.expressionevaluator.swing.CalculatorController; |
... | ... | |
20 | 25 |
import org.gvsig.expressionevaluator.swing.Element.FunctionElement; |
21 | 26 |
import org.gvsig.expressionevaluator.swing.Element.GroupElement; |
22 | 27 |
import org.gvsig.expressionevaluator.swing.ElementFactory; |
28 |
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator; |
|
23 | 29 |
import org.gvsig.expressionevaluator.swing.ExpressionPickerController; |
24 | 30 |
import org.gvsig.expressionevaluator.swing.FunctionAdditionalPanelFactory; |
25 | 31 |
import org.gvsig.expressionevaluator.swing.JExpressionPicker; |
... | ... | |
29 | 35 |
import org.gvsig.expressionevaluator.swing.impl.elements.DefaultGroupElement; |
30 | 36 |
import org.gvsig.tools.ToolsLocator; |
31 | 37 |
import org.gvsig.tools.i18n.I18nManager; |
38 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
39 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
|
40 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
|
41 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
|
32 | 42 |
|
33 | 43 |
public class DefaultExpressionEvaluatorSwingManager |
34 | 44 |
implements ExpressionEvaluatorSwingManager { |
... | ... | |
104 | 114 |
}); |
105 | 115 |
return factories; |
106 | 116 |
} |
117 |
|
|
118 |
private static class CreateJExpressionBuilderAction extends AbstractAction { |
|
119 |
|
|
120 |
private JTextComponent jtext; |
|
121 |
|
|
122 |
public CreateJExpressionBuilderAction(JTextComponent jtext) { |
|
123 |
this.jtext = jtext; |
|
124 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
125 |
this.putValue( |
|
126 |
Action.ACTION_COMMAND_KEY, |
|
127 |
"CreateJExpressionBuilderAction" |
|
128 |
); |
|
129 |
this.putValue( |
|
130 |
Action.NAME, |
|
131 |
i18n.getTranslation("_Show_expression_builder") |
|
132 |
); |
|
133 |
this.putValue( |
|
134 |
Action.SMALL_ICON, |
|
135 |
ToolsSwingLocator.getIconThemeManager().getCurrent().get("picker-expression") |
|
136 |
); |
|
137 |
} |
|
138 |
|
|
139 |
@Override |
|
140 |
public void actionPerformed(ActionEvent e) { |
|
141 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
142 |
WindowManager_v2 winmgr = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
143 |
final JExpressionBuilder panel = ExpressionEvaluatorSwingLocator.getManager().createJExpressionBuilder(); |
|
144 |
final Dialog dialog = winmgr.createDialog( |
|
145 |
panel.asJComponent(), |
|
146 |
i18n.getTranslation("_Expression_builder"), |
|
147 |
null, |
|
148 |
WindowManager_v2.BUTTONS_OK_CANCEL |
|
149 |
); |
|
150 |
dialog.addActionListener(new ActionListener() { |
|
151 |
@Override |
|
152 |
public void actionPerformed(ActionEvent e2) { |
|
153 |
if( dialog.getAction()==WindowManager_v2.BUTTON_OK ) { |
|
154 |
if( ExpressionUtils.isDynamicText(jtext.getText())) { |
|
155 |
jtext.replaceSelection( |
|
156 |
panel.getExpression().getPhrase() |
|
157 |
); |
|
158 |
} else { |
|
159 |
jtext.replaceSelection( |
|
160 |
ExpressionUtils.surroundByDynamicTextTag( |
|
161 |
panel.getExpression().getPhrase(), |
|
162 |
true |
|
163 |
) |
|
164 |
); |
|
165 |
} |
|
166 |
} |
|
167 |
} |
|
168 |
}); |
|
169 |
dialog.show(WindowManager.MODE.DIALOG); |
|
170 |
} |
|
171 |
|
|
172 |
} |
|
173 |
|
|
174 |
@Override |
|
175 |
public Action createJExpressionBuilderAction(JTextComponent jtext) { |
|
176 |
Action action = new CreateJExpressionBuilderAction(jtext); |
|
177 |
return action; |
|
178 |
} |
|
107 | 179 |
|
108 | 180 |
@Override |
109 | 181 |
public JExpressionBuilder createJExpressionBuilder() { |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/export/swing/impl/panels/SelectAttributesPanelView.java | ||
---|---|---|
1 | 1 |
package org.gvsig.export.swing.impl.panels; |
2 |
|
|
2 | 3 |
import com.jeta.open.i18n.I18NUtils; |
3 | 4 |
import com.jgoodies.forms.layout.CellConstraints; |
4 | 5 |
import com.jgoodies.forms.layout.FormLayout; |
... | ... | |
6 | 7 |
import java.awt.ComponentOrientation; |
7 | 8 |
import java.awt.Container; |
8 | 9 |
import java.awt.Dimension; |
9 |
import java.awt.event.WindowAdapter; |
|
10 |
import java.awt.event.WindowEvent; |
|
11 | 10 |
import javax.swing.Box; |
12 | 11 |
import javax.swing.ImageIcon; |
12 |
import javax.swing.JButton; |
|
13 | 13 |
import javax.swing.JFrame; |
14 | 14 |
import javax.swing.JLabel; |
15 | 15 |
import javax.swing.JPanel; |
16 | 16 |
import javax.swing.JScrollPane; |
17 | 17 |
import javax.swing.JTable; |
18 |
import javax.swing.JTextField; |
|
19 |
import javax.swing.border.EmptyBorder; |
|
18 | 20 |
|
19 | 21 |
|
20 | 22 |
public class SelectAttributesPanelView extends JPanel |
... | ... | |
22 | 24 |
JLabel lblHeader = new JLabel(); |
23 | 25 |
JPanel jplAttributes = new JPanel(); |
24 | 26 |
JTable tblAttributes = new JTable(); |
27 |
JButton btnFilter = new JButton(); |
|
28 |
JTextField txtFilter = new JTextField(); |
|
29 |
JButton btnCheckAll = new JButton(); |
|
30 |
JButton btnUncheckAll = new JButton(); |
|
25 | 31 |
|
26 | 32 |
/** |
27 | 33 |
* Default constructor |
... | ... | |
32 | 38 |
} |
33 | 39 |
|
34 | 40 |
/** |
35 |
* Main method for panel |
|
36 |
*/ |
|
37 |
public static void main(String[] args) |
|
38 |
{ |
|
39 |
JFrame frame = new JFrame(); |
|
40 |
frame.setSize(600, 400); |
|
41 |
frame.setLocation(100, 100); |
|
42 |
frame.getContentPane().add(new SelectAttributesPanelView()); |
|
43 |
frame.setVisible(true); |
|
44 |
|
|
45 |
frame.addWindowListener( new WindowAdapter() |
|
46 |
{ |
|
47 |
public void windowClosing( WindowEvent evt ) |
|
48 |
{ |
|
49 |
System.exit(0); |
|
50 |
} |
|
51 |
}); |
|
52 |
} |
|
53 |
|
|
54 |
/** |
|
55 | 41 |
* Adds fill components to empty cells in the first row and first column of the grid. |
56 | 42 |
* This ensures that the grid spacing will be the same as shown in the designer. |
57 | 43 |
* @param cols an array of column indices in the first row where fill components should be added. |
... | ... | |
133 | 119 |
public JPanel createPanel() |
134 | 120 |
{ |
135 | 121 |
JPanel jpanel1 = new JPanel(); |
136 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:8DLU:NONE,FILL:8DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:53DLU:NONE,CENTER:2DLU:NONE");
|
|
122 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:8DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:53DLU:NONE,CENTER:2DLU:NONE");
|
|
137 | 123 |
CellConstraints cc = new CellConstraints(); |
138 | 124 |
jpanel1.setLayout(formlayout1); |
139 | 125 |
|
140 | 126 |
lblHeader.setName("lblHeader"); |
141 | 127 |
lblHeader.setText("_Select_name_type_size_and_attributes_to_export"); |
142 |
jpanel1.add(lblHeader,cc.xywh(2,2,3,1));
|
|
128 |
jpanel1.add(lblHeader,cc.xywh(2,2,2,1));
|
|
143 | 129 |
|
144 | 130 |
jplAttributes.setAutoscrolls(true); |
145 | 131 |
jplAttributes.setName("jplAttributes"); |
146 |
jpanel1.add(jplAttributes,cc.xy(4,5));
|
|
132 |
jpanel1.add(jplAttributes,cc.xy(3,9));
|
|
147 | 133 |
|
148 | 134 |
tblAttributes.setName("tblAttributes"); |
135 |
tblAttributes.setShowVerticalLines(false); |
|
149 | 136 |
JScrollPane jscrollpane1 = new JScrollPane(); |
150 | 137 |
jscrollpane1.setViewportView(tblAttributes); |
151 | 138 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
152 | 139 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
153 |
jpanel1.add(jscrollpane1,cc.xy(4,4));
|
|
140 |
jpanel1.add(jscrollpane1,cc.xy(3,6));
|
|
154 | 141 |
|
155 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6 }); |
|
142 |
jpanel1.add(createPanel1(),cc.xy(3,4)); |
|
143 |
jpanel1.add(createPanel2(),cc.xy(3,8)); |
|
144 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4 },new int[]{ 1,2,3,4,5,6,7,8,9,10 }); |
|
156 | 145 |
return jpanel1; |
157 | 146 |
} |
158 | 147 |
|
148 |
public JPanel createPanel1() |
|
149 |
{ |
|
150 |
JPanel jpanel1 = new JPanel(); |
|
151 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
|
152 |
CellConstraints cc = new CellConstraints(); |
|
153 |
jpanel1.setLayout(formlayout1); |
|
154 |
|
|
155 |
btnFilter.setActionCommand("JButton"); |
|
156 |
btnFilter.setIcon(loadImage("org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/resources/images/export-to/common-filter.png")); |
|
157 |
btnFilter.setName("btnFilter"); |
|
158 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
|
159 |
btnFilter.setBorder(emptyborder1); |
|
160 |
jpanel1.add(btnFilter,cc.xy(3,1)); |
|
161 |
|
|
162 |
txtFilter.setName("txtFilter"); |
|
163 |
jpanel1.add(txtFilter,cc.xy(1,1)); |
|
164 |
|
|
165 |
addFillComponents(jpanel1,new int[]{ 2 },new int[0]); |
|
166 |
return jpanel1; |
|
167 |
} |
|
168 |
|
|
169 |
public JPanel createPanel2() |
|
170 |
{ |
|
171 |
JPanel jpanel1 = new JPanel(); |
|
172 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE"); |
|
173 |
CellConstraints cc = new CellConstraints(); |
|
174 |
jpanel1.setLayout(formlayout1); |
|
175 |
|
|
176 |
btnCheckAll.setActionCommand("JButton"); |
|
177 |
btnCheckAll.setIcon(loadImage("org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/resources/images/export-to/common-check-on.png")); |
|
178 |
btnCheckAll.setName("btnCheckAll"); |
|
179 |
EmptyBorder emptyborder1 = new EmptyBorder(0,0,0,0); |
|
180 |
btnCheckAll.setBorder(emptyborder1); |
|
181 |
jpanel1.add(btnCheckAll,cc.xy(1,1)); |
|
182 |
|
|
183 |
btnUncheckAll.setActionCommand("JButton"); |
|
184 |
btnUncheckAll.setIcon(loadImage("org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/resources/images/export-to/common-check-off.png")); |
|
185 |
btnUncheckAll.setName("btnUncheckAll"); |
|
186 |
EmptyBorder emptyborder2 = new EmptyBorder(0,0,0,0); |
|
187 |
btnUncheckAll.setBorder(emptyborder2); |
|
188 |
jpanel1.add(btnUncheckAll,cc.xy(2,1)); |
|
189 |
|
|
190 |
addFillComponents(jpanel1,new int[]{ 3 },new int[0]); |
|
191 |
return jpanel1; |
|
192 |
} |
|
193 |
|
|
159 | 194 |
/** |
160 | 195 |
* Initializer |
161 | 196 |
*/ |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/export/swing/impl/panels/SelectAttributesPanel.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.awt.Component; |
4 | 4 |
import java.awt.Font; |
5 |
import java.awt.event.ActionEvent; |
|
6 |
import java.awt.event.ActionListener; |
|
7 |
import java.awt.event.KeyAdapter; |
|
8 |
import java.awt.event.KeyEvent; |
|
9 |
import java.net.URL; |
|
5 | 10 |
import java.util.ArrayList; |
6 | 11 |
import java.util.Comparator; |
7 |
import java.util.HashMap;
|
|
12 |
import java.util.Iterator;
|
|
8 | 13 |
import java.util.List; |
14 |
import java.util.Map; |
|
15 |
import java.util.Objects; |
|
9 | 16 |
import javax.swing.DefaultCellEditor; |
10 | 17 |
import javax.swing.DefaultComboBoxModel; |
18 |
import javax.swing.DefaultListCellRenderer; |
|
19 |
import javax.swing.ImageIcon; |
|
20 |
import javax.swing.JButton; |
|
21 |
import javax.swing.JCheckBox; |
|
11 | 22 |
import javax.swing.JComboBox; |
12 | 23 |
import javax.swing.JComponent; |
13 | 24 |
import javax.swing.JLabel; |
14 | 25 |
import javax.swing.JList; |
15 | 26 |
import javax.swing.JOptionPane; |
16 | 27 |
import javax.swing.JTable; |
17 |
import javax.swing.ListCellRenderer; |
|
18 |
import javax.swing.table.DefaultTableModel; |
|
28 |
import javax.swing.table.AbstractTableModel; |
|
29 |
import javax.swing.table.TableCellRenderer; |
|
30 |
import javax.swing.table.TableColumnModel; |
|
19 | 31 |
import javax.swing.table.TableModel; |
32 |
import javax.swing.text.JTextComponent; |
|
33 |
import org.apache.commons.io.FilenameUtils; |
|
20 | 34 |
import org.apache.commons.lang.StringUtils; |
21 | 35 |
import org.gvsig.export.ExportAttributes; |
36 |
import org.gvsig.export.ExportAttributes.ExportAttribute; |
|
22 | 37 |
import org.gvsig.export.ExportParameters; |
23 | 38 |
import org.gvsig.export.swing.JExportProcessPanel; |
24 | 39 |
import org.gvsig.export.swing.spi.ExportPanel; |
25 | 40 |
import org.gvsig.export.swing.spi.ExportPanelValidationException; |
26 | 41 |
import org.gvsig.export.swing.spi.ExportPanelsManager; |
27 | 42 |
import org.gvsig.fmap.dal.DataTypes; |
43 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
44 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
28 | 45 |
import org.gvsig.tools.ToolsLocator; |
46 |
import org.gvsig.tools.dataTypes.DataType; |
|
29 | 47 |
import org.gvsig.tools.dataTypes.DataTypesManager; |
30 | 48 |
import org.gvsig.tools.i18n.I18nManager; |
49 |
import org.gvsig.tools.swing.api.FilteredTableModel; |
|
31 | 50 |
import org.gvsig.tools.swing.api.ListElement; |
32 | 51 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
33 | 52 |
import org.gvsig.tools.swing.api.ToolsSwingManager; |
53 |
import org.gvsig.tools.swing.icontheme.IconTheme; |
|
54 |
import org.gvsig.tools.util.LabeledValue; |
|
55 |
import org.gvsig.tools.util.LabeledValueImpl; |
|
34 | 56 |
import org.slf4j.Logger; |
35 | 57 |
import org.slf4j.LoggerFactory; |
36 | 58 |
|
... | ... | |
38 | 60 |
* |
39 | 61 |
* @author jjdelcerro |
40 | 62 |
*/ |
63 |
@SuppressWarnings("UseSpecificCatch") |
|
41 | 64 |
public class SelectAttributesPanel |
42 | 65 |
extends SelectAttributesPanelView |
43 | 66 |
implements ExportPanel { |
44 | 67 |
|
45 |
private static final Logger LOG = LoggerFactory.getLogger(SelectAttributesPanel.class); |
|
68 |
private static final Logger LOGGER = LoggerFactory.getLogger(SelectAttributesPanel.class);
|
|
46 | 69 |
|
47 |
public static final int COLUMN_FIELD_NAME = 0;
|
|
48 |
public static final int COLUMN_FIELD_NEW_NAME = 1;
|
|
49 |
public static final int COLUMN_FIELD_TYPE = 2;
|
|
50 |
public static final int COLUMN_FIELD_SIZE = 3;
|
|
51 |
public static final int COLUMN_FIELD_EXPORT = 4;
|
|
70 |
private static final int COLUMN_FIELD_EXPORT = 0;
|
|
71 |
private static final int COLUMN_FIELD_TYPE = 1;
|
|
72 |
private static final int COLUMN_FIELD_SIZE = 2;
|
|
73 |
private static final int COLUMN_FIELD_NAME = 3;
|
|
74 |
private static final int COLUMN_FIELD_NEW_NAME = 4;
|
|
52 | 75 |
|
76 |
private static final int COLUMN_FIELD_COUNT = 5; |
|
77 |
|
|
78 |
private static class AttributesTableModel |
|
79 |
extends AbstractTableModel |
|
80 |
implements TableModel { |
|
81 |
|
|
82 |
final private ExportAttributes attributes; |
|
83 |
private final String[] columnNames = new String[COLUMN_FIELD_COUNT]; |
|
84 |
private final Class[] columnClases = new Class[COLUMN_FIELD_COUNT]; |
|
85 |
private final DataTypesManager dataManager; |
|
86 |
|
|
87 |
public AttributesTableModel(ExportAttributes attributes) { |
|
88 |
this.attributes = attributes; |
|
89 |
this.dataManager = ToolsLocator.getDataTypesManager(); |
|
90 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
91 |
columnNames[COLUMN_FIELD_NAME] = i18nManager.getTranslation("_name"); |
|
92 |
columnNames[COLUMN_FIELD_NEW_NAME] = i18nManager.getTranslation("_new_name"); |
|
93 |
columnNames[COLUMN_FIELD_TYPE] = i18nManager.getTranslation("_type"); |
|
94 |
columnNames[COLUMN_FIELD_SIZE] = i18nManager.getTranslation("_size"); |
|
95 |
columnNames[COLUMN_FIELD_EXPORT] = ""; |
|
96 |
|
|
97 |
columnClases[COLUMN_FIELD_NAME] = String.class; |
|
98 |
columnClases[COLUMN_FIELD_NEW_NAME] = String.class; |
|
99 |
columnClases[COLUMN_FIELD_TYPE] = String.class; |
|
100 |
columnClases[COLUMN_FIELD_SIZE] = Integer.class; |
|
101 |
columnClases[COLUMN_FIELD_EXPORT] = Boolean.class; |
|
102 |
} |
|
103 |
|
|
104 |
@Override |
|
105 |
public int getRowCount() { |
|
106 |
return this.attributes.size(); |
|
107 |
} |
|
108 |
|
|
109 |
@Override |
|
110 |
public int getColumnCount() { |
|
111 |
return COLUMN_FIELD_COUNT; |
|
112 |
} |
|
113 |
|
|
114 |
@Override |
|
115 |
public String getColumnName(int columnIndex) { |
|
116 |
return this.columnNames[columnIndex]; |
|
117 |
} |
|
118 |
|
|
119 |
@Override |
|
120 |
public Class<?> getColumnClass(int columnIndex) { |
|
121 |
return this.columnClases[columnIndex]; |
|
122 |
} |
|
123 |
|
|
124 |
@Override |
|
125 |
public boolean isCellEditable(int rowIndex, int columnIndex) { |
|
126 |
switch (columnIndex) { |
|
127 |
case COLUMN_FIELD_NAME: |
|
128 |
return false; |
|
129 |
default: |
|
130 |
return true; |
|
131 |
} |
|
132 |
} |
|
133 |
|
|
134 |
@Override |
|
135 |
public Object getValueAt(int rowIndex, int columnIndex) { |
|
136 |
ExportAttribute attr = this.attributes.get(rowIndex); |
|
137 |
switch (columnIndex) { |
|
138 |
case COLUMN_FIELD_NAME: |
|
139 |
return attr.getName(); |
|
140 |
case COLUMN_FIELD_NEW_NAME: |
|
141 |
return attr.getNewName(); |
|
142 |
case COLUMN_FIELD_TYPE: |
|
143 |
return dataManager.getTypeName(attr.getNewDataType()); |
|
144 |
case COLUMN_FIELD_SIZE: |
|
145 |
return attr.getSize(); |
|
146 |
case COLUMN_FIELD_EXPORT: |
|
147 |
return attr.isExported(); |
|
148 |
default: |
|
149 |
return null; |
|
150 |
} |
|
151 |
} |
|
152 |
|
|
153 |
@Override |
|
154 |
public void setValueAt(Object aValue, int rowIndex, int columnIndex) { |
|
155 |
ExportAttribute attr = this.attributes.get(rowIndex); |
|
156 |
switch (columnIndex) { |
|
157 |
case COLUMN_FIELD_NAME: |
|
158 |
break; |
|
159 |
case COLUMN_FIELD_NEW_NAME: |
|
160 |
attr.setNewName(Objects.toString(aValue, attr.getName())); |
|
161 |
break; |
|
162 |
case COLUMN_FIELD_TYPE: |
|
163 |
attr.setNewType(dataManager.getType(Objects.toString(aValue))); |
|
164 |
break; |
|
165 |
case COLUMN_FIELD_SIZE: |
|
166 |
try { |
|
167 |
attr.setSize(Integer.parseInt(Objects.toString(aValue))); |
|
168 |
} catch (Exception ex) { |
|
169 |
LOGGER.warn("Not been able to set size value of attribute " + attr.getName() + " (" + Objects.toString(aValue) + ").", ex); |
|
170 |
} |
|
171 |
break; |
|
172 |
case COLUMN_FIELD_EXPORT: |
|
173 |
try { |
|
174 |
attr.setExported((boolean) dataManager.get(DataTypes.BOOLEAN).coerce(aValue)); |
|
175 |
} catch (Exception ex) { |
|
176 |
LOGGER.warn("Not been able to set exported value of attribute " + attr.getName() + " (" + Objects.toString(aValue) + ").", ex); |
|
177 |
} |
|
178 |
break; |
|
179 |
default: |
|
180 |
break; |
|
181 |
} |
|
182 |
this.fireTableCellUpdated(rowIndex, columnIndex); |
|
183 |
} |
|
184 |
} |
|
185 |
|
|
186 |
private static class TableFilterController { |
|
187 |
|
|
188 |
private final JTable jtable; |
|
189 |
private final JTextComponent jtext; |
|
190 |
private final JButton btnFilter; |
|
191 |
private final int filterColumn; |
|
192 |
|
|
193 |
private FilteredTableModel tableModel; |
|
194 |
|
|
195 |
public TableFilterController(JTable jtable, JTextComponent jtext, JButton btnFilter, int filterColumn) { |
|
196 |
this.jtable = jtable; |
|
197 |
this.filterColumn = filterColumn; |
|
198 |
this.btnFilter = btnFilter; |
|
199 |
this.jtext = jtext; |
|
200 |
this.tableModel = null; |
|
201 |
ToolsSwingLocator.getToolsSwingManager().setDefaultPopupMenu(jtext); |
|
202 |
ToolsSwingLocator.getToolsSwingManager().addClearButton(jtext, new ActionListener() { |
|
203 |
@Override |
|
204 |
public void actionPerformed(ActionEvent e) { |
|
205 |
if (tableModel != null) { |
|
206 |
tableModel.setFilter(null); |
|
207 |
jtext.setText(""); |
|
208 |
} |
|
209 |
} |
|
210 |
}); |
|
211 |
this.jtext.addKeyListener(new KeyAdapter() { |
|
212 |
@Override |
|
213 |
public void keyPressed(KeyEvent e) { |
|
214 |
if (e.getKeyChar() == '\n') { |
|
215 |
if (tableModel != null) { |
|
216 |
tableModel.setFilter(jtext.getText()); |
|
217 |
} |
|
218 |
} |
|
219 |
} |
|
220 |
}); |
|
221 |
this.btnFilter.addActionListener(new ActionListener() { |
|
222 |
@Override |
|
223 |
public void actionPerformed(ActionEvent e) { |
|
224 |
if (tableModel != null) { |
|
225 |
tableModel.setFilter(jtext.getText()); |
|
226 |
} |
|
227 |
} |
|
228 |
}); |
|
229 |
} |
|
230 |
|
|
231 |
public void setModel(TableModel tableModel) { |
|
232 |
this.tableModel = ToolsSwingLocator.getToolsSwingManager().createFilteredTableModel( |
|
233 |
tableModel, |
|
234 |
this.filterColumn |
|
235 |
); |
|
236 |
this.jtable.setModel(this.tableModel); |
|
237 |
} |
|
238 |
} |
|
239 |
|
|
240 |
private class DataTypeCellRenderer |
|
241 |
extends JLabel |
|
242 |
implements TableCellRenderer { |
|
243 |
|
|
244 |
public DataTypeCellRenderer() { |
|
245 |
} |
|
246 |
|
|
247 |
@Override |
|
248 |
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { |
|
249 |
if (value != null) { |
|
250 |
String name = (String) table.getModel().getValueAt(row, COLUMN_FIELD_NAME); |
|
251 |
this.setText(value.toString()); |
|
252 |
Font f = this.getFont(); |
|
253 |
if (isOriginalType(row, value.toString())) { |
|
254 |
this.setFont(f.deriveFont(f.getStyle() & ~Font.BOLD)); |
|
255 |
} else { |
|
256 |
this.setFont(f.deriveFont(f.getStyle() | Font.BOLD)); |
|
257 |
} |
|
258 |
} else { |
|
259 |
this.setText(""); |
|
260 |
} |
|
261 |
return this; |
|
262 |
} |
|
263 |
} |
|
264 |
|
|
265 |
private class DataTypeCellEditor extends DefaultCellEditor { |
|
266 |
|
|
267 |
private int currentRow = -1; |
|
268 |
|
|
269 |
private class DataTypeListCellRenderer extends DefaultListCellRenderer { |
|
270 |
|
|
271 |
@Override |
|
272 |
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
|
273 |
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
|
274 |
if (value != null) { |
|
275 |
label.setText(value.toString()); |
|
276 |
Font f = label.getFont(); |
|
277 |
if (isOriginalType(currentRow, value.toString())) { |
|
278 |
label.setFont(f.deriveFont(f.getStyle() | Font.BOLD)); |
|
279 |
} else { |
|
280 |
label.setFont(f.deriveFont(f.getStyle() & ~Font.BOLD)); |
|
281 |
} |
|
282 |
} |
|
283 |
return label; |
|
284 |
} |
|
285 |
} |
|
286 |
|
|
287 |
public DataTypeCellEditor() { |
|
288 |
super(new JComboBox()); |
|
289 |
JComboBox combo = (JComboBox) this.getComponent(); |
|
290 |
combo.setRenderer(new DataTypeListCellRenderer()); |
|
291 |
combo.setModel(this.getDataTypeComboModel()); |
|
292 |
} |
|
293 |
|
|
294 |
@Override |
|
295 |
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { |
|
296 |
this.currentRow = row; |
|
297 |
JComboBox combo = (JComboBox) super.getTableCellEditorComponent(table, value, isSelected, row, column); |
|
298 |
ListElement.setSelected(combo, value); |
|
299 |
return combo; |
|
300 |
} |
|
301 |
|
|
302 |
private DefaultComboBoxModel getDataTypeComboModel() { |
|
303 |
DataTypesManager dataManager = ToolsLocator.getDataTypesManager(); |
|
304 |
List<ListElement<Integer>> fieldTypes = new ArrayList<>(); |
|
305 |
Iterator<DataType> it = dataManager.iterator(); |
|
306 |
while (it.hasNext()) { |
|
307 |
DataType dataType = it.next(); |
|
308 |
fieldTypes.add( new ListElement<>(dataType.getName(), dataType.getType()) ); |
|
309 |
} |
|
310 |
fieldTypes.sort(new Comparator<ListElement<Integer>>() { |
|
311 |
@Override |
|
312 |
public int compare(ListElement<Integer> o1, ListElement<Integer> o2) { |
|
313 |
return o1.toString().compareTo(o2.toString()); |
|
314 |
} |
|
315 |
}); |
|
316 |
|
|
317 |
DefaultComboBoxModel<ListElement<Integer>> model = new DefaultComboBoxModel<>(); |
|
318 |
for (ListElement<Integer> element : fieldTypes) { |
|
319 |
model.addElement(element); |
|
320 |
} |
|
321 |
return model; |
|
322 |
} |
|
323 |
} |
|
324 |
|
|
53 | 325 |
private final ExportParameters parameters; |
54 | 326 |
private final JExportProcessPanel processPanel; |
55 |
private HashMap<String, String> layerAttributeDescriptor; |
|
56 | 327 |
|
328 |
// private Map<String, String> fieldAttributeTypes; |
|
329 |
// private FilteredTableModel filteredTableModel; |
|
330 |
private TableModel tableModel; |
|
331 |
private TableFilterController tableFilterController; |
|
332 |
private FeatureType targetFeatureType ; |
|
333 |
|
|
57 | 334 |
public SelectAttributesPanel( |
58 | 335 |
JExportProcessPanel processPanel, |
59 | 336 |
ExportParameters parameters |
... | ... | |
77 | 354 |
|
78 | 355 |
@Override |
79 | 356 |
public boolean validatePanel() throws ExportPanelValidationException { |
80 |
ExportAttributes expAttrs; |
|
81 |
expAttrs = this.parameters.getExportAttributes(); |
|
82 |
DataTypesManager dataManager = ToolsLocator.getDataTypesManager(); |
|
83 |
TableModel model = this.tblAttributes.getModel(); |
|
84 |
for (int i = 0; i < model.getRowCount(); i++) { |
|
85 |
String object = (String) model.getValueAt(i, COLUMN_FIELD_NAME); |
|
86 |
for (ExportAttributes.ExportAttribute expAttr : expAttrs) { // assign valuen from table to ExportAttribute |
|
87 |
if (object == null ? expAttr.getName() == null : object.equals(expAttr.getName())) { |
|
88 |
try { |
|
89 |
expAttr.setNewName((String) model.getValueAt(i, COLUMN_FIELD_NEW_NAME)); |
|
90 |
Object value = model.getValueAt(i, COLUMN_FIELD_TYPE); |
|
91 |
int dataType = dataManager.getType(value.toString()); |
|
92 |
expAttr.setNewType(dataType); |
|
93 |
int sizeValue; |
|
94 |
try { |
|
95 |
sizeValue = Integer.parseInt(model.getValueAt(i, COLUMN_FIELD_SIZE).toString()); |
|
96 |
} catch (NumberFormatException ex) { |
|
97 |
LOG.error("Not been able to set size value" + expAttr.getName() + ".Exception:" + ex); |
|
98 |
sizeValue = expAttr.getSize(); |
|
99 |
} |
|
100 |
expAttr.setSize(sizeValue); |
|
101 |
expAttr.setExported((boolean) model.getValueAt(i, COLUMN_FIELD_EXPORT)); |
|
102 |
} catch (Exception ex) { |
|
103 |
// TODO |
|
104 |
// break for incorrect values |
|
105 |
LOG.error("Not been able to set Export attribute for field" + expAttr.getName() + ".Exception:" + ex); |
|
106 |
|
|
107 |
} |
|
108 |
|
|
109 |
} |
|
110 |
|
|
111 |
} |
|
112 |
} |
|
113 |
|
|
357 |
ExportAttributes expAttrs = this.parameters.getExportAttributes(); |
|
114 | 358 |
if (!expAttrs.isAttributeNamesValid()) { |
115 | 359 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
116 | 360 |
int as = JOptionPane.showConfirmDialog( |
... | ... | |
150 | 394 |
return this; |
151 | 395 |
} |
152 | 396 |
|
153 |
private void fillTableWithAttributes() { |
|
154 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
155 |
String[] columnNames = new String[]{ |
|
156 |
i18nManager.getTranslation("_Field_name"), |
|
157 |
i18nManager.getTranslation("_Change_field_name"), |
|
158 |
i18nManager.getTranslation("_Change_field_type"), |
|
159 |
i18nManager.getTranslation("_Change_field_size"), |
|
160 |
i18nManager.getTranslation("_Check_export")}; |
|
161 |
|
|
162 |
DataTypesManager dataManager = ToolsLocator.getDataTypesManager(); |
|
163 |
List<ListElement<Integer>> fieldTypes = new ArrayList<>(); |
|
164 |
fieldTypes.add(new ListElement<>(dataManager.getTypeName(DataTypes.BOOLEAN), DataTypes.BOOLEAN)); |
|
165 |
fieldTypes.add(new ListElement<>(dataManager.getTypeName(DataTypes.DATE), DataTypes.DATE)); |
|
166 |
fieldTypes.add(new ListElement<>(dataManager.getTypeName(DataTypes.INT), DataTypes.INT)); |
|
167 |
fieldTypes.add(new ListElement<>(dataManager.getTypeName(DataTypes.DOUBLE), DataTypes.DOUBLE)); |
|
168 |
fieldTypes.add(new ListElement<>(dataManager.getTypeName(DataTypes.LONG), DataTypes.LONG)); |
|
169 |
fieldTypes.add(new ListElement<>(dataManager.getTypeName(DataTypes.STRING), DataTypes.STRING)); |
|
170 |
fieldTypes.add(new ListElement<>(dataManager.getTypeName(DataTypes.GEOMETRY), DataTypes.GEOMETRY)); |
|
171 |
|
|
172 |
fieldTypes.sort(new Comparator<ListElement<Integer>>() { |
|
173 |
@Override |
|
174 |
public int compare(ListElement<Integer> o1, ListElement<Integer> o2) { |
|
175 |
return o1.toString().compareTo(o2.toString()); |
|
397 |
private boolean isOriginalType(int row, String type) { |
|
398 |
try { |
|
399 |
if( this.targetFeatureType==null ) { |
|
400 |
return true; |
|
176 | 401 |
} |
177 |
}); |
|
178 |
|
|
179 |
// model = new ComboModelDataType(fieldTypes, fad.getType()); |
|
180 |
DefaultComboBoxModel<ListElement<Integer>> modelTypes = new DefaultComboBoxModel<>(); |
|
181 |
for (ListElement<Integer> element : fieldTypes) { |
|
182 |
modelTypes.addElement(element); |
|
402 |
TableModel model = this.tblAttributes.getModel(); |
|
403 |
String name = (String) model.getValueAt(row, COLUMN_FIELD_NAME); |
|
404 |
FeatureAttributeDescriptor attr = this.targetFeatureType.getAttributeDescriptor(name); |
|
405 |
if (attr == null) { |
|
406 |
return true; |
|
407 |
} |
|
408 |
return StringUtils.equalsIgnoreCase(type, attr.getDataTypeName()); |
|
409 |
} catch (Exception ex) { |
|
410 |
return true; |
|
183 | 411 |
} |
184 | 412 |
|
185 |
JComboBox comboBoxFieldTypes = new JComboBox(); |
|
186 |
comboBoxFieldTypes.setModel(modelTypes); |
|
413 |
} |
|
187 | 414 |
|
188 |
// Values to field the table are taken from the parameter.getExportAttributes |
|
189 |
Object[][] propertyFields = new Object[this.parameters.getExportAttributes().size()][5]; |
|
190 |
this.layerAttributeDescriptor = new HashMap<>(); |
|
191 |
for (int nAttr = 0; nAttr < this.parameters.getExportAttributes().size(); nAttr++) { |
|
192 |
//ExportAttributes.ExportAttribute exportAttr : this.parameters.getExportAttributes()) { |
|
193 |
ExportAttributes.ExportAttribute exportAttr = this.parameters.getExportAttributes().get(nAttr); |
|
194 |
propertyFields[nAttr][COLUMN_FIELD_NAME] = exportAttr.getName(); |
|
195 |
propertyFields[nAttr][COLUMN_FIELD_NEW_NAME] = exportAttr.getNewName(); |
|
196 |
propertyFields[nAttr][COLUMN_FIELD_TYPE] = dataManager.getTypeName(exportAttr.getDataType()); |
|
197 |
propertyFields[nAttr][COLUMN_FIELD_SIZE] = exportAttr.getSize(); |
|
198 |
propertyFields[nAttr][COLUMN_FIELD_EXPORT] = exportAttr.isExported(); |
|
415 |
private ExportAttributes getExportAttributes() { |
|
416 |
ExportAttributes attributes = this.parameters.getExportAttributes(); |
|
417 |
return attributes; |
|
418 |
} |
|
199 | 419 |
|
200 |
this.layerAttributeDescriptor.put(
|
|
201 |
exportAttr.getName(),
|
|
202 |
dataManager.getTypeName(exportAttr.getDataType())
|
|
203 |
); |
|
420 |
private void fillTableWithAttributes() {
|
|
421 |
ExportAttributes attributes = this.getExportAttributes();
|
|
422 |
if( this.targetFeatureType == null ) {
|
|
423 |
this.targetFeatureType = this.getExportAttributes().getTargetFeatureType();
|
|
204 | 424 |
} |
205 | 425 |
|
206 |
DefaultTableModel model = new DefaultTableModel(propertyFields, columnNames) { |
|
426 |
|
|
427 |
this.tableModel = new AttributesTableModel(attributes); |
|
428 |
this.tblAttributes.setModel(this.tableModel); |
|
429 |
this.tableFilterController.setModel(this.tableModel); |
|
207 | 430 |
|
208 |
private static final long serialVersionUID = 1L; |
|
431 |
TableColumnModel columnModel = this.tblAttributes.getColumnModel(); |
|
432 |
columnModel.getColumn(COLUMN_FIELD_TYPE).setCellEditor(new DataTypeCellEditor()); |
|
433 |
columnModel.getColumn(COLUMN_FIELD_TYPE).setCellRenderer(new DataTypeCellRenderer()); |
|
434 |
|
|
435 |
columnModel.getColumn(COLUMN_FIELD_EXPORT).setPreferredWidth( new JCheckBox().getPreferredSize().width*2); |
|
436 |
columnModel.getColumn(COLUMN_FIELD_TYPE).setPreferredWidth( new JLabel("XXIntegerXX").getPreferredSize().width); |
|
437 |
columnModel.getColumn(COLUMN_FIELD_SIZE).setPreferredWidth( new JLabel("00000").getPreferredSize().width); |
|
209 | 438 |
|
210 |
@Override |
|
211 |
public boolean isCellEditable(int row, int col) { |
|
212 |
return col != 0; |
|
213 |
} |
|
439 |
} |
|
214 | 440 |
|
441 |
private void initComponents() { |
|
442 |
|
|
443 |
this.tblAttributes.setAutoCreateRowSorter(true); |
|
444 |
this.tblAttributes.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); |
|
445 |
|
|
446 |
this.tableFilterController = new TableFilterController( |
|
447 |
this.tblAttributes, |
|
448 |
this.txtFilter, |
|
449 |
this.btnFilter, |
|
450 |
COLUMN_FIELD_NAME |
|
451 |
); |
|
452 |
this.btnCheckAll.addActionListener(new ActionListener() { |
|
215 | 453 |
@Override |
216 |
public Class getColumnClass(int column) { |
|
217 |
switch (column) { |
|
218 |
case 0: |
|
219 |
case 1: |
|
220 |
case 3: |
|
221 |
return String.class; |
|
222 |
case 2: |
|
223 |
return JComboBox.class; |
|
224 |
case 4: |
|
225 |
return Boolean.class; |
|
226 |
|
|
227 |
} |
|
228 |
return getValueAt(0, column).getClass(); |
|
454 |
public void actionPerformed(ActionEvent e) { |
|
455 |
doCheckAll(); |
|
229 | 456 |
} |
230 |
}; |
|
231 |
|
|
232 |
this.tblAttributes.setModel(model); |
|
233 |
|
|
234 |
class TypeDefaultCellEditor extends DefaultCellEditor { |
|
235 |
|
|
236 |
private final HashMap<String, String> attributes; |
|
237 |
|
|
238 |
public TypeDefaultCellEditor(JComboBox comboBox, HashMap attributes) { |
|
239 |
super(comboBox); |
|
240 |
this.attributes = attributes; |
|
241 |
} |
|
242 |
|
|
457 |
}); |
|
458 |
this.btnUncheckAll.addActionListener(new ActionListener() { |
|
243 | 459 |
@Override |
244 |
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, |
|
245 |
int row, int column) { |
|
246 |
|
|
247 |
JComboBox editor = (JComboBox) super.getTableCellEditorComponent(table, value, isSelected, row, column); |
|
248 |
Object labelField = table.getModel().getValueAt(row, 0); |
|
249 |
String initialType = this.attributes.get(labelField.toString()); |
|
250 |
|
|
251 |
editor.getModel().setSelectedItem(value); |
|
252 |
|
|
253 |
class ComboBoxRenderer extends JLabel implements ListCellRenderer { |
|
254 |
|
|
255 |
private final String actualValue; |
|
256 |
private final String initialType; |
|
257 |
|
|
258 |
public ComboBoxRenderer(String value, String initialType) { |
|
259 |
this.actualValue = value; |
|
260 |
this.initialType = initialType; |
|
261 |
} |
|
262 |
|
|
263 |
@Override |
|
264 |
public Component getListCellRendererComponent(JList list, |
|
265 |
Object value, |
|
266 |
int index, |
|
267 |
boolean isSelected, |
|
268 |
boolean cellHasFocus) { |
|
269 |
if (value != null) { |
|
270 |
this.setText(value.toString()); |
|
271 |
} |
|
272 |
Font f = this.getFont(); |
|
273 |
if (StringUtils.equals(value.toString(), initialType)) { |
|
274 |
this.setFont(f.deriveFont(f.getStyle() | Font.BOLD)); |
|
275 |
} else { |
|
276 |
this.setFont(f.deriveFont(f.getStyle() & ~Font.BOLD)); |
|
277 |
} |
|
278 |
|
|
279 |
return this; |
|
280 |
} |
|
281 |
} |
|
282 |
ListCellRenderer cmbRenderer = new ComboBoxRenderer(value.toString(), initialType); |
|
283 |
editor.setRenderer(cmbRenderer); |
|
284 |
|
|
285 |
return editor; |
|
460 |
public void actionPerformed(ActionEvent e) { |
|
461 |
doUncheckAll(); |
|
286 | 462 |
} |
287 |
} |
|
288 |
DefaultCellEditor cellEditor = new TypeDefaultCellEditor(comboBoxFieldTypes, this.layerAttributeDescriptor); |
|
289 |
this.tblAttributes.getColumnModel().getColumn(COLUMN_FIELD_TYPE).setCellEditor(cellEditor); |
|
463 |
}); |
|
290 | 464 |
|
291 | 465 |
this.translate(); |
292 | 466 |
} |
293 | 467 |
|
294 |
private void initComponents() { |
|
295 |
// init default values |
|
468 |
private void doUncheckAll() { |
|
469 |
TableModel model = this.tblAttributes.getModel(); |
|
470 |
for (int row = 0; row < model.getRowCount(); row++) { |
|
471 |
model.setValueAt(false, row, COLUMN_FIELD_EXPORT); |
|
472 |
} |
|
473 |
} |
|
296 | 474 |
|
297 |
// init all UI |
|
298 |
this.fillTableWithAttributes(); |
|
299 |
|
|
475 |
private void doCheckAll() { |
|
476 |
TableModel model = this.tblAttributes.getModel(); |
|
477 |
for (int row = 0; row < model.getRowCount(); row++) { |
|
478 |
model.setValueAt(true, row, COLUMN_FIELD_EXPORT); |
|
479 |
} |
|
300 | 480 |
} |
301 | 481 |
|
302 | 482 |
private void translate() { |
... | ... | |
304 | 484 |
manager.translate(this.lblHeader); |
305 | 485 |
} |
306 | 486 |
|
487 |
@Override |
|
488 |
public ImageIcon loadImage(String imageName) { |
|
489 |
String name = FilenameUtils.getBaseName(imageName); |
|
490 |
IconTheme theme = ToolsSwingLocator.getIconThemeManager().getDefault(); |
|
491 |
if (theme.exists(name)) { |
|
492 |
return theme.get(name); |
|
493 |
} |
|
494 |
URL url = this.getClass().getResource(name + ".png"); |
|
495 |
if (url == null) { |
|
496 |
return null; |
|
497 |
} |
|
498 |
return new ImageIcon(url); |
|
499 |
} |
|
500 |
|
|
307 | 501 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/export/swing/impl/panels/SelectAttributesPanelView.xml | ||
---|---|---|
24 | 24 |
</at> |
25 | 25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
26 | 26 |
</super> |
27 |
<at name="id">/home/osc/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/export/swing/impl/panels/SelectAttributesPanelView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:53DLU:NONE,CENTER:2DLU:NONE</at> |
|
29 |
<at name="colspecs">FILL:4DLU:NONE,FILL:8DLU:NONE,FILL:8DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/export/swing/impl/panels/SelectAttributesPanelView.xml</at> |
|
28 |
<at name="path">org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/export/swing/impl/panels/SelectAttributesPanelView.xml</at> |
|
29 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:53DLU:NONE,CENTER:2DLU:NONE</at> |
|
30 |
<at name="colspecs">FILL:4DLU:NONE,FILL:8DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
|
30 | 31 |
<at name="components"> |
31 | 32 |
<object classname="java.util.LinkedList"> |
32 | 33 |
<item > |
... | ... | |
37 | 38 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
38 | 39 |
<at name="column">2</at> |
39 | 40 |
<at name="row">2</at> |
40 |
<at name="colspan">3</at>
|
|
41 |
<at name="colspan">2</at>
|
|
41 | 42 |
<at name="rowspan">1</at> |
42 | 43 |
<at name="halign">default</at> |
43 | 44 |
<at name="valign">default</at> |
... | ... | |
74 | 75 |
</object> |
75 | 76 |
</at> |
76 | 77 |
<at name="name">lblHeader</at> |
77 |
<at name="width">652</at>
|
|
78 |
<at name="width">929</at>
|
|
78 | 79 |
<at name="text">_Select_name_type_size_and_attributes_to_export</at> |
79 | 80 |
<at name="fill"> |
80 | 81 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
... | ... | |
95 | 96 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
96 | 97 |
<at name="cellconstraints"> |
97 | 98 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
98 |
<at name="column">4</at>
|
|
99 |
<at name="row">5</at>
|
|
99 |
<at name="column">3</at>
|
|
100 |
<at name="row">9</at>
|
|
100 | 101 |
<at name="colspan">1</at> |
101 | 102 |
<at name="rowspan">1</at> |
102 | 103 |
<at name="halign">default</at> |
... | ... | |
115 | 116 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
116 | 117 |
<at name="autoscrolls">true</at> |
117 | 118 |
<at name="name">jplAttributes</at> |
118 |
<at name="width">624</at>
|
|
119 |
<at name="width">915</at>
|
|
119 | 120 |
<at name="height">12</at> |
120 | 121 |
</object> |
121 | 122 |
</at> |
... | ... | |
130 | 131 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
131 | 132 |
<at name="cellconstraints"> |
132 | 133 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
133 |
<at name="column">4</at>
|
|
134 |
<at name="row">4</at>
|
|
134 |
<at name="column">3</at>
|
|
135 |
<at name="row">6</at>
|
|
135 | 136 |
<at name="colspan">1</at> |
136 | 137 |
<at name="rowspan">1</at> |
137 | 138 |
<at name="halign">default</at> |
... | ... | |
169 | 170 |
</object> |
170 | 171 |
</at> |
171 | 172 |
<at name="name">tblAttributes</at> |
172 |
<at name="width">622</at> |
|
173 |
<at name="showVerticalLines">false</at> |
|
174 |
<at name="width">913</at> |
|
173 | 175 |
<at name="scollBars"> |
174 | 176 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
175 | 177 |
<at name="name">scollBars</at> |
... | ... | |
205 | 207 |
</object> |
206 | 208 |
</at> |
207 | 209 |
</item> |
210 |
<item > |
|
211 |
<at name="value"> |
|
212 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
213 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
214 |
<at name="cellconstraints"> |
|
215 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
216 |
<at name="column">3</at> |
|
217 |
<at name="row">4</at> |
|
218 |
<at name="colspan">1</at> |
|
219 |
<at name="rowspan">1</at> |
|
220 |
<at name="halign">default</at> |
|
221 |
<at name="valign">default</at> |
|
222 |
<at name="insets" object="insets">0,0,0,0</at> |
|
223 |
</object> |
|
224 |
</at> |
|
225 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
226 |
</super> |
|
227 |
<at name="id">embedded.1436963166</at> |
|
228 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
|
229 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
|
230 |
<at name="components"> |
|
231 |
<object classname="java.util.LinkedList"> |
|
232 |
<item > |
|
233 |
<at name="value"> |
|
234 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
235 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
236 |
<at name="cellconstraints"> |
|
237 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
238 |
<at name="column">3</at> |
|
239 |
<at name="row">1</at> |
|
240 |
<at name="colspan">1</at> |
|
241 |
<at name="rowspan">1</at> |
|
242 |
<at name="halign">default</at> |
|
243 |
<at name="valign">default</at> |
|
244 |
<at name="insets" object="insets">0,0,0,0</at> |
|
245 |
</object> |
|
246 |
</at> |
|
247 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
248 |
</super> |
|
249 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
250 |
<at name="beanclass">javax.swing.JButton</at> |
|
251 |
<at name="beanproperties"> |
|
252 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
253 |
<at name="classname">javax.swing.JButton</at> |
|
254 |
<at name="properties"> |
|
255 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
256 |
<at name="border"> |
|
257 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
258 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
259 |
<at name="name">border</at> |
|
260 |
</super> |
|
261 |
<at name="borders"> |
|
262 |
<object classname="java.util.LinkedList"> |
|
263 |
<item > |
|
264 |
<at name="value"> |
|
265 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
266 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
267 |
<at name="name">border</at> |
|
268 |
</super> |
|
269 |
<at name="top">2</at> |
|
270 |
<at name="left">2</at> |
|
271 |
<at name="bottom">2</at> |
|
272 |
<at name="right">2</at> |
|
273 |
</object> |
|
274 |
</at> |
|
275 |
</item> |
|
276 |
</object> |
|
277 |
</at> |
|
278 |
</object> |
|
279 |
</at> |
|
280 |
<at name="actionCommand">JButton</at> |
|
281 |
<at name="icon"> |
|
282 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
283 |
<at name="embedded">false</at> |
|
284 |
<at name="path">org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/resources/images/export-to/common-filter.png</at> |
|
285 |
<at name="description">common-filter.png</at> |
|
286 |
<at name="width">16</at> |
|
287 |
<at name="height">16</at> |
|
288 |
</object> |
|
289 |
</at> |
|
290 |
<at name="name">btnFilter</at> |
|
291 |
<at name="width">20</at> |
|
292 |
<at name="height">20</at> |
|
293 |
</object> |
|
294 |
</at> |
|
295 |
</object> |
|
296 |
</at> |
|
297 |
</object> |
|
298 |
</at> |
|
299 |
</item> |
|
300 |
<item > |
|
301 |
<at name="value"> |
|
302 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
303 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
304 |
<at name="cellconstraints"> |
|
305 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
306 |
<at name="column">1</at> |
|
307 |
<at name="row">1</at> |
|
308 |
<at name="colspan">1</at> |
|
309 |
<at name="rowspan">1</at> |
|
310 |
<at name="halign">default</at> |
|
311 |
<at name="valign">default</at> |
|
312 |
<at name="insets" object="insets">0,0,0,0</at> |
|
313 |
</object> |
|
314 |
</at> |
|
315 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
316 |
</super> |
|
317 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
318 |
<at name="beanclass">javax.swing.JTextField</at> |
|
319 |
<at name="beanproperties"> |
|
320 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
321 |
<at name="classname">javax.swing.JTextField</at> |
|
322 |
<at name="properties"> |
|
323 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
324 |
<at name="border"> |
|
325 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
326 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
327 |
<at name="name">border</at> |
|
328 |
</super> |
|
329 |
<at name="borders"> |
|
330 |
<object classname="java.util.LinkedList"> |
|
331 |
<item > |
|
332 |
<at name="value"> |
|
333 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
334 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
335 |
<at name="name">border</at> |
|
336 |
</super> |
|
337 |
</object> |
|
338 |
</at> |
|
339 |
</item> |
|
340 |
</object> |
|
341 |
</at> |
|
342 |
</object> |
|
343 |
</at> |
|
344 |
<at name="name">txtFilter</at> |
|
345 |
<at name="width">879</at> |
|
346 |
<at name="height">20</at> |
|
347 |
</object> |
|
348 |
</at> |
|
349 |
</object> |
|
350 |
</at> |
|
351 |
</object> |
|
352 |
</at> |
|
353 |
</item> |
|
354 |
</object> |
|
355 |
</at> |
|
356 |
<at name="properties"> |
|
357 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
358 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
359 |
<at name="properties"> |
|
360 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
361 |
<at name="border"> |
|
362 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
363 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
364 |
<at name="name">border</at> |
|
365 |
</super> |
|
366 |
<at name="borders"> |
|
367 |
<object classname="java.util.LinkedList"/> |
|
368 |
</at> |
|
369 |
</object> |
|
370 |
</at> |
|
371 |
<at name="name"/> |
|
372 |
<at name="fill"> |
|
373 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
374 |
<at name="name">fill</at> |
|
375 |
</object> |
|
376 |
</at> |
|
377 |
<at name="scollBars"> |
|
378 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
379 |
<at name="name">scollBars</at> |
|
380 |
<at name="verticalpolicy">21</at> |
|
381 |
<at name="horizontalpolicy">31</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 |
<at name="cellpainters"> |
|
409 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
410 |
<at name="rows"> |
|
411 |
<object classname="[Ljava.lang.Object;" size="1"> |
|
412 |
<at name="item" index="0"> |
|
413 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
414 |
</at> |
|
415 |
</object> |
|
416 |
</at> |
|
417 |
</object> |
|
418 |
</at> |
|
419 |
<at name="rowgroups"> |
|
420 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
421 |
<at name="groups"> |
|
422 |
<object classname="java.util.HashMap"/> |
|
423 |
</at> |
|
424 |
</object> |
|
425 |
</at> |
|
426 |
<at name="colgroups"> |
|
427 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
428 |
<at name="groups"> |
|
429 |
<object classname="java.util.HashMap"/> |
|
430 |
</at> |
|
431 |
</object> |
|
432 |
</at> |
|
433 |
</object> |
|
434 |
</at> |
|
435 |
</item> |
|
436 |
<item > |
|
437 |
<at name="value"> |
|
438 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
439 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
440 |
<at name="cellconstraints"> |
|
441 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
442 |
<at name="column">3</at> |
|
443 |
<at name="row">8</at> |
|
444 |
<at name="colspan">1</at> |
|
445 |
<at name="rowspan">1</at> |
|
446 |
<at name="halign">default</at> |
|
447 |
<at name="valign">default</at> |
|
448 |
<at name="insets" object="insets">0,0,0,0</at> |
|
449 |
</object> |
|
450 |
</at> |
|
451 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
452 |
</super> |
|
453 |
<at name="id">embedded.711656473</at> |
|
454 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
|
455 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)</at> |
|
456 |
<at name="components"> |
|
457 |
<object classname="java.util.LinkedList"> |
|
458 |
<item > |
|
459 |
<at name="value"> |
|
460 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
461 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
462 |
<at name="cellconstraints"> |
|
463 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
464 |
<at name="column">1</at> |
|
465 |
<at name="row">1</at> |
|
466 |
<at name="colspan">1</at> |
|
467 |
<at name="rowspan">1</at> |
|
468 |
<at name="halign">default</at> |
|
469 |
<at name="valign">default</at> |
|
470 |
<at name="insets" object="insets">0,0,0,0</at> |
|
471 |
</object> |
|
472 |
</at> |
|
473 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
474 |
</super> |
|
475 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
476 |
<at name="beanclass">javax.swing.JButton</at> |
|
477 |
<at name="beanproperties"> |
|
478 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
479 |
<at name="classname">javax.swing.JButton</at> |
|
480 |
<at name="properties"> |
|
481 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
482 |
<at name="border"> |
|
483 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
484 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
485 |
<at name="name">border</at> |
|
486 |
</super> |
|
487 |
<at name="borders"> |
|
488 |
<object classname="java.util.LinkedList"> |
|
489 |
<item > |
|
490 |
<at name="value"> |
|
491 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
492 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
493 |
<at name="name">border</at> |
|
494 |
</super> |
|
495 |
<at name="top">0</at> |
|
496 |
<at name="left">0</at> |
|
497 |
<at name="bottom">0</at> |
|
498 |
<at name="right">0</at> |
|
499 |
</object> |
|
500 |
</at> |
|
501 |
</item> |
|
502 |
</object> |
|
503 |
</at> |
|
504 |
</object> |
|
505 |
</at> |
|
506 |
<at name="actionCommand">JButton</at> |
|
507 |
<at name="icon"> |
|
508 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
509 |
<at name="embedded">false</at> |
|
510 |
<at name="path">org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/resources/images/export-to/common-check-on.png</at> |
|
511 |
<at name="description">common-check-on.png</at> |
|
512 |
<at name="width">16</at> |
|
513 |
<at name="height">16</at> |
|
514 |
</object> |
|
515 |
</at> |
|
516 |
<at name="name">btnCheckAll</at> |
|
517 |
<at name="width">16</at> |
|
518 |
<at name="height">16</at> |
|
519 |
</object> |
|
520 |
</at> |
|
521 |
</object> |
|
522 |
</at> |
|
523 |
</object> |
|
524 |
</at> |
|
525 |
</item> |
|
526 |
<item > |
|
527 |
<at name="value"> |
|
528 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
529 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
530 |
<at name="cellconstraints"> |
|
531 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
532 |
<at name="column">2</at> |
|
533 |
<at name="row">1</at> |
|
534 |
<at name="colspan">1</at> |
|
535 |
<at name="rowspan">1</at> |
|
536 |
<at name="halign">default</at> |
|
537 |
<at name="valign">default</at> |
|
538 |
<at name="insets" object="insets">0,0,0,0</at> |
|
539 |
</object> |
|
540 |
</at> |
|
541 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
542 |
</super> |
|
543 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
544 |
<at name="beanclass">javax.swing.JButton</at> |
|
545 |
<at name="beanproperties"> |
|
546 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
547 |
<at name="classname">javax.swing.JButton</at> |
|
548 |
<at name="properties"> |
|
549 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
550 |
<at name="border"> |
|
551 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
552 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
553 |
<at name="name">border</at> |
|
554 |
</super> |
|
555 |
<at name="borders"> |
|
556 |
<object classname="java.util.LinkedList"> |
|
557 |
<item > |
|
558 |
<at name="value"> |
|
559 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
560 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
561 |
<at name="name">border</at> |
|
562 |
</super> |
|
563 |
<at name="top">0</at> |
|
564 |
<at name="left">0</at> |
|
565 |
<at name="bottom">0</at> |
|
566 |
<at name="right">0</at> |
|
567 |
</object> |
|
568 |
</at> |
|
569 |
</item> |
|
570 |
</object> |
|
571 |
</at> |
|
572 |
</object> |
|
573 |
</at> |
|
574 |
<at name="actionCommand">JButton</at> |
|
575 |
<at name="icon"> |
|
576 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
577 |
<at name="embedded">false</at> |
|
578 |
<at name="path">org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/resources/images/export-to/common-check-off.png</at> |
|
579 |
<at name="description">common-check-off.png</at> |
|
580 |
<at name="width">16</at> |
|
581 |
<at name="height">16</at> |
|
582 |
</object> |
|
583 |
</at> |
|
584 |
<at name="name">btnUncheckAll</at> |
|
585 |
<at name="width">16</at> |
|
586 |
<at name="height">16</at> |
|
587 |
</object> |
|
588 |
</at> |
|
589 |
</object> |
|
590 |
</at> |
|
591 |
</object> |
|
592 |
</at> |
|
593 |
</item> |
|
594 |
</object> |
|
595 |
</at> |
|
596 |
<at name="properties"> |
|
597 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
598 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
599 |
<at name="properties"> |
|
600 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
601 |
<at name="border"> |
|
602 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
603 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
604 |
<at name="name">border</at> |
|
605 |
</super> |
|
606 |
<at name="borders"> |
|
607 |
<object classname="java.util.LinkedList"/> |
|
608 |
</at> |
|
609 |
</object> |
|
610 |
</at> |
|
611 |
<at name="name"/> |
|
612 |
<at name="fill"> |
|
613 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
614 |
<at name="name">fill</at> |
|
615 |
</object> |
|
616 |
</at> |
|
617 |
<at name="scollBars"> |
|
618 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
619 |
<at name="name">scollBars</at> |
|
620 |
<at name="verticalpolicy">21</at> |
|
621 |
<at name="horizontalpolicy">31</at> |
|
622 |
<at name="border"> |
|
623 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
624 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
625 |
<at name="name">border</at> |
|
626 |
</super> |
|
627 |
<at name="borders"> |
|
628 |
<object classname="java.util.LinkedList"> |
|
629 |
<item > |
|
630 |
<at name="value"> |
|
631 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
632 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
633 |
<at name="name">border</at> |
|
634 |
</super> |
|
635 |
</object> |
|
636 |
</at> |
|
637 |
</item> |
|
638 |
</object> |
|
639 |
</at> |
|
640 |
</object> |
|
641 |
</at> |
|
642 |
</object> |
|
643 |
</at> |
|
644 |
</object> |
|
645 |
</at> |
|
646 |
</object> |
|
647 |
</at> |
|
648 |
<at name="cellpainters"> |
|
649 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
650 |
<at name="rows"> |
|
651 |
<object classname="[Ljava.lang.Object;" size="1"> |
|
652 |
<at name="item" index="0"> |
|
653 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
654 |
</at> |
|
655 |
</object> |
|
656 |
</at> |
|
657 |
</object> |
|
658 |
</at> |
|
659 |
<at name="rowgroups"> |
|
660 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
661 |
<at name="groups"> |
|
662 |
<object classname="java.util.HashMap"/> |
|
663 |
</at> |
|
664 |
</object> |
|
665 |
</at> |
|
666 |
<at name="colgroups"> |
|
667 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
Also available in: Unified diff