Revision 2822
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
74 | 74 |
_Add_new_table_to_project=Add new table to project |
75 | 75 |
_Add_new_layer_to_view=Add new layer to view |
76 | 76 |
_Select_a_view=Select a view |
77 |
_Cant_show_form_because_entity_isnt_in_workspace_yet=Can't show form because entity isn't in workspace yet. |
|
77 |
_Cant_show_form_because_entity_isnt_in_workspace_yet=Can't show form because entity isn't in workspace yet. |
|
78 |
_Dont_add_the_table_or_layer_to_the_project=Don't add the table or layer to the project |
|
79 |
_Add_layer_to_view=Add layer to view |
|
80 |
_Add_table_to_project=Add table to project |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
91 | 91 |
_Add_new_table_to_project=A\u00f1adir la tabla nueva al proyecto |
92 | 92 |
_Add_new_layer_to_view=A\u00f1adir la nueva capa a la vista |
93 | 93 |
_Select_a_view=Seleccione una vista |
94 |
_Cant_show_form_because_entity_isnt_in_workspace_yet=No se puede mostrar el formulario porque la entidad no est\u00e1 en el espacio de trabajo todav\u00eda. |
|
94 |
_Cant_show_form_because_entity_isnt_in_workspace_yet=No se puede mostrar el formulario porque la entidad no est\u00e1 en el espacio de trabajo todav\u00eda. |
|
95 |
_Dont_add_the_table_or_layer_to_the_project=No a\u00f1adir la tabla/capa al proyecto |
|
96 |
_Add_layer_to_view=A\u00f1adir la capa a la vista |
|
97 |
_Add_table_to_project=A\u00f1adir la tabla al projecto |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/java/org/gvsig/vcsgis/app/VCSGisSwingServicesImpl.java | ||
---|---|---|
11 | 11 |
import javax.swing.DefaultListModel; |
12 | 12 |
import javax.swing.ListModel; |
13 | 13 |
import javax.swing.tree.TreeModel; |
14 |
import org.apache.commons.lang.StringUtils; |
|
14 | 15 |
import org.gvsig.app.ApplicationLocator; |
15 | 16 |
import org.gvsig.app.ApplicationManager; |
16 | 17 |
import org.gvsig.app.project.Project; |
... | ... | |
89 | 90 |
|
90 | 91 |
@Override |
91 | 92 |
public void addLayerToView(FeatureStore store, LabeledValue labeledView) { |
93 |
addLayerToView(store, labeledView, null); |
|
94 |
} |
|
95 |
|
|
96 |
@Override |
|
97 |
public void addLayerToView(FeatureStore store, LabeledValue labeledView, String name) { |
|
92 | 98 |
try { |
93 | 99 |
if (labeledView.getValue() == null){ |
94 | 100 |
return; |
95 | 101 |
} |
96 | 102 |
ViewDocument view = (ViewDocument) labeledView.getValue(); |
97 |
FLayer layer = MapContextLocator.getMapContextManager().createLayer(store.getName(), store); |
|
103 |
String layerName = name; |
|
104 |
if(StringUtils.isBlank(layerName)){ |
|
105 |
layerName = store.getName(); |
|
106 |
} |
|
107 |
FLayer layer = MapContextLocator.getMapContextManager().createLayer(layerName, store); |
|
98 | 108 |
view.getMapContext().getLayers().add(layer); |
99 | 109 |
} catch (Exception ex) { |
100 | 110 |
throw new RuntimeException("Can't add layer to view.", ex); //FIXME |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisSwingServices.java | ||
---|---|---|
28 | 28 |
|
29 | 29 |
public void addLayerToView(FeatureStore store, LabeledValue view); |
30 | 30 |
|
31 |
public void addLayerToView(FeatureStore store, LabeledValue view, String name); |
|
32 |
|
|
31 | 33 |
|
32 | 34 |
|
33 | 35 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/checkout/VCSGisJCheckoutImpl.java | ||
---|---|---|
22 | 22 |
package org.gvsig.vcsgis.swing.impl.checkout; |
23 | 23 |
|
24 | 24 |
import java.awt.Dimension; |
25 |
import java.awt.event.ActionEvent; |
|
26 |
import java.awt.event.ActionListener; |
|
25 | 27 |
import java.util.List; |
28 |
import javax.swing.Action; |
|
29 |
import javax.swing.ButtonGroup; |
|
30 |
import javax.swing.ButtonModel; |
|
31 |
import javax.swing.ComboBoxModel; |
|
26 | 32 |
import javax.swing.JComponent; |
27 | 33 |
import javax.swing.ListSelectionModel; |
28 | 34 |
import javax.swing.event.ChangeEvent; |
29 | 35 |
import javax.swing.event.ListSelectionEvent; |
36 |
import org.apache.commons.lang3.StringUtils; |
|
37 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
30 | 38 |
import org.gvsig.tools.swing.api.Component; |
31 | 39 |
import org.gvsig.tools.swing.api.FilteredListController; |
32 | 40 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
... | ... | |
35 | 43 |
import org.gvsig.tools.swing.api.pickercontroller.PickerController; |
36 | 44 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
37 | 45 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
46 |
import org.gvsig.tools.util.LabeledValue; |
|
38 | 47 |
import org.gvsig.vcsgis.lib.VCSGisEntity; |
48 |
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_OK; |
|
39 | 49 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace; |
40 | 50 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity; |
41 | 51 |
import org.gvsig.vcsgis.swing.VCSGisJCheckout; |
42 | 52 |
import org.gvsig.vcsgis.swing.VCSGisSwingLocator; |
43 | 53 |
import org.gvsig.vcsgis.swing.VCSGisSwingManager; |
54 |
import org.gvsig.vcsgis.swing.VCSGisSwingServices; |
|
44 | 55 |
import org.slf4j.LoggerFactory; |
45 | 56 |
|
46 | 57 |
/** |
... | ... | |
61 | 72 |
public VCSGisJCheckoutImpl() { |
62 | 73 |
translate(); |
63 | 74 |
|
64 |
initializeComponents();
|
|
75 |
initComponents(); |
|
65 | 76 |
} |
66 | 77 |
|
67 |
private void initializeComponents() {
|
|
78 |
private void initComponents() { |
|
68 | 79 |
|
69 | 80 |
ToolsSwingManager toolsSwingManager = ToolsSwingLocator.getToolsSwingManager(); |
70 | 81 |
VCSGisSwingManager swingManager = VCSGisSwingLocator.getVCSGisSwingManager(); |
... | ... | |
127 | 138 |
// }); |
128 | 139 |
|
129 | 140 |
|
141 |
VCSGisSwingServices services = swingManager.getDefaultServices(); |
|
142 |
|
|
143 |
ComboBoxModel<LabeledValue> viewDocumentsModel = services.getViewDocumentsComboBoxModel(); |
|
144 |
|
|
145 |
cboView.setModel(viewDocumentsModel); |
|
146 |
|
|
147 |
cboView.addActionListener((ActionEvent e) -> { |
|
148 |
doUpdateEnableComponents(); |
|
149 |
}); |
|
150 |
|
|
151 |
|
|
152 |
this.rdbDontAddToProject.addActionListener((ActionEvent e) -> { |
|
153 |
doUpdateEnableComponents(); |
|
154 |
}); |
|
155 |
|
|
156 |
this.rdbAddLayerToView.addActionListener((ActionEvent e) -> { |
|
157 |
doUpdateEnableComponents(); |
|
158 |
}); |
|
159 |
|
|
160 |
this.rdbAddTableToProject.addActionListener((ActionEvent e) -> { |
|
161 |
doUpdateEnableComponents(); |
|
162 |
}); |
|
163 |
|
|
130 | 164 |
this.setPreferredSize( |
131 | 165 |
new Dimension(520, 340) |
132 | 166 |
); |
133 | 167 |
|
134 | 168 |
} |
135 |
|
|
169 |
|
|
136 | 170 |
@Override |
137 | 171 |
public JComponent asJComponent() { |
138 | 172 |
return this; |
... | ... | |
191 | 225 |
return (VCSGisEntity) lstTables.getSelectedValue(); |
192 | 226 |
} |
193 | 227 |
|
194 |
|
|
228 |
private void doUpdateEnableComponents() { |
|
229 |
if(this.getTable()==null) { |
|
230 |
this.rdbDontAddToProject.setEnabled(false); |
|
231 |
this.rdbAddLayerToView.setEnabled(false); |
|
232 |
this.cboView.setEnabled(false); |
|
233 |
this.rdbAddTableToProject.setEnabled(false); |
|
234 |
} else { |
|
235 |
this.rdbDontAddToProject.setEnabled(true); |
|
236 |
this.rdbAddTableToProject.setEnabled(true); |
|
237 |
if(isLayer(this.getTable())){ |
|
238 |
this.rdbAddLayerToView.setEnabled(true); |
|
239 |
this.cboView.setEnabled(true); |
|
240 |
} else { |
|
241 |
this.rdbAddLayerToView.setEnabled(false); |
|
242 |
this.cboView.setEnabled(false); |
|
243 |
} |
|
244 |
} |
|
195 | 245 |
|
196 |
private void doUpdateEnableComponents() { |
|
197 |
boolean enableInit = (this.getWorkspace() != null && this.getTable() != null); |
|
246 |
LabeledValue selectedView = (LabeledValue)cboView.getSelectedItem(); |
|
247 |
boolean enableInit = this.getWorkspace() != null && this.getTable() != null; |
|
248 |
|
|
249 |
boolean dontAddNothing = rdbDontAddToProject.isSelected(); |
|
250 |
boolean addLayerToView = rdbAddLayerToView.isSelected() && selectedView != null && selectedView.getValue() != null; |
|
251 |
boolean addTableToProject = rdbAddTableToProject.isSelected(); |
|
252 |
|
|
253 |
enableInit = enableInit && (dontAddNothing || (addLayerToView || addTableToProject)); |
|
198 | 254 |
if (dialog != null) { |
199 | 255 |
this.dialog.setButtonEnabled(WindowManager_v2.BUTTON_OK, |
200 | 256 |
enableInit |
201 | 257 |
); |
202 | 258 |
} |
203 | 259 |
} |
260 |
|
|
261 |
private boolean isLayer(VCSGisEntity entity){ |
|
262 |
return !StringUtils.isBlank(entity.getGeometryFieldName()); |
|
263 |
} |
|
204 | 264 |
|
205 | 265 |
@Override |
206 | 266 |
public int checkout() { |
207 |
if (this.getWorkspace() != null && this.getTable() != null) { |
|
208 |
return this.getWorkspace().checkout(getTable().getEntityName()); |
|
267 |
VCSGisSwingManager swingManager = VCSGisSwingLocator.getVCSGisSwingManager(); |
|
268 |
VCSGisSwingServices services = swingManager.getDefaultServices(); |
|
269 |
|
|
270 |
VCSGisEntity entity = getTable(); |
|
271 |
final VCSGisWorkspace workspace = this.getWorkspace(); |
|
272 |
if (workspace != null && entity != null) { |
|
273 |
int res = this.getWorkspace().checkout(entity.getEntityName()); |
|
274 |
if(res == ERR_OK) { |
|
275 |
if(!rdbDontAddToProject.isSelected()){ |
|
276 |
if(rdbAddLayerToView.isSelected()){ |
|
277 |
if(isLayer(entity)){ |
|
278 |
FeatureStore store = this.getWorkspace().getFeatureStore(entity.getEntityName()); |
|
279 |
String layerName = workspace.getLabel()+" - " + store.getName(); |
|
280 |
services.addLayerToView(store, (LabeledValue)cboView.getSelectedItem(), layerName); |
|
281 |
} |
|
282 |
} |
|
283 |
if(rdbAddTableToProject.isSelected()){ |
|
284 |
FeatureStore store = this.getWorkspace().getFeatureStore(entity.getEntityName()); |
|
285 |
services.addTableToProject(workspace, store); |
|
286 |
} |
|
287 |
} |
|
288 |
} |
|
289 |
return res; |
|
209 | 290 |
} |
210 | 291 |
return -1; |
211 | 292 |
} |
... | ... | |
217 | 298 |
swingManager.translate(this.lblTable); |
218 | 299 |
swingManager.translate(this.rdbEffectiveDate); |
219 | 300 |
swingManager.translate(this.rdbRevision); |
301 |
swingManager.translate(this.rdbDontAddToProject); |
|
302 |
swingManager.translate(this.rdbAddLayerToView); |
|
303 |
swingManager.translate(this.rdbAddTableToProject); |
|
220 | 304 |
} |
221 | 305 |
|
222 | 306 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/checkout/VCSGisJCheckoutView.xml | ||
---|---|---|
26 | 26 |
</super> |
27 | 27 |
<at name="id">/home/fdiaz/projects/gvSIG/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/checkout/VCSGisJCheckoutView.xml</at> |
28 | 28 |
<at name="path">src/main/java/org/gvsig/vcsgis/swing/impl/checkout/VCSGisJCheckoutView.xml</at> |
29 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at> |
|
29 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
|
|
30 | 30 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at> |
31 | 31 |
<at name="components"> |
32 | 32 |
<object classname="java.util.LinkedList"> |
... | ... | |
800 | 800 |
</object> |
801 | 801 |
</at> |
802 | 802 |
</item> |
803 |
<item > |
|
804 |
<at name="value"> |
|
805 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
806 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
807 |
<at name="cellconstraints"> |
|
808 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
809 |
<at name="column">4</at> |
|
810 |
<at name="row">22</at> |
|
811 |
<at name="colspan">3</at> |
|
812 |
<at name="rowspan">1</at> |
|
813 |
<at name="halign">default</at> |
|
814 |
<at name="valign">default</at> |
|
815 |
<at name="insets" object="insets">0,0,0,0</at> |
|
816 |
</object> |
|
817 |
</at> |
|
818 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
819 |
</super> |
|
820 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
821 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
822 |
<at name="beanproperties"> |
|
823 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
824 |
<at name="classname">javax.swing.JComboBox</at> |
|
825 |
<at name="properties"> |
|
826 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
827 |
<at name="border"> |
|
828 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
829 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
830 |
<at name="name">border</at> |
|
831 |
</super> |
|
832 |
<at name="borders"> |
|
833 |
<object classname="java.util.LinkedList"> |
|
834 |
<item > |
|
835 |
<at name="value"> |
|
836 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
837 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
838 |
<at name="name">border</at> |
|
839 |
</super> |
|
840 |
</object> |
|
841 |
</at> |
|
842 |
</item> |
|
843 |
</object> |
|
844 |
</at> |
|
845 |
</object> |
|
846 |
</at> |
|
847 |
<at name="name">cboView</at> |
|
848 |
<at name="width">1205</at> |
|
849 |
<at name="items"> |
|
850 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
851 |
<at name="name">items</at> |
|
852 |
</object> |
|
853 |
</at> |
|
854 |
<at name="height">20</at> |
|
855 |
</object> |
|
856 |
</at> |
|
857 |
</object> |
|
858 |
</at> |
|
859 |
</object> |
|
860 |
</at> |
|
861 |
</item> |
|
862 |
<item > |
|
863 |
<at name="value"> |
|
864 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
865 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
866 |
<at name="cellconstraints"> |
|
867 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
868 |
<at name="column">2</at> |
|
869 |
<at name="row">24</at> |
|
870 |
<at name="colspan">5</at> |
|
871 |
<at name="rowspan">1</at> |
|
872 |
<at name="halign">default</at> |
|
873 |
<at name="valign">default</at> |
|
874 |
<at name="insets" object="insets">0,0,0,0</at> |
|
875 |
</object> |
|
876 |
</at> |
|
877 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
878 |
</super> |
|
879 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
880 |
<at name="beanclass">javax.swing.JRadioButton</at> |
|
881 |
<at name="beanproperties"> |
|
882 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
883 |
<at name="classname">javax.swing.JRadioButton</at> |
|
884 |
<at name="properties"> |
|
885 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
886 |
<at name="border"> |
|
887 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
888 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
889 |
<at name="name">border</at> |
|
890 |
</super> |
|
891 |
<at name="borders"> |
|
892 |
<object classname="java.util.LinkedList"> |
|
893 |
<item > |
|
894 |
<at name="value"> |
|
895 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
896 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
897 |
<at name="name">border</at> |
|
898 |
</super> |
|
899 |
</object> |
|
900 |
</at> |
|
901 |
</item> |
|
902 |
</object> |
|
903 |
</at> |
|
904 |
</object> |
|
905 |
</at> |
|
906 |
<at name="actionCommand">_Add_table_to_project</at> |
|
907 |
<at name="buttonGroup"> |
|
908 |
<object classname="com.jeta.forms.store.properties.ButtonGroupProperty"> |
|
909 |
<at name="name">buttonGroup</at> |
|
910 |
<at name="groupname">2</at> |
|
911 |
</object> |
|
912 |
</at> |
|
913 |
<at name="name">rdbAddTableToProject</at> |
|
914 |
<at name="width">1283</at> |
|
915 |
<at name="text">_Add_table_to_project</at> |
|
916 |
<at name="height">16</at> |
|
917 |
</object> |
|
918 |
</at> |
|
919 |
</object> |
|
920 |
</at> |
|
921 |
</object> |
|
922 |
</at> |
|
923 |
</item> |
|
924 |
<item > |
|
925 |
<at name="value"> |
|
926 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
927 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
928 |
<at name="cellconstraints"> |
|
929 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
930 |
<at name="column">2</at> |
|
931 |
<at name="row">20</at> |
|
932 |
<at name="colspan">5</at> |
|
933 |
<at name="rowspan">1</at> |
|
934 |
<at name="halign">default</at> |
|
935 |
<at name="valign">default</at> |
|
936 |
<at name="insets" object="insets">0,0,0,0</at> |
|
937 |
</object> |
|
938 |
</at> |
|
939 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
940 |
</super> |
|
941 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
942 |
<at name="beanclass">javax.swing.JRadioButton</at> |
|
943 |
<at name="beanproperties"> |
|
944 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
945 |
<at name="classname">javax.swing.JRadioButton</at> |
|
946 |
<at name="properties"> |
|
947 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
948 |
<at name="border"> |
|
949 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
950 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
951 |
<at name="name">border</at> |
|
952 |
</super> |
|
953 |
<at name="borders"> |
|
954 |
<object classname="java.util.LinkedList"> |
|
955 |
<item > |
|
956 |
<at name="value"> |
|
957 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
958 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
959 |
<at name="name">border</at> |
|
960 |
</super> |
|
961 |
</object> |
|
962 |
</at> |
|
963 |
</item> |
|
964 |
</object> |
|
965 |
</at> |
|
966 |
</object> |
|
967 |
</at> |
|
968 |
<at name="actionCommand">_Add_layer_to_view</at> |
|
969 |
<at name="buttonGroup"> |
|
970 |
<object classname="com.jeta.forms.store.properties.ButtonGroupProperty"> |
|
971 |
<at name="name">buttonGroup</at> |
|
972 |
<at name="groupname">2</at> |
|
973 |
</object> |
|
974 |
</at> |
|
975 |
<at name="name">rdbAddLayerToView</at> |
|
976 |
<at name="width">1283</at> |
|
977 |
<at name="text">_Add_layer_to_view</at> |
|
978 |
<at name="toolTipText"></at> |
|
979 |
<at name="height">16</at> |
|
980 |
</object> |
|
981 |
</at> |
|
982 |
</object> |
|
983 |
</at> |
|
984 |
</object> |
|
985 |
</at> |
|
986 |
</item> |
|
987 |
<item > |
|
988 |
<at name="value"> |
|
989 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
990 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
991 |
<at name="cellconstraints"> |
|
992 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
993 |
<at name="column">2</at> |
|
994 |
<at name="row">18</at> |
|
995 |
<at name="colspan">5</at> |
|
996 |
<at name="rowspan">1</at> |
|
997 |
<at name="halign">default</at> |
|
998 |
<at name="valign">default</at> |
|
999 |
<at name="insets" object="insets">0,0,0,0</at> |
|
1000 |
</object> |
|
1001 |
</at> |
|
1002 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
1003 |
</super> |
|
1004 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
1005 |
<at name="beanclass">javax.swing.JRadioButton</at> |
|
1006 |
<at name="beanproperties"> |
|
1007 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
1008 |
<at name="classname">javax.swing.JRadioButton</at> |
|
1009 |
<at name="properties"> |
|
1010 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
1011 |
<at name="border"> |
|
1012 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
1013 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
1014 |
<at name="name">border</at> |
|
1015 |
</super> |
|
1016 |
<at name="borders"> |
|
1017 |
<object classname="java.util.LinkedList"> |
|
1018 |
<item > |
|
1019 |
<at name="value"> |
|
1020 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
1021 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
1022 |
<at name="name">border</at> |
|
1023 |
</super> |
|
1024 |
</object> |
|
1025 |
</at> |
|
1026 |
</item> |
|
1027 |
</object> |
|
1028 |
</at> |
|
1029 |
</object> |
|
1030 |
</at> |
|
1031 |
<at name="actionCommand">_Dont_add_the_table_or_layer_to_the_project</at> |
|
1032 |
<at name="buttonGroup"> |
|
1033 |
<object classname="com.jeta.forms.store.properties.ButtonGroupProperty"> |
|
1034 |
<at name="name">buttonGroup</at> |
|
1035 |
<at name="groupname">2</at> |
|
1036 |
</object> |
|
1037 |
</at> |
|
1038 |
<at name="name">rdbDontAddToProject</at> |
|
1039 |
<at name="width">1283</at> |
|
1040 |
<at name="text">_Dont_add_the_table_or_layer_to_the_project</at> |
|
1041 |
<at name="toolTipText"></at> |
|
1042 |
<at name="height">16</at> |
|
1043 |
</object> |
|
1044 |
</at> |
|
1045 |
</object> |
|
1046 |
</at> |
|
1047 |
</object> |
|
1048 |
</at> |
|
1049 |
</item> |
|
803 | 1050 |
</object> |
804 | 1051 |
</at> |
805 | 1052 |
<at name="properties"> |
... | ... | |
817 | 1064 |
</at> |
818 | 1065 |
</object> |
819 | 1066 |
</at> |
820 |
<at name="name"/>
|
|
1067 |
<at name="name"></at>
|
|
821 | 1068 |
<at name="fill"> |
822 | 1069 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
823 | 1070 |
<at name="name">fill</at> |
... | ... | |
857 | 1104 |
<at name="cellpainters"> |
858 | 1105 |
<object classname="com.jeta.forms.store.support.Matrix"> |
859 | 1106 |
<at name="rows"> |
860 |
<object classname="[Ljava.lang.Object;" size="17">
|
|
1107 |
<object classname="[Ljava.lang.Object;" size="25">
|
|
861 | 1108 |
<at name="item" index="0"> |
862 | 1109 |
<object classname="[Ljava.lang.Object;" size="7"/> |
863 | 1110 |
</at> |
... | ... | |
909 | 1156 |
<at name="item" index="16"> |
910 | 1157 |
<object classname="[Ljava.lang.Object;" size="7"/> |
911 | 1158 |
</at> |
1159 |
<at name="item" index="17"> |
|
1160 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1161 |
</at> |
|
1162 |
<at name="item" index="18"> |
|
1163 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1164 |
</at> |
|
1165 |
<at name="item" index="19"> |
|
1166 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1167 |
</at> |
|
1168 |
<at name="item" index="20"> |
|
1169 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1170 |
</at> |
|
1171 |
<at name="item" index="21"> |
|
1172 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1173 |
</at> |
|
1174 |
<at name="item" index="22"> |
|
1175 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1176 |
</at> |
|
1177 |
<at name="item" index="23"> |
|
1178 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1179 |
</at> |
|
1180 |
<at name="item" index="24"> |
|
1181 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1182 |
</at> |
|
912 | 1183 |
</object> |
913 | 1184 |
</at> |
914 | 1185 |
</object> |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/checkout/VCSGisJCheckoutView.java | ||
---|---|---|
37 | 37 |
JButton btnTable = new JButton(); |
38 | 38 |
JTextField txtEffectiveDate = new JTextField(); |
39 | 39 |
JButton btnEffectiveDate = new JButton(); |
40 |
JComboBox cboView = new JComboBox(); |
|
41 |
JRadioButton rdbAddTableToProject = new JRadioButton(); |
|
42 |
ButtonGroup buttongroup2 = new ButtonGroup(); |
|
43 |
JRadioButton rdbAddLayerToView = new JRadioButton(); |
|
44 |
JRadioButton rdbDontAddToProject = new JRadioButton(); |
|
40 | 45 |
|
41 | 46 |
/** |
42 | 47 |
* Default constructor |
... | ... | |
128 | 133 |
public JPanel createPanel() |
129 | 134 |
{ |
130 | 135 |
JPanel jpanel1 = new JPanel(); |
131 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
|
136 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
|
|
132 | 137 |
CellConstraints cc = new CellConstraints(); |
133 | 138 |
jpanel1.setLayout(formlayout1); |
134 | 139 |
|
... | ... | |
199 | 204 |
btnEffectiveDate.setBorder(emptyborder3); |
200 | 205 |
jpanel1.add(btnEffectiveDate,cc.xy(6,12)); |
201 | 206 |
|
202 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 }); |
|
207 |
cboView.setName("cboView"); |
|
208 |
jpanel1.add(cboView,cc.xywh(4,22,3,1)); |
|
209 |
|
|
210 |
rdbAddTableToProject.setActionCommand("_Add_table_to_project"); |
|
211 |
rdbAddTableToProject.setName("rdbAddTableToProject"); |
|
212 |
rdbAddTableToProject.setText("_Add_table_to_project"); |
|
213 |
buttongroup2.add(rdbAddTableToProject); |
|
214 |
jpanel1.add(rdbAddTableToProject,cc.xywh(2,24,5,1)); |
|
215 |
|
|
216 |
rdbAddLayerToView.setActionCommand("_Add_layer_to_view"); |
|
217 |
rdbAddLayerToView.setName("rdbAddLayerToView"); |
|
218 |
rdbAddLayerToView.setText("_Add_layer_to_view"); |
|
219 |
rdbAddLayerToView.setToolTipText(""); |
|
220 |
buttongroup2.add(rdbAddLayerToView); |
|
221 |
jpanel1.add(rdbAddLayerToView,cc.xywh(2,20,5,1)); |
|
222 |
|
|
223 |
rdbDontAddToProject.setActionCommand("_Dont_add_the_table_or_layer_to_the_project"); |
|
224 |
rdbDontAddToProject.setName("rdbDontAddToProject"); |
|
225 |
rdbDontAddToProject.setSelected(true); |
|
226 |
rdbDontAddToProject.setText("_Dont_add_the_table_or_layer_to_the_project"); |
|
227 |
rdbDontAddToProject.setToolTipText(""); |
|
228 |
buttongroup2.add(rdbDontAddToProject); |
|
229 |
jpanel1.add(rdbDontAddToProject,cc.xywh(2,18,5,1)); |
|
230 |
|
|
231 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 }); |
|
203 | 232 |
return jpanel1; |
204 | 233 |
} |
205 | 234 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/addToWorkspace/VCSGisJAddToWorkspaceImpl.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
import java.awt.Dimension; |
27 | 27 |
import java.awt.event.ActionEvent; |
28 |
import java.awt.event.ActionListener; |
|
29 |
import java.awt.event.ItemEvent; |
|
30 |
import java.util.List; |
|
31 | 28 |
import javax.swing.ComboBoxModel; |
32 | 29 |
import javax.swing.DefaultListCellRenderer; |
33 | 30 |
import javax.swing.JComponent; |
... | ... | |
57 | 54 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
58 | 55 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
59 | 56 |
import org.gvsig.tools.util.LabeledValue; |
60 |
import org.gvsig.vcsgis.lib.VCSGisManager; |
|
61 | 57 |
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_OK; |
62 | 58 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace; |
63 | 59 |
import org.gvsig.vcsgis.swing.VCSGisJAddToWorkspace; |
... | ... | |
318 | 314 |
case TAB_LAYERS_INDEX: |
319 | 315 |
if(chkAddLayerToView.isSelected()){ |
320 | 316 |
FeatureStore store = workspace.getFeatureStore(txtName.getText()); |
321 |
services.addLayerToView(store, (LabeledValue)cboView.getSelectedItem()); |
|
317 |
String layerName = workspace.getLabel()+" - " + store.getName(); |
|
318 |
services.addLayerToView(store, (LabeledValue)cboView.getSelectedItem(), layerName); |
|
322 | 319 |
} |
323 | 320 |
break; |
324 | 321 |
|
Also available in: Unified diff