[Schmitzm-commits] r207 - in trunk/src: org/geotools/gui/swing schmitzm/geotools/gui skrueger/i8n

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jul 9 22:14:22 CEST 2009


Author: alfonx
Date: 2009-07-09 22:14:21 +0200 (Thu, 09 Jul 2009)
New Revision: 207

Modified:
   trunk/src/org/geotools/gui/swing/JMapPane.java
   trunk/src/schmitzm/geotools/gui/JMapPane.java
   trunk/src/skrueger/i8n/SwitchLanguageDialog.java
Log:
* AS FEATURE: Changing the TextSymbolizer (label settings) in AS is now directly presented in the preview JMapPane(s). Up to now, the LabelCache of the JMapPane didn't clear properly and the changes were only shown after a while.

* CodeCleanup: Removed some unneeded SwingUtil.getParentWindow (because most atlas classes now use a Component object as GUI-parent parameter)


Modified: trunk/src/org/geotools/gui/swing/JMapPane.java
===================================================================
--- trunk/src/org/geotools/gui/swing/JMapPane.java	2009-07-09 16:45:26 UTC (rev 206)
+++ trunk/src/org/geotools/gui/swing/JMapPane.java	2009-07-09 20:14:21 UTC (rev 207)
@@ -344,12 +344,12 @@
 		}
 
 		this.renderer = renderer;
-		this.highlightRenderer = new StreamingRenderer();
-		this.selectionRenderer = new StreamingRenderer();
+//		this.highlightRenderer = new StreamingRenderer();
+//		this.selectionRenderer = new StreamingRenderer();
 
 		hints.put("memoryPreloadingEnabled", Boolean.FALSE);
-		highlightRenderer.setRendererHints(hints);
-		selectionRenderer.setRendererHints(hints);
+//		highlightRenderer.setRendererHints(hints);
+//		selectionRenderer.setRendererHints(hints);
 
 		if (this.context != null) {
 			this.renderer.setContext(this.context);

Modified: trunk/src/schmitzm/geotools/gui/JMapPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/JMapPane.java	2009-07-09 16:45:26 UTC (rev 206)
+++ trunk/src/schmitzm/geotools/gui/JMapPane.java	2009-07-09 20:14:21 UTC (rev 207)
@@ -595,7 +595,7 @@
     }
 
     /**
-     * Aktiviert oder Deaktiviert das AntiAliasing for diese {@link JMapPane}.
+     * Aktiviert oder deaktiviert das AntiAliasing for diese {@link JMapPane}.
      * AntiALiasing ist besonders fuer Textbeschriftung sehr schoen, verbraucht
      * aber auch mehr Performance.
      *

Modified: trunk/src/skrueger/i8n/SwitchLanguageDialog.java
===================================================================
--- trunk/src/skrueger/i8n/SwitchLanguageDialog.java	2009-07-09 16:45:26 UTC (rev 206)
+++ trunk/src/skrueger/i8n/SwitchLanguageDialog.java	2009-07-09 20:14:21 UTC (rev 207)
@@ -62,8 +62,7 @@
 	 */
 	public SwitchLanguageDialog(final Component owner,
 			final List<String> languages) {
-		super(owner instanceof Window ? (Window) owner : SwingUtil
-				.getParentWindow(owner));
+		super(SwingUtil.getParentWindow(owner));
 		this.languages = languages;
 
 		Translation.setActiveLang(languages.get(0));
@@ -86,9 +85,9 @@
 		this.setContentPane(getJContentPane());
 		setModal(true);
 		SwingUtil.centerFrameOnScreenRandom(this);
-		
-		setDefaultCloseOperation( JDialog.DO_NOTHING_ON_CLOSE);
-		
+
+		setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
+
 		pack();
 	}
 
@@ -185,7 +184,8 @@
 			gridBagConstraints.insets = new Insets(0, 5, 0, 0);
 			gridBagConstraints.gridy = 0;
 			jLabel = new JLabel();
-			jLabel.setText("Select language: "); //i8n!?! Maybe replace with an icon of an index finger
+			jLabel.setText("Select language: "); // i8n!?! Maybe replace with an
+													// icon of an index finger
 			jPanel1 = new JPanel();
 			jPanel1.setLayout(new GridBagLayout());
 			jPanel1.add(jLabel, gridBagConstraints);
@@ -240,18 +240,17 @@
 						getJButton().setEnabled(false);
 						return;
 					}
-					
-					String l = languages.get(jComboBox
-							.getSelectedIndex());
+
+					String l = languages.get(jComboBox.getSelectedIndex());
 					try {
 						Translation.setActiveLang(l);
-						
+
 						getJButton().setEnabled(true);
 					} catch (java.lang.IllegalArgumentException ee) {
-						LOGGER.warn("The language "+l+" is not valid",ee);
+						LOGGER.warn("The language " + l + " is not valid", ee);
 						getJButton().setEnabled(false);
 					}
-					
+
 				}
 
 			});



More information about the Schmitzm-commits mailing list