Revision 22948 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/TableRowsOperations.java

View differences:

TableRowsOperations.java
85 85
    }
86 86

  
87 87
	private void showsSelectedRows(Table table) {
88
    	long[] mapping=null;
89
		try {
90
			FeatureStore fs=table.getModel().getModel();
91
			mapping = new long[fs.getDataCollection().size()];
88
//    	long[] mapping=null;
89
//		try {
90
//			FeatureStore fs=table.getModel().getModel();
91
//			mapping = new long[fs.getDataCollection().size()];
92
//
93
//		FeatureCollection selectedRows=(FeatureCollection)fs.getSelection();
94
//
95
//
96
//		int m=0;
97
//		for (int i = selectedRows.nextSetBit(0); i >= 0;
98
//         	i = selectedRows.nextSetBit(i + 1)) {
99
//			mapping[m]=i;
100
//			m++;
101
//		}
102
//		for (int i = 0; i < mapping.length;
103
//     		i++) {
104
//			if (!selectedRows.get(i)) {
105
//				mapping[m]=i;
106
//				m++;
107
//			}
108
//		}
109
		table.setOrder("SELECTEDUP");
110
//		} catch (ReadException e) {
111
//			e.printStackTrace();
112
//		}
92 113

  
93
		FeatureCollection selectedRows=(FeatureCollection)fs.getSelection();
94

  
95
		int m=0;
96
		for (int i = selectedRows.nextSetBit(0); i >= 0;
97
         	i = selectedRows.nextSetBit(i + 1)) {
98
			mapping[m]=i;
99
			m++;
100
		}
101
		for (int i = 0; i < mapping.length;
102
     		i++) {
103
			if (!selectedRows.get(i)) {
104
				mapping[m]=i;
105
				m++;
106
			}
107
		}
108
		table.setOrder(mapping);
109
		} catch (ReadException e) {
110
			e.printStackTrace();
111
		}
112

  
113 114
	}
114 115
    /**
115 116
     * DOCUMENT ME!

Also available in: Unified diff