[Schmitzm-commits] r268 - in trunk/src: schmitzm/jfree/chart skrueger/i8n

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Aug 1 17:15:01 CEST 2009


Author: alfonx
Date: 2009-08-01 17:15:00 +0200 (Sat, 01 Aug 2009)
New Revision: 268

Modified:
   trunk/src/schmitzm/jfree/chart/SelectableChartPanel.java
   trunk/src/skrueger/i8n/Translation.java
Log:
* Hackingsession: First release of DesignAtlasChartJDialog 

Modified: trunk/src/schmitzm/jfree/chart/SelectableChartPanel.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/SelectableChartPanel.java	2009-08-01 12:23:04 UTC (rev 267)
+++ trunk/src/schmitzm/jfree/chart/SelectableChartPanel.java	2009-08-01 15:15:00 UTC (rev 268)
@@ -72,7 +72,7 @@
 		 * Zoom on window selection (normal behavior of
 		 * {@link org.jfree.chart.ChartPanel})
 		 */
-		ZOOM_IN,
+		ZOOM_IN_CHART,
 		/**
 		 * Swap the "selection-state" of data objects in the chart on window
 		 * selection.
@@ -91,9 +91,9 @@
 
 	/**
 	 * Holds the behavior on window selection (Default:
-	 * {@link WindowSelectionMode#ZOOM_IN}).
+	 * {@link WindowSelectionMode#ZOOM_IN_CHART}).
 	 */
-	protected WindowSelectionMode windowSelectionMode = WindowSelectionMode.ZOOM_IN;
+	protected WindowSelectionMode windowSelectionMode = WindowSelectionMode.ZOOM_IN_CHART;
 
 	/** Listens to mouse window selection on the chart. */
 	protected ChartMouseSelectionTracker selectionTracker = null;
@@ -243,7 +243,7 @@
 
 		};
 		addMouseListener(selectionTracker);
-		setWindowSelectionMode(WindowSelectionMode.ZOOM_IN);
+		setWindowSelectionMode(WindowSelectionMode.ZOOM_IN_CHART);
 
 		// XYPlot p = (XYPlot)getChart().getPlot();
 		// XYLineAndShapeRenderer r = (XYLineAndShapeRenderer)p.getRenderer();
@@ -320,12 +320,12 @@
 	 */
 	protected void updateStatesForWindowSelectionMode() {
 		// enable/disable the zoom functionality
-		setMouseZoomable(windowSelectionMode == WindowSelectionMode.ZOOM_IN,
+		setMouseZoomable(windowSelectionMode == WindowSelectionMode.ZOOM_IN_CHART,
 				getFillZoomRectangle());
 		// enable/disable the selection functionality
 		if (selectionTracker != null)
 			selectionTracker
-					.setEnabled(windowSelectionMode != WindowSelectionMode.ZOOM_IN);
+					.setEnabled(windowSelectionMode != WindowSelectionMode.ZOOM_IN_CHART);
 	}
 
 	/**
@@ -352,24 +352,24 @@
 
 	/**
 	 * Ignores the event if the window selection mode is not
-	 * {@link WindowSelectionMode#ZOOM_IN}, to avoid conflicts between the two
+	 * {@link WindowSelectionMode#ZOOM_IN_CHART}, to avoid conflicts between the two
 	 * listeners.
 	 */
 	@Override
 	public void mouseDragged(MouseEvent e) {
-		if (getWindowSelectionMode() != WindowSelectionMode.ZOOM_IN)
+		if (getWindowSelectionMode() != WindowSelectionMode.ZOOM_IN_CHART)
 			return;
 		super.mouseDragged(e);
 	}
 
 	/**
 	 * Ignores the event if the window selection mode is not
-	 * {@link WindowSelectionMode#ZOOM_IN}, to avoid conflicts between the two
+	 * {@link WindowSelectionMode#ZOOM_IN_CHART}, to avoid conflicts between the two
 	 * listeners.
 	 */
 	@Override
 	public void mouseMoved(MouseEvent e) {
-		if (getWindowSelectionMode() != WindowSelectionMode.ZOOM_IN)
+		if (getWindowSelectionMode() != WindowSelectionMode.ZOOM_IN_CHART)
 			return;
 		super.mouseMoved(e);
 	}

Modified: trunk/src/skrueger/i8n/Translation.java
===================================================================
--- trunk/src/skrueger/i8n/Translation.java	2009-08-01 12:23:04 UTC (rev 267)
+++ trunk/src/skrueger/i8n/Translation.java	2009-08-01 15:15:00 UTC (rev 268)
@@ -53,7 +53,7 @@
 	public static final String NO_TRANSLATION = "NO TRANSLATION";
 	public static final String DEFAULT_KEY = "default";
 	static final Logger log = Logger.getLogger(Translation.class);
-	static String activeLang = "fr";
+	static String activeLang = Locale.getDefault().getLanguage();
 
 	static protected List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
 



More information about the Schmitzm-commits mailing list