# HG changeset patch # User Felix Wolfsteller # Date 1338897231 0 # Node ID 9cea02b51241e4abb36ca3110d00287301732b80 # Parent e341606faeb475717e5cbfeda274f85e1b78d73f Added better doc and todo. flys-artifacts/trunk@4580 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r e341606faeb4 -r 9cea02b51241 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Tue Jun 05 09:11:24 2012 +0000 +++ b/flys-artifacts/ChangeLog Tue Jun 05 11:53:51 2012 +0000 @@ -1,3 +1,8 @@ +2012-06-05 Felix Wolfsteller + + * src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java: + Added better doc and TODO. + 2012-06-05 Sascha L. Teichmann * src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java, diff -r e341606faeb4 -r 9cea02b51241 flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java --- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java Tue Jun 05 09:11:24 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java Tue Jun 05 11:53:51 2012 +0000 @@ -66,8 +66,17 @@ } - /** Draw a background-box of a text to render. */ - public static void drawTextBox(Graphics2D g2, String text, float textX, float textY, Color bgColor) { + /** + * Draw a background-box of a text to render. + * @param g2 graphics device to use + * @param text text to draw + * @param textX x-position for text + * @param textY y-position for text + * @param bgColor color to fill box with. + */ + public static void drawTextBox(Graphics2D g2, + String text, float textX, float textY, Color bgColor + ) { Rectangle2D hotspotBox = g2.getFontMetrics().getStringBounds(text, g2); float w = (float) hotspotBox.getWidth(), h = (float) hotspotBox.getHeight(); hotspotBox.setRect(textX, textY-h, w, h); @@ -263,6 +272,7 @@ } // Draw label of line. + // TODO add colision detection if (isShowLineLabel(series) && isMinimumX (dataset, series, item)) { XYSeries xYSeries = ((XYSeriesCollection) dataset).getSeries(series); String waterlevelLabel = (xYSeries instanceof HasLabel)