Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java @ 3076:5642a83420f2
FLYS artifacts: Removed trailing whitespace.
flys-artifacts/trunk@4670 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 15 Jun 2012 09:30:07 +0000 |
parents | 60925be3c84f |
children | ed07dd55f487 |
comparison
equal
deleted
inserted
replaced
3075:db9e2bb34707 | 3076:5642a83420f2 |
---|---|
126 return ""; | 126 return ""; |
127 } | 127 } |
128 | 128 |
129 @Override | 129 @Override |
130 public int getColumnCount() { | 130 public int getColumnCount() { |
131 return 5; | 131 return 5; |
132 } | 132 } |
133 | 133 |
134 @Override | 134 @Override |
135 public int getRowCount() { | 135 public int getRowCount() { |
136 return crossSections != null ? crossSections.size() : 0; | 136 return crossSections != null ? crossSections.size() : 0; |
150 } | 150 } |
151 | 151 |
152 @Override | 152 @Override |
153 public void setValueAt(Object value, int row, int col) { | 153 public void setValueAt(Object value, int row, int col) { |
154 switch (col) { | 154 switch (col) { |
155 case 1: | 155 case 1: |
156 if (change(drawCrossSection, row, (Boolean)value)) { | 156 if (change(drawCrossSection, row, (Boolean)value)) { |
157 fireTableCellUpdated(row, col); | 157 fireTableCellUpdated(row, col); |
158 } | 158 } |
159 break; | 159 break; |
160 case 2: | 160 case 2: |
179 public Class<?> getColumnClass(int columnIndex) { | 179 public Class<?> getColumnClass(int columnIndex) { |
180 switch (columnIndex) { | 180 switch (columnIndex) { |
181 case 0: return String.class; | 181 case 0: return String.class; |
182 case 1: | 182 case 1: |
183 case 2: | 183 case 2: |
184 case 3: | 184 case 3: |
185 case 4: return Boolean.class; | 185 case 4: return Boolean.class; |
186 } | 186 } |
187 return null; | 187 return null; |
188 } | 188 } |
189 | 189 |
196 } | 196 } |
197 } // class CrossSectionTableModel | 197 } // class CrossSectionTableModel |
198 | 198 |
199 private static boolean change( | 199 private static boolean change( |
200 boolean [] values, | 200 boolean [] values, |
201 int index, | 201 int index, |
202 boolean value | 202 boolean value |
203 ) { | 203 ) { |
204 if (values[index] != value) { | 204 if (values[index] != value) { |
205 values[index] = value; | 205 values[index] = value; |
206 return true; | 206 return true; |
212 | 212 |
213 Double km; | 213 Double km; |
214 List<Pair<CrossSection, CrossSectionLine>> lines; | 214 List<Pair<CrossSection, CrossSectionLine>> lines; |
215 | 215 |
216 public CrossSectionLineItem( | 216 public CrossSectionLineItem( |
217 Double km, | 217 Double km, |
218 List<Pair<CrossSection, CrossSectionLine>> lines | 218 List<Pair<CrossSection, CrossSectionLine>> lines |
219 ) { | 219 ) { |
220 this.km = km; | 220 this.km = km; |
221 this.lines = lines; | 221 this.lines = lines; |
222 } | 222 } |