[Schmitzm-commits] r299 - in trunk/src/schmitzm/jfree/chart: . style

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Aug 12 17:12:17 CEST 2009


Author: mojays
Date: 2009-08-12 17:12:16 +0200 (Wed, 12 Aug 2009)
New Revision: 299

Modified:
   trunk/src/schmitzm/jfree/chart/SelectableChartPanel.java
   trunk/src/schmitzm/jfree/chart/style/ChartStyle.java
Log:
ChartStyle: JavaDoc bug fixed
SelectableChartPanel: ImageIcon creation by SwingUtil method (to avoid NullPointerException when resource is missing)

Modified: trunk/src/schmitzm/jfree/chart/SelectableChartPanel.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/SelectableChartPanel.java	2009-08-11 12:18:00 UTC (rev 298)
+++ trunk/src/schmitzm/jfree/chart/SelectableChartPanel.java	2009-08-12 15:12:16 UTC (rev 299)
@@ -64,6 +64,7 @@
 import schmitzm.jfree.chart.selection.SeriesDatasetSelectionModel;
 import schmitzm.jfree.feature.FeatureSeriesDatasetSelectionModel;
 import schmitzm.lang.LangUtil;
+import schmitzm.swing.SwingUtil;
 
 /**
  * This class extends the {@link org.jfree.chart.ChartPanel} with some new
@@ -80,11 +81,9 @@
 	/** Used for log and debug messages. */
 	private static Logger LOGGER = LangUtil.createLogger(SelectableChartPanel.class);
 	
-	public static final ImageIcon ICON_ZOOM_TO_SELECTED = new ImageIcon(
-			SelectableChartPanel.class
-					.getResource("resource/icons/chartActionZoomToSelected.png"));
+	public static final ImageIcon ICON_ZOOM_TO_SELECTED = SwingUtil.createImageIconFromResourcePath(
+	    JFreeChartUtil.class, "resource/icons/chartActionZoomToSelected.png", null ); 
 
-
 	/**
 	 * Types of window selection on chart panel.
 	 */

Modified: trunk/src/schmitzm/jfree/chart/style/ChartStyle.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/style/ChartStyle.java	2009-08-11 12:18:00 UTC (rev 298)
+++ trunk/src/schmitzm/jfree/chart/style/ChartStyle.java	2009-08-12 15:12:16 UTC (rev 299)
@@ -171,8 +171,9 @@
   /**
    * Returns the style of a chart axis.<br>
    * 0 = domain axis (X)<br>
-   * 1 = first (right) range axis (Y)<br>
-   * 2 = second (left) range axis (Y) if available<br>
+   * 1 = first (left) range axis (Y)<br>
+   * 2 = second (right) range axis (Y) if available
+   * @return {@code null} if axis style is not available
    */
   public ChartAxisStyle getAxisStyle(int axis);
 



More information about the Schmitzm-commits mailing list