comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 4282:8b4988815974

Added marker for Ws and Qs in Historical Discharge WQ charts. Therefore, the XYChartGenerator got two new methods addDomainMarker(Marker, boolean) and addValueMarker(Marker, boolean). The boolean parameters determine, if the marker should be visible or not. This is analogous to addAxisSeries(XYSeries, int, boolean).
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 29 Oct 2012 05:59:27 +0100
parents 3aec5a42696a
children e8a4d2fd25cc
comparison
equal deleted inserted replaced
4281:7b6c31390427 4282:8b4988815974
501 501
502 /** 502 /**
503 * Add the given vertical marker to the chart. 503 * Add the given vertical marker to the chart.
504 */ 504 */
505 public void addDomainMarker(Marker marker) { 505 public void addDomainMarker(Marker marker) {
506 if (marker == null) { 506 addDomainMarker(marker, true);
507 return; 507 }
508 } 508
509 509
510 domainMarkers.add(marker); 510 /**
511 * Add the given vertical marker to the chart.<b>Note:</b> the marker is
512 * added to the chart only if it is not null and if <i>visible</i> is true.
513 * @param marker The marker that should be added to the chart.
514 * @param visible The visibility of the marker.
515 */
516 public void addDomainMarker(Marker marker, boolean visible) {
517 if (visible && marker != null) {
518 domainMarkers.add(marker);
519 }
511 } 520 }
512 521
513 522
514 /** 523 /**
515 * Add the given vertical marker to the chart. 524 * Add the given vertical marker to the chart.
516 */ 525 */
517 public void addValueMarker(Marker marker) { 526 public void addValueMarker(Marker marker) {
518 if (marker == null) { 527 addValueMarker(marker, true);
519 return; 528 }
520 } 529
521 530
522 valueMarkers.add(marker); 531 /**
532 * Add the given horizontal marker to the chart.<b>Note:</b> the marker is
533 * added to the chart only if it is not null and if <i>visible</i> is true.
534 * @param marker The marker that should be added to the chart.
535 * @param visible The visibility of the marker.
536 */
537 public void addValueMarker(Marker marker, boolean visible) {
538 if (visible && marker != null) {
539 valueMarkers.add(marker);
540 }
523 } 541 }
524 542
525 543
526 protected void addMarkers(XYPlot plot) { 544 protected void addMarkers(XYPlot plot) {
527 for(Marker marker : domainMarkers) { 545 for(Marker marker : domainMarkers) {

http://dive4elements.wald.intevation.org