(BufferedReader bs, String datatype, int iVersion)
| 282 | } |
| 283 | |
| 284 | public void loadCurves(BufferedReader bs, String datatype, |
| 285 | int iVersion) { |
| 286 | int j, k; |
| 287 | |
| 288 | try { |
| 289 | String nix = bs.readLine(); |
| 290 | String zeile1; |
| 291 | // boolean first = true; |
| 292 | int numcu = Integer.parseInt(bs.readLine()); |
| 293 | for (k = numcu; k > 0; k--) { |
| 294 | zeile1 = bs.readLine();//) != null) { |
| 295 | // if (first) { |
| 296 | // // lasse erstes element ueberschreiben |
| 297 | // first = false; |
| 298 | // } else { |
| 299 | newCurve(); |
| 300 | // } |
| 301 | if (datatype.equals("specify")) { |
| 302 | String strline; |
| 303 | try { |
| 304 | bs.mark(255); |
| 305 | strline = bs.readLine(); |
| 306 | while ((strline.equals("curveno:")) |
| 307 | || (strline.equals("surfaces:")) |
| 308 | || (strline.equals("color:")) |
| 309 | || (strline.equals("showcbox:"))) { |
| 310 | // System.out.println("strline:"+strline); |
| 311 | if (strline.equals("curveno:")) { |
| 312 | ((Curve) cunList.lastElement()) |
| 313 | .setCurveNo(Integer.parseInt(bs |
| 314 | .readLine())); |
| 315 | } |
| 316 | if (strline.equals("surfaces:")) { |
| 317 | for (j = 0; j <= 9; j++) { |
| 318 | try { |
| 319 | bs.mark(255); |
| 320 | ((Curve) cunList.lastElement()).C[j] |
| 321 | .setSelectedIndex(Integer |
| 322 | .parseInt(bs.readLine())); |
| 323 | } catch (Exception nex) { |
| 324 | bs.reset(); |
| 325 | } |
| 326 | } |
| 327 | } |
| 328 | if (strline.equals("color:")) { |
| 329 | ((Curve) cunList.lastElement()).colorButton_i |
| 330 | .setBackground(new Color( |
| 331 | Integer.parseInt(bs.readLine()), |
| 332 | Integer.parseInt(bs.readLine()), |
| 333 | Integer.parseInt(bs.readLine()))); |
| 334 | } |
| 335 | if (strline.equals("showcbox:")) { |
| 336 | ((Curve) cunList.lastElement()).cbox |
| 337 | .setSelected((Boolean.valueOf(bs |
| 338 | .readLine())).booleanValue()); |
| 339 | } |
| 340 | bs.mark(255); |
| 341 | strline = bs.readLine(); |
no test coverage detected