Changeset 4435
- Timestamp:
- Mar 8, 2013, 9:43:39 AM (10 years ago)
- Location:
- trunk/client/servlet/src/org/proteios/action/peakList
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/servlet/src/org/proteios/action/peakList/PeakAnnotationUtil.java
r3442 r4435 56 56 private static final org.apache.log4j.Logger log = org.apache.log4j.LogManager 57 57 .getLogger("org.proteios.io"); 58 59 60 private int spectrumOffsetLeft = -2; 61 private int spectrumOffsetRight = -2; 62 private Double spectrumLimitMassMin = null; 63 private Double spectrumLimitMassMax = null; 64 65 66 public int getSpectrumOffsetLeft() 67 { 68 return this.spectrumOffsetLeft; 69 } 70 71 72 private void setSpectrumOffsetLeft(int xSpectrumOffsetLeft) 73 { 74 this.spectrumOffsetLeft = xSpectrumOffsetLeft; 75 } 76 77 78 public int getSpectrumOffsetRight() 79 { 80 return this.spectrumOffsetRight; 81 } 82 83 84 private void setSpectrumOffsetRight(int spectrumOffsetRight) 85 { 86 this.spectrumOffsetRight = spectrumOffsetRight; 87 } 88 89 90 public Double getSpectrumLimitMassMin() 91 { 92 return this.spectrumLimitMassMin; 93 } 94 95 96 private void setSpectrumLimitMassMin(Double spectrumLimitMassMin) 97 { 98 this.spectrumLimitMassMin = spectrumLimitMassMin; 99 } 100 101 102 public Double getSpectrumLimitMassMax() 103 { 104 return this.spectrumLimitMassMax; 105 } 106 107 108 private void setSpectrumLimitMassMax(Double spectrumLimitMassMax) 109 { 110 this.spectrumLimitMassMax = spectrumLimitMassMax; 111 } 58 112 59 113 … … 514 568 log.debug("imageWidth = " + imageWidth + " imageHeight = " + imageHeight); 515 569 log.debug("spectrumAreaWidth = " + spectrumAreaWidth + " spectrumAreaHeight = " + spectrumAreaHeight); 570 // Set spectrum offset left and right pixel values 571 setSpectrumOffsetLeft(xSpectrumOffsetLeft); 572 setSpectrumOffsetRight(xSpectrumOffsetRight); 573 // Set spectrum limit mass min and max values 574 setSpectrumLimitMassMin(massMin); 575 setSpectrumLimitMassMax(massMax); 516 576 // 517 577 // Create mass value annotation tool-tips for all peaks -
trunk/client/servlet/src/org/proteios/action/peakList/PlotFileSpectrum.java
r4003 r4435 35 35 import org.jfree.chart.ChartFactory; 36 36 import org.jfree.chart.JFreeChart; 37 import org.jfree.chart.plot.Plot; 37 38 import org.jfree.chart.plot.PlotOrientation; 38 39 import org.jfree.data.xy.CategoryTableXYDataset; … … 61 62 extends ProteiosAction<PlotFileSpectrum> 62 63 { 63 public static final Integer WIDTH = 400; 64 public static final Integer HEIGHT = 300; 65 public static final VString VSPECTRUMID = MassRangeForm.VSPECTRUMID; 66 public static final VString VMASSCUTOFFLOWSTR = MassRangeForm.VMASSCUTOFFLOWSTR; 67 public static final VString VMASSCUTOFFHIGHSTR = MassRangeForm.VMASSCUTOFFHIGHSTR; 68 69 @Override 64 public static final Integer WIDTH = 400; 65 public static final Integer HEIGHT = 300; 66 public static final VString VSPECTRUMID = MassRangeForm.VSPECTRUMID; 67 public static final VString VMASSCUTOFFLOWSTR = MassRangeForm.VMASSCUTOFFLOWSTR; 68 public static final VString VMASSCUTOFFHIGHSTR = MassRangeForm.VMASSCUTOFFHIGHSTR; 69 private int spectrumOffsetLeft = -1; 70 private int spectrumOffsetRight = -1; 71 private Double spectrumLimitMassMin = null; 72 private Double spectrumLimitMassMax = null; 73 74 75 public int getSpectrumOffsetLeft() 76 { 77 return this.spectrumOffsetLeft; 78 } 79 80 81 private void setSpectrumOffsetLeft(int xSpectrumOffsetLeft) 82 { 83 this.spectrumOffsetLeft = xSpectrumOffsetLeft; 84 } 85 86 87 public int getSpectrumOffsetRight() 88 { 89 return this.spectrumOffsetRight; 90 } 91 92 93 private void setSpectrumOffsetRight(int spectrumOffsetRight) 94 { 95 this.spectrumOffsetRight = spectrumOffsetRight; 96 } 97 98 99 public Double getSpectrumLimitMassMin() 100 { 101 return this.spectrumLimitMassMin; 102 } 103 104 105 private void setSpectrumLimitMassMin(Double spectrumLimitMassMin) 106 { 107 this.spectrumLimitMassMin = spectrumLimitMassMin; 108 } 109 110 111 public Double getSpectrumLimitMassMax() 112 { 113 return this.spectrumLimitMassMax; 114 } 115 116 117 private void setSpectrumLimitMassMax(Double spectrumLimitMassMax) 118 { 119 this.spectrumLimitMassMax = spectrumLimitMassMax; 120 } 121 122 123 @Override 70 124 protected void runMe() 71 125 throws ActionException, InvalidParameterValue … … 136 190 log.debug("Exception when parsing string \"" + massCutoffHighStr + "\" to Float: " + e); 137 191 } 192 } 193 // Switch mass cutoff low and high values if low > high 194 if (massCutoffLow != null && massCutoffHigh != null && massCutoffLow > massCutoffHigh) 195 { 196 // Switch values 197 Float massCutoffLowTmp = massCutoffLow; 198 massCutoffLow = massCutoffHigh; 199 massCutoffHigh = massCutoffLowTmp; 138 200 } 139 201 log.debug("fileId = " + peakListFileId); … … 325 387 } 326 388 } 389 // Switch mass cutoff low and high values if low > high 390 if (massCutoffLow != null && massCutoffHigh != null && massCutoffLow > massCutoffHigh) 391 { 392 // Switch values 393 Float massCutoffLowTmp = massCutoffLow; 394 massCutoffLow = massCutoffHigh; 395 massCutoffHigh = massCutoffLowTmp; 396 } 327 397 log.debug("spectrumFileId = " + spectrumFileId); 328 398 log.debug("spectrumId = \"" + spectrumId + "\""); … … 335 405 PeakAnnotationUtil peakAnnotationUtil = new PeakAnnotationUtil(); 336 406 ImageMap imageMap = peakAnnotationUtil.fetchMassPeakAnnotationToolTips(spectrum, WIDTH, HEIGHT); 407 // Set spectrum offset left and right pixel values 408 setSpectrumOffsetLeft(peakAnnotationUtil.getSpectrumOffsetLeft()); 409 setSpectrumOffsetRight(peakAnnotationUtil.getSpectrumOffsetRight()); 410 // Set spectrum limit mass min and max values 411 setSpectrumLimitMassMin(peakAnnotationUtil.getSpectrumLimitMassMin()); 412 setSpectrumLimitMassMax(peakAnnotationUtil.getSpectrumLimitMassMax()); 337 413 return imageMap; 338 414 } … … 361 437 PeakAnnotationUtil peakAnnotationUtil = new PeakAnnotationUtil(); 362 438 ImageMap imageMap = peakAnnotationUtil.fetchMassPeakAnnotationToolTips(spectrum, WIDTH, HEIGHT); 439 // Set spectrum offset left and right pixel values 440 setSpectrumOffsetLeft(peakAnnotationUtil.getSpectrumOffsetLeft()); 441 setSpectrumOffsetRight(peakAnnotationUtil.getSpectrumOffsetRight()); 442 // Set spectrum limit mass min and max values 443 setSpectrumLimitMassMin(peakAnnotationUtil.getSpectrumLimitMassMin()); 444 setSpectrumLimitMassMax(peakAnnotationUtil.getSpectrumLimitMassMax()); 363 445 return imageMap; 364 446 } … … 385 467 PeakAnnotationUtil peakAnnotationUtil = new PeakAnnotationUtil(); 386 468 ImageMap imageMap = peakAnnotationUtil.fetchMassPeakAnnotationToolTips(spectrum, imageWidth, imageHeight); 469 // Set spectrum offset left and right pixel values 470 setSpectrumOffsetLeft(peakAnnotationUtil.getSpectrumOffsetLeft()); 471 setSpectrumOffsetRight(peakAnnotationUtil.getSpectrumOffsetRight()); 472 // Set spectrum limit mass min and max values 473 setSpectrumLimitMassMin(peakAnnotationUtil.getSpectrumLimitMassMin()); 474 setSpectrumLimitMassMax(peakAnnotationUtil.getSpectrumLimitMassMax()); 387 475 return imageMap; 388 476 } -
trunk/client/servlet/src/org/proteios/action/peakList/PlotSpectrum.java
r3446 r4435 31 31 import org.jfree.chart.ChartFactory; 32 32 import org.jfree.chart.JFreeChart; 33 import org.jfree.chart.plot.Plot; 33 34 import org.jfree.chart.plot.PlotOrientation; 34 35 import org.jfree.data.xy.CategoryTableXYDataset; … … 64 65 public static final VString VMASSCUTOFFLOWSTR = new VString("massCutoffLowStr", 0, 255, false); 65 66 public static final VString VMASSCUTOFFHIGHSTR = new VString("massCutoffHighStr", 0, 255, false); 67 private int spectrumOffsetLeft = -1; 68 private int spectrumOffsetRight = -1; 69 private Double spectrumLimitMassMin = null; 70 private Double spectrumLimitMassMax = null; 71 72 73 public int getSpectrumOffsetLeft() 74 { 75 return this.spectrumOffsetLeft; 76 } 77 78 79 private void setSpectrumOffsetLeft(int xSpectrumOffsetLeft) 80 { 81 this.spectrumOffsetLeft = xSpectrumOffsetLeft; 82 } 83 84 85 public int getSpectrumOffsetRight() 86 { 87 return this.spectrumOffsetRight; 88 } 89 90 91 private void setSpectrumOffsetRight(int spectrumOffsetRight) 92 { 93 this.spectrumOffsetRight = spectrumOffsetRight; 94 } 95 96 97 public Double getSpectrumLimitMassMin() 98 { 99 return this.spectrumLimitMassMin; 100 } 101 102 103 private void setSpectrumLimitMassMin(Double spectrumLimitMassMin) 104 { 105 this.spectrumLimitMassMin = spectrumLimitMassMin; 106 } 107 108 109 public Double getSpectrumLimitMassMax() 110 { 111 return this.spectrumLimitMassMax; 112 } 113 114 115 private void setSpectrumLimitMassMax(Double spectrumLimitMassMax) 116 { 117 this.spectrumLimitMassMax = spectrumLimitMassMax; 118 } 66 119 67 120 … … 121 174 log.debug("Exception when parsing string \"" + massCutoffHighStr + "\" to Float: " + e); 122 175 } 176 } 177 // Switch mass cutoff low and high values if low > high 178 if (massCutoffLow != null && massCutoffHigh != null && massCutoffLow > massCutoffHigh) 179 { 180 // Switch values 181 Float massCutoffLowTmp = massCutoffLow; 182 massCutoffLow = massCutoffHigh; 183 massCutoffHigh = massCutoffLowTmp; 123 184 } 124 185 log.debug("peakListId = " + peakListId); … … 288 349 } 289 350 } 351 // Switch mass cutoff low and high values if low > high 352 if (massCutoffLow != null && massCutoffHigh != null && massCutoffLow > massCutoffHigh) 353 { 354 // Switch values 355 Float massCutoffLowTmp = massCutoffLow; 356 massCutoffLow = massCutoffHigh; 357 massCutoffHigh = massCutoffLowTmp; 358 } 290 359 log.debug("peakListId = " + peakListId); 291 360 log.debug("massCutoffLowStr = \"" + massCutoffLowStr + "\""); … … 297 366 PeakAnnotationUtil peakAnnotationUtil = new PeakAnnotationUtil(); 298 367 ImageMap imageMap = peakAnnotationUtil.fetchMassPeakAnnotationToolTips(spectrum, WIDTH, HEIGHT); 368 // Set spectrum offset left and right pixel values 369 setSpectrumOffsetLeft(peakAnnotationUtil.getSpectrumOffsetLeft()); 370 setSpectrumOffsetRight(peakAnnotationUtil.getSpectrumOffsetRight()); 371 // Set spectrum limit mass min and max values 372 setSpectrumLimitMassMin(peakAnnotationUtil.getSpectrumLimitMassMin()); 373 setSpectrumLimitMassMax(peakAnnotationUtil.getSpectrumLimitMassMax()); 299 374 return imageMap; 300 375 } … … 322 397 PeakAnnotationUtil peakAnnotationUtil = new PeakAnnotationUtil(); 323 398 ImageMap imageMap = peakAnnotationUtil.fetchMassPeakAnnotationToolTips(spectrum, WIDTH, HEIGHT); 399 // Set spectrum offset left and right pixel values 400 setSpectrumOffsetLeft(peakAnnotationUtil.getSpectrumOffsetLeft()); 401 setSpectrumOffsetRight(peakAnnotationUtil.getSpectrumOffsetRight()); 402 // Set spectrum limit mass min and max values 403 setSpectrumLimitMassMin(peakAnnotationUtil.getSpectrumLimitMassMin()); 404 setSpectrumLimitMassMax(peakAnnotationUtil.getSpectrumLimitMassMax()); 324 405 return imageMap; 325 406 } … … 346 427 PeakAnnotationUtil peakAnnotationUtil = new PeakAnnotationUtil(); 347 428 ImageMap imageMap = peakAnnotationUtil.fetchMassPeakAnnotationToolTips(spectrum, imageWidth, imageHeight); 429 // Set spectrum offset left and right pixel values 430 setSpectrumOffsetLeft(peakAnnotationUtil.getSpectrumOffsetLeft()); 431 setSpectrumOffsetRight(peakAnnotationUtil.getSpectrumOffsetRight()); 432 // Set spectrum limit mass min and max values 433 setSpectrumLimitMassMin(peakAnnotationUtil.getSpectrumLimitMassMin()); 434 setSpectrumLimitMassMax(peakAnnotationUtil.getSpectrumLimitMassMax()); 348 435 return imageMap; 349 436 }
Note: See TracChangeset
for help on using the changeset viewer.