Revision 5086 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/Table.java

View differences:

Table.java
692 692
		}
693 693
    }
694 694
    private void initEditField(int x,int y){
695
    	if (isEditing()){
695 696
    	table.editCellAt(y,x);
696 697
        JTextField tf=(JTextField)table.getEditorComponent();
697 698
        if (tf!=null){
......
699 700
        }
700 701
        getTable().setRowSelectionInterval(y,y);
701 702
        getTable().setColumnSelectionInterval(x,x);
703
    	}
702 704
    }
703 705
    /**
704 706
     * DOCUMENT ME!
......
861 863
     * DOCUMENT ME!
862 864
     */
863 865
    public void refresh() {
866
    	int row=table.getSelectedRow();
867
    	int column=table.getSelectedColumn();
868
    	if (row!=-1 && column!=-1 && table.getEditorComponent()!=null){
869
    		Value[] values=getValueRow(row);
870
    		JTextField jtf=(JTextField)table.getEditorComponent();
871
    		jtf.setText(values[column].toString());
872
    	}
864 873
        updating = true;
865 874
        ((DataSourceDataModel) getTable().getModel()).fireTableDataChanged();
866 875

  
867 876
        updating = false;
868 877
        updateSelection();
878

  
879

  
869 880
    }
870 881

  
871 882
    /**

Also available in: Unified diff