Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 4433:5b8919ef601d
Backed out changeset e8a4d2fd25cc
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 07 Nov 2012 12:23:41 +0100 |
parents | e8a4d2fd25cc |
children | 0eca080fc162 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Nov 07 09:47:44 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Nov 07 12:23:41 2012 +0100 @@ -254,8 +254,6 @@ * axis could be inverted. */ protected double getLeftX() { - // TODO if the range null... - //return (Double)getDomainAxisRange().getLowerBound(); return (Double)getXBounds(0).getLower(); } @@ -266,27 +264,12 @@ * axis could be inverted. */ protected double getRightX() { - return (Double)getXBounds(0).getLower(); - //return (Double)getDomainAxisRange().getUpperBound(); + return (Double)getXBounds(0).getUpper(); } - protected double getBottomY() { - Range zoomedRange = getValueAxisRange(); - return (zoomedRange != null) - ? zoomedRange.getLowerBound() - : (Double)getYBounds(0).getLower(); - } - - protected double getTopY() { - Range zoomedRange = getValueAxisRange(); - return (zoomedRange != null) - ? zoomedRange.getUpperBound() - : (Double)getYBounds(0).getUpper(); - } /** Add a logo as background annotation to plot. */ protected void addLogo(XYPlot plot) { - // TODO getValue/DomainAxisRange, so that the current zoom level is respected String logo = showLogo(); if (logo == null) { logger.debug("No logo to show chosen"); @@ -316,6 +299,7 @@ } imageIcon = new ImageIcon(imageURL); + double xPos = 0d, yPos = 0d; String placeh = logoHPlace(); @@ -325,13 +309,13 @@ placev = "top"; } if (placev.equals("top")) { - yPos = getTopY(); + yPos = (Double)getYBounds(0).getUpper(); } else if (placev.equals("bottom")) { - yPos = getBottomY(); + yPos = (Double)getYBounds(0).getLower(); } else if (placev.equals("center")) { - yPos = (getTopY() + getBottomY())/2d; + yPos = ((Double)getYBounds(0).getUpper() + (Double)getYBounds(0).getLower())/2d; } else { logger.debug("Unknown place-v value: " + placev); @@ -347,9 +331,7 @@ xPos = getRightX(); } else if (placeh.equals("center")) { - // TODO: Hier noch xPos = ((Double)getXBounds(0).getUpper() + (Double)getXBounds(0).getLower())/2d; - // ->->-> (getDomainAxisRange().getUpperBound() + getDomainAxisRange().getLowerBound())/2d; } else { logger.debug("Unknown place-h value: " + placeh); @@ -703,7 +685,6 @@ } - /** Return range of domain axis. */ protected Range getDomainAxisRange() { String[] ranges = getDomainAxisRangeFromRequest(); @@ -743,9 +724,7 @@ String[] ranges = getValueAxisRangeFromRequest(); if (ranges == null || ranges.length < 2) { - logger.warn("No range (or not enogh) specified."); - if (ranges == null) logger.warn("ranges is null here"); - else logger.warn("ranges has just one element."); + logger.debug("No range specified. Lower and upper Y == 0"); return null; } @@ -768,7 +747,6 @@ } } - logger.warn("One of the range elements is zero length text."); return null; } @@ -1056,5 +1034,6 @@ return hash; } + } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :