Revision 5572

View differences:

trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/Table.java
49 49
import java.awt.event.MouseEvent;
50 50
import java.beans.PropertyChangeEvent;
51 51
import java.beans.PropertyChangeListener;
52
import java.io.File;
52 53
import java.io.IOException;
53 54
import java.text.ParseException;
54 55
import java.util.BitSet;
......
98 99
import com.iver.cit.gvsig.fmap.core.IGeometry;
99 100
import com.iver.cit.gvsig.fmap.core.IRow;
100 101
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
102
import com.iver.cit.gvsig.fmap.drivers.ITableDefinition;
101 103
import com.iver.cit.gvsig.fmap.edition.EditionEvent;
102 104
import com.iver.cit.gvsig.fmap.edition.EditionException;
103 105
import com.iver.cit.gvsig.fmap.edition.IEditableSource;
104 106
import com.iver.cit.gvsig.fmap.edition.IRowEdited;
105 107
import com.iver.cit.gvsig.fmap.edition.ISpatialWriter;
108
import com.iver.cit.gvsig.fmap.edition.IWriter;
106 109
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter;
107 110
import com.iver.cit.gvsig.fmap.edition.commands.CommandListener;
108 111
import com.iver.cit.gvsig.fmap.edition.writers.gdbms.GdbmsWriter;
......
748 751
	 */
749 752
    public void stopEditing() {
750 753
        try {
754
        	this.stopEditingCell();
755
        	
751 756
            FLyrVect lyr = (FLyrVect) getModel().getAssociatedTable();
752 757

  
753 758
            if ((lyr != null) &&
......
761 766
            } else {
762 767

  
763 768
                 IEditableSource ies=getModel().getModelo();
764
                 /* IWriter writer = ies.getWriter();
769
                 IWriter writer = ies.getWriter();
765 770
                 if (writer == null)
766 771
                 {
767 772
                	 NotificationManager.addError("No existe driver de escritura para la tabla" 
......
773 778
    				writer.initialize(tableDef);
774 779
                	 
775 780
                	 ies.stopEdition(writer,EditionEvent.ALPHANUMERIC);
776
                 } */
781
                 } 
777 782

  
778 783

  
779

  
784
                 /*
780 785
                GdbmsWriter gdbmswriter = new GdbmsWriter();
781 786
                gdbmswriter.setDataWare(getModel().getModelo()
782 787
                                                              .getRecordset()
......
789 794
                }
790 795

  
791 796
                gdbmswriter.postProcess();
797
                */
792 798
 
793 799
            }
794 800

  
......
850 856
     * @throws IOException DOCUMENT ME!
851 857
     */
852 858
    public void cancelEditing() throws IOException {
859
    	this.cancelEditingCell();
853 860
        getModel().getModelo().cancelEdition(EditionEvent.ALPHANUMERIC);
854 861
        //refresh();
855 862
        //refreshControls();
......
1522 1529
		frame.getContentPane().add(tf);
1523 1530
		frame.show(true);
1524 1531
	}
1525
}
1532
	
1533
	public void stopEditingCell() {
1534
    	if (table.isEditing()) {
1535
    		// TODO: finalizar la edicion de la columna
1536
    		this.table.getCellEditor().stopCellEditing();
1537
    		this.refresh();
1538
    	}
1539
		
1540
	}
1541
	
1542
	public void cancelEditingCell() {
1543
    	if (table.isEditing()) {
1544
    		// TODO: finalizar la edicion de la columna
1545
    		this.table.getCellEditor().cancelCellEditing();
1546
    		this.refresh();
1547
    	}
1548
		
1549
	}
1550
}

Also available in: Unified diff