Mercurial > dive4elements > river
changeset 1962:59622ba800c8
Cosmetics.
flys-artifacts/trunk@3371 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 08 Dec 2011 13:09:04 +0000 |
parents | 4781096f31f8 |
children | 6c24ffe946a5 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/AnnotationFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionFactory.java flys-artifacts/src/main/java/de/intevation/flys/exports/OutGenerator.java flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java |
diffstat | 5 files changed, 20 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Dec 08 12:01:24 2011 +0000 +++ b/flys-artifacts/ChangeLog Thu Dec 08 13:09:04 2011 +0000 @@ -1,3 +1,11 @@ +2011-12-08 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/CrossSectionFactory.java, + src/main/java/de/intevation/flys/artifacts/model/AnnotationFacet.java, + src/main/java/de/intevation/flys/exports/OutGenerator.java, + src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java: + Cosmetics. + 2011-12-08 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/artifacts/services/CrossSectionKMService.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/AnnotationFacet.java Thu Dec 08 12:01:24 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/AnnotationFacet.java Thu Dec 08 13:09:04 2011 +0000 @@ -79,3 +79,4 @@ return copy; } } +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionFactory.java Thu Dec 08 12:01:24 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionFactory.java Thu Dec 08 13:09:04 2011 +0000 @@ -42,4 +42,3 @@ } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : -
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/OutGenerator.java Thu Dec 08 12:01:24 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/OutGenerator.java Thu Dec 08 13:09:04 2011 +0000 @@ -9,6 +9,7 @@ import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; + /** * An OutGenerator is used to create a collected outputs of a list of Artifacts. *
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java Thu Dec 08 12:01:24 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java Thu Dec 08 13:09:04 2011 +0000 @@ -101,6 +101,7 @@ this.pos = pos; } + /** * Legacy-Constructor. * @deprecated @@ -226,8 +227,8 @@ /** - * Draw the Annotiation if it does not collide with other already drawn - * Annotations. + * Draw the Annotation; the text only if it does not collide with other + * already drawn Annotations- texts. * * @param g2 the graphics device. * @param plot the plot. @@ -271,10 +272,10 @@ float anchorX = 0f; float anchorY = 0.0f; if (this.stickyAxis == SimpleAxis.X_AXIS) { - // Text starts at 1.5% of full distance. + // Text starts at 2% of full distance. float rangeLow = (float) rangeAxis.getRange().getLowerBound(); float y = rangeLow + 0.02f * ((float) - rangeAxis.getRange().getUpperBound() - rangeLow); + rangeAxis.getRange().getUpperBound() - rangeLow); setY(y); anchorX = (float) domainAxis.valueToJava2D( @@ -284,7 +285,7 @@ } else { float rangeLow = (float) domainAxis.getRange().getLowerBound(); float x = rangeLow + 0.02f * ((float) - domainAxis.getRange().getUpperBound() - rangeLow); + domainAxis.getRange().getUpperBound() - rangeLow); setX(x); anchorX = (float) domainAxis.valueToJava2D( getX(), dataArea, domainEdge); @@ -302,11 +303,11 @@ // Always draw the small line at axis. drawAxisMark(g2, dataArea, domainAxis, rangeAxis, domainEdge, - rangeEdge, orientation); + rangeEdge, orientation); Shape hotspot = TextUtilities.calculateRotatedStringBounds( - getText(), g2, anchorX, anchorY, getTextAnchor(), - getRotationAngle(), getRotationAnchor()); + getText(), g2, anchorX, anchorY, getTextAnchor(), + getRotationAngle(), getRotationAnchor()); Rectangle2D hotspotBox = hotspot.getBounds2D(); // Check for collisions with other XYAnnotations. for (Iterator i = chartInfo.getEntityCollection().iterator(); @@ -338,7 +339,7 @@ g2.setPaint(textColor); g2.setFont(font); TextUtilities.drawRotatedString(getText(), g2, anchorX, anchorY, - getTextAnchor(), getRotationAngle(), getRotationAnchor()); + getTextAnchor(), getRotationAngle(), getRotationAnchor()); // Add info that we have drawn this Annotation. addEntity(info, hotspot, rendererIndex, getToolTipText(), getURL());