From 87bf38984616135a8aebb16a1e30a063e692ee0e Mon Sep 17 00:00:00 2001 From: Nicolas Dumoulin <nicolas.dumoulin@irstea.fr> Date: Fri, 10 Dec 2010 08:45:10 +0000 Subject: [PATCH] [maven-release-plugin] copy for tag observation-0.1.2 --- pom.xml | 6 +++--- .../observers/jfreechart/TemporalChart.java | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 6b1d6df..ff81e5d 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ <groupId>fr.cemagref</groupId> <artifactId>observation</artifactId> - <version>0.1.1</version> + <version>0.1.2</version> <dependencies> <dependency> @@ -62,8 +62,8 @@ <packaging>jar</packaging> <scm> - <connection>scm:svn:http://trac.clermont.cemagref.fr/svn/LISC/Observation/tags/observation-0.1.1</connection> - <url>http://trac.clermont.cemagref.fr/projets/LISC/browser/Observation/tags/observation-0.1.1</url> + <connection>scm:svn:http://trac.clermont.cemagref.fr/svn/LISC/Observation/tags/observation-0.1.2</connection> + <url>http://trac.clermont.cemagref.fr/projets/LISC/browser/Observation/tags/observation-0.1.2</url> </scm> <build> <plugins> diff --git a/src/main/java/fr/cemagref/observation/observers/jfreechart/TemporalChart.java b/src/main/java/fr/cemagref/observation/observers/jfreechart/TemporalChart.java index 709447d..a6e510d 100644 --- a/src/main/java/fr/cemagref/observation/observers/jfreechart/TemporalChart.java +++ b/src/main/java/fr/cemagref/observation/observers/jfreechart/TemporalChart.java @@ -29,7 +29,7 @@ public abstract class TemporalChart implements ObserverListener, Configurable, D */ protected transient ObservablesHandler.ObservableFetcher variable; protected transient ObservablesHandler classObservable; - private String title = "", xAxisLabel = "Time", yAxisLabel = ""; + private String titlePrefix="Observation of ", title = "", xAxisLabel = "Time", yAxisLabel = ""; public TemporalChart() { graphTypeUpdated(); @@ -44,10 +44,18 @@ public abstract class TemporalChart implements ObserverListener, Configurable, D protected void variableUpdated() { if (variable != null) { yAxisLabel = variable.getDescription(); - title = "Observation of " + yAxisLabel; + title = titlePrefix + yAxisLabel; } } + /** + * Modify the prefix used for updating the title. By default, it is "Observation of ". + * @param prefix + */ + protected void setTitlePrefix(String prefix) { + this.titlePrefix = prefix; + } + protected void graphTypeUpdated() { PlotOrientation orientation = PlotOrientation.VERTICAL; boolean legend = true; -- GitLab