Revision 37535

View differences:

branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/gui/command/CommandStackDialog.java
1 1
package org.gvsig.app.gui.command;
2 2

  
3
import java.awt.*;
3
import java.awt.BorderLayout;
4
import java.awt.Color;
5
import java.awt.Component;
6
import java.awt.Dimension;
4 7

  
5
import javax.swing.*;
8
import javax.swing.ImageIcon;
9
import javax.swing.JLabel;
10
import javax.swing.JPanel;
11
import javax.swing.JScrollBar;
12
import javax.swing.JScrollPane;
13
import javax.swing.JSlider;
14
import javax.swing.JTable;
15
import javax.swing.ListSelectionModel;
16
import javax.swing.SwingConstants;
6 17
import javax.swing.table.DefaultTableCellRenderer;
7 18
import javax.swing.table.TableColumn;
8 19

  
......
10 21
import org.gvsig.andami.ui.mdiManager.IWindowListener;
11 22
import org.gvsig.andami.ui.mdiManager.SingletonWindow;
12 23
import org.gvsig.andami.ui.mdiManager.WindowInfo;
13
import org.gvsig.fmap.dal.DataStoreNotification;
24
import org.gvsig.app.ApplicationLocator;
25
import org.gvsig.fmap.dal.feature.FeatureStoreNotification;
14 26
import org.gvsig.gui.beans.DefaultBean;
15 27
import org.gvsig.tools.observer.Observable;
16 28
import org.gvsig.tools.observer.Observer;
......
297 309
		}
298 310
		return jScrollPane;
299 311
	}
312
	
300 313
	public void update(Observable observable, Object notification) {
301
//	    if (notification instanceof DataStoreNotification) {
302
//            DataStoreNotification storeNotification = (DataStoreNotification) notification;
303
//            if (DataStoreNotification.SELECTION_CHANGE.equals(storeNotification
304
//                    .getType())) {
305
//                commandRepaint();
306
//            }
307
//        }
314
		if (notification instanceof FeatureStoreNotification){
315
			FeatureStoreNotification featureStoreNotification =
316
					(FeatureStoreNotification) notification;
317
			//If the edition finish the command stack disappears
318
			String type = featureStoreNotification.getType();
319
			if (FeatureStoreNotification.AFTER_FINISHEDITING.equals(type) ||
320
					FeatureStoreNotification.AFTER_CANCELEDITING.equals(type)){							
321
				ApplicationLocator.getManager().getUIManager().closeWindow(this);				
322
				featureStoreNotification.getSource().deleteObserver(this);
323
				return;
324
			}
325
		}
308 326
	    commandRepaint();
309 327
	}
310 328

  

Also available in: Unified diff