Revision 4014
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/tables/RemoteChangesTable.java | ||
---|---|---|
4 | 4 |
import javax.json.JsonObject; |
5 | 5 |
import javax.json.JsonString; |
6 | 6 |
import javax.json.JsonValue; |
7 |
import org.apache.commons.lang3.ArrayUtils; |
|
7 | 8 |
import org.apache.commons.lang3.StringUtils; |
9 |
import org.gvsig.expressionevaluator.ExpressionBuilder; |
|
8 | 10 |
import org.gvsig.fmap.dal.DALLocator; |
9 | 11 |
import org.gvsig.fmap.dal.DataManager; |
10 | 12 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
... | ... | |
362 | 364 |
} |
363 | 365 |
} |
364 | 366 |
|
365 |
public GetItemWithSize64<Feature> getByEntityCode(VCSGisWorkspace workspace, String entityCode) {
|
|
367 |
public GetItemWithSize64<Feature> getByEntityCode(VCSGisWorkspace workspace, String[] entityCodes) {
|
|
366 | 368 |
FeatureStore store = null; |
367 | 369 |
try { |
370 |
GetItemWithSize64<Feature> changes; |
|
368 | 371 |
store = workspace.getFeatureStore(TABLE_NAME); |
369 |
|
|
370 |
|
|
371 |
GetItemWithSize64<Feature> changes; |
|
372 |
if( StringUtils.isBlank(entityCode) ) { |
|
372 |
if( ArrayUtils.isEmpty(entityCodes) ) { |
|
373 | 373 |
changes = store.getFeatures64(); |
374 | 374 |
} else { |
375 |
changes = store.getFeatures64("\""+COD_ENTITY+"\"='"+entityCode+"'"); |
|
375 |
ExpressionBuilder builder = store.createExpressionBuilder(); |
|
376 |
for (String entityCode : entityCodes) { |
|
377 |
builder.or( |
|
378 |
builder.eq( |
|
379 |
builder.column(COD_ENTITY), |
|
380 |
builder.constant(entityCode) |
|
381 |
) |
|
382 |
); |
|
383 |
} |
|
384 |
changes = store.getFeatures64(builder.toString()); |
|
376 | 385 |
} |
377 | 386 |
return changes; |
378 | 387 |
} catch (Exception ex) { |
379 |
throw new RuntimeException("Can't retrieve remote changes by entity code (ENTITY["+entityCode+"]).", ex);
|
|
388 |
throw new RuntimeException("Can't retrieve remote changes by entity code (ENTITY["+StringUtils.join(entityCodes,",")+"]).", ex);
|
|
380 | 389 |
} finally { |
381 | 390 |
if( store!=null ) { |
382 | 391 |
DisposeUtils.dispose(store); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspaceImpl.java | ||
---|---|---|
1420 | 1420 |
} |
1421 | 1421 |
|
1422 | 1422 |
@Override |
1423 |
public VCSGisWorkspaceChanges<VCSGisRepositoryChange> getRemoteChangesByEntity(String entityName) {
|
|
1424 |
String entityCode;
|
|
1425 |
if (StringUtils.isBlank(entityName)) {
|
|
1426 |
entityCode = null;
|
|
1427 |
} else {
|
|
1428 |
VCSGisEntity entity = this.getWorkspaceEntity(entityName);
|
|
1429 |
if (entity == null) {
|
|
1430 |
entity = this.getRepositoryEntity(entityName);
|
|
1423 |
public VCSGisWorkspaceChanges<VCSGisRepositoryChange> getRemoteChangesByEntity(String... entityNames) {
|
|
1424 |
String[] entityCodes = new String[entityNames.length];
|
|
1425 |
for (int i = 0; i < entityNames.length; i++) {
|
|
1426 |
String entityName = entityNames[i];
|
|
1427 |
if (StringUtils.isBlank(entityName)) {
|
|
1428 |
entityCodes[i] = null;
|
|
1429 |
} else {
|
|
1430 |
VCSGisEntity entity = this.getWorkspaceEntity(entityName);
|
|
1431 | 1431 |
if (entity == null) { |
1432 |
return null; |
|
1432 |
entity = this.getRepositoryEntity(entityName); |
|
1433 |
if (entity == null) { |
|
1434 |
return null; |
|
1435 |
} |
|
1433 | 1436 |
} |
1437 |
entityCodes[i] = entity.getEntityCode(); |
|
1434 | 1438 |
} |
1435 |
entityCode = entity.getEntityCode(); |
|
1436 | 1439 |
} |
1437 | 1440 |
RemoteChangesTable changesTable = new RemoteChangesTable(); |
1438 |
ChangesImpl changes = new ChangesImpl<RemoteChangeRow>(changesTable.getByEntityCode(this, entityCode), RemoteChangesTable.SELECTED) { |
|
1441 |
ChangesImpl changes = new ChangesImpl<RemoteChangeRow>(changesTable.getByEntityCode(this, entityCodes), RemoteChangesTable.SELECTED) {
|
|
1439 | 1442 |
@Override |
1440 | 1443 |
protected RemoteChangeRow createChange(Feature f) { |
1441 | 1444 |
return new RemoteChangeRow(VCSGisWorkspaceImpl.this, f); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspace.java | ||
---|---|---|
132 | 132 |
|
133 | 133 |
public VCSGisWorkspaceChanges<VCSGisRepositoryChange> getRemoteChanges(); |
134 | 134 |
|
135 |
public VCSGisWorkspaceChanges<VCSGisRepositoryChange> getRemoteChangesByEntity(String entityName); |
|
135 |
public VCSGisWorkspaceChanges<VCSGisRepositoryChange> getRemoteChangesByEntity(String... entityName);
|
|
136 | 136 |
|
137 | 137 |
public VCSGisWorkspaceChanges<VCSGisWorkspaceChange> getLocalChanges(); |
138 | 138 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/VCSGisEntitySelectorControllerJList.java | ||
---|---|---|
40 | 40 |
import javax.swing.ListSelectionModel; |
41 | 41 |
import javax.swing.event.ChangeListener; |
42 | 42 |
import javax.swing.event.ListSelectionEvent; |
43 |
import javax.swing.text.JTextComponent; |
|
43 | 44 |
import org.apache.commons.lang3.StringUtils; |
44 | 45 |
import org.gvsig.tools.ToolsLocator; |
45 | 46 |
import org.gvsig.tools.dispose.DisposeUtils; |
... | ... | |
73 | 74 |
{ |
74 | 75 |
private static final Logger LOGGER = LoggerFactory.getLogger(VCSGisEntitySelectorControllerJList.class); |
75 | 76 |
|
76 |
private final JTextField txtFilter;
|
|
77 |
private final JTextComponent txtFilter;
|
|
77 | 78 |
private final JList lstTables; |
78 | 79 |
private JListWithCheckbox lstTablesWithCheckbox; |
79 | 80 |
private final JButton btnTable; |
... | ... | |
93 | 94 |
this(lstTables, null, null, null, null); |
94 | 95 |
} |
95 | 96 |
|
96 |
public VCSGisEntitySelectorControllerJList(JList lstTables, JTextField txtFilter, JButton btnTable, JButton btnCheckAll, JButton btnUnCheckAll) {
|
|
97 |
public VCSGisEntitySelectorControllerJList(JList lstTables, JTextComponent txtFilter, JButton btnTable, JButton btnCheckAll, JButton btnUnCheckAll) {
|
|
97 | 98 |
viewFilter = ALL_ENTITIES; |
98 | 99 |
filter = ALL_ENTITIES; |
99 | 100 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/VCSGisSwingManagerImpl.java | ||
---|---|---|
27 | 27 |
import javax.swing.JButton; |
28 | 28 |
import javax.swing.JComboBox; |
29 | 29 |
import javax.swing.JList; |
30 |
import javax.swing.JTextField; |
|
31 | 30 |
import javax.swing.JTree; |
31 |
import javax.swing.text.JTextComponent; |
|
32 | 32 |
import org.apache.commons.io.FilenameUtils; |
33 | 33 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
34 | 34 |
import org.gvsig.tools.swing.api.pickercontroller.PickerController; |
... | ... | |
207 | 207 |
return new VCSGisJLogoutImpl(); |
208 | 208 |
} |
209 | 209 |
|
210 |
public VCSGisEntitySelectorController createEntitySelectorController(JList lstTables, JTextField txtFilter, JButton btnTable, JButton btnCheckAll, JButton btnUnCheckAll) { |
|
210 |
@Override |
|
211 |
public VCSGisEntitySelectorController createEntitySelectorController(JList lstTables, JTextComponent txtFilter, JButton btnTable, JButton btnCheckAll, JButton btnUnCheckAll) { |
|
211 | 212 |
return new VCSGisEntitySelectorControllerJList(lstTables, txtFilter, btnTable, btnCheckAll, btnUnCheckAll); |
212 | 213 |
} |
213 | 214 |
|
214 |
public VCSGisEntitySelectorController createEntitySelectorController(JList lstTables, JTextField txtFilter, JButton btnTable) { |
|
215 |
@Override |
|
216 |
public VCSGisEntitySelectorController createEntitySelectorController(JList lstTables, JTextComponent txtFilter, JButton btnTable) { |
|
215 | 217 |
return new VCSGisEntitySelectorControllerJList(lstTables, txtFilter, btnTable, null, null); |
216 | 218 |
} |
217 | 219 |
|
220 |
@Override |
|
218 | 221 |
public VCSGisEntitySelectorController createEntitySelectorController(JList lstTables) { |
219 | 222 |
return new VCSGisEntitySelectorControllerJList(lstTables, null, null, null, null); |
220 | 223 |
} |
221 | 224 |
|
222 |
public VCSGisEntitySelectorController createEntitySelectorController(JTree treeEntities, JTextField txtFilter, JButton btnTable, JButton btnCheckAll, JButton btnUnCheckAll) { |
|
225 |
@Override |
|
226 |
public VCSGisEntitySelectorController createEntitySelectorController(JTree treeEntities, JTextComponent txtFilter, JButton btnTable, JButton btnCheckAll, JButton btnUnCheckAll) { |
|
223 | 227 |
return new VCSGisEntitySelectorControllerJTree(treeEntities, txtFilter, btnTable, btnCheckAll, btnUnCheckAll); |
224 | 228 |
} |
225 | 229 |
|
226 |
public VCSGisEntitySelectorController createEntitySelectorController(JTree treeEntities, JTextField txtFilter, JButton btnTable) { |
|
230 |
@Override |
|
231 |
public VCSGisEntitySelectorController createEntitySelectorController(JTree treeEntities, JTextComponent txtFilter, JButton btnTable) { |
|
227 | 232 |
return new VCSGisEntitySelectorControllerJTree(treeEntities, txtFilter, btnTable, null, null); |
228 | 233 |
} |
229 | 234 |
|
235 |
@Override |
|
230 | 236 |
public VCSGisEntitySelectorController createEntitySelectorController(JTree treeEntities) { |
231 | 237 |
return new VCSGisEntitySelectorControllerJTree(treeEntities, null, null, null, null); |
232 | 238 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/changes/LocalChangesController.java | ||
---|---|---|
523 | 523 |
private VCSGisWorkspace getUndisposableWorkspace() { |
524 | 524 |
VCSGisWorkspace ws = getWorkspace(); |
525 | 525 |
DisposeUtils.disposeQuietly(ws); |
526 |
LOGGER.info("ws.references = " + DisposeUtils.getReferences(ws)); |
|
526 |
// LOGGER.info("ws.references = " + DisposeUtils.getReferences(ws));
|
|
527 | 527 |
return ws; |
528 | 528 |
} |
529 | 529 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/changes/RemoteChangesController.java | ||
---|---|---|
28 | 28 |
import java.awt.event.KeyAdapter; |
29 | 29 |
import java.awt.event.KeyEvent; |
30 | 30 |
import java.util.Iterator; |
31 |
import javax.swing.DefaultListCellRenderer; |
|
32 |
import javax.swing.DefaultListModel; |
|
31 |
import java.util.List; |
|
33 | 32 |
import javax.swing.JButton; |
34 | 33 |
import javax.swing.JLabel; |
35 |
import javax.swing.JList; |
|
36 | 34 |
import javax.swing.JOptionPane; |
37 | 35 |
import javax.swing.JTable; |
36 |
import javax.swing.JTree; |
|
38 | 37 |
import javax.swing.ListSelectionModel; |
39 | 38 |
import javax.swing.SwingUtilities; |
40 | 39 |
import javax.swing.event.ChangeEvent; |
41 | 40 |
import javax.swing.event.ListSelectionEvent; |
42 | 41 |
import javax.swing.table.DefaultTableCellRenderer; |
43 | 42 |
import javax.swing.table.DefaultTableModel; |
44 |
import org.apache.commons.lang3.BooleanUtils; |
|
43 |
import javax.swing.text.JTextComponent; |
|
44 |
import org.apache.commons.collections.CollectionUtils; |
|
45 | 45 |
import org.apache.commons.lang3.StringUtils; |
46 | 46 |
import org.apache.commons.lang3.mutable.MutableLong; |
47 | 47 |
import org.gvsig.featureform.swing.JFeatureForm; |
... | ... | |
65 | 65 |
import org.gvsig.tools.swing.api.pickercontroller.PickerController; |
66 | 66 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
67 | 67 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
68 |
import org.gvsig.tools.util.LabeledValue; |
|
69 |
import org.gvsig.tools.util.LabeledValueImpl; |
|
70 | 68 |
import org.gvsig.vcsgis.lib.VCSGisChange; |
71 | 69 |
import org.gvsig.vcsgis.lib.VCSGisEntity; |
72 | 70 |
import org.gvsig.vcsgis.lib.VCSGisLocator; |
... | ... | |
79 | 77 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace; |
80 | 78 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceChanges; |
81 | 79 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity; |
80 |
import org.gvsig.vcsgis.swing.VCSGisEntitySelectorController; |
|
82 | 81 |
import org.gvsig.vcsgis.swing.VCSGisSwingLocator; |
83 | 82 |
import org.gvsig.vcsgis.swing.VCSGisSwingManager; |
84 | 83 |
import org.gvsig.vcsgis.swing.VCSGisSwingServices; |
... | ... | |
110 | 109 |
private final JButton btnRemoteReloadChanges; |
111 | 110 |
private final JButton btnRemoteCheckAll; |
112 | 111 |
private final JButton btnRemoteUnCheckAll; |
113 |
private final JList lstRemoteTables; |
|
112 |
private final JTree treeRepositoryTables; |
|
113 |
private final JTextComponent txtRepositoryTablesFilter; |
|
114 |
private final JButton btnRepositoryTablesFilter; |
|
114 | 115 |
|
115 | 116 |
private VCSGisWorkspaceChanges<VCSGisRepositoryChange> changes; |
116 | 117 |
|
... | ... | |
127 | 128 |
private final JButton btnRemoteCleanHighligthed; |
128 | 129 |
|
129 | 130 |
private final JLabel lblRemoteChangesCount; |
131 |
private VCSGisEntitySelectorController entitySelector; |
|
130 | 132 |
|
131 | 133 |
public RemoteChangesController( |
132 | 134 |
VCSGisJChangesImpl context, |
133 | 135 |
PickerController<VCSGisWorkspace> workspacePicker, |
134 |
JList lstRemoteTables, |
|
136 |
JTree treeRepositoryTables, |
|
137 |
JTextComponent txtRepositoryTablesFilter, |
|
138 |
JButton btnRepositoryTablesFilter, |
|
135 | 139 |
JButton btnRemoteTablesReload, |
136 | 140 |
JTable tblRemoteChanges, |
137 | 141 |
JButton btnRemoteCheckAll, |
... | ... | |
153 | 157 |
|
154 | 158 |
this.workspacePicker = workspacePicker; |
155 | 159 |
|
156 |
this.lstRemoteTables = lstRemoteTables; |
|
160 |
this.treeRepositoryTables = treeRepositoryTables; |
|
161 |
this.txtRepositoryTablesFilter = txtRepositoryTablesFilter; |
|
162 |
this.btnRepositoryTablesFilter = btnRepositoryTablesFilter; |
|
163 |
|
|
157 | 164 |
this.btnRemoteTablesReload = btnRemoteTablesReload; |
158 | 165 |
|
159 | 166 |
this.tblRemoteChanges = tblRemoteChanges; |
... | ... | |
203 | 210 |
|
204 | 211 |
translate(); |
205 | 212 |
|
206 |
lstRemoteTables.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
|
207 |
|
|
208 |
lstRemoteTables.setCellRenderer(new DefaultListCellRenderer() { |
|
209 |
@Override |
|
210 |
public java.awt.Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
|
211 |
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
|
212 |
LabeledValue lvalue = (LabeledValue) value; |
|
213 |
VCSGisEntity entity = (VCSGisEntity) lvalue.getValue(); |
|
214 |
String entityCode = entity.getEntityCode(); |
|
215 |
VCSGisWorkspaceEntity lentity = getUndisposableWorkspace().getWorkspaceEntity(entityCode); |
|
216 |
String s = VCSGisSwingCommons.getHTMLColorTag( |
|
217 |
lentity == null ? VCSGisManager.STATE_REPOSITORY_NEW : lentity.getState(), |
|
218 |
lvalue.getLabel() |
|
219 |
); |
|
220 |
label.setText(s); |
|
221 |
return label; |
|
213 |
this.entitySelector = VCSGisSwingLocator.getVCSGisSwingManager().createEntitySelectorController( |
|
214 |
this.treeRepositoryTables, |
|
215 |
this.txtRepositoryTablesFilter, |
|
216 |
this.btnRepositoryTablesFilter |
|
217 |
); |
|
218 |
this.entitySelector.setViewFilter(VCSGisEntitySelectorController.ALL_ENTITIES); |
|
219 |
this.entitySelector.setFilter(VCSGisEntitySelectorController.ALL_ENTITIES); |
|
220 |
this.entitySelector.setChecksEnabled(true); |
|
221 |
this.entitySelector.addChangeListener((ChangeEvent e) -> { |
|
222 |
doReloadChanges(); |
|
223 |
}); |
|
224 |
this.entitySelector.addActionListener((ActionEvent e) -> { |
|
225 |
switch(e.getID()) { |
|
226 |
case VCSGisEntitySelectorController.ACTION_SELECT_ID: |
|
227 |
doUpdateComponents(); |
|
228 |
break; |
|
229 |
case VCSGisEntitySelectorController.ACTION_CHECK_ID: |
|
230 |
doReloadChanges(); |
|
231 |
doUpdateComponents(); |
|
232 |
break; |
|
233 |
case VCSGisEntitySelectorController.ACTION_RELOAD_ID: |
|
234 |
doReloadChanges(); |
|
235 |
doUpdateComponents(); |
|
236 |
break; |
|
222 | 237 |
} |
223 | 238 |
}); |
239 |
|
|
240 |
|
|
241 |
// lstRemoteTables.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
|
242 |
// |
|
243 |
// lstRemoteTables.setCellRenderer(new DefaultListCellRenderer() { |
|
244 |
// @Override |
|
245 |
// public java.awt.Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
|
246 |
// JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
|
247 |
// LabeledValue lvalue = (LabeledValue) value; |
|
248 |
// VCSGisEntity entity = (VCSGisEntity) lvalue.getValue(); |
|
249 |
// String entityCode = entity.getEntityCode(); |
|
250 |
// VCSGisWorkspaceEntity lentity = getUndisposableWorkspace().getWorkspaceEntity(entityCode); |
|
251 |
// String s = VCSGisSwingCommons.getHTMLColorTag( |
|
252 |
// lentity == null ? VCSGisManager.STATE_REPOSITORY_NEW : lentity.getState(), |
|
253 |
// lvalue.getLabel() |
|
254 |
// ); |
|
255 |
// label.setText(s); |
|
256 |
// return label; |
|
257 |
// } |
|
258 |
// }); |
|
259 |
// |
|
260 |
// this.lstRemoteTables.getSelectionModel().addListSelectionListener((ListSelectionEvent e) -> { |
|
261 |
// doReloadChanges(); |
|
262 |
// }); |
|
224 | 263 |
|
225 |
this.lstRemoteTables.getSelectionModel().addListSelectionListener((ListSelectionEvent e) -> { |
|
226 |
doReloadChanges(); |
|
227 |
}); |
|
228 |
|
|
229 | 264 |
this.btnRemoteTablesReload.addActionListener((ActionEvent e) -> { |
230 |
doReloadTables(true);
|
|
265 |
doReloadTables(); |
|
231 | 266 |
doReloadChanges(); |
232 | 267 |
}); |
233 | 268 |
|
... | ... | |
316 | 351 |
} |
317 | 352 |
|
318 | 353 |
public void doChangeWorkspace() { |
319 |
doReloadTables(false); |
|
354 |
VCSGisWorkspace ws = this.context.getWorkspace(); |
|
355 |
this.entitySelector.setWorkspace(ws); |
|
320 | 356 |
doReloadChanges(); |
321 | 357 |
} |
322 | 358 |
|
... | ... | |
343 | 379 |
private VCSGisWorkspace getUndisposableWorkspace() { |
344 | 380 |
VCSGisWorkspace ws = this.context.getWorkspace(); |
345 | 381 |
DisposeUtils.disposeQuietly(ws); |
346 |
LOGGER.info("ws.references = " + DisposeUtils.getReferences(ws)); |
|
382 |
// LOGGER.info("ws.references = " + DisposeUtils.getReferences(ws));
|
|
347 | 383 |
return ws; |
348 | 384 |
} |
349 | 385 |
|
... | ... | |
353 | 389 |
})) { |
354 | 390 |
return; |
355 | 391 |
} |
356 |
VCSGisWorkspace ws = null;
|
|
392 |
VCSGisWorkspace ws; |
|
357 | 393 |
try { |
358 | 394 |
this.context.setVisibleStatus(context.processing); |
359 | 395 |
ws = this.getUndisposableWorkspace(); |
396 |
List<VCSGisEntity> checkedEntities = entitySelector.getCheckedEntities(); |
|
360 | 397 |
|
398 |
boolean hasLocalTables = false; |
|
399 |
boolean hasRemoteTables = false; |
|
400 |
for (VCSGisEntity checkedEntity : checkedEntities) { |
|
401 |
if( ws.getWorkspaceEntityByName(checkedEntity.getEntityName())!=null ) { |
|
402 |
hasLocalTables = true; |
|
403 |
} else { |
|
404 |
hasRemoteTables = true; |
|
405 |
} |
|
406 |
} |
|
407 |
|
|
361 | 408 |
this.btnRemoteCheckAll.setEnabled(!context.processing && changes != null); |
362 | 409 |
this.btnRemoteUnCheckAll.setEnabled(!context.processing && changes != null); |
363 | 410 |
|
364 |
this.btnRemoteDownloadChanges.setEnabled(!context.processing && ws != null && BooleanUtils.isTrue(this.isSelectedTableInWorkspace())); |
|
365 |
this.btnRemoteCheckout.setEnabled(!context.processing && ws != null && BooleanUtils.isFalse(this.isSelectedTableInWorkspace())); |
|
366 |
this.btnRemoteReloadChanges.setEnabled(!context.processing && ws != null && BooleanUtils.isTrue(this.isSelectedTableInWorkspace())); |
|
367 |
this.btnRemoteCleanChanges.setEnabled(!context.processing && ws != null && BooleanUtils.isTrue(this.isSelectedTableInWorkspace())); |
|
411 |
if( hasLocalTables && hasLocalTables ) { |
|
412 |
this.btnRemoteDownloadChanges.setEnabled(false); |
|
413 |
this.btnRemoteCheckout.setEnabled(false); |
|
414 |
this.btnRemoteReloadChanges.setEnabled(false); |
|
415 |
this.btnRemoteCleanChanges.setEnabled(false); |
|
416 |
} else { |
|
417 |
this.btnRemoteDownloadChanges.setEnabled(!context.processing && ws != null && hasLocalTables); |
|
418 |
this.btnRemoteCheckout.setEnabled(!context.processing && ws != null && !hasRemoteTables); |
|
419 |
this.btnRemoteReloadChanges.setEnabled(!context.processing && ws != null && hasLocalTables); |
|
420 |
this.btnRemoteCleanChanges.setEnabled(!context.processing && ws != null && hasLocalTables); |
|
421 |
} |
|
422 |
|
|
368 | 423 |
this.btnRemoteTablesReload.setEnabled(!context.processing); |
369 | 424 |
|
370 | 425 |
this.btnRemoteTablesReload.setEnabled(!context.processing && ws != null); |
... | ... | |
380 | 435 |
} |
381 | 436 |
this.btnRemoteShowForm.setEnabled(!context.processing && enableShowForm); |
382 | 437 |
|
383 |
this.lstRemoteTables.setEnabled(!context.processing);
|
|
438 |
this.entitySelector.setEnabled(!context.processing);
|
|
384 | 439 |
this.tblRemoteChanges.setEnabled(!context.processing); |
385 | 440 |
this.workspacePicker.setEnabled(!context.processing); |
386 | 441 |
|
387 |
LabeledValue selected = (LabeledValue) lstRemoteTables.getSelectedValue(); |
|
388 |
if (selected == null) { |
|
442 |
if ( CollectionUtils.isEmpty(checkedEntities) ) { |
|
389 | 443 |
this.btnRemoteMerge.setEnabled(false); |
390 | 444 |
this.btnRemoteUpdate.setEnabled(false); |
391 |
return; |
|
392 |
} |
|
393 |
|
|
394 |
VCSGisEntity entity = (VCSGisEntity) selected.getValue(); |
|
395 |
if (this.getUndisposableWorkspace().updateNeedMerge(entity.getEntityName())) { |
|
396 |
this.btnRemoteMerge.setEnabled(!context.processing); |
|
397 |
this.btnRemoteUpdate.setEnabled(false); |
|
398 | 445 |
} else { |
399 |
this.btnRemoteMerge.setEnabled(false); |
|
400 |
this.btnRemoteUpdate.setEnabled(!context.processing && changes != null && !this.changes.isSelectionEmpty()); |
|
446 |
if( checkedEntities.size()==1 ) { |
|
447 |
VCSGisEntity checkedEntity = checkedEntities.get(0); |
|
448 |
if ( ws.updateNeedMerge(checkedEntity.getEntityName())) { |
|
449 |
this.btnRemoteMerge.setEnabled(!context.processing); |
|
450 |
this.btnRemoteUpdate.setEnabled(false); |
|
451 |
} else { |
|
452 |
this.btnRemoteMerge.setEnabled(false); |
|
453 |
this.btnRemoteUpdate.setEnabled(!context.processing && changes != null && !this.changes.isSelectionEmpty()); |
|
454 |
} |
|
455 |
} else { |
|
456 |
this.btnRemoteMerge.setEnabled(false); |
|
457 |
this.btnRemoteUpdate.setEnabled(!context.processing && changes != null && !this.changes.isSelectionEmpty()); |
|
458 |
for (VCSGisEntity checkedEntity : checkedEntities) { |
|
459 |
if( ws.updateNeedMerge(checkedEntity.getEntityName())) { |
|
460 |
this.btnRemoteMerge.setEnabled(false); |
|
461 |
this.btnRemoteUpdate.setEnabled(false); |
|
462 |
break; |
|
463 |
} |
|
464 |
} |
|
465 |
} |
|
401 | 466 |
} |
402 | 467 |
|
403 | 468 |
Geometry repoGeom = getRepositoryGeometryOfSelectedChange(); |
... | ... | |
524 | 589 |
if (ws == null) { |
525 | 590 |
return; |
526 | 591 |
} |
527 |
LabeledValue selectedTable = (LabeledValue) lstRemoteTables.getSelectedValue();
|
|
528 |
if (selectedTable == null) {
|
|
592 |
List<VCSGisEntity> checkedEntities = entitySelector.getCheckedEntities();
|
|
593 |
if ( CollectionUtils.isEmpty(checkedEntities) ) {
|
|
529 | 594 |
return; |
530 | 595 |
} |
531 |
VCSGisEntity entity = (VCSGisEntity) selectedTable.getValue(); |
|
532 |
String tableName = entity.getEntityName(); |
|
533 | 596 |
|
534 | 597 |
this.tblRemoteChanges.setModel(new ChangesTableModel(ws)); |
535 | 598 |
|
... | ... | |
537 | 600 |
try { |
538 | 601 |
context.processing = true; |
539 | 602 |
context.doUpdateComponents(); |
540 |
int r = ws.update(tableName, null); |
|
541 |
doPostUpdate(r); |
|
603 |
int r = ERR_OK; |
|
604 |
for (VCSGisEntity checkedEntity : checkedEntities) { |
|
605 |
r = ws.update(checkedEntity.getEntityName(), null); |
|
606 |
if( r!=ERR_OK ) { |
|
607 |
break; |
|
608 |
} |
|
609 |
} |
|
610 |
doPostUpdate(checkedEntities, r); |
|
542 | 611 |
} finally { |
543 | 612 |
context.processing = false; |
544 | 613 |
context.doUpdateComponents(); |
... | ... | |
549 | 618 |
task.start(); |
550 | 619 |
} |
551 | 620 |
|
552 |
private void doPostUpdate(int updateStatus) { |
|
553 |
if (notInSwingThreadInvokeLater(() -> {doPostUpdate(updateStatus);})) { |
|
621 |
private void doPostUpdate(List<VCSGisEntity> checkedEntities, int updateStatus) {
|
|
622 |
if (notInSwingThreadInvokeLater(() -> {doPostUpdate(checkedEntities, updateStatus);})) {
|
|
554 | 623 |
return; |
555 | 624 |
} |
556 | 625 |
if (updateStatus == ERR_OK) { |
557 | 626 |
context.setVisibleStatus(false); |
558 | 627 |
} |
628 |
VCSGisWorkspace ws = getUndisposableWorkspace(); |
|
629 |
|
|
559 | 630 |
doReloadChanges(); |
560 | 631 |
|
561 |
VCSGisEntity selectedTable = getSelectedTable(); |
|
562 |
FeatureStore store = getUndisposableWorkspace().getFeatureStore(selectedTable.getEntityName()); |
|
563 |
refreshDocument(store); |
|
632 |
for (VCSGisEntity checkedEntity : checkedEntities) { |
|
633 |
FeatureStore store = ws.getFeatureStore(checkedEntity.getEntityName()); |
|
634 |
refreshDocument(store); |
|
635 |
} |
|
564 | 636 |
|
565 | 637 |
context.doUpdateComponents(); |
566 | 638 |
context.updateLocalChangesTable(); |
... | ... | |
573 | 645 |
if (ws == null) { |
574 | 646 |
return; |
575 | 647 |
} |
576 |
LabeledValue selectedTable = (LabeledValue) lstRemoteTables.getSelectedValue();
|
|
577 |
if (selectedTable == null) {
|
|
648 |
List<VCSGisEntity> checkedEntities = entitySelector.getCheckedEntities();
|
|
649 |
if ( CollectionUtils.isEmpty(checkedEntities) ) {
|
|
578 | 650 |
return; |
579 | 651 |
} |
580 |
VCSGisEntity entity = (VCSGisEntity) selectedTable.getValue(); |
|
652 |
if( checkedEntities.size()!=1 ) { |
|
653 |
ThreadSafeDialogsManager dialogsManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
654 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
655 |
dialogsManager.messageDialog( |
|
656 |
i18n.getTranslation("_Cant_merge_with_more_a_table_selected"), |
|
657 |
null, |
|
658 |
i18n.getTranslation("_VCSGis_Merge"), |
|
659 |
JOptionPane.WARNING_MESSAGE |
|
660 |
); |
|
661 |
return; |
|
662 |
} |
|
663 |
VCSGisEntity entity = checkedEntities.get(0); |
|
581 | 664 |
String tableName = entity.getEntityName(); |
582 | 665 |
|
583 | 666 |
this.tblRemoteChanges.setModel(new ChangesTableModel(ws)); |
... | ... | |
592 | 675 |
localChangesCreated, |
593 | 676 |
this.context.getTaskStatusController().getSimpleTaskStatus() |
594 | 677 |
); |
595 |
doPostMerge(r, localChangesCreated.getValue()); |
|
678 |
doPostMerge(entity, r, localChangesCreated.getValue());
|
|
596 | 679 |
} finally { |
597 | 680 |
context.processing = false; |
598 | 681 |
context.doUpdateComponents(); |
... | ... | |
603 | 686 |
task.start(); |
604 | 687 |
} |
605 | 688 |
|
606 |
private void doPostMerge(int mergeStatus, long localChangesCreated) { |
|
607 |
if (notInSwingThreadInvokeLater(() -> {doPostMerge(mergeStatus, localChangesCreated);})) { |
|
689 |
private void doPostMerge(VCSGisEntity entity, int mergeStatus, long localChangesCreated) {
|
|
690 |
if (notInSwingThreadInvokeLater(() -> {doPostMerge(entity, mergeStatus, localChangesCreated);})) {
|
|
608 | 691 |
return; |
609 | 692 |
} |
610 | 693 |
if (mergeStatus == ERR_OK) { |
611 | 694 |
this.context.setVisibleStatus(false); |
612 | 695 |
} |
613 | 696 |
doReloadChanges(); |
614 |
VCSGisEntity selectedTable = getSelectedTable(); |
|
615 |
FeatureStore store = getUndisposableWorkspace().getFeatureStore(selectedTable.getEntityName()); |
|
697 |
FeatureStore store = getUndisposableWorkspace().getFeatureStore(entity.getEntityName()); |
|
616 | 698 |
refreshDocument(store); |
617 | 699 |
|
618 | 700 |
if(localChangesCreated>0){ |
... | ... | |
625 | 707 |
JOptionPane.INFORMATION_MESSAGE, |
626 | 708 |
"VCSGIS_merge_need_commit"); |
627 | 709 |
context.selectTab(LOCAL_TAB_INDEX); |
628 |
context.selectOnlyALocalEntity(selectedTable);
|
|
710 |
context.selectOnlyALocalEntity(entity);
|
|
629 | 711 |
} |
630 | 712 |
context.doUpdateComponents(); |
631 | 713 |
context.updateLocalChangesTable(); |
... | ... | |
688 | 770 |
if (this.changes != null) { |
689 | 771 |
this.changes.removeAllChangeListener(); |
690 | 772 |
} |
691 |
LabeledValue selected = (LabeledValue) lstRemoteTables.getSelectedValue(); |
|
692 |
if (selected != null) { |
|
693 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
694 |
VCSGisEntity entity = (VCSGisEntity) selected.getValue(); |
|
695 |
message("Reloading list of remote changes..."); |
|
696 |
this.changes = ws.getRemoteChangesByEntity(entity.getEntityName()); |
|
697 |
this.changes.addChangeListener((ChangeEvent e) -> { |
|
698 |
context.doUpdateComponents(); |
|
699 |
}); |
|
700 |
ChangesTableModel changesModel = new ChangesTableModel(changes, ws); |
|
701 |
this.tblRemoteChanges.setModel(changesModel); |
|
702 |
|
|
703 |
int columns = this.tblRemoteChanges.getColumnModel().getColumnCount(); |
|
704 |
for (int i = 1; i < columns; i++) { |
|
705 |
this.tblRemoteChanges.getColumnModel().getColumn(i).setCellRenderer(new DefaultTableCellRenderer() { |
|
706 |
@Override |
|
707 |
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { |
|
708 |
Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); |
|
709 |
VCSGisChange changeRow = changes.get64(row); |
|
710 |
VCSGisSwingCommons.setColorCompoment(c, changeRow.getStatus()); |
|
711 |
return c; |
|
712 |
} |
|
713 |
}); |
|
714 |
} |
|
715 |
|
|
716 |
context.doUpdateComponents(); |
|
717 |
context.message(i18n.getTranslation( |
|
718 |
"_Repository_changes_list_updated", |
|
719 |
new String[] { String.valueOf(changes.size64()) } |
|
720 |
) |
|
721 |
); |
|
722 |
this.lblRemoteChangesCount.setText(String.valueOf(changes.size64())); |
|
723 |
} else { |
|
773 |
List<VCSGisEntity> checkedEntities = entitySelector.getCheckedEntities(); |
|
774 |
if ( CollectionUtils.isEmpty(checkedEntities) ) { |
|
724 | 775 |
this.changes = null; |
725 | 776 |
this.tblRemoteChanges.setModel(new DefaultTableModel()); |
726 | 777 |
this.lblRemoteChangesCount.setText("0"); |
778 |
return; |
|
727 | 779 |
} |
780 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
781 |
message("Reloading list of remote changes..."); |
|
782 |
this.changes = ws.getRemoteChangesByEntity( |
|
783 |
checkedEntities.stream() |
|
784 |
.map((t) -> {return t.getEntityName();}) |
|
785 |
.toArray((n) -> { return new String[n];}) |
|
786 |
); |
|
787 |
this.changes.addChangeListener((ChangeEvent e) -> { |
|
788 |
context.doUpdateComponents(); |
|
789 |
}); |
|
790 |
ChangesTableModel changesModel = new ChangesTableModel(changes, ws); |
|
791 |
this.tblRemoteChanges.setModel(changesModel); |
|
728 | 792 |
|
793 |
int columns = this.tblRemoteChanges.getColumnModel().getColumnCount(); |
|
794 |
for (int i = 1; i < columns; i++) { |
|
795 |
this.tblRemoteChanges.getColumnModel().getColumn(i).setCellRenderer(new DefaultTableCellRenderer() { |
|
796 |
@Override |
|
797 |
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { |
|
798 |
Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); |
|
799 |
VCSGisChange changeRow = changes.get64(row); |
|
800 |
VCSGisSwingCommons.setColorCompoment(c, changeRow.getStatus()); |
|
801 |
return c; |
|
802 |
} |
|
803 |
}); |
|
804 |
} |
|
805 |
|
|
806 |
context.doUpdateComponents(); |
|
807 |
context.message(i18n.getTranslation( |
|
808 |
"_Repository_changes_list_updated", |
|
809 |
new String[] { String.valueOf(changes.size64()) } |
|
810 |
) |
|
811 |
); |
|
812 |
this.lblRemoteChangesCount.setText(String.valueOf(changes.size64())); |
|
729 | 813 |
} |
730 | 814 |
|
731 | 815 |
private void doCleanChanges() { |
... | ... | |
733 | 817 |
if (ws == null) { |
734 | 818 |
return; |
735 | 819 |
} |
736 |
LabeledValue tableSelected = (LabeledValue) lstRemoteTables.getSelectedValue(); |
|
737 |
if (tableSelected != null) { |
|
738 |
final VCSGisEntity entity = (VCSGisEntity) tableSelected.getValue(); |
|
739 |
Thread task = new Thread(() -> { |
|
740 |
try { |
|
741 |
context.processing = true; |
|
742 |
context.doUpdateComponents(); |
|
743 |
message("Removing list of remote changes from " + entity.getEntityName() + "..."); |
|
744 |
ws.updateClean(entity.getEntityCode()); |
|
745 |
message("Ready."); |
|
746 |
} finally { |
|
747 |
context.processing = false; |
|
748 |
context.doUpdateComponents(); |
|
820 |
List<VCSGisEntity> checkedEntities = entitySelector.getCheckedEntities(); |
|
821 |
if ( CollectionUtils.isEmpty(checkedEntities) ) { |
|
822 |
return; |
|
823 |
} |
|
824 |
Thread task = new Thread(() -> { |
|
825 |
try { |
|
826 |
context.processing = true; |
|
827 |
context.doUpdateComponents(); |
|
828 |
for (VCSGisEntity checkedEntity : checkedEntities) { |
|
829 |
message("Removing list of remote changes from selected tables" + checkedEntity.getEntityName() + "..."); |
|
830 |
ws.updateClean(checkedEntity.getEntityName()); |
|
749 | 831 |
} |
750 |
}, "VCSGisUpdateClean"); |
|
751 |
task.start(); |
|
752 |
} |
|
753 |
|
|
832 |
message("Ready."); |
|
833 |
} finally { |
|
834 |
context.processing = false; |
|
835 |
context.doUpdateComponents(); |
|
836 |
} |
|
837 |
}, "VCSGisUpdateClean"); |
|
838 |
task.start(); |
|
754 | 839 |
} |
755 | 840 |
|
756 | 841 |
private void doDownloadChangesOfSelectedTable() { |
... | ... | |
758 | 843 |
if (ws == null) { |
759 | 844 |
return; |
760 | 845 |
} |
761 |
LabeledValue selected = (LabeledValue) lstRemoteTables.getSelectedValue();
|
|
762 |
if (selected == null) {
|
|
846 |
List<VCSGisEntity> checkedEntities = entitySelector.getCheckedEntities();
|
|
847 |
if ( CollectionUtils.isEmpty(checkedEntities) ) {
|
|
763 | 848 |
return; |
764 | 849 |
} |
765 | 850 |
Thread task = new Thread(() -> { |
766 | 851 |
try { |
767 | 852 |
context.processing = true; |
768 | 853 |
context.doUpdateComponents(); |
769 |
VCSGisEntity entity = (VCSGisEntity) selected.getValue(); |
|
770 |
message("Removing list of remote changes of " + entity.getEntityName() + "..."); |
|
771 |
ws.updateClean(entity.getEntityName()); |
|
772 |
message("Downloading list of remote changes of " + entity.getEntityName() + "..."); |
|
773 |
ws.updatePrepare(entity.getEntityName()); |
|
854 |
for (VCSGisEntity entity : checkedEntities) { |
|
855 |
message("Removing list of remote changes of " + entity.getEntityName() + "..."); |
|
856 |
ws.updateClean(entity.getEntityName()); |
|
857 |
message("Downloading list of remote changes of " + entity.getEntityName() + "..."); |
|
858 |
ws.updatePrepare(entity.getEntityName()); |
|
859 |
} |
|
774 | 860 |
context.updateLocalChangesTable(); |
775 | 861 |
} finally { |
776 | 862 |
context.processing = false; |
... | ... | |
785 | 871 |
message("_Ready"); |
786 | 872 |
} |
787 | 873 |
|
788 |
private void doReloadTables(boolean forceUpdateEntities) { |
|
789 |
DefaultListModel model = new DefaultListModel(); |
|
874 |
private void doReloadTables() { |
|
790 | 875 |
VCSGisWorkspace ws = this.getUndisposableWorkspace(); |
791 | 876 |
if (ws == null) { |
792 |
this.lstRemoteTables.setModel(model);
|
|
877 |
this.entitySelector.setWorkspace(null);
|
|
793 | 878 |
return; |
794 | 879 |
} |
795 |
message("Updating list of tables from remote repository...");// "+ws.getRepository().getLabel()+")..."); |
|
796 |
this.context.updateEntitiesFromRepository(forceUpdateEntities); |
|
797 |
message("Loading list of tables..."); |
|
798 |
|
|
799 |
for (VCSGisEntity entity : ws.getRepositoryEntities()) { |
|
800 |
model.addElement(new LabeledValueImpl<>(entity.getEntityName(), entity)); |
|
801 |
} |
|
802 |
this.lstRemoteTables.setModel(model); |
|
803 |
context.doUpdateComponents(); |
|
804 |
message("Ready."); |
|
880 |
this.entitySelector.reloadEntities(); |
|
881 |
// context.doUpdateComponents(); |
|
805 | 882 |
} |
806 | 883 |
|
807 | 884 |
public boolean isProcessing() { |
... | ... | |
899 | 976 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
900 | 977 |
|
901 | 978 |
final VCSGisWorkspace workspace = this.getUndisposableWorkspace(); |
902 |
VCSGisEntity entity = getSelectedTable(); |
|
903 |
|
|
904 |
if (workspace != null && entity != null) { |
|
905 |
Thread task = new Thread(() -> { |
|
906 |
try { |
|
907 |
context.processing = true; |
|
908 |
context.doUpdateComponents(); |
|
909 |
int r = workspace.checkout(entity.getEntityName()); |
|
979 |
if( workspace==null ) { |
|
980 |
return; |
|
981 |
} |
|
982 |
List<VCSGisEntity> checkedEntities = entitySelector.getCheckedEntities(); |
|
983 |
if ( CollectionUtils.isEmpty(checkedEntities) ) { |
|
984 |
return; |
|
985 |
} |
|
986 |
Thread task = new Thread(() -> { |
|
987 |
try { |
|
988 |
context.processing = true; |
|
989 |
context.doUpdateComponents(); |
|
990 |
int r = ERR_OK; |
|
991 |
for (VCSGisEntity entity : checkedEntities) { |
|
992 |
r = workspace.checkout(entity.getEntityName()); |
|
910 | 993 |
if (r != ERR_OK) { |
911 |
this.message(i18n.getTranslation("_Cant_checkout")); |
|
912 |
} else { |
|
913 |
postCheckout(r, entity); |
|
994 |
this.message(i18n.getTranslation("_Cant_checkout")+" "+ entity.getEntityName()); |
|
995 |
break; |
|
914 | 996 |
} |
915 |
} finally { |
|
916 |
context.processing = false; |
|
917 |
context.doUpdateComponents(); |
|
918 |
context.updateLocalChangesTable(); |
|
919 | 997 |
} |
920 |
}, "VCSGisCheckout"); |
|
998 |
postCheckout(r, checkedEntities); |
|
999 |
} finally { |
|
1000 |
context.processing = false; |
|
1001 |
context.doUpdateComponents(); |
|
1002 |
context.updateLocalChangesTable(); |
|
1003 |
} |
|
1004 |
}, "VCSGisCheckout"); |
|
921 | 1005 |
|
922 |
this.context.processing = true; |
|
923 |
doUpdateComponents(); |
|
924 |
task.start(); |
|
925 |
|
|
926 |
} |
|
1006 |
this.context.processing = true; |
|
1007 |
doUpdateComponents(); |
|
1008 |
task.start(); |
|
927 | 1009 |
} |
928 | 1010 |
|
929 |
private void postCheckout(int checkoutStatus, VCSGisEntity entity) {
|
|
1011 |
private void postCheckout(int checkoutStatus, List<VCSGisEntity> entities) {
|
|
930 | 1012 |
if (notInSwingThreadInvokeLater(() -> { |
931 |
postCheckout(checkoutStatus, entity);
|
|
1013 |
postCheckout(checkoutStatus, entities);
|
|
932 | 1014 |
})) { |
933 | 1015 |
return; |
934 | 1016 |
} |
... | ... | |
941 | 1023 |
if (checkoutStatus == ERR_OK) { |
942 | 1024 |
this.context.setVisibleStatus(false); |
943 | 1025 |
|
944 |
if (StringUtils.isNotBlank(entity.getGeometryFieldName()) && services.isThereAnyActiveView()) { |
|
1026 |
int tablesWithGeometry = 0; |
|
1027 |
for (VCSGisEntity entity : entities) { |
|
1028 |
if (StringUtils.isNotBlank(entity.getGeometryFieldName()) ) { |
|
1029 |
tablesWithGeometry++; |
|
1030 |
} |
|
1031 |
} |
|
1032 |
|
|
1033 |
if (tablesWithGeometry>0 && services.isThereAnyActiveView()) { |
|
945 | 1034 |
ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager(); |
946 |
dialogs.confirmDialog(i18n.getTranslation("_Do_you_want_add_layer_to_active_view"), |
|
1035 |
int n = dialogs.confirmDialog(i18n.getTranslation("_Do_you_want_add_layer_to_active_view"),
|
|
947 | 1036 |
i18n.getTranslation("_VCS_Checkout"), |
948 | 1037 |
JOptionPane.YES_NO_OPTION, |
949 | 1038 |
JOptionPane.QUESTION_MESSAGE, |
950 | 1039 |
"VCSGis_Checkout_add_layer_to_view" |
951 | 1040 |
); |
952 |
|
|
953 |
FeatureStore store = workspace.getFeatureStore(entity.getEntityName()); |
|
954 |
String layerName = workspace.getLabel() + " - " + store.getName(); |
|
955 |
services.addLayerToActiveView(store, layerName); |
|
956 |
} else { |
|
1041 |
if( n == JOptionPane.YES_OPTION ) { |
|
1042 |
for (VCSGisEntity entity : entities) { |
|
1043 |
if (StringUtils.isNotBlank(entity.getGeometryFieldName()) ) { |
|
1044 |
FeatureStore store = workspace.getFeatureStore(entity.getEntityName()); |
|
1045 |
String layerName = store.getName(); |
|
1046 |
services.addLayerToActiveView(store, layerName); |
|
1047 |
} |
|
1048 |
} |
|
1049 |
} |
|
1050 |
} |
|
1051 |
if( entities.size() - tablesWithGeometry > 0 ) { |
|
1052 |
// Hay tablas sin geometrias |
|
957 | 1053 |
ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager(); |
958 | 1054 |
int res = dialogs.confirmDialog(i18n.getTranslation("_Do_you_want_add_table_to_project"), |
959 | 1055 |
i18n.getTranslation("_VCS_Checkout"), |
... | ... | |
963 | 1059 |
); |
964 | 1060 |
|
965 | 1061 |
if (res == JOptionPane.YES_OPTION) { |
966 |
FeatureStore store = workspace.getFeatureStore(entity.getEntityName()); |
|
967 |
services.addTableToProject(workspace, store); |
|
1062 |
for (VCSGisEntity entity : entities) { |
|
1063 |
if (!services.isThereAnyActiveView() || StringUtils.isBlank(entity.getGeometryFieldName()) ) { |
|
1064 |
FeatureStore store = workspace.getFeatureStore(entity.getEntityName()); |
|
1065 |
services.addTableToProject(workspace, store); |
|
1066 |
} |
|
1067 |
} |
|
968 | 1068 |
} |
969 | 1069 |
} |
970 | 1070 |
} |
971 | 1071 |
|
972 | 1072 |
doReloadChanges(); |
973 |
VCSGisEntity selectedTable = getSelectedTable(); |
|
974 |
FeatureStore store = getUndisposableWorkspace().getFeatureStore(selectedTable.getEntityName()); |
|
975 |
refreshDocument(store); |
|
1073 |
for (VCSGisEntity entity : entities) { |
|
1074 |
FeatureStore store = getUndisposableWorkspace().getFeatureStore(entity.getEntityName()); |
|
1075 |
refreshDocument(store); |
|
1076 |
} |
|
976 | 1077 |
} |
977 | 1078 |
|
978 | 1079 |
|
979 |
private VCSGisEntity getSelectedTable() { |
|
980 |
LabeledValue<VCSGisEntity> lValue = (LabeledValue<VCSGisEntity>) lstRemoteTables.getSelectedValue(); |
|
981 |
if(lValue == null){ |
|
982 |
return null; |
|
983 |
} |
|
984 |
return lValue.getValue(); |
|
985 |
} |
|
986 |
|
|
987 |
private Boolean isSelectedTableInWorkspace() { |
|
988 |
VCSGisEntity entity = getSelectedTable(); |
|
989 |
if(entity == null){ |
|
990 |
return null; |
|
991 |
} |
|
992 |
VCSGisWorkspace ws = getUndisposableWorkspace(); |
|
993 |
if(ws == null){ |
|
994 |
return null; |
|
995 |
} |
|
996 |
entity = ws.getWorkspaceEntity(entity.getEntityCode()); |
|
997 |
return entity != null; |
|
998 |
} |
|
999 | 1080 |
|
1000 | 1081 |
@Override |
1001 | 1082 |
protected void doDispose() throws BaseException { |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/changes/VCSGisJChangesView.xml | ||
---|---|---|
24 | 24 |
</at> |
25 | 25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
26 | 26 |
</super> |
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/changes/VCSGisJChangesView.xml</at>
|
|
28 |
<at name="path">src/main/java/org/gvsig/vcsgis/swing/impl/changes/VCSGisJChangesView.xml</at> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/changes/VCSGisJChangesView.xml</at>
|
|
28 |
<at name="path">datos/devel/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/changes/VCSGisJChangesView.xml</at>
|
|
29 | 29 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),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"> |
... | ... | |
75 | 75 |
</object> |
76 | 76 |
</at> |
77 | 77 |
<at name="name">lblWorkspace</at> |
78 |
<at name="width">82</at>
|
|
78 |
<at name="width">133</at>
|
|
79 | 79 |
<at name="text">_Working_copy</at> |
80 | 80 |
<at name="fill"> |
81 | 81 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
82 | 82 |
<at name="name">fill</at> |
83 | 83 |
</object> |
84 | 84 |
</at> |
85 |
<at name="height">14</at>
|
|
85 |
<at name="height">26</at>
|
|
86 | 86 |
</object> |
87 | 87 |
</at> |
88 | 88 |
</object> |
... | ... | |
135 | 135 |
</object> |
136 | 136 |
</at> |
137 | 137 |
<at name="name">cboWorkspace</at> |
138 |
<at name="width">1163</at>
|
|
138 |
<at name="width">1171</at>
|
|
139 | 139 |
<at name="items"> |
140 | 140 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
141 | 141 |
<at name="name">items</at> |
142 | 142 |
</object> |
143 | 143 |
</at> |
144 |
<at name="height">20</at>
|
|
144 |
<at name="height">38</at>
|
|
145 | 145 |
</object> |
146 | 146 |
</at> |
147 | 147 |
</object> |
... | ... | |
210 | 210 |
<at name="embedded">false</at> |
211 | 211 |
<at name="path">datos/devel/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/resources/org/gvsig/vcsgis/swing/impl/images/vcsgis-show-local-changes.png</at> |
212 | 212 |
<at name="description">vcsgis-show-local-changes.png</at> |
213 |
<at name="width">16</at>
|
|
214 |
<at name="height">16</at>
|
|
213 |
<at name="width">18</at>
|
|
214 |
<at name="height">18</at>
|
|
215 | 215 |
</object> |
216 | 216 |
</at> |
217 | 217 |
<at name="form"> |
... | ... | |
230 | 230 |
</at> |
231 | 231 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
232 | 232 |
</super> |
233 |
<at name="id">embedded.854481661</at>
|
|
234 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
|
|
235 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.2),FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
|
|
233 |
<at name="id">embedded.1203961856</at>
|
|
234 |
<at name="rowspecs">CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at> |
|
235 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.2),FILL:4DLU:NONE</at> |
|
236 | 236 |
<at name="components"> |
237 | 237 |
<object classname="java.util.LinkedList"> |
238 | 238 |
<item > |
239 | 239 |
<at name="value"> |
240 |
<object classname="com.jeta.forms.store.memento.BeanMemento">
|
|
240 |
<object classname="com.jeta.forms.store.memento.FormMemento">
|
|
241 | 241 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
242 | 242 |
<at name="cellconstraints"> |
243 | 243 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
244 |
<at name="column">4</at>
|
|
244 |
<at name="column">2</at>
|
|
245 | 245 |
<at name="row">5</at> |
246 | 246 |
<at name="colspan">1</at> |
247 | 247 |
<at name="rowspan">1</at> |
... | ... | |
250 | 250 |
<at name="insets" object="insets">0,0,0,0</at> |
251 | 251 |
</object> |
252 | 252 |
</at> |
253 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
254 |
</super> |
|
255 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
256 |
<at name="beanclass">javax.swing.JTable</at> |
|
257 |
<at name="beanproperties"> |
|
258 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
259 |
<at name="classname">javax.swing.JTable</at> |
|
260 |
<at name="properties"> |
|
261 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
262 |
<at name="border"> |
|
263 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
264 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
265 |
<at name="name">border</at> |
|
266 |
</super> |
|
267 |
<at name="borders"> |
|
268 |
<object classname="java.util.LinkedList"> |
|
269 |
<item > |
|
270 |
<at name="value"> |
|
271 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
272 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
273 |
<at name="name">border</at> |
|
274 |
</super> |
|
275 |
</object> |
|
276 |
</at> |
|
277 |
</item> |
|
278 |
</object> |
|
279 |
</at> |
|
280 |
</object> |
|
281 |
</at> |
|
282 |
<at name="name">tblLocalChanges</at> |
|
283 |
<at name="width">882</at> |
|
284 |
<at name="scollBars"> |
|
285 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
286 |
<at name="name">scollBars</at> |
|
287 |
<at name="verticalpolicy">20</at> |
|
288 |
<at name="horizontalpolicy">30</at> |
|
289 |
<at name="border"> |
|
290 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
291 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
292 |
<at name="name">border</at> |
|
293 |
</super> |
|
294 |
<at name="borders"> |
|
295 |
<object classname="java.util.LinkedList"> |
|
296 |
<item > |
|
297 |
<at name="value"> |
|
298 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
299 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
300 |
<at name="name">border</at> |
|
301 |
</super> |
|
302 |
</object> |
|
303 |
</at> |
|
304 |
</item> |
|
305 |
</object> |
|
306 |
</at> |
|
307 |
</object> |
|
308 |
</at> |
|
309 |
</object> |
|
310 |
</at> |
|
311 |
<at name="height">32</at> |
|
312 |
</object> |
|
313 |
</at> |
|
314 |
</object> |
|
315 |
</at> |
|
316 |
</object> |
|
317 |
</at> |
|
318 |
</item> |
|
319 |
<item > |
|
320 |
<at name="value"> |
|
321 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
322 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
323 |
<at name="cellconstraints"> |
|
324 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
325 |
<at name="column">4</at> |
|
326 |
<at name="row">3</at> |
|
327 |
<at name="colspan">1</at> |
|
328 |
<at name="rowspan">1</at> |
|
329 |
<at name="halign">default</at> |
|
330 |
<at name="valign">default</at> |
|
331 |
<at name="insets" object="insets">0,0,0,0</at> |
|
332 |
</object> |
|
333 |
</at> |
|
334 | 253 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
335 | 254 |
</super> |
336 |
<at name="id">embedded.610388303</at> |
|
337 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
|
338 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:8DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
|
339 |
<at name="components"> |
|
340 |
<object classname="java.util.LinkedList"> |
|
341 |
<item > |
|
342 |
<at name="value"> |
|
343 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
344 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
345 |
<at name="cellconstraints"> |
|
346 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
347 |
<at name="column">1</at> |
|
348 |
<at name="row">1</at> |
|
349 |
<at name="colspan">1</at> |
|
350 |
<at name="rowspan">1</at> |
|
351 |
<at name="halign">default</at> |
|
352 |
<at name="valign">default</at> |
|
353 |
<at name="insets" object="insets">0,0,0,0</at> |
|
354 |
</object> |
|
355 |
</at> |
|
356 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
357 |
</super> |
|
358 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
359 |
<at name="beanclass">javax.swing.JButton</at> |
|
360 |
<at name="beanproperties"> |
|
361 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
362 |
<at name="classname">javax.swing.JButton</at> |
|
363 |
<at name="properties"> |
|
364 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
365 |
<at name="border"> |
|
366 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
367 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
368 |
<at name="name">border</at> |
|
369 |
</super> |
|
370 |
<at name="borders"> |
|
371 |
<object classname="java.util.LinkedList"> |
|
372 |
<item > |
|
373 |
<at name="value"> |
|
374 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
375 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
376 |
<at name="name">border</at> |
|
377 |
</super> |
|
378 |
<at name="top">1</at> |
|
379 |
<at name="left">1</at> |
|
380 |
<at name="bottom">1</at> |
|
381 |
<at name="right">1</at> |
|
382 |
</object> |
|
383 |
</at> |
|
384 |
</item> |
|
385 |
</object> |
|
386 |
</at> |
|
387 |
</object> |
|
388 |
</at> |
|
389 |
<at name="actionCommand">...</at> |
|
390 |
<at name="opaque">false</at> |
|
391 |
<at name="icon"> |
|
392 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
393 |
<at name="embedded">false</at> |
|
394 |
<at name="path">src/main/resources/org/gvsig/vcsgis/swing/impl/images/common-check-on.png</at> |
|
395 |
<at name="description">common-check-on.png</at> |
|
396 |
<at name="width">16</at> |
|
397 |
<at name="height">16</at> |
|
398 |
</object> |
|
399 |
</at> |
|
400 |
<at name="name">btnLocalCheckAll</at> |
|
401 |
<at name="width">18</at> |
|
402 |
<at name="enabled">false</at> |
|
403 |
<at name="toolTipText">_Select_all</at> |
|
404 |
<at name="height">18</at> |
|
405 |
</object> |
|
406 |
</at> |
|
407 |
</object> |
|
408 |
</at> |
|
409 |
</object> |
|
410 |
</at> |
|
411 |
</item> |
|
412 |
<item > |
|
413 |
<at name="value"> |
|
414 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
415 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
416 |
<at name="cellconstraints"> |
|
417 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
418 |
<at name="column">2</at> |
|
419 |
<at name="row">1</at> |
|
420 |
<at name="colspan">1</at> |
|
421 |
<at name="rowspan">1</at> |
|
422 |
<at name="halign">default</at> |
|
423 |
<at name="valign">default</at> |
|
424 |
<at name="insets" object="insets">0,0,0,0</at> |
|
425 |
</object> |
|
426 |
</at> |
|
427 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
428 |
</super> |
|
429 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
430 |
<at name="beanclass">javax.swing.JButton</at> |
|
431 |
<at name="beanproperties"> |
|
432 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
433 |
<at name="classname">javax.swing.JButton</at> |
|
434 |
<at name="properties"> |
|
435 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
436 |
<at name="border"> |
|
437 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
438 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
439 |
<at name="name">border</at> |
|
440 |
</super> |
|
441 |
<at name="borders"> |
|
442 |
<object classname="java.util.LinkedList"> |
|
443 |
<item > |
|
444 |
<at name="value"> |
|
445 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
446 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
447 |
<at name="name">border</at> |
|
448 |
</super> |
|
449 |
<at name="top">1</at> |
|
450 |
<at name="left">1</at> |
|
451 |
<at name="bottom">1</at> |
|
452 |
<at name="right">1</at> |
|
453 |
</object> |
|
454 |
</at> |
|
455 |
</item> |
|
456 |
</object> |
|
457 |
</at> |
|
458 |
</object> |
|
459 |
</at> |
|
460 |
<at name="actionCommand">...</at> |
|
461 |
<at name="opaque">false</at> |
|
462 |
<at name="icon"> |
|
463 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
464 |
<at name="embedded">false</at> |
|
465 |
<at name="path">src/main/resources/org/gvsig/vcsgis/swing/impl/images/common-check-off.png</at> |
|
466 |
<at name="description">common-check-off.png</at> |
|
467 |
<at name="width">16</at> |
|
468 |
<at name="height">16</at> |
|
469 |
</object> |
|
470 |
</at> |
|
471 |
<at name="name">btnLocalUnCheckAll</at> |
|
472 |
<at name="width">18</at> |
|
473 |
<at name="enabled">false</at> |
|
474 |
<at name="toolTipText">_Unselect_all</at> |
|
475 |
<at name="height">18</at> |
|
476 |
</object> |
|
477 |
</at> |
|
478 |
</object> |
|
479 |
</at> |
|
480 |
</object> |
|
481 |
</at> |
|
482 |
</item> |
|
483 |
<item > |
|
484 |
<at name="value"> |
|
485 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
486 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
487 |
<at name="cellconstraints"> |
|
488 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
489 |
<at name="column">18</at> |
|
490 |
<at name="row">1</at> |
|
491 |
<at name="colspan">1</at> |
|
492 |
<at name="rowspan">1</at> |
|
493 |
<at name="halign">default</at> |
|
494 |
<at name="valign">default</at> |
|
495 |
<at name="insets" object="insets">0,0,0,0</at> |
|
496 |
</object> |
|
497 |
</at> |
|
498 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
499 |
</super> |
|
500 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
501 |
<at name="beanclass">javax.swing.JButton</at> |
|
502 |
<at name="beanproperties"> |
|
503 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
504 |
<at name="classname">javax.swing.JButton</at> |
|
505 |
<at name="properties"> |
|
506 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
507 |
<at name="border"> |
|
508 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
509 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
510 |
<at name="name">border</at> |
|
511 |
</super> |
|
512 |
<at name="borders"> |
|
513 |
<object classname="java.util.LinkedList"> |
|
514 |
<item > |
|
515 |
<at name="value"> |
|
516 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
517 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
518 |
<at name="name">border</at> |
|
519 |
</super> |
|
520 |
<at name="top">2</at> |
|
521 |
<at name="left">2</at> |
|
522 |
<at name="bottom">2</at> |
|
523 |
<at name="right">2</at> |
|
524 |
</object> |
|
525 |
</at> |
|
526 |
</item> |
|
527 |
</object> |
|
528 |
</at> |
|
529 |
</object> |
|
530 |
</at> |
|
531 |
<at name="actionCommand">...</at> |
|
532 |
<at name="opaque">false</at> |
|
533 |
<at name="icon"> |
|
534 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
535 |
<at name="embedded">false</at> |
|
536 |
<at name="path">src/main/resources/org/gvsig/vcsgis/swing/impl/images/common-showform.png</at> |
|
537 |
<at name="description">common-showform.png</at> |
|
538 |
<at name="width">16</at> |
|
539 |
<at name="height">16</at> |
|
540 |
</object> |
|
541 |
</at> |
|
542 |
<at name="name">btnLocalShowForm</at> |
|
543 |
<at name="width">20</at> |
|
544 |
<at name="toolTipText">_Show_form</at> |
|
545 |
<at name="height">20</at> |
|
546 |
</object> |
|
547 |
</at> |
|
548 |
</object> |
|
549 |
</at> |
|
550 |
</object> |
|
551 |
</at> |
|
552 |
</item> |
|
553 |
<item > |
|
554 |
<at name="value"> |
|
555 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
556 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
557 |
<at name="cellconstraints"> |
|
558 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
559 |
<at name="column">3</at> |
|
560 |
<at name="row">1</at> |
|
561 |
<at name="colspan">1</at> |
|
562 |
<at name="rowspan">1</at> |
|
563 |
<at name="halign">default</at> |
|
564 |
<at name="valign">default</at> |
|
565 |
<at name="insets" object="insets">0,0,0,0</at> |
|
566 |
</object> |
|
567 |
</at> |
|
568 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
569 |
</super> |
|
570 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
571 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
572 |
<at name="beanproperties"> |
|
573 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
574 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
575 |
<at name="properties"> |
|
576 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
577 |
<at name="border"> |
|
578 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
579 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
580 |
<at name="name">border</at> |
|
581 |
</super> |
|
582 |
<at name="borders"> |
|
583 |
<object classname="java.util.LinkedList"> |
|
584 |
<item > |
|
585 |
<at name="value"> |
|
586 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
587 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
588 |
<at name="name">border</at> |
|
589 |
</super> |
|
590 |
</object> |
|
591 |
</at> |
|
592 |
</item> |
|
593 |
</object> |
|
594 |
</at> |
|
595 |
</object> |
|
596 |
</at> |
|
597 |
<at name="name"></at> |
|
598 |
<at name="width">587</at> |
|
599 |
<at name="fill"> |
|
600 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
601 |
<at name="name">fill</at> |
|
602 |
</object> |
|
603 |
</at> |
|
604 |
<at name="height">12</at> |
|
605 |
</object> |
|
606 |
</at> |
|
607 |
</object> |
|
608 |
</at> |
|
609 |
</object> |
|
610 |
</at> |
|
611 |
</item> |
|
612 |
<item > |
|
613 |
<at name="value"> |
|
614 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
615 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
616 |
<at name="cellconstraints"> |
|
617 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
618 |
<at name="column">4</at> |
|
619 |
<at name="row">1</at> |
|
620 |
<at name="colspan">1</at> |
|
621 |
<at name="rowspan">1</at> |
|
622 |
<at name="halign">default</at> |
|
623 |
<at name="valign">default</at> |
|
624 |
<at name="insets" object="insets">0,0,0,0</at> |
|
625 |
</object> |
|
626 |
</at> |
|
627 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
628 |
</super> |
|
629 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
630 |
<at name="beanclass">javax.swing.JButton</at> |
|
631 |
<at name="beanproperties"> |
|
632 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
633 |
<at name="classname">javax.swing.JButton</at> |
|
634 |
<at name="properties"> |
|
635 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
636 |
<at name="border"> |
|
637 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
638 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
639 |
<at name="name">border</at> |
|
640 |
</super> |
|
641 |
<at name="borders"> |
|
642 |
<object classname="java.util.LinkedList"> |
|
643 |
<item > |
|
644 |
<at name="value"> |
|
645 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
646 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
647 |
<at name="name">border</at> |
|
648 |
</super> |
|
649 |
<at name="top">2</at> |
|
650 |
<at name="left">2</at> |
|
651 |
<at name="bottom">2</at> |
|
652 |
<at name="right">2</at> |
|
653 |
</object> |
|
654 |
</at> |
|
655 |
</item> |
|
656 |
</object> |
|
657 |
</at> |
|
658 |
</object> |
|
659 |
</at> |
|
660 |
<at name="actionCommand">...</at> |
|
661 |
<at name="opaque">false</at> |
|
662 |
<at name="icon"> |
|
663 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
664 |
<at name="embedded">false</at> |
|
665 |
<at name="path">src/main/resources/org/gvsig/vcsgis/swing/impl/images/vcsgis-refresh-status.png</at> |
|
666 |
<at name="description">vcsgis-refresh-status.png</at> |
|
667 |
<at name="width">16</at> |
|
668 |
<at name="height">16</at> |
|
669 |
</object> |
|
670 |
</at> |
|
671 |
<at name="name">btnLocalRefresh</at> |
|
672 |
<at name="width">20</at> |
|
673 |
<at name="toolTipText">_Refresh</at> |
|
674 |
<at name="height">20</at> |
|
675 |
</object> |
|
676 |
</at> |
|
677 |
</object> |
|
678 |
</at> |
|
679 |
</object> |
|
680 |
</at> |
|
681 |
</item> |
|
682 |
<item > |
|
683 |
<at name="value"> |
|
684 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
685 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
686 |
<at name="cellconstraints"> |
|
687 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
688 |
<at name="column">8</at> |
|
689 |
<at name="row">1</at> |
|
690 |
<at name="colspan">1</at> |
|
691 |
<at name="rowspan">1</at> |
|
692 |
<at name="halign">default</at> |
|
693 |
<at name="valign">default</at> |
|
694 |
<at name="insets" object="insets">0,0,0,0</at> |
|
695 |
</object> |
|
696 |
</at> |
|
697 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
698 |
</super> |
|
699 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
700 |
<at name="beanclass">javax.swing.JButton</at> |
|
701 |
<at name="beanproperties"> |
|
702 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
703 |
<at name="classname">javax.swing.JButton</at> |
|
704 |
<at name="properties"> |
|
705 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
706 |
<at name="border"> |
|
707 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
708 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
709 |
<at name="name">border</at> |
|
710 |
</super> |
|
711 |
<at name="borders"> |
|
712 |
<object classname="java.util.LinkedList"> |
|
713 |
<item > |
|
714 |
<at name="value"> |
|
715 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
716 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
717 |
<at name="name">border</at> |
|
718 |
</super> |
|
719 |
<at name="top">2</at> |
|
720 |
<at name="left">2</at> |
|
721 |
<at name="bottom">2</at> |
|
722 |
<at name="right">2</at> |
|
723 |
</object> |
|
724 |
</at> |
|
725 |
</item> |
|
726 |
</object> |
|
727 |
</at> |
|
728 |
</object> |
|
729 |
</at> |
|
730 |
<at name="actionCommand">...</at> |
|
731 |
<at name="opaque">false</at> |
|
732 |
<at name="icon"> |
|
733 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
734 |
<at name="embedded">false</at> |
|
735 |
<at name="path">src/main/resources/org/gvsig/vcsgis/swing/impl/images/vcsgis-commit-all.png</at> |
Also available in: Unified diff