Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/pom.xml	(revision 40911)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.labeling.app.mainplugin</artifactId>
+  <packaging>jar</packaging>
+  <name>Labeling: advanced options</name>
+  <description>
+  This plugin provides extended labeling options for vector layers, such as labeling selected features only,
+  label position with regard to the geometry, etc.
+  </description>
+
+  <parent>
+    <groupId>org.gvsig</groupId>
+    <artifactId>org.gvsig.labeling.app</artifactId>
+    <version>2.0.21-SNAPSHOT</version>
+  </parent>
+
+  <dependencies>
+
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.app.mainplugin</artifactId>
+          <scope>compile</scope>
+      </dependency>
+  
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.symbology.swing.api</artifactId>
+          <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.andami</artifactId>
+          <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+          <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.fmap.dal.api</artifactId>
+          <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.fmap.dal.file.shp</artifactId>
+          <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.i18n</artifactId>
+          <scope>compile</scope>
+      </dependency>
+      
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.ui</artifactId>
+          <scope>compile</scope>
+      </dependency>
+      
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+          <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.fmap.control</artifactId>
+          <scope>compile</scope>
+      </dependency>
+      
+      <dependency>
+         <groupId>org.slf4j</groupId>
+         <artifactId>slf4j-api</artifactId>
+         <scope>provided</scope>
+      </dependency>
+    
+	  <dependency>
+          <groupId>org.gvsig</groupId>
+		  <artifactId>org.gvsig.tools.evaluator.sqljep</artifactId>
+          <scope>compile</scope>
+	  </dependency>
+	  
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+      
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.projection.api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+    <!-- Runtime dependencies -->
+
+
+  </dependencies>
+
+  <properties>
+      <gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2</gvsig.package.info.dependencies>
+      <gvsig.package.info.categories>Vector,Labeling</gvsig.package.info.categories>
+	  <gvsig.package.info.official>true</gvsig.package.info.official>
+	  <gvsig.package.info.poolURL>http://devel.gvsig.org/download/projects/gvsig-labeling/pool</gvsig.package.info.poolURL>
+  </properties>  
+</project>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/buildNumber.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/buildNumber.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/buildNumber.properties	(revision 40911)
@@ -0,0 +1,2 @@
+#Tue Aug 13 14:00:42 CEST 2013
+buildNumber=1
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/test/resources/README.txt
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/test/resources/README.txt	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/test/resources/README.txt	(revision 40911)
@@ -0,0 +1,8 @@
+Put into this folder the resources needed by your test classes.
+
+This folder is added to the Tests classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, in this folder you can find an example of log4j configuration,
+prepared to log messages through the console, so logging works when you
+run your tests classes.
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/test/resources/log4j.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/test/resources/log4j.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/test/resources/log4j.xml	(revision 40911)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+
+    gvSIG. Desktop Geographic Information System.
+
+    Copyright (C) 2007-2013 gvSIG Association.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA  02110-1301, USA.
+
+    For any additional information, do not hesitate to contact us
+    at info AT gvsig.com, or visit our website www.gvsig.com.
+
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- 
+Log4J configuration file for unit tests execution.
+ -->
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+	<!-- Appender configuration to show logging messages through the console -->
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
+		</layout>
+	</appender>
+
+	<!-- 
+	Activate logging messages of DEBUG level of higher only for the
+	org.gvsig.tools packages.
+	You can put full classes names or packages instead, to configure
+	logging for all the classes and subpackages of the package.
+	-->
+	<category name="org.gvsig.tools">
+		<priority value="DEBUG" />
+	</category>
+	<category name="org.gvsig.exportto">
+		<priority value="DEBUG" />
+	</category>
+
+	<!-- 
+	By default, show only logging messages of INFO level or higher, 
+	through the previously configured CONSOLE appender. 
+	-->
+	<root>
+		<priority value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml	(revision 40911)
@@ -0,0 +1,64 @@
+<!--
+
+    gvSIG. Desktop Geographic Information System.
+
+    Copyright (C) 2007-2013 gvSIG Association.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA  02110-1301, USA.
+
+    For any additional information, do not hesitate to contact us
+    at info AT gvsig.com, or visit our website www.gvsig.com.
+
+-->
+<assembly>
+  <id>gvsig-plugin-package</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <baseDirectory>${project.artifactId}</baseDirectory>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <files>
+    <file>
+      <source>target/${project.artifactId}-${project.version}.jar</source>
+      <outputDirectory>lib</outputDirectory>
+    </file>
+    <file>
+      <source>target/package.info</source>
+    </file>
+  </files>
+
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources-plugin</directory>
+      <outputDirectory>.</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+<!-- 
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <useTransitiveDependencies>false</useTransitiveDependencies>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+      </includes>
+    </dependencySet>
+  </dependencySets>
+  
+-->
+
+</assembly>
+
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/ExtendedLabelingExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/ExtendedLabelingExtension.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/ExtendedLabelingExtension.java	(revision 40911)
@@ -0,0 +1,131 @@
+package org.gvsig.labeling;
+
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.gui.styling.StyleEditor;
+import org.gvsig.app.project.documents.view.legend.gui.LabelingManager;
+import org.gvsig.fmap.IconThemeHelper;
+import org.gvsig.labeling.gui.layerproperties.DefaultLabeling;
+import org.gvsig.labeling.gui.layerproperties.FeatureDependent;
+import org.gvsig.labeling.gui.layerproperties.GeneralLabeling;
+import org.gvsig.labeling.gui.layerproperties.OnSelection;
+import org.gvsig.labeling.gui.styling.editortools.LabelStyleNewTextFieldTool;
+import org.gvsig.labeling.gui.styling.editortools.LabelStyleOpenBackgroundFile;
+import org.gvsig.labeling.gui.styling.editortools.LabelStylePanTool;
+import org.gvsig.labeling.gui.styling.editortools.LabelStyleRemoveLastTextField;
+import org.gvsig.labeling.gui.styling.editortools.PointLabelForbiddenPrecedenceTool;
+import org.gvsig.labeling.gui.styling.editortools.PointLabelHighPrecedenceTool;
+import org.gvsig.labeling.gui.styling.editortools.PointLabelLowPrecedenceTool;
+import org.gvsig.labeling.gui.styling.editortools.PointLabelNormalPrecedenceTool;
+import org.gvsig.labeling.label.FeatureDependentLabeled;
+import org.gvsig.labeling.label.GeneralLabelingStrategy;
+import org.gvsig.labeling.label.OnSelectionLabeled;
+import org.gvsig.labeling.placements.AbstractPlacementConstraints;
+import org.gvsig.labeling.placements.LinePlacementAtBest;
+import org.gvsig.labeling.placements.LinePlacementAtExtremities;
+import org.gvsig.labeling.placements.LinePlacementConstraints;
+import org.gvsig.labeling.placements.LinePlacementInTheMiddle;
+import org.gvsig.labeling.placements.MarkerPlacementAroundPoint;
+import org.gvsig.labeling.placements.MarkerPlacementOnPoint;
+import org.gvsig.labeling.placements.MultiShapePlacementConstraints;
+import org.gvsig.labeling.placements.PlacementManager;
+import org.gvsig.labeling.placements.PointLabelPositioner;
+import org.gvsig.labeling.placements.PointPlacementConstraints;
+import org.gvsig.labeling.placements.PolygonPlacementConstraints;
+import org.gvsig.labeling.placements.PolygonPlacementInside;
+import org.gvsig.labeling.placements.PolygonPlacementOnCentroid;
+import org.gvsig.labeling.placements.PolygonPlacementParallel;
+import org.gvsig.labeling.symbol.CharacterMarkerSymbol;
+import org.gvsig.labeling.symbol.SmartTextSymbol;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelingFactory;
+
+
+public class ExtendedLabelingExtension extends Extension {
+
+	public void execute(String actionCommand) {
+
+	}
+
+	public void initialize() {
+		
+		registerPersistence();
+		registerIcons();
+
+		// Editor tools
+		StyleEditor.addEditorTool(LabelStylePanTool.class);
+		StyleEditor.addEditorTool(LabelStyleNewTextFieldTool.class);
+		StyleEditor.addEditorTool(LabelStyleRemoveLastTextField.class);
+		StyleEditor.addEditorTool(LabelStyleOpenBackgroundFile.class);
+		StyleEditor.addEditorTool(PointLabelHighPrecedenceTool.class);
+		StyleEditor.addEditorTool(PointLabelNormalPrecedenceTool.class);
+		StyleEditor.addEditorTool(PointLabelLowPrecedenceTool.class);
+		StyleEditor.addEditorTool(PointLabelForbiddenPrecedenceTool.class);
+
+		LabelingManager.addLabelingStrategy(GeneralLabeling.class);
+
+		// labeling methods in the labeling page
+		//						(inverse order to the wanted to be shown)
+		GeneralLabeling.addLabelingMethod(OnSelection.class);
+		GeneralLabeling.addLabelingMethod(FeatureDependent.class);
+		GeneralLabeling.addLabelingMethod(DefaultLabeling.class);
+
+		PlacementManager.addLabelPlacement(LinePlacementAtExtremities.class);
+		PlacementManager.addLabelPlacement(LinePlacementAtBest.class);
+		PlacementManager.addLabelPlacement(LinePlacementInTheMiddle.class);
+		PlacementManager.addLabelPlacement(MarkerPlacementOnPoint.class);
+		// PlacementManager.addLabelPlacement(MarkerCenteredAtPoint.class);
+		PlacementManager.addLabelPlacement(MarkerPlacementAroundPoint.class);
+		PlacementManager.addLabelPlacement(PolygonPlacementOnCentroid.class);
+		PlacementManager.addLabelPlacement(PolygonPlacementInside.class);
+		PlacementManager.addLabelPlacement(PolygonPlacementParallel.class);
+
+		// LabelingFactory.setDefaultLabelingStrategy(GeneralLabelingStrategy.class);
+	}
+
+	private void registerIcons() {
+		
+		IconThemeHelper.registerIcon("action", "edit-add-text", this);
+		IconThemeHelper.registerIcon("action", "edit-remove-text", this);
+		IconThemeHelper.registerIcon("action", "set-forbidden-precedence", this);
+		IconThemeHelper.registerIcon("action", "set-high-precedence", this);
+		IconThemeHelper.registerIcon("action", "set-low-precedence", this);
+		IconThemeHelper.registerIcon("action", "set-normal-precedence", this);
+		
+		IconThemeHelper.registerIcon("action", "edit-shift-component", this);
+		IconThemeHelper.registerIcon("action", "edit-add-background-image", this);
+	}
+
+	private void registerPersistence() {
+		
+		AbstractPlacementConstraints.registerPersistent();
+		PointPlacementConstraints.registerPersistent();
+		LinePlacementConstraints.registerPersistent();
+		PolygonPlacementConstraints.registerPersistent();
+		MultiShapePlacementConstraints.registerPersistent();
+		
+		CharacterMarkerSymbol.registerPersistent();
+		SmartTextSymbol.registerPersistent();
+
+		PointLabelPositioner.registerPersistent();
+		
+		CharacterMarkerSymbol.registerPersistent();
+		SmartTextSymbol.registerPersistent();
+		
+		GeneralLabelingStrategy.registerPersistent();
+		
+		OnSelectionLabeled.registerPersistent();
+		FeatureDependentLabeled.registerPersistent();
+	}
+
+	public boolean isEnabled() {
+		return false;
+	}
+
+	public boolean isVisible() {
+		return false;
+	}
+
+
+
+}
+
+
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacementConstraints.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacementConstraints.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacementConstraints.java	(revision 40911)
@@ -0,0 +1,169 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ *
+ * MultiShapePlacementConstraints.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Apr 1, 2008
+ *
+ */
+public class MultiShapePlacementConstraints extends AbstractPlacementConstraints {
+
+	public static final String MULTI_SHAPE_PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME =
+			"MULTI_SHAPE_PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME";
+	
+	private PolygonPlacementConstraints polygonConstraints;
+	private LinePlacementConstraints lineConstraints;
+	private PointPlacementConstraints pointConstraints;
+
+
+	public MultiShapePlacementConstraints() { }
+
+	public MultiShapePlacementConstraints(
+			PointPlacementConstraints pointConstraints,
+			LinePlacementConstraints lineConstraints,
+			PolygonPlacementConstraints polygonConstraints) {
+		this.pointConstraints = pointConstraints;
+		this.lineConstraints = lineConstraints;
+		this.polygonConstraints = polygonConstraints;
+
+	}
+
+	public void setPolygonConstraints(PolygonPlacementConstraints p) {
+		this.polygonConstraints = p;
+	}
+
+	public void setLineConstraints(LinePlacementConstraints l) {
+		this.lineConstraints = l;
+	}
+
+	public void setPointConstraints(PointPlacementConstraints p) {
+		this.pointConstraints = p;
+	}
+
+	public PolygonPlacementConstraints getPolygonConstraints() {
+		return polygonConstraints;
+	}
+
+	public LinePlacementConstraints getLineConstraints() {
+		return lineConstraints;
+	}
+
+	public PointPlacementConstraints getPointConstraints() {
+		return pointConstraints;
+	}
+	
+	// ======================================
+	
+	public void saveToState(PersistentState state) throws PersistenceException {
+		
+		super.saveToState(state);
+		state.set("pointConstraints", this.pointConstraints);
+		state.set("lineConstraints", this.lineConstraints);
+		state.set("polygonConstraints", this.polygonConstraints);
+	}
+
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		
+		super.loadFromState(state);
+		this.pointConstraints = (PointPlacementConstraints)
+				state.get("pointConstraints");
+		this.lineConstraints = (LinePlacementConstraints)
+				state.get("lineConstraints");
+		this.polygonConstraints = (PolygonPlacementConstraints)
+				state.get("polygonConstraints");
+		
+	}
+
+	public static void registerPersistent() {
+		
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(MULTI_SHAPE_PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME) == null ) {
+			DynStruct definition = manager.addDefinition(
+					MultiShapePlacementConstraints.class,
+					MULTI_SHAPE_PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME,
+					MULTI_SHAPE_PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME +" Persistence definition",
+					null, 
+					null);
+			
+			definition.extend(manager.getDefinition(
+					AbstractPlacementConstraints.PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME));
+			
+			definition.addDynFieldObject("pointConstraints").setClassOfValue(
+					PointPlacementConstraints.class).setMandatory(true);
+			definition.addDynFieldObject("lineConstraints").setClassOfValue(
+					LinePlacementConstraints.class).setMandatory(true);
+			definition.addDynFieldObject("polygonConstraints").setClassOfValue(
+					PolygonPlacementConstraints.class).setMandatory(true);
+		}		
+	}
+	
+	public Object clone() throws CloneNotSupportedException {
+		
+		
+		PointPlacementConstraints point_co = null;
+		LinePlacementConstraints line_co = null;
+		PolygonPlacementConstraints poly_co = null;
+		
+		try {
+			point_co = (PointPlacementConstraints) pointConstraints.clone();
+			line_co = (LinePlacementConstraints) lineConstraints.clone();
+			poly_co = (PolygonPlacementConstraints) polygonConstraints.clone();
+		} catch (CloneNotSupportedException ce) {
+			throw ce;
+		}
+		
+		MultiShapePlacementConstraints resp =
+				new MultiShapePlacementConstraints(point_co, line_co, poly_co);
+		return resp;
+	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementParallel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementParallel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementParallel.java	(revision 40911)
@@ -0,0 +1,194 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.Rectangle;
+import java.awt.geom.PathIterator;
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.Vector;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class PolygonPlacementParallel implements ILabelPlacement{
+
+	private static final Logger logger = LoggerFactory.getLogger(
+			PolygonPlacementParallel.class);
+	
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc, Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
+
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		
+		double theta = 0;
+		Point start_po = null;
+		
+		try {
+			if(placementConstraints.isFitInsidePolygon()){
+				start_po = geom.getInteriorPoint();
+			} else {
+				start_po = geom.centroid();
+			}
+		} catch (Exception exc) {
+			logger.error("While getting centroid/interior point.", exc);
+		}
+
+		Point2D startingPoint = new Point2D.Double(start_po.getX(), start_po.getY());
+
+		// calculated with the Linear Regression technique
+		PathIterator pi = geom.getPathIterator(null);
+		Rectangle geomBounds = geom.getBounds();
+		double sumx = 0, sumy = 0, sumxx = 0, sumyy = 0, sumxy = 0;
+		double Sxx, Sxy, b, a;
+		double[] coords = new double[6];
+		int count = 0;
+
+		// add points to the regression process
+		Vector<Point2D> v = new Vector<Point2D>();
+		while (!pi.isDone()) {
+			pi.currentSegment(coords);
+			Point2D p;
+			if (geomBounds.width > geomBounds.height)
+				p = new Point2D.Double(coords[0], coords[1]);
+			else
+				p = new Point2D.Double(coords[1], coords[0]);
+			v.addElement(p);
+			count++;
+			sumx += p.getX();
+			sumy += p.getY();
+			sumxx += p.getX()*p.getX();
+			sumyy += p.getY()*p.getY();
+			sumxy += p.getX()*p.getY();
+			pi.next();
+		}
+
+		// start regression
+		double n = (double) count;
+		Sxx = sumxx-sumx*sumx/n;
+		Sxy = sumxy-sumx*sumy/n;
+		b = Sxy/Sxx;
+		a = (sumy-b*sumx)/n;
+
+		boolean isVertical = false;
+		if (geomBounds.width < geomBounds.height) {
+			if (b == 0) {
+				// force vertical (to avoid divide by zero)
+				isVertical = true;
+
+			} else {
+				// swap axes
+				double bAux = 1/b;
+				a = - a / b;
+				b = bAux;
+			}
+		}
+
+		if (isVertical){
+			theta = AbstractLinePlacement.HALF_PI;
+		} else {
+			double p1x = 0;
+			double  p1y =geomBounds.height-a;
+			double  p2x = geomBounds.width;
+			double  p2y = geomBounds.height-
+			(a+geomBounds.width*b);
+
+			theta = -Math.atan(((p2y - p1y) / (p2x - p1x)) );
+		}
+
+		ArrayList<LabelLocationMetrics> guessed = new ArrayList<LabelLocationMetrics>();
+		Rectangle labelBounds = lc.getBounds();
+		double cosTheta = Math.cos(theta);
+		double sinTheta = Math.sin(theta);
+		double halfHeight = labelBounds.getHeight()*0.5;
+		double halfWidth= labelBounds.getWidth()*0.5;
+		double offsetX =  halfHeight * sinTheta + halfWidth*cosTheta;
+		double offsetY = -halfHeight * cosTheta + halfWidth*sinTheta;
+		double offsetRX=vp.toMapDistance((int)offsetX);
+		double offsetRY=vp.toMapDistance((int)offsetY);
+		startingPoint.setLocation(startingPoint.getX() - offsetRX,
+				startingPoint.getY() - offsetRY);
+		
+		Point auxp = null;
+		
+		try {
+			auxp = GeometryLocator.getGeometryManager().createPoint(
+					startingPoint.getX(),startingPoint.getY(), SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			logger.error("While creating point.", e);
+		}
+		
+		auxp.transform(vp.getAffineTransform());
+		guessed.add(new LabelLocationMetrics(
+				new Point2D.Double(auxp.getX(),auxp.getY()), -theta, true));
+		return guessed;
+	}
+	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
+			int shapeType) {
+		
+		GeometryType gt = null;
+		try {
+			gt = GeometryLocator.getGeometryManager().getGeometryType(
+					shapeType, SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			logger.error("While getting geo type.", e);
+		}
+		
+		if (gt.isTypeOf(TYPES.SURFACE) || shapeType == TYPES.MULTISURFACE) {
+			return placementConstraints.isParallel();
+		}
+		return false;
+	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementAroundPoint.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementAroundPoint.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementAroundPoint.java	(revision 40911)
@@ -0,0 +1,231 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.Rectangle;
+import java.awt.geom.NoninvertibleTransformException;
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MarkerPlacementAroundPoint implements ILabelPlacement {
+
+	private static Logger logger =
+			LoggerFactory.getLogger(MarkerPlacementAroundPoint.class);
+	private static final MarkerPlacementOnPoint pos = new MarkerPlacementOnPoint();
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc,
+			Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
+		
+	if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+	Geometry shp = geom.cloneGeometry();
+	shp.transform(vp.getAffineTransform());
+
+		if (placementConstraints instanceof PointPlacementConstraints) {
+			PointPlacementConstraints ppc = (PointPlacementConstraints) placementConstraints;
+			PointLabelPositioner plp = ppc.getPositioner();
+
+			if (plp != null) {
+				Point po = null;
+				try {
+					po = shp.centroid();
+				} catch (Exception exc) {
+					logger.error("While getting centroid.", exc);
+				}
+				
+				int[] preferredPositions = plp.getPreferenceVector();
+				ArrayList<LabelLocationMetrics> highPreference = new ArrayList<LabelLocationMetrics>();
+				ArrayList<LabelLocationMetrics> normalPreference = new ArrayList<LabelLocationMetrics>();
+				ArrayList<LabelLocationMetrics> lowPreference = new ArrayList<LabelLocationMetrics>();
+				Rectangle bounds = lc.getBounds();
+				double width = bounds.getWidth()*.5; // + 2; //¿por qué el +2?
+				double heigth = bounds.getHeight()*.5;
+
+				double offsetX = 0, offsetY = 0;
+				for (int i = 0; i < preferredPositions.length; i++) {
+					switch (i) {
+					case 0:
+					case 3:
+					case 5:
+						// left
+						offsetX = -width;
+						break;
+					case 2:
+					case 4:
+					case 7:
+						// rigth
+						offsetX = width;
+						break;
+					case 1:
+					case 6:
+					default:
+						// horizontally centered
+						offsetX = 0;
+						break;
+					}
+					switch (i) {
+					case 0:
+					case 1:
+					case 2:
+						// top
+						offsetY = -heigth;
+						break;
+					case 5:
+					case 6:
+					case 7:
+						// below
+						offsetY = heigth;
+						break;
+					case 3:
+					case 4:
+					default:
+						// vertically centered
+						offsetY = 0;
+						break;
+
+					}
+//					// xOffset
+//					switch (i % 3) {
+//					case 0:
+//						// left
+//						offsetX = -width;
+//						break;
+//					case 2:
+//						// rigth
+//						offsetX = width;
+//						break;
+//					case 1:
+//					default:
+//						// horizontally centered
+//						offsetX = 0;
+//						break;
+//
+//					}
+//
+//					switch (i / 3) {
+//					case 0:
+//						// top
+//						offsetY = -heigth;
+//						break;
+//					case 2:
+//						// below
+//						offsetY = heigth;
+//						break;
+//					case 1:
+//					default:
+//						// vertically centered
+//						offsetY = 0;
+//						break;
+//
+//					}
+					
+					po.setX(po.getX() + offsetX);
+					po.setY(po.getY() + offsetY);
+					try {
+						po.transform(vp.getAffineTransform().createInverse());
+					} catch (NoninvertibleTransformException e) {
+						logger.error("uninvertible matrix.", e);
+					}
+
+					switch (preferredPositions[i]) {
+					case PointLabelPositioner.FORBIDDEN:
+						break;
+					case PointLabelPositioner.PREFERENCE_HIGH:
+						highPreference.addAll(
+								pos.guess(lc, po, placementConstraints, cartographicSymbolSize, cancel,vp));
+						break;
+					case PointLabelPositioner.PREFERENCE_NORMAL:
+
+						normalPreference.addAll(
+								pos.guess(lc, po, placementConstraints, cartographicSymbolSize, cancel,vp));
+						break;
+					case PointLabelPositioner.PREFERENCE_LOW:
+						lowPreference.addAll(
+								pos.guess(lc, po, placementConstraints, cartographicSymbolSize, cancel,vp));
+						break;
+
+					default:
+						throw new Error("unrecognised label position preference value: "+preferredPositions[i]);
+					}
+				}
+
+				ArrayList<LabelLocationMetrics> guessed = new ArrayList<LabelLocationMetrics>();
+				for (int j = 0; j < highPreference.size(); j++)		guessed.add(highPreference.get(j));
+				for (int j = 0; j < normalPreference.size(); j++)	guessed.add(normalPreference.get(j));
+				for (int j = 0; j < lowPreference.size(); j++)		guessed.add(lowPreference.get(j));
+				return guessed;
+			}
+		}
+
+		return CannotPlaceLabel.NO_PLACES;
+	}
+
+
+
+	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
+			int shapeType) {
+		
+		if (shapeType == TYPES.POINT
+				|| shapeType == TYPES.MULTIPOINT) {
+			// TODO (09/01/08) is this correct? if not fix it also in PlacementManager, PlacementProperties
+			return placementConstraints.isAroundThePoint();
+		} else {
+			return false;
+		}
+		
+	}
+
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PlacementManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PlacementManager.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PlacementManager.java	(revision 40911)
@@ -0,0 +1,187 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.geom.type.GeometryTypeNotSupportedException;
+import org.gvsig.fmap.geom.type.GeometryTypeNotValidException;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.tools.exception.DriverException;
+import org.gvsig.tools.locator.LocatorException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ *
+ * PlacementManager.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Jan 3, 2008
+ *
+ */
+public class PlacementManager {
+	
+	private static Logger logger = LoggerFactory.getLogger(PlacementManager.class);
+	
+	private static ArrayList<Class<?>> installedLabelPlacements = new ArrayList<Class<?>>();
+	private static ArrayList<ILabelPlacement> availableLabelPlacements;
+	private static final CannotPlaceLabel cantPlaceLabel = new CannotPlaceLabel();
+	private PlacementManager() {}
+
+	public static ILabelPlacement getPlacement(
+			IPlacementConstraints placementConstraints, int shapeType) {
+
+		ArrayList<ILabelPlacement> suitablePlacements = new ArrayList<ILabelPlacement>();
+		if (placementConstraints.getClass().equals(MultiShapePlacementConstraints.class)) {
+			MultiShapePlacementConstraints msp = (MultiShapePlacementConstraints) placementConstraints;
+
+			return new MultiShapePlacement(
+					getPlacement(msp.getPointConstraints(),   Geometry.TYPES.POINT),
+					getPlacement(msp.getLineConstraints(),    Geometry.TYPES.CURVE),
+					getPlacement(msp.getPolygonConstraints(), Geometry.TYPES.SURFACE)
+					);
+		} else {
+			for (Iterator<ILabelPlacement> iterator = getAvailablePlacements().iterator(); iterator.hasNext();) {
+				ILabelPlacement placement = iterator.next();
+				if (placement.isSuitableFor(placementConstraints, shapeType)) {
+					suitablePlacements.add(placement);
+				}
+			}
+
+			if (suitablePlacements.size() == 0)
+				return cantPlaceLabel;
+			else if (suitablePlacements.size() == 1)
+				return suitablePlacements.get(0);
+			else
+				return new CompoundLabelPlacement(
+						(ILabelPlacement[]) suitablePlacements.
+						toArray(new ILabelPlacement[suitablePlacements.size()]));
+
+		}
+
+	}
+
+	public static void addLabelPlacement(Class<?> labelPlacementClass) {
+//		if (!labelPlacementClass.isInstance(ILabelPlacement.class))
+//		throw new IllegalArgumentException(
+//			labelPlacementClass.getName()+" is not an valid label placement algorithm.");
+		installedLabelPlacements.add(labelPlacementClass);
+
+		// invalidate current list of available placements
+		if (availableLabelPlacements != null)
+			availableLabelPlacements.clear();
+		availableLabelPlacements = null;
+	}
+
+	private static ArrayList<ILabelPlacement> getAvailablePlacements() {
+		if (availableLabelPlacements == null) {
+			availableLabelPlacements = new ArrayList<ILabelPlacement>(installedLabelPlacements.size());
+			for (Iterator<Class<?>> iterator = installedLabelPlacements.iterator(); iterator.hasNext();) {
+				Class<?> clazz = null;
+				try {
+					clazz = iterator.next();
+					availableLabelPlacements.add((ILabelPlacement) clazz.newInstance());
+				} catch (Exception e) {
+					logger.error("Couldn't install label placement: "+clazz.getName(), e);
+				}
+			}
+		}
+
+		return availableLabelPlacements;
+	}
+
+
+	/**
+	 * Creates a new instance of placement constraints from a vector layer. The
+	 * placement constraints are created according the layer shape type.
+	 * @param layerDest
+	 * @return
+	 * @throws LocatorException 
+	 * @throws GeometryTypeNotValidException 
+	 * @throws GeometryTypeNotSupportedException 
+	 * @throws DriverException
+	 */
+	public static IPlacementConstraints createPlacementConstraints(int geotype)
+			throws Exception {
+		
+		GeometryType geom_gt = GeometryLocator.getGeometryManager().getGeometryType(
+				geotype, Geometry.SUBTYPES.GEOM2D);
+
+		if (geom_gt.getType() == TYPES.POINT ||
+				geom_gt.getType() == TYPES.MULTIPOINT) {
+			return new PointPlacementConstraints();
+		} else {
+			if (geom_gt.isTypeOf(TYPES.CURVE) ||
+					geom_gt.getType() == TYPES.MULTICURVE) {
+				return new LinePlacementConstraints();
+			} else {
+				if (geom_gt.isTypeOf(TYPES.SURFACE) ||
+						geom_gt.getType() == TYPES.MULTISURFACE) {
+					return new PolygonPlacementConstraints();
+				} else {
+					if (geom_gt.getType() == TYPES.GEOMETRY ||
+					geom_gt.getType() == TYPES.AGGREGATE) {
+
+						return new MultiShapePlacementConstraints(
+								(PointPlacementConstraints)
+								createPlacementConstraints(TYPES.POINT),
+								(LinePlacementConstraints)
+								createPlacementConstraints(TYPES.CURVE),
+								(PolygonPlacementConstraints)
+								createPlacementConstraints(TYPES.SURFACE));
+					}
+				}
+			}
+		}		
+		logger.error("Unknown geo type in createPlacementConstraints: " + geotype);
+		return null;
+	}
+	
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/RemoveDuplicatesComparator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/RemoveDuplicatesComparator.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/RemoveDuplicatesComparator.java	(revision 40911)
@@ -0,0 +1,56 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.util.Comparator;
+
+public class RemoveDuplicatesComparator implements Comparator<String[]> {
+
+	public int compare(String[] o1, String[] o2) {
+		if (o1 == null || o2 == null || o1.length != o2.length) return 0;
+		for (int i = 0; i < o2.length; i++) {
+			int c = o1[i].compareTo(o2[i]);
+			if (c != 0) return c;
+		}
+		return 0;
+	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacement.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacement.java	(revision 40911)
@@ -0,0 +1,130 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+
+/**
+ *
+ * MultiShapePlacementConstraints.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Apr 1, 2008
+ *
+ */
+public class MultiShapePlacement implements ILabelPlacement {
+	private ILabelPlacement pointPlacement;
+	private ILabelPlacement linePlacement;
+	private ILabelPlacement polygonPlacement;
+
+
+	/**
+	 * Creates a new instance of MultiShapePlacement initializing the respective
+	 * placements to those passed as parameters. Null values are allowed for
+	 * the parameters and will cause that no label will be placed when the
+	 * geometry belongs to such null values.
+	 *
+	 * @param pointPlacement, the placement for points
+	 * @param linePlacement, the placement for lines
+	 * @param polygonPlacement, the placement for polygons
+	 */
+	public MultiShapePlacement(
+			ILabelPlacement pointPlacement,
+			ILabelPlacement linePlacement,
+			ILabelPlacement polygonPlacement) {
+		this.pointPlacement = pointPlacement;
+		this.linePlacement = linePlacement;
+		this.polygonPlacement = polygonPlacement;
+	}
+
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc,
+			Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize,
+			Cancellable cancel, ViewPort vp) {
+		
+		MultiShapePlacementConstraints pc =
+				(MultiShapePlacementConstraints) placementConstraints;
+
+		GeometryType gt = geom.getGeometryType();
+		if (gt.getType() == TYPES.POINT || gt.getType() == TYPES.MULTIPOINT) {
+			if (pointPlacement != null) {
+				return pointPlacement.guess(lc, geom, pc.getPointConstraints(), cartographicSymbolSize, cancel,vp);
+			}
+		} else {
+			if (gt.isTypeOf(TYPES.CURVE) || gt.getType() == TYPES.MULTICURVE) {
+				if (linePlacement != null) {
+					return linePlacement.guess(lc, geom, pc.getLineConstraints(), cartographicSymbolSize, cancel,vp);
+				}
+			} else {
+				if (gt.isTypeOf(TYPES.SURFACE) || gt.getType() == TYPES.MULTISURFACE) {
+					if (polygonPlacement != null) {
+						return polygonPlacement.guess(lc, geom, pc.getPolygonConstraints(), cartographicSymbolSize, cancel,vp);
+					}
+				}
+			}
+		}
+		return CannotPlaceLabel.NO_PLACES;
+	}
+
+	public boolean isSuitableFor(
+			IPlacementConstraints placementConstraints,
+			int shapeType) {
+		// TODO shoud I also ask to each placement if it is suitable
+		// for these constraints????
+		return (shapeType == TYPES.GEOMETRY || shapeType == TYPES.AGGREGATE);
+	}
+
+
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractLinePlacement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractLinePlacement.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractLinePlacement.java	(revision 40911)
@@ -0,0 +1,166 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+
+import org.apache.batik.ext.awt.geom.PathLength;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+
+/**
+ *
+ * AbstractLinePlacement.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
+ *
+ */
+public abstract class AbstractLinePlacement implements ILabelPlacement {
+	public static final double PI = Math.PI;
+	public static final double HALF_PI = PI * 0.5;
+	private ArrayList<LabelLocationMetrics> guessed =
+			new ArrayList<LabelLocationMetrics>();
+	private static final double TOLERANCE = 1E-2;
+
+
+	public ArrayList<LabelLocationMetrics> guess(ILabelClass lc, Geometry geom,
+			IPlacementConstraints pc, double cartographicSymbolSize,
+			Cancellable cancel, ViewPort vp) {
+		
+		guessed.clear();
+
+		Geometry shp = geom.cloneGeometry();
+		shp.transform(vp.getAffineTransform());
+
+		PathLength pathLen = new PathLength(shp);
+
+		LabelLocationMetrics initial = initialLocation(lc, pc, pathLen, cancel);
+
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		double theta = initial.getRotation();
+
+
+		double xOffset = 0;
+		double yOffset = 0;
+		Rectangle2D bounds = lc.getBounds();
+
+		if (pc.isPageOriented()) {
+			if(theta >  HALF_PI) { // from origin to left-down
+				theta = (theta - Math.PI);
+
+				Point2D anchor = initial.getAnchor();
+//				double cosTheta = Math.cos(theta);
+				double sinTheta = Math.sin(theta);
+				double width = bounds.getWidth();
+				double height = bounds.getHeight()*1.1;
+				initial.getAnchor().setLocation(
+						anchor.getX()+ (sinTheta*width /* + cosTheta*height*/),
+						anchor.getY()- (/*cosTheta*width*/ + sinTheta*height));
+			} else if (theta < -HALF_PI ) { // from origin to left-up
+				if (Math.abs(Math.abs(theta) - HALF_PI) -TOLERANCE > 0)
+					// the condition avoids errors when segment is almost up-down vertical
+				{
+					theta = (theta + Math.PI);
+					Point2D anchor = initial.getAnchor();
+					double cosTheta = Math.cos(theta);
+					double sinTheta = Math.sin(theta);
+					double width = bounds.getWidth();
+					double height = bounds.getHeight()*1.1;
+					initial.getAnchor().setLocation(
+							anchor.getX()- (cosTheta*width/* + sinTheta*height*/),
+							anchor.getY()- (sinTheta*width + cosTheta*height));
+				}
+			}
+
+
+		}
+
+		if (pc.isBelowTheLine() ||
+				pc.isOnTheLine() ||
+				pc.isAboveTheLine()) {
+
+			double h = bounds.getHeight()*0.5;
+
+			xOffset += h * Math.sin(theta);
+			yOffset += h * Math.cos(theta);
+
+
+			Point2D initialAnchor = initial.getAnchor();
+			// calculate the possibles in the inverse
+			// order to the preferred order and add it
+			// always in the first position
+			if (pc.isBelowTheLine()) {
+				Point2D anchor = new Point2D.Double(
+						initialAnchor.getX() +	-xOffset,
+						initialAnchor.getY() +	+yOffset);
+				guessed.add(0, new LabelLocationMetrics(anchor, theta, false));
+			}
+
+			if (pc.isOnTheLine()) {
+				guessed.add(0, new LabelLocationMetrics(initial.getAnchor(), theta, false));
+			}
+
+			if (pc.isAboveTheLine()) {
+				Point2D anchor = new Point2D.Double(
+						initialAnchor.getX() +	+xOffset,
+						initialAnchor.getY() +  -yOffset);
+				guessed.add(0, new LabelLocationMetrics(anchor, theta, false));
+			}
+		} else {
+			// will say that on the line is legal
+			guessed.add(0, initial);
+		}
+		return guessed;
+	}
+
+	abstract LabelLocationMetrics initialLocation(
+			ILabelClass lc, IPlacementConstraints pc,
+			PathLength pathLen, Cancellable cancel);
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PointLabelPositioner.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PointLabelPositioner.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PointLabelPositioner.java	(revision 40911)
@@ -0,0 +1,169 @@
+package org.gvsig.labeling.placements;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 
+ *  Specifies the point position for a label
+ *
+ */
+public class PointLabelPositioner extends AbstractStyle {
+
+	private static Logger logger = LoggerFactory.getLogger(PointLabelPositioner.class);
+	
+	public static final String POINT_LABEL_POSITIONER_PERSISTENCE_NAME =
+			"POINT_LABEL_POSITIONER_PERSISTENCE_NAME";
+	
+	private static Geometry sampleGeometry = null;
+	private int[] preferenceVector = new int[8];
+	private static final Color[] colorVector = new Color[] {
+		new Color(140, 140, 140), // gray
+		new Color(140, 245, 130), // green
+		new Color(130, 170, 245), // light blue
+		new Color(100, 100, 255),   // dark blue
+	};
+
+	public static final byte FORBIDDEN 		   = 0;
+	public static final byte PREFERENCE_HIGH   = 1;
+	public static final byte PREFERENCE_NORMAL = 2;
+	public static final byte PREFERENCE_LOW    = 3;
+	/**
+	 * Constructor method
+	 *
+	 */
+	public PointLabelPositioner() {}
+
+	/**
+	 * Constructor method
+	 *
+	 * @param preferenceVector
+	 * @param description
+	 */
+	public PointLabelPositioner(int[] preferenceVector, String description) {
+		this.preferenceVector = preferenceVector;
+		setDescription(description);
+	}
+
+	public void drawInsideRectangle(Graphics2D g, Rectangle r) {
+		int size = Math.min(r.width, r.height) / 3;
+		int j = -1;
+		final int fontSize = (int) (size * 0.8);
+		final Font font = new Font("Arial", Font.PLAIN, fontSize);
+		RenderingHints old = g.getRenderingHints();
+		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+		for (int i = 0; i < 9; i++) {
+			if (i == 4) continue;
+			j++;
+			int value = Math.abs(preferenceVector[j] % colorVector.length);
+			int col = i % 3;
+			int row = i / 3;
+
+			g.setColor(colorVector[value]);
+			g.fillRect(size * col, size*row, size, size);
+			g.setColor(Color.BLACK);
+			g.drawRect(size * col, size*row, size, size);
+			g.setFont(font);
+			g.drawString(String.valueOf(value),
+					(float) ((size/2) - (fontSize/4)) + size * col,
+					(float) (size * 0.8) + size*row);
+		}
+		g.setRenderingHints(old);
+	}
+
+	public boolean isSuitableFor(ISymbol sym) {
+		return sym.isSuitableFor(getSampleGeometry());
+	}
+
+	public void loadFromState(PersistentState state)
+			throws PersistenceException {
+		
+		super.loadFromState(state);
+		preferenceVector = state.getIntArray("preferenceVector");
+	}
+
+	public void saveToState(PersistentState state) throws PersistenceException {
+		
+		super.saveToState(state);
+		state.set("preferenceVector", preferenceVector);
+	}
+	
+	public static void registerPersistent() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(POINT_LABEL_POSITIONER_PERSISTENCE_NAME)==null ) {
+			DynStruct definition = manager.addDefinition(
+					PointLabelPositioner.class,
+					POINT_LABEL_POSITIONER_PERSISTENCE_NAME,
+					POINT_LABEL_POSITIONER_PERSISTENCE_NAME+" Persistence definition",
+					null, 
+					null
+			);
+			definition.extend(manager.getDefinition(
+					AbstractStyle.STYLE_PERSISTENCE_DEFINITION_NAME));
+			definition.addDynFieldArray("preferenceVector").setClassOfItems(
+					int.class).setMandatory(true);
+		}
+		
+	}
+	
+	/*
+	public XMLEntity getXMLEntity() {
+		XMLEntity xml = new XMLEntity();
+		xml.putProperty("className", getClassName());
+		xml.putProperty("desc", getDescription());
+		StringBuffer sb = new StringBuffer();
+		for (int i = 0; i < preferenceVector.length; i++) {
+			sb.append(preferenceVector[i]+" ,");
+		}
+		String s = sb.substring(0, sb.length()-2);
+		xml.putProperty("preferenceVector", s);
+		return xml;
+	}
+
+	public void setXMLEntity(XMLEntity xml) {
+		setDescription(xml.getStringProperty("desc"));
+		preferenceVector = xml.getByteArrayProperty("preferenceVector");
+	}
+	*/
+
+	public Object clone() throws CloneNotSupportedException {
+		return super.clone();
+	}	
+	
+	public void drawOutline(Graphics2D g, Rectangle r) {
+		drawInsideRectangle(g, r);
+	}
+
+	public int[] getPreferenceVector() {
+		return preferenceVector;
+	}
+	
+	private static Geometry getSampleGeometry() {
+		
+		if (sampleGeometry == null) {
+			try {
+				sampleGeometry = GeometryLocator.getGeometryManager().createPoint(
+						0, 0, Geometry.SUBTYPES.GEOM2D);
+			} catch (Exception e) {
+				logger.error("While getting sample geometry.", e);
+			}
+		}
+		return sampleGeometry;
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementOnCentroid.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementOnCentroid.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementOnCentroid.java	(revision 40911)
@@ -0,0 +1,141 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * PolygonPlacementOnCentroid.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Apr 1, 2008
+ *
+ */
+//public class PolygonPlacementOnCentroid extends MarkerCenteredAtPoint implements ILabelPlacement {
+public class PolygonPlacementOnCentroid extends MarkerPlacementOnPoint
+implements ILabelPlacement {
+	
+	private static final Logger logger = LoggerFactory.getLogger(
+			PolygonPlacementOnCentroid.class);
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc, Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
+
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		Point cen = null;
+		try {
+			cen = geom.centroid();
+		} catch (Exception e) {
+			logger.error("While getting centroid.", e);
+		}
+		return super.guess(
+				lc,
+				cen,
+				placementConstraints,
+				cartographicSymbolSize, cancel,vp);
+	}
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc, Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel) {
+
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		ArrayList<LabelLocationMetrics> guessed =
+				new ArrayList<LabelLocationMetrics>();
+		
+		Point cen = null;
+		try {
+			cen = geom.centroid();
+		} catch (Exception e) {
+			logger.error("While getting centroid.", e);
+		}
+		Point2D p = new Point2D.Double(cen.getX(), cen.getY());
+		Rectangle2D bounds = lc.getBounds();
+		p.setLocation(
+				p.getX() - (bounds.getWidth()*0.5),
+				p.getY() - (bounds.getHeight()*0.5));// - 2);
+		guessed.add(new LabelLocationMetrics(p, 0, true));
+		return guessed;
+	}
+
+	public boolean isSuitableFor(
+			IPlacementConstraints placementConstraints,
+			int shapeType) {
+		
+		GeometryType gt = null;
+		try {
+			gt = GeometryLocator.getGeometryManager().getGeometryType(
+					shapeType, SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			logger.error("While getting geo type.", e);
+		}
+		
+		if (gt.isTypeOf(TYPES.SURFACE) || shapeType == TYPES.MULTISURFACE) {
+			return (placementConstraints.isHorizontal()
+					&&
+					!placementConstraints.isFitInsidePolygon());
+		}
+		return false;
+	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementConstraints.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementConstraints.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementConstraints.java	(revision 40911)
@@ -0,0 +1,118 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: PolygonPlacementConstraints.java 13606 2007-09-10 15:47:11Z jaume $
+* $Log$
+* Revision 1.11  2007-09-10 15:47:11  jaume
+* *** empty log message ***
+*
+* Revision 1.10  2007/07/18 06:54:34  jaume
+* continuing with cartographic support
+*
+* Revision 1.9  2007/04/26 11:41:00  jaume
+* attempting to let defining size in world units
+*
+* Revision 1.8  2007/04/19 14:21:30  jaume
+* *** empty log message ***
+*
+* Revision 1.7  2007/04/18 15:35:11  jaume
+* *** empty log message ***
+*
+* Revision 1.6  2007/04/13 11:59:30  jaume
+* *** empty log message ***
+*
+* Revision 1.5  2007/04/12 14:28:43  jaume
+* basic labeling support for lines
+*
+* Revision 1.4  2007/04/11 16:01:08  jaume
+* maybe a label placer refactor
+*
+* Revision 1.3  2007/04/02 16:34:56  jaume
+* Styled labeling (start commiting)
+*
+* Revision 1.2  2007/03/09 08:33:43  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.1  2007/02/21 07:34:08  jaume
+* labeling starts working
+*
+*
+*/
+package org.gvsig.labeling.placements;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+
+/**
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+public class PolygonPlacementConstraints extends AbstractPlacementConstraints {
+	
+	public PolygonPlacementConstraints() {
+		setPlacementMode(HORIZONTAL);
+	}
+	
+	public static final String POLYGON_PLACE_CONSTRAINTS =
+			"POLYGON_PLACE_CONSTRAINTS";
+
+	public static void registerPersistent() {
+		
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(POLYGON_PLACE_CONSTRAINTS) == null ) {
+			DynStruct definition = manager.addDefinition(
+					PolygonPlacementConstraints.class,
+					POLYGON_PLACE_CONSTRAINTS,
+					POLYGON_PLACE_CONSTRAINTS +" Persistence definition",
+					null, 
+					null);
+			definition.extend(manager.getDefinition(
+					AbstractPlacementConstraints.PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME));
+		}		
+	}
+
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementConstraints.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementConstraints.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementConstraints.java	(revision 40911)
@@ -0,0 +1,122 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: LinePlacementConstraints.java 13606 2007-09-10 15:47:11Z jaume $
+* $Log$
+* Revision 1.11  2007-09-10 15:47:11  jaume
+* *** empty log message ***
+*
+* Revision 1.10  2007/05/22 10:05:31  jaume
+* *** empty log message ***
+*
+* Revision 1.9  2007/05/08 08:47:40  jaume
+* *** empty log message ***
+*
+* Revision 1.8  2007/04/18 15:35:11  jaume
+* *** empty log message ***
+*
+* Revision 1.7  2007/04/13 11:59:30  jaume
+* *** empty log message ***
+*
+* Revision 1.6  2007/04/12 16:01:11  jaume
+* *** empty log message ***
+*
+* Revision 1.5  2007/04/12 14:28:43  jaume
+* basic labeling support for lines
+*
+* Revision 1.4  2007/04/11 16:01:08  jaume
+* maybe a label placer refactor
+*
+* Revision 1.3  2007/04/02 16:34:56  jaume
+* Styled labeling (start commiting)
+*
+* Revision 1.2  2007/03/09 08:33:43  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.1  2007/02/09 07:47:05  jaume
+* Isymbol moved
+*
+*
+*/
+package org.gvsig.labeling.placements;
+
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+
+/**
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+public class LinePlacementConstraints extends AbstractPlacementConstraints {
+//	private static final double HALF_PI = Math.PI * 0.5;
+//	private Hashtable textPaths = new Hashtable(), texts = new Hashtable();
+
+	public LinePlacementConstraints() {
+		super();
+		setPlacementMode(PARALLEL);
+		setLocationAlongTheLine(IPlacementConstraints.AT_THE_MIDDLE_OF_THE_LINE);
+		setPageOriented(false);
+	}
+
+	public static final String LINE_PLACE_CONSTRAINTS =
+			"LINE_PLACE_CONSTRAINTS";
+
+	public static void registerPersistent() {
+		
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(LINE_PLACE_CONSTRAINTS) == null ) {
+			DynStruct definition = manager.addDefinition(
+					LinePlacementConstraints.class,
+					LINE_PLACE_CONSTRAINTS,
+					LINE_PLACE_CONSTRAINTS +" Persistence definition",
+					null, 
+					null);
+			definition.extend(manager.getDefinition(
+					AbstractPlacementConstraints.PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME));
+		}		
+	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PointPlacementConstraints.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PointPlacementConstraints.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PointPlacementConstraints.java	(revision 40911)
@@ -0,0 +1,155 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: PointPlacementConstraints.java 13606 2007-09-10 15:47:11Z jaume $
+* $Log$
+* Revision 1.10  2007-09-10 15:47:11  jaume
+* *** empty log message ***
+*
+* Revision 1.9  2007/07/18 06:54:34  jaume
+* continuing with cartographic support
+*
+* Revision 1.8  2007/04/18 15:35:11  jaume
+* *** empty log message ***
+*
+* Revision 1.7  2007/04/13 11:59:30  jaume
+* *** empty log message ***
+*
+* Revision 1.6  2007/04/12 14:28:43  jaume
+* basic labeling support for lines
+*
+* Revision 1.5  2007/04/11 16:01:08  jaume
+* maybe a label placer refactor
+*
+* Revision 1.4  2007/04/05 16:07:13  jaume
+* Styled labeling stuff
+*
+* Revision 1.3  2007/04/02 16:34:56  jaume
+* Styled labeling (start commiting)
+*
+* Revision 1.2  2007/03/09 08:33:43  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.1  2007/02/21 07:34:08  jaume
+* labeling starts working
+*
+*
+*/
+package org.gvsig.labeling.placements;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+public class PointPlacementConstraints extends AbstractPlacementConstraints {
+	
+	public static final String POINT_PLACEM_CONSTRAINTS_PERSIST_NAME =
+			"POINT_PLACEM_CONSTRAINTS_PERSIST_NAME";
+	private PointLabelPositioner positioner = null;
+
+	public PointPlacementConstraints() {
+		super();
+		setPlacementMode(ON_TOP_OF_THE_POINT);
+	}
+
+
+	public PointLabelPositioner getPositioner() {
+		return positioner;
+	}
+
+	public void setPositioner(PointLabelPositioner pos) {
+		this.positioner = pos;
+	}
+	
+	public void saveToState(PersistentState state) throws PersistenceException {
+
+		super.saveToState(state);
+		if (positioner != null) {
+			state.set("pointPositioner", positioner);
+		}
+	}
+
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		
+		super.loadFromState(state);
+		if (state.hasValue("pointPositioner")) {
+			positioner = (PointLabelPositioner) state.get("pointPositioner");
+		}
+	}
+
+	public static void registerPersistent() {
+		
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(POINT_PLACEM_CONSTRAINTS_PERSIST_NAME) == null) {
+			
+			DynStruct definition = manager.addDefinition(
+					PointPlacementConstraints.class,
+					POINT_PLACEM_CONSTRAINTS_PERSIST_NAME,
+					POINT_PLACEM_CONSTRAINTS_PERSIST_NAME +" Persistence definition",
+					null, 
+					null);
+			
+			definition.extend(manager.getDefinition(
+					AbstractPlacementConstraints.PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME));
+			definition.addDynFieldObject("pointPositioner").setClassOfValue(
+					PointLabelPositioner.class).setMandatory(false);
+		}		
+	}
+	
+	public Object clone() throws CloneNotSupportedException {
+		
+		PointPlacementConstraints resp = (PointPlacementConstraints) super.clone();
+		PointLabelPositioner aux = (PointLabelPositioner) positioner.clone();
+		resp.setPositioner(aux);
+		return resp;
+	}
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementInside.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementInside.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementInside.java	(revision 40911)
@@ -0,0 +1,141 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * PolygonPlacementInside.java
+ *
+ *
+ * @author
+ *
+ */
+public class PolygonPlacementInside extends MarkerPlacementOnPoint implements ILabelPlacement {
+
+	private static final Logger logger =
+			LoggerFactory.getLogger(PolygonPlacementInside.class);
+	
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc, Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
+
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		Point int_po = null;
+		
+		try {
+			
+			Geometry vp_env = vp.getAdjustedEnvelope().getGeometry();
+			if (geom.intersects(vp_env)) {
+				geom = geom.intersection(vp_env);
+			}
+			
+			int_po = geom.getInteriorPoint();
+		} catch (Exception e) {
+			logger.error("While getting interior point.", e);
+		}
+		return super.guess(lc,
+				int_po,
+				placementConstraints, cartographicSymbolSize, cancel,vp);
+	}
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc, Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel) {
+
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		ArrayList<LabelLocationMetrics> guessed =
+				new ArrayList<LabelLocationMetrics>();
+		
+		Point int_po = null;
+		try {
+			int_po = geom.getInteriorPoint();
+		} catch (Exception e) {
+			logger.error("While getting interior point.", e);
+		}
+		Point2D p = new Point2D.Double(int_po.getX(), int_po.getY());
+		Rectangle2D bounds = lc.getBounds();
+		p.setLocation(p.getX() - (bounds.getWidth()*0.5), p.getY() - (bounds.getHeight()*0.5));// - 2);
+		guessed.add(new LabelLocationMetrics(p, 0, true));
+		return guessed;
+	}
+
+	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
+			int shapeType) {
+		
+		GeometryType gt = null;
+		try {
+			gt = GeometryLocator.getGeometryManager().getGeometryType(
+					shapeType, SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			logger.error("While getting geo type.", e);
+		}
+		
+		if (gt.isTypeOf(TYPES.SURFACE) || shapeType == TYPES.MULTISURFACE) {
+			return (placementConstraints.isFitInsidePolygon() && !placementConstraints.isParallel());
+		} else {
+			return false;
+		}
+		
+	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CompoundLabelPlacement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CompoundLabelPlacement.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CompoundLabelPlacement.java	(revision 40911)
@@ -0,0 +1,87 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+
+/**
+ *
+ * CompoundLabelPlacement.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
+ *
+ */
+public class CompoundLabelPlacement implements ILabelPlacement {
+	private ILabelPlacement[] placements;
+
+	public CompoundLabelPlacement(ILabelPlacement[] suitablePlacements) {
+		this.placements = suitablePlacements;
+	}
+
+	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
+			int shapeType) {
+		return true;
+	}
+
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc,
+			Geometry geom,
+			IPlacementConstraints constraints,
+			double cartographicSymbolSize,
+			Cancellable cancel,
+			ViewPort vp) {
+		
+		ArrayList<LabelLocationMetrics> guessed = new ArrayList<LabelLocationMetrics>();
+		for (int i = 0; cancel != null && !cancel.isCanceled() && i < placements.length; i++) {
+			guessed.addAll(placements[i].guess(lc, geom, constraints, cartographicSymbolSize, cancel,vp));
+		}
+		return guessed;
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/ILabelPlacement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/ILabelPlacement.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/ILabelPlacement.java	(revision 40911)
@@ -0,0 +1,71 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+
+
+/**
+ *
+ * ILabelPlacement.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
+ *
+ */
+public interface ILabelPlacement {
+
+	boolean isSuitableFor(IPlacementConstraints placementConstraints, int shapeType);
+
+	ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc,
+			Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) ;
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementOnPoint.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementOnPoint.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementOnPoint.java	(revision 40911)
@@ -0,0 +1,139 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class MarkerPlacementOnPoint implements ILabelPlacement{
+	
+	private Logger logger = LoggerFactory.getLogger(MarkerPlacementOnPoint.class);
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc,
+			Geometry shp,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel) {
+
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		ArrayList<LabelLocationMetrics> guessed = new ArrayList<LabelLocationMetrics>();
+		
+		Point cen = null;
+		try {
+			cen = shp.centroid();
+		} catch (Exception ex) {
+			logger.error("While getting centroid", ex);
+		}
+		Point2D p = new Point2D.Double(cen.getX(), cen.getY());
+		Rectangle2D bounds = lc.getBounds();
+		//FIXME: Con este posicionamiento, es identico al MarkerCenteredAtPoint
+		//pero es así como lo hacen otros programas
+		//(tal vez, hubo una confusión por el nombre de la constante ON_TOP_OF_THE_POINT).
+		//Entonces sobraría el posicionamiento MarkerCenteredAtPoint debiendose utilizar siempre éste.
+		p.setLocation(p.getX() - (bounds.getWidth()*0.5), p.getY() - (bounds.getHeight()*0.5));// - 2);
+		guessed.add(new LabelLocationMetrics(
+				p, 0, true));
+		return guessed;
+	}
+
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc,
+			Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
+		
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		Geometry shp = geom.cloneGeometry();
+		shp.transform(vp.getAffineTransform());
+
+		ArrayList<LabelLocationMetrics> guessed =
+				new ArrayList<LabelLocationMetrics>();
+		
+		Point cen = null;
+		try {
+			cen = shp.centroid();
+		} catch (Exception ex) {
+			logger.error("While getting centroid", ex);
+		}
+		Point2D p = new Point2D.Double(cen.getX(), cen.getY());
+		Rectangle2D bounds = lc.getBounds();
+		//FIXME: Con este posicionamiento, es identico al MarkerCenteredAtPoint
+		//pero es así como lo hacen otros programas
+		//(tal vez, hubo una confusión por el nombre de la constante ON_TOP_OF_THE_POINT).
+		//Entonces sobraría el posicionamiento MarkerCenteredAtPoint debiendose utilizar siempre éste.
+		p.setLocation(p.getX() - (bounds.getWidth()*0.5), p.getY() - bounds.getHeight()*0.5);// - 2);
+		guessed.add(new LabelLocationMetrics(
+				p, 0, true));
+		return guessed;
+	}
+
+	public boolean isSuitableFor(
+			IPlacementConstraints placementConstraints,
+			int shapeType) {
+		
+		
+		if (shapeType == TYPES.POINT) {
+			return placementConstraints.isOnTopOfThePoint();
+		} else{
+			return false;
+		}
+		
+	}
+
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtBest.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtBest.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtBest.java	(revision 40911)
@@ -0,0 +1,123 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * LinePlacementAtBest.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
+ *
+ */
+public class LinePlacementAtBest extends CompoundLabelPlacement {
+	
+	private static Logger logger = LoggerFactory.getLogger(LinePlacementAtBest.class);
+	static private ILabelPlacement[] pl = new ILabelPlacement[] {
+		new LinePlacementInTheMiddle(),
+		new LinePlacementAtExtremities()
+	};
+
+	public LinePlacementAtBest() {
+		super(pl);
+		// a patch just to keep in mind the end of the lines
+	}
+
+
+	public ArrayList<LabelLocationMetrics> guess(ILabelClass lc,
+			Geometry geom, IPlacementConstraints constraints,
+			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
+		
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		ArrayList<LabelLocationMetrics> llc = super.guess(lc, geom, constraints, cartographicSymbolSize, cancel,vp);
+		if (constraints instanceof AbstractPlacementConstraints) {
+			AbstractPlacementConstraints clone;
+			try {
+				clone = (AbstractPlacementConstraints) ((AbstractPlacementConstraints) constraints).clone();
+				clone.setLocationAlongTheLine(IPlacementConstraints.AT_THE_END_OF_THE_LINE);
+				llc.addAll(pl[1].guess(lc, geom, clone, cartographicSymbolSize, cancel,vp));
+			} catch (CloneNotSupportedException e) {
+				// this should never happen but
+				// anyway a warning does not hurt anyone
+				logger.info("Couldn't clone "+constraints.getClass().getName(), e);
+			}
+
+		}
+		return llc;
+	}
+	public boolean isSuitableFor(
+			IPlacementConstraints placementConstraints,
+			int shapeType) {
+		
+		GeometryType gt = null;
+		
+		try {
+			gt = GeometryLocator.getGeometryManager().getGeometryType(
+					shapeType, Geometry.SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			logger.error("While getting aux geo type.", e);
+		}
+		
+		if (gt.isTypeOf(TYPES.CURVE)
+				|| shapeType == TYPES.MULTICURVE) {
+			return placementConstraints != null && placementConstraints.isAtBestOfLine();
+		} else {
+			return false;
+		}
+	}
+
+
+}
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractPlacementConstraints.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractPlacementConstraints.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractPlacementConstraints.java	(revision 40911)
@@ -0,0 +1,247 @@
+package org.gvsig.labeling.placements;
+
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+
+/**
+ * @author  jaume dominguez faus - jaume.dominguez@iver.es
+ */
+public abstract class AbstractPlacementConstraints implements
+Cloneable, IPlacementConstraints {
+	
+	public static final String PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME =
+			"PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME";
+	
+	// CAUTION, THIS IS A CLONEABLE OBJECT, DON'T FORGET TO 
+	// UPDATE clone() METHOD WHEN ADDING FIELDS
+	private int duplicateLabelsMode = ONE_LABEL_PER_FEATURE_PART; // default duplicate treatment
+	private int placementMode;
+	private boolean belowTheLine;
+	private boolean aboveTheLine;
+	private boolean onTheLine;
+	private boolean pageOriented;
+	private int locationAlongLine;
+	private boolean fitInsidePolygon;
+	// CAUTION, THIS IS A CLONEABLE OBJECT, DON'T FORGET TO 
+	// UPDATE clone() METHOD WHEN ADDING FIELDS
+	
+	
+	
+	public void setDuplicateLabelsMode(int mode) {
+		if (mode != REMOVE_DUPLICATE_LABELS &&
+			mode != ONE_LABEL_PER_FEATURE &&
+			mode != ONE_LABEL_PER_FEATURE_PART)
+			throw new IllegalArgumentException(
+					"Only REMOVE_DUPLICATE_LABELS, " +
+					"ONE_LABEL_PER_FEATURE " +
+					"or ONE_LABEL_PER_FEATURE_PARTS allowed");
+		this.duplicateLabelsMode = mode;
+	}
+
+	public void setPlacementMode(int mode) {
+		if (this instanceof PointPlacementConstraints) {
+			if (mode != OFFSET_HORIZONTALY_AROUND_THE_POINT &&
+				mode != ON_TOP_OF_THE_POINT &&
+				mode != AT_SPECIFIED_ANGLE &&
+				mode != AT_ANGLE_SPECIFIED_BY_A_FIELD)
+				throw new IllegalArgumentException(
+						"Only OFFSET_HORIZONTALY_AROUND_THE_POINT, " +
+						"ON_TOP_OF_THE_POINT, " +
+						"AT_SPECIFIED_ANGLE " +
+						"or AT_ANGLE_SPECIFIED_BY_A_FIELD allowed for points: "+ mode);
+		}
+
+		if (this instanceof PolygonPlacementConstraints) {
+			if (mode != HORIZONTAL &&
+				mode != PARALLEL )
+					throw new IllegalArgumentException(
+							"Only HORIZONTAL, " +
+							"or PARALLEL allowed for polygons: "+ mode);
+		}
+
+		if (this instanceof LinePlacementConstraints) {
+					if (mode != HORIZONTAL &&
+				mode != PARALLEL &&
+				mode != FOLLOWING_LINE &&
+				mode != PERPENDICULAR)
+				throw new IllegalArgumentException(
+						"Only HORIZONTAL, PARALLEL," +
+						"FOLLOWING_LINE, or PERPENDICULAR allowed for lines: "+ mode);
+		}
+		this.placementMode = mode;
+	}
+
+	public boolean isHorizontal() {
+		return placementMode == HORIZONTAL;
+	}
+
+	public boolean isPerpendicular() {
+		return placementMode  == PERPENDICULAR;
+	}
+
+	public boolean isFollowingLine() {
+		return placementMode  == FOLLOWING_LINE;
+	}
+
+	public boolean isParallel() {
+		return placementMode == PARALLEL;
+	}
+
+	public int getDuplicateLabelsMode() {
+		return duplicateLabelsMode;
+	}
+
+	/**
+	 * Tells if the place mode selected is to put the label over the <b>POINT</b>
+	 * @return boolean
+	 */
+	public boolean isOnTopOfThePoint() {
+		return placementMode == ON_TOP_OF_THE_POINT;
+	}
+
+	public boolean isBelowTheLine() {
+		return belowTheLine;
+	}
+
+	public boolean isAboveTheLine() {
+		return aboveTheLine;
+	}
+
+	public boolean isOnTheLine() {
+		return onTheLine;
+	}
+
+	public boolean isPageOriented() {
+		return pageOriented;
+	}
+
+	public void setOnTheLine(boolean b) {
+		this.onTheLine = b;
+	}
+
+	public void setPageOriented(boolean b) {
+		this.pageOriented = b;
+	}
+
+	public void setBelowTheLine(boolean b) {
+		this.belowTheLine = b;
+	}
+
+	public void setAboveTheLine(boolean b) {
+		this.aboveTheLine = b;
+	}
+
+	public boolean isAtTheEndOfLine() {
+		return locationAlongLine == AT_THE_END_OF_THE_LINE;
+	}
+
+	public boolean isAtTheBeginingOfLine() {
+		return locationAlongLine == AT_THE_BEGINING_OF_THE_LINE;
+	}
+
+	public boolean isInTheMiddleOfLine() {
+		return locationAlongLine == AT_THE_MIDDLE_OF_THE_LINE;
+	}
+	
+	public boolean isAtBestOfLine() {
+		return locationAlongLine == AT_BEST_OF_LINE;
+	}
+
+	public boolean isAroundThePoint() {
+		return placementMode == OFFSET_HORIZONTALY_AROUND_THE_POINT;
+	}
+
+	public boolean isFitInsidePolygon() {
+		return fitInsidePolygon;
+	}
+
+	public void setFitInsidePolygon(boolean b) {
+		fitInsidePolygon = b;
+	}
+
+	public void setLocationAlongTheLine(int location) {
+		if (location != IPlacementConstraints.AT_THE_MIDDLE_OF_THE_LINE
+			&& location != IPlacementConstraints.AT_THE_BEGINING_OF_THE_LINE
+			&& location != IPlacementConstraints.AT_THE_END_OF_THE_LINE
+			&& location != IPlacementConstraints.AT_BEST_OF_LINE) {
+			throw new IllegalArgumentException("Only IPlacementConstraints.AT_THE_MIDDLE_OF_THE_LINE, " +
+					"IPlacementConstraints.AT_THE_BEGINING_OF_THE_LINE, or " +
+					"IPlacementConstraints.AT_THE_END_OF_THE_LINE, or " +
+					"IPlacementConstraints.AT_BEST_OF_LINE values are allowed" );
+		}
+		this.locationAlongLine = location;
+	}
+	
+	
+	
+	public void saveToState(PersistentState state) throws PersistenceException {
+
+		state.set("duplicateLabelsMode", getDuplicateLabelsMode());
+		state.set("placementMode", placementMode);
+		state.set("locationAlongLine", locationAlongLine);
+		
+		state.set("belowTheLine", isBelowTheLine());
+		state.set("aboveTheLine", isAboveTheLine());
+		state.set("onTheLine", isOnTheLine());
+		state.set("pageOriented", isPageOriented());
+		state.set("fitInsidePolygon", isFitInsidePolygon());
+	}
+
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		
+		setDuplicateLabelsMode(state.getInt("duplicateLabelsMode"));
+		setPlacementMode(state.getInt("placementMode"));
+		locationAlongLine = state.getInt("locationAlongLine");
+		
+		setBelowTheLine(state.getBoolean("belowTheLine"));
+		setAboveTheLine(state.getBoolean("aboveTheLine"));
+		setOnTheLine(state.getBoolean("onTheLine"));
+		setPageOriented(state.getBoolean("pageOriented"));
+		setFitInsidePolygon(state.getBoolean("fitInsidePolygon"));
+	}
+
+	public static void registerPersistent() {
+		
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME) == null ) {
+			DynStruct definition = manager.addDefinition(
+					AbstractPlacementConstraints.class,
+					PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME,
+					PLACEMENT_CONSTRAINTS_PERSISTENCE_NAME +" Persistence definition",
+					null, 
+					null);
+			definition.addDynFieldBoolean("belowTheLine").setMandatory(true);
+			definition.addDynFieldBoolean("aboveTheLine").setMandatory(true);
+			definition.addDynFieldBoolean("onTheLine").setMandatory(true);
+			definition.addDynFieldBoolean("pageOriented").setMandatory(true);
+			definition.addDynFieldBoolean("fitInsidePolygon").setMandatory(true);
+			
+			definition.addDynFieldInt("duplicateLabelsMode").setMandatory(true);
+			definition.addDynFieldInt("placementMode").setMandatory(true);
+			definition.addDynFieldInt("locationAlongLine").setMandatory(true);
+		}		
+	}
+	
+
+	public Object clone() throws CloneNotSupportedException {
+		try {
+			AbstractPlacementConstraints clone = getClass().newInstance();
+			clone.aboveTheLine        = this.aboveTheLine;
+			clone.belowTheLine        = this.belowTheLine;
+			clone.duplicateLabelsMode = this.duplicateLabelsMode;
+			clone.fitInsidePolygon    = this.fitInsidePolygon;
+			clone.locationAlongLine   = this.locationAlongLine;
+			clone.onTheLine           = this.onTheLine;
+			clone.pageOriented        = this.pageOriented;
+			clone.placementMode       = this.placementMode;
+			return clone;
+		} catch (Exception e) {
+			throw new CloneNotSupportedException(e.getMessage());
+		}
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CannotPlaceLabel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CannotPlaceLabel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CannotPlaceLabel.java	(revision 40911)
@@ -0,0 +1,78 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+
+/**
+ *
+ * CannotPlaceLabel.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
+ *
+ */
+public class CannotPlaceLabel implements ILabelPlacement {
+	public static final ArrayList<LabelLocationMetrics> NO_PLACES = new ArrayList<LabelLocationMetrics>();
+
+	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
+			int shapeType) {
+		return true;
+	}
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc,
+			Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize,
+			Cancellable cancel, ViewPort vp) {
+		return NO_PLACES;
+	}
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementInTheMiddle.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementInTheMiddle.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementInTheMiddle.java	(revision 40911)
@@ -0,0 +1,150 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.geom.Point2D;
+
+import org.apache.batik.ext.awt.geom.PathLength;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * LinePlacementInTheMiddle.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
+ *
+ */
+public class LinePlacementInTheMiddle extends AbstractLinePlacement {
+
+	private static Logger logger =
+			LoggerFactory.getLogger(LinePlacementInTheMiddle.class);
+					
+	public boolean isSuitableFor(
+			IPlacementConstraints placementConstraints,
+			int shapeType) {
+		
+		GeometryType gt = null;
+		
+		try {
+			gt = GeometryLocator.getGeometryManager().getGeometryType(
+					shapeType, Geometry.SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			logger.error("While getting aux geo type.", e);
+		}
+		
+		if (gt.isTypeOf(TYPES.CURVE)
+				|| shapeType == TYPES.MULTICURVE) {
+			
+			return placementConstraints != null &&
+			   placementConstraints.isInTheMiddleOfLine()
+			  /* && !placementConstraints.isFollowingLine()*/;
+		} else {
+			return false;
+		}
+		
+	}
+
+	public LabelLocationMetrics initialLocation(ILabelClass lc,
+			IPlacementConstraints pc, PathLength pathLen, Cancellable cancel) {
+		
+		if (cancel.isCanceled()) return null;
+
+		float length = pathLen.lengthOfPath();
+		float distance = (float) (length * 0.5);
+
+
+		double theta = 0;
+		if (pc.isParallel()) {
+			// get the line theta and apply it
+			theta = pathLen.angleAtLength(distance);
+
+		} else if (pc.isPerpendicular()) {
+			// get the line theta with 90 degrees
+			theta = pathLen.angleAtLength(distance) + AbstractLinePlacement.HALF_PI;
+		}
+
+		Point2D p = pathLen.pointAtLength(distance);
+
+		/*
+		 * Offset the point to a distance of the height of the
+		 * label class's height to make the label appear to
+		 * be on the line.
+		 *
+		 */
+		double x = p.getX();
+		double y = p.getY();
+		double halfHeight = lc.getBounds().getHeight()*.5;
+		double halfWidth = lc.getBounds().getWidth()*.5;
+
+		double sinTheta = Math.sin(theta);
+		double cosTheta = Math.cos(theta);
+
+		double xOffset = halfHeight * sinTheta;
+		double yOffset = halfHeight * cosTheta;
+
+		/*
+		 * now, offset the anchor point as much as need to
+		 * make the center of the label be the middle of the
+		 * line
+		 */
+		xOffset -= halfWidth * cosTheta;
+		yOffset += halfWidth * sinTheta;
+
+		p.setLocation(x + xOffset, y - yOffset);
+
+		return new LabelLocationMetrics(
+				p,
+				theta,
+				true);
+	}
+
+}
+
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtExtremities.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtExtremities.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtExtremities.java	(revision 40911)
@@ -0,0 +1,148 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.geom.Point2D;
+
+import org.apache.batik.ext.awt.geom.PathLength;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * LinePlacementAtExtremities.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
+ *
+ */
+public class LinePlacementAtExtremities extends AbstractLinePlacement {
+
+	private static Logger logger =
+			LoggerFactory.getLogger(LinePlacementAtExtremities.class);
+			
+	public LabelLocationMetrics initialLocation(
+			ILabelClass lc,
+			IPlacementConstraints pc, PathLength pathLen,
+			Cancellable cancel) {
+		
+		if (cancel.isCanceled()) return null;
+
+		float distance = 0;
+		if (pc.isAtTheEndOfLine()) {
+			distance = (float) (pathLen.lengthOfPath()) ;
+		}
+
+		Point2D p = pathLen.pointAtLength(distance);
+
+		double theta = 0;
+		if (pc.isParallel()) {
+			// get the line theta and apply it
+			theta = pathLen.angleAtLength(distance);
+
+		} else if (pc.isPerpendicular()) {
+			// get the line theta with 90 degrees
+			theta = pathLen.angleAtLength(distance) + AbstractLinePlacement.HALF_PI;
+		}
+
+		/*
+		 * Offset the point to a distance of the height of the
+		 * label class's height to make the label appear to
+		 * be on the line.
+		 *
+		 */
+		double x = p.getX();
+		double y = p.getY();
+		double halfHeight = lc.getBounds().getHeight()*.5;
+
+		double sinTheta = Math.sin(theta);
+		double cosTheta = Math.cos(theta);
+		double xOffset = halfHeight * sinTheta;
+		double yOffset = halfHeight * cosTheta;
+
+		if (pc.isAtTheEndOfLine()) {
+			double width = lc.getBounds().getWidth();
+			xOffset -= width * cosTheta;
+			yOffset += width * sinTheta;
+		}
+
+		p.setLocation(x + xOffset, y - yOffset);
+
+		return new LabelLocationMetrics(
+				p,
+				theta,
+				true);
+	}
+
+	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
+			int shapeType) {
+		
+		GeometryType gt = null;
+		
+		try {
+			gt = GeometryLocator.getGeometryManager().getGeometryType(
+					shapeType, Geometry.SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			logger.error("While getting aux geo type.", e);
+		}
+		
+		if (gt.isTypeOf(TYPES.CURVE)
+				|| shapeType == TYPES.MULTICURVE) {
+			
+			return placementConstraints != null
+					/* && !placementConstraints.isFollowingLine()*/
+					&& (placementConstraints.isAtTheBeginingOfLine()
+							|| placementConstraints.isAtTheEndOfLine());
+		} else {
+			return false;
+		}
+		
+	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerCenteredAtPoint.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerCenteredAtPoint.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerCenteredAtPoint.java	(revision 40911)
@@ -0,0 +1,97 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.placements;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.util.ArrayList;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MarkerCenteredAtPoint implements ILabelPlacement {
+
+	private static Logger logger =
+			LoggerFactory.getLogger(MarkerCenteredAtPoint.class);
+
+	public ArrayList<LabelLocationMetrics> guess(
+			ILabelClass lc, Geometry geom,
+			IPlacementConstraints placementConstraints,
+			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
+
+		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+
+		Geometry shp = geom.cloneGeometry();
+		shp.transform(vp.getAffineTransform());
+
+		ArrayList<LabelLocationMetrics> guessed =
+				new ArrayList<LabelLocationMetrics>();
+		
+		Point cen = null;
+		try {
+			cen = shp.centroid();
+		} catch (Exception e) {
+			logger.error("While gentting centroid.", e);
+		}
+		Point2D p = new Point2D.Double(cen.getX(), cen.getY());
+
+		Rectangle2D bounds = lc.getBounds();
+		p.setLocation(p.getX() - (bounds.getWidth()*0.5), p.getY() - bounds.getHeight()*0.5);
+		guessed.add(new LabelLocationMetrics(
+				p, 0, true));
+		return guessed;
+	}
+
+	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
+			int shapeType) {
+		return false;
+	}
+
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/LabelClassComparatorByPriority.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/LabelClassComparatorByPriority.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/LabelClassComparatorByPriority.java	(revision 40911)
@@ -0,0 +1,58 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.label;
+
+import java.util.Comparator;
+
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+
+public class LabelClassComparatorByPriority implements Comparator<ILabelClass> {
+	
+	public int compare(ILabelClass o1, ILabelClass o2) {
+		
+		// they will always be LabelClass
+		if (o1 == null && o2 == null) return 0;
+		if (o1 != null && o2 == null) return -1;
+		if (o1 == null && o2 != null) return 1;
+		if (o1.getPriority() < o2.getPriority()) return -1;
+		return 1;
+	}
+}
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/FeatureDependentLabeled.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/FeatureDependentLabeled.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/FeatureDependentLabeled.java	(revision 40911)
@@ -0,0 +1,291 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: FeatureDependentLabeled.java 10671 2007-03-09 08:33:43Z jaume $
+* $Log$
+* Revision 1.2  2007-03-09 08:33:43  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.2  2007/02/01 11:42:47  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.1  2007/01/30 18:10:45  jaume
+* start commiting labeling stuff
+*
+*
+*/
+package org.gvsig.labeling.label;
+
+
+import java.awt.Color;
+import java.awt.Font;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.FeatureQuery;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.fmap.mapcontext.layers.vectorial.IntersectsEnvelopeEvaluator;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.labeling.lang.EvaluatorCreator;
+import org.gvsig.labeling.lang.LabelClassUtils;
+import org.gvsig.labeling.symbol.CharacterMarkerSymbol;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.evaluator.AndEvaluator;
+import org.gvsig.tools.evaluator.Evaluator;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class FeatureDependentLabeled implements ILabelingMethod {
+	
+	public static final String FEATURE_DEP_LABELED_PERSISTENCE_NAME =
+			"FEATURE_DEP_LABELED_PERSISTENCE_NAME";
+
+	private static Logger logger =
+			LoggerFactory.getLogger(FeatureDependentLabeled.class);
+	
+	private boolean flagDefinesPriorities;
+	private List<ILabelClass> classes = new ArrayList<ILabelClass>();
+
+	public void addLabelClass(ILabelClass lbl) throws IllegalArgumentException{
+		if (getLabelClassByName(lbl.getName()) !=null) {
+			throw new IllegalArgumentException("A class with the same name already exists!");
+		}
+		classes.add(lbl);
+	}
+
+	public void deleteLabelClass(ILabelClass lbl) {
+		classes.remove(lbl);
+	}
+
+	public String getClassName() {
+		return getClass().getName();
+	}
+
+	/*
+	public XMLEntity getXMLEntity() {
+		XMLEntity xml = new XMLEntity();
+		xml.putProperty("className", getClassName());
+		xml.putProperty("definesPriorities", definesPriorities());
+
+		LabelClass[] labels = getLabelClasses();
+		if (labels!=null) {
+			XMLEntity xmlLabels = new XMLEntity();
+			xmlLabels.putProperty("id", "LabelClasses");
+			for (int i = 0; i < labels.length; i++) {
+				xmlLabels.addChild(labels[i].getXMLEntity());
+			}
+			xml.addChild(xmlLabels);
+		}
+		return xml;
+	}
+	*/
+
+	public ILabelClass[] getLabelClasses() {
+		return classes.toArray(new ILabelClass[0]);
+	}
+
+	/*
+	public void setXMLEntity(XMLEntity xml) {
+		if (xml.contains("definesPriorities"))
+			setDefinesPriorities(xml.getBooleanProperty("definesPriorities"));
+
+		XMLEntity aux = xml.firstChild("id", "defaultLabelClass");
+
+//		if (aux!=null)
+//			defaultLabel = LabelingFactory.createLabelClassFromXML(aux);
+
+		aux = xml.firstChild("id", "LabelClasses");
+		if (aux!=null) {
+			for (int i = 0; i < aux.getChildrenCount(); i++) {
+				addLabelClass(LabelingFactory.
+						createLabelClassFromXML(aux.getChild(i)));
+			}
+		}
+	}
+	*/
+
+	public boolean allowsMultipleClass() {
+		return true;
+	}
+
+	public void renameLabelClass(ILabelClass lbl, String newName) {
+		ILabelClass label = (ILabelClass) classes.get(classes.indexOf(lbl));
+		label.setName(newName);
+	}
+
+	public FeatureSet getFeatureIteratorByLabelClass(
+			FLyrVect layer,
+			ILabelClass lc,
+			ViewPort viewPort,
+			String[] usedFields) throws DataException {
+		
+		Envelope vp_env = viewPort.getAdjustedEnvelope();
+		IProjection ipro = layer.getProjection();
+		FeatureType fty = layer.getFeatureStore().getDefaultFeatureType();
+		String geo_field_name = fty.getDefaultGeometryAttributeName();
+		
+		IntersectsEnvelopeEvaluator iee = new IntersectsEnvelopeEvaluator(
+				vp_env, ipro, fty, geo_field_name); 
+		
+		FeatureQuery fq = null;
+		FeatureStore fsto = layer.getFeatureStore();
+		
+		if (!LabelClassUtils.isUseSqlQuery(lc)) {
+			/*
+			 * No SQL, use only view port filter
+			 */
+			fq = fsto.createFeatureQuery();
+			fq.addFilter(iee);
+			return fsto.getFeatureSet(fq);
+		}
+		
+		/*
+		 * There is SQL
+		 */
+		String sql_str = lc.getSQLQuery();
+		if (! LabelClassUtils.validExpression(sql_str, fsto, true)) {
+			logger.error("SQL for labeling exists but is not valid: " + sql_str);
+		}
+		
+		Evaluator eval = EvaluatorCreator.getEvaluator(sql_str);
+		/*
+		 * This will make the view port evaluator be applied first
+		 */
+		AndEvaluator and_ev = new AndEvaluator(iee);
+		and_ev.addEvaluator(eval);
+		fq = fsto.createFeatureQuery();
+		fq.addFilter(and_ev);
+		return fsto.getFeatureSet(fq);
+	}
+
+	public boolean definesPriorities() {
+		return flagDefinesPriorities;
+	}
+
+	public void setDefinesPriorities(boolean flag) {
+		if (flag == false) {
+			ILabelClass[] lcs = getLabelClasses();
+			for (int i = 0; i < lcs.length; i++) {
+				lcs[i].setPriority(0);
+			}
+		}
+		flagDefinesPriorities = flag;
+	}
+
+	public void clearAllClasses() {
+		classes.clear();
+	}
+
+	public ILabelClass getLabelClassByName(String labelName) {
+		ILabelClass[] classes = getLabelClasses();
+		for (int i = 0; i < classes.length; i++) {
+			if (classes[i].getName().equals(labelName)) {
+				return classes[i];
+			}
+		}
+		return null;
+	}
+
+	public ILabelingMethod cloneMethod() {
+		
+		ILabelingMethod resp = (ILabelingMethod) LabelClassUtils.clone(this);
+		return resp;
+	}
+	
+	public static void registerPersistent() {
+		
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(FEATURE_DEP_LABELED_PERSISTENCE_NAME)==null ) {
+			DynStruct definition = manager.addDefinition(
+					FeatureDependentLabeled.class,
+					FEATURE_DEP_LABELED_PERSISTENCE_NAME,
+					FEATURE_DEP_LABELED_PERSISTENCE_NAME+" Persistence definition",
+					null, 
+					null
+			);
+			
+			definition.addDynFieldBoolean("definesPriorities").setMandatory(true);
+			definition.addDynFieldList("classes").setClassOfItems(ILabelClass.class)
+			.setMandatory(true);
+		}		
+	}	
+
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		
+		this.setDefinesPriorities(state.getBoolean("definesPriorities"));
+		List aux = state.getList("classes");
+		ILabelClass item = null;
+		Iterator iter = aux.iterator();
+		
+		try {
+			while (iter.hasNext()) {
+				item = (ILabelClass) iter.next();
+				this.addLabelClass(item);
+			}
+		} catch (IllegalArgumentException exc) {
+			throw new PersistenceException(exc);
+		}
+	}
+
+	public void saveToState(PersistentState state) throws PersistenceException {
+		
+		state.set("definesPriorities", flagDefinesPriorities);
+		state.set("classes", classes);
+		
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/OnSelectionLabeled.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/OnSelectionLabeled.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/OnSelectionLabeled.java	(revision 40911)
@@ -0,0 +1,193 @@
+	/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: OnSelectionLabeled.java 10815 2007-03-20 16:16:20Z jaume $
+* $Log$
+* Revision 1.3  2007-03-20 16:16:20  jaume
+* refactored to use ISymbol instead of FSymbol
+*
+* Revision 1.2  2007/03/09 08:33:43  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.2  2007/02/01 11:42:47  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.1  2007/01/30 18:10:45  jaume
+* start commiting labeling stuff
+*
+*
+*/
+package org.gvsig.labeling.label;
+
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.FeatureSelection;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.labeling.lang.LabelClassUtils;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ *
+ * OnSelectionLabeled.java
+ *
+ *
+ * 
+ *
+ */
+public class OnSelectionLabeled implements ILabelingMethod {
+
+	private static final String FIELD_DEFAULT_LABEL = "defaultLabel";
+	private static final String ONSELECTION_LABELING_METHOD_PERSISTENCE_NAME =
+			"ONSELECTION_LABELING_METHOD_PERSISTENCE_NAME";
+	private ILabelClass defaultLabel;
+
+	/**
+	 * Empty constructor for persistence.
+	 */
+	public OnSelectionLabeled() {
+		// Nothing to do
+	}
+
+	public OnSelectionLabeled(ILabelClass defaultLabel) {
+		this.defaultLabel = defaultLabel;
+	}
+
+
+	public void addLabelClass(ILabelClass lbl) {
+		defaultLabel = lbl;
+	}
+
+
+	public void deleteLabelClass(ILabelClass lbl) {
+		// does nothing
+	}
+
+	public boolean allowsMultipleClass() {
+		return false;
+	}
+
+	public void renameLabelClass(ILabelClass lbl, String newName) {
+		// does nothing
+	}
+
+
+	public FeatureSet getFeatureIteratorByLabelClass(FLyrVect layer, ILabelClass lc, ViewPort viewPort, String[] usedFields)
+	throws DataException {
+		
+		FeatureStore fsto = layer.getFeatureStore();
+		FeatureSet fset = (FeatureSelection) fsto.getSelection();
+		return fset;
+	}
+
+	public boolean definesPriorities() {
+		return false;
+	}
+
+	public void setDefinesPriorities(boolean flag) {
+		/* nothing, since only one label class is suported */
+	}
+	
+	public ILabelClass getLabelClassByName(String labelName) {
+		return defaultLabel;
+	}
+
+	public void clearAllClasses() {
+		defaultLabel = null;
+	}
+
+	public ILabelClass[] getLabelClasses() {
+		return defaultLabel == null ? new ILabelClass[0] : new ILabelClass[] { defaultLabel };
+	}
+
+	public ILabelingMethod cloneMethod() {
+		ILabelClass lbl = (ILabelClass) LabelClassUtils.clone(this.defaultLabel);
+		OnSelectionLabeled resp = new OnSelectionLabeled(lbl);
+		return resp;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.tools.persistence.Persistent#loadFromState(org.gvsig.tools.persistence.PersistentState)
+	 */
+	public void loadFromState(PersistentState state)
+			throws PersistenceException {
+		defaultLabel = (ILabelClass) state.get(FIELD_DEFAULT_LABEL);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.tools.persistence.Persistent#saveToState(org.gvsig.tools.persistence.PersistentState)
+	 */
+	public void saveToState(PersistentState state) throws PersistenceException {
+		state.set(FIELD_DEFAULT_LABEL, defaultLabel);
+	}
+	
+	public static void registerPersistent() {
+
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(ONSELECTION_LABELING_METHOD_PERSISTENCE_NAME)==null ) {
+			DynStruct definition = manager.addDefinition(
+					OnSelectionLabeled.class,
+					ONSELECTION_LABELING_METHOD_PERSISTENCE_NAME,
+					ONSELECTION_LABELING_METHOD_PERSISTENCE_NAME+
+					" Persistence definition",
+					null, 
+					null
+			);
+			
+			definition.addDynFieldObject(FIELD_DEFAULT_LABEL).setMandatory(true)
+			.setClassOfValue(ILabelClass.class);
+		}
+		
+	}
+	
+	// =================================================
+	// =================================================
+	
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingStrategy.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingStrategy.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingStrategy.java	(revision 40911)
@@ -0,0 +1,1099 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+ *
+ * $Id: GeneralLabelingStrategy.java 13749 2007-09-17 14:16:11Z jaume $
+ * $Log$
+ * Revision 1.2  2007-09-17 14:16:11  jaume
+ * multilayer symbols sizing bug fixed
+ *
+ * Revision 1.1  2007/05/22 12:17:41  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.1  2007/05/22 10:05:31  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.10  2007/05/17 09:32:06  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.9  2007/05/09 11:04:58  jaume
+ * refactored legend hierarchy
+ *
+ * Revision 1.8  2007/04/13 11:59:30  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.7  2007/04/12 14:28:43  jaume
+ * basic labeling support for lines
+ *
+ * Revision 1.6  2007/04/11 16:01:08  jaume
+ * maybe a label placer refactor
+ *
+ * Revision 1.5  2007/04/10 16:34:01  jaume
+ * towards a styled labeling
+ *
+ * Revision 1.4  2007/04/02 16:34:56  jaume
+ * Styled labeling (start commiting)
+ *
+ * Revision 1.3  2007/03/28 16:48:01  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.2  2007/03/26 14:40:38  jaume
+ * added print method (BUT UNIMPLEMENTED)
+ *
+ * Revision 1.1  2007/03/20 16:16:20  jaume
+ * refactored to use ISymbol instead of FSymbol
+ *
+ * Revision 1.2  2007/03/09 11:20:57  jaume
+ * Advanced symbology (start committing)
+ *
+ * Revision 1.1  2007/03/09 08:33:43  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.1.2.5  2007/02/21 07:34:08  jaume
+ * labeling starts working
+ *
+ * Revision 1.1.2.4  2007/02/15 16:23:44  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.1.2.3  2007/02/09 07:47:05  jaume
+ * Isymbol moved
+ *
+ * Revision 1.1.2.2  2007/02/02 16:21:24  jaume
+ * start commiting labeling stuff
+ *
+ * Revision 1.1.2.1  2007/02/01 17:46:49  jaume
+ * *** empty log message ***
+ *
+ *
+ */
+package org.gvsig.labeling.label;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.awt.image.BufferedImage;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.gvsig.compat.print.PrintAttributes;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryException;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints;
+import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.lang.LabelClassUtils;
+import org.gvsig.labeling.placements.AbstractPlacementConstraints;
+import org.gvsig.labeling.placements.ILabelPlacement;
+import org.gvsig.labeling.placements.LinePlacementConstraints;
+import org.gvsig.labeling.placements.MultiShapePlacementConstraints;
+import org.gvsig.labeling.placements.PlacementManager;
+import org.gvsig.labeling.placements.PointPlacementConstraints;
+import org.gvsig.labeling.placements.PolygonPlacementConstraints;
+import org.gvsig.labeling.placements.RemoveDuplicatesComparator;
+import org.gvsig.labeling.symbol.SmartTextSymbol;
+import org.gvsig.labeling.symbol.SymbolUtils;
+import org.gvsig.symbology.SymbologyLocator;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dispose.DisposableIterator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * GeneralLabelingStrategy.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Jan 4, 2008
+ *
+ */
+public class GeneralLabelingStrategy implements
+ILabelingStrategy, Cloneable, CartographicSupport {
+	
+	private static final Logger logger = LoggerFactory.getLogger(
+			GeneralLabelingStrategy.class);
+	
+	public static final String GENERAL_LABEL_STRATEGY_PERSISTENCE_NAME =
+			"GENERAL_LABEL_STRATEGY_PERSISTENCE_NAME";
+	
+	public static PointPlacementConstraints DefaultPointPlacementConstraints =
+			new PointPlacementConstraints();
+	public static LinePlacementConstraints DefaultLinePlacementConstraints =
+			new LinePlacementConstraints();
+	public static PolygonPlacementConstraints DefaultPolygonPlacementConstraints =
+			new PolygonPlacementConstraints();
+	
+	private static String[] NO_TEXT = { Messages.getText("text_field") };
+	
+	private static MultiShapePlacementConstraints DefaultMultiShapePlacementConstratints =
+			new MultiShapePlacementConstraints();
+	
+	private ILabelingMethod method;
+	private IPlacementConstraints placementConstraints;
+	private IZoomConstraints zoomConstraints;
+	
+	private boolean allowOverlapping;
+	
+	protected FLyrVect layer;
+
+	
+	private long parseTime;
+	private int unit;
+	private int referenceSystem;
+	// private double sizeAfter;
+	private boolean printMode = false; /* indicate whether output is for a print product (PDF, PS, ...) */
+	
+	public GeneralLabelingStrategy() {
+		method =
+				SymbologyLocator.getSymbologyManager().createDefaultLabelingMethod();
+	}
+
+	public void setLayer(FLayer layer) {
+		FLyrVect l = (FLyrVect) layer;
+		this.layer = l;
+	}
+
+	public ILabelingMethod getLabelingMethod() {
+		return method;
+	}
+
+	public void setLabelingMethod(ILabelingMethod method) {
+		this.method = method;
+	}
+
+	private class GeometryItem{
+		public Geometry geom = null;
+		public int weigh = 0;
+		public double savedPerimeter;
+
+		public GeometryItem(Geometry geom, int weigh){
+			this.geom = geom;
+			this.weigh = weigh;
+			this.savedPerimeter = 0;
+		}
+	}
+	public void draw(BufferedImage mapImage, Graphics2D mapGraphics,
+			ViewPort viewPort,
+			Cancellable cancel,
+			double dpi) throws ReadException {
+		
+		int x = (int)viewPort.getOffset().getX();
+		int y = (int)viewPort.getOffset().getY();
+//		boolean bVisualFXEnabled = false; // if true, the user can see how the labeling is drawing up
+
+		//offsets for page generation (PDF, PS, direct printing)
+		int print_offset_x = x;
+		int print_offset_y = y;
+		if (printMode) {
+			//for printing, we never offset the labels themselves
+			x = 0;
+			y = 0;
+			printMode = false;
+		}		
+
+		TreeMap<String[], GeometryItem> labelsToPlace = null;
+		parseTime =0;
+//		long t1 = System.currentTimeMillis();
+		
+		String[] usedFields = getUsedFields();
+
+		int notPlacedCount = 0;
+		int placedCount = 0;
+
+		/*
+		 * Get the label placement solvers according the user's settings
+		 */
+		ILabelPlacement placement = PlacementManager.getPlacement(
+				getPlacementConstraints(), layer.getShapeType());
+
+
+		BufferedImage targetBI;
+		Graphics2D targetGr;
+
+
+		/*
+		 * get an ordered set of the LabelClasses up on the
+		 * label priority
+		 */
+		ILabelClass[] lcs = method.getLabelClasses();
+		TreeSet<ILabelClass> ts = new TreeSet<ILabelClass>(
+				new LabelClassComparatorByPriority());
+
+		for (int i = 0; i < lcs.length; i++) ts.add(lcs[i]);
+
+		if (ts.size()==0) return;
+
+		/*
+		 * now we have an ordered set, it is only need to give a pass
+		 * for each label class to render by priorities.
+		 *
+		 * If no priorities were defined, the following loop only executes
+		 * once
+		 */
+		for (ILabelClass lc : ts) {
+			
+			FeatureSet fset = null;
+			
+			try {
+				fset = method.getFeatureIteratorByLabelClass(
+						layer, lc, viewPort, usedFields);
+			} catch (DataException e) {
+				throw new ReadException(layer.getFeatureStore().getProviderName(), e);
+			}
+
+			// duplicates treatment stuff
+			/* handle the duplicates mode */
+			int duplicateMode = getDuplicateLabelsMode();
+			if (duplicateMode == IPlacementConstraints.REMOVE_DUPLICATE_LABELS) {
+				// we need to register the labels already placed
+
+				labelsToPlace = new TreeMap<String[], GeometryItem>(
+						new RemoveDuplicatesComparator());
+			}
+
+			boolean bLabelsReallocatable = !isAllowingOverlap();
+
+			BufferedImage overlapDetectImage = null;
+			Graphics2D overlapDetectGraphics = null;
+			if (bLabelsReallocatable) {
+				int width = viewPort.getImageWidth() + print_offset_x;
+
+				if(width<0){
+					width = 1;
+				}
+				int height = viewPort.getImageHeight() + print_offset_y;
+				if(height<0){
+					height = 1;
+				}
+				if (mapImage!=null)
+					overlapDetectImage = new BufferedImage(
+							mapImage.getWidth()  + print_offset_x,
+							mapImage.getHeight()  + print_offset_y,
+							BufferedImage.TYPE_INT_ARGB
+				);
+				else
+					overlapDetectImage = new BufferedImage(
+							viewPort.getImageWidth() + print_offset_x,
+							viewPort.getImageHeight() + print_offset_y,
+							BufferedImage.TYPE_INT_ARGB
+					);
+
+				overlapDetectGraphics = overlapDetectImage.createGraphics();
+				overlapDetectGraphics.setRenderingHints(mapGraphics.getRenderingHints());
+			}
+			if (bLabelsReallocatable) {
+				targetBI = overlapDetectImage;
+				targetGr = overlapDetectGraphics;
+				targetGr.translate(-x, -y);
+			} else {
+				targetBI = mapImage;
+				targetGr = mapGraphics;
+			}
+
+			DisposableIterator diter = null;
+			try {
+				diter = fset.fastIterator();
+			} catch (DataException e) {
+				throw new ReadException(layer.getFeatureStore().getProviderName(), e);
+			}
+			Feature featu = null;
+			Geometry geome = null;
+			while ( !cancel.isCanceled() && diter.hasNext()) {
+				
+				featu = (Feature) diter.next();
+				geome = featu.getDefaultGeometry();
+				if (geome == null || geome.getType() == Geometry.TYPES.NULL) {
+					continue;
+				}
+					
+
+				if (!setupLabel(featu, lc, cancel,
+						usedFields, viewPort, dpi, duplicateMode)) {
+					continue;
+				}
+
+				String[] texts = lc.getTexts();
+
+				if (duplicateMode == IPlacementConstraints.REMOVE_DUPLICATE_LABELS) {
+					// check if this text (so label) is already present in the map
+
+					GeometryItem item = labelsToPlace.get(texts);
+					if (item == null){
+						item = new GeometryItem(geome, 0);
+						labelsToPlace.put(texts, item);
+					}
+					if (item.geom != null) {
+						
+						notPlacedCount++;
+						if (geome.getType() != Geometry.TYPES.POINT) {
+							// FJP: Cambiamos la unión por una comprobación de longitud, por ejemplo.
+							// La geometría con mayor longitud del bounding box será la que etiquetamos.
+							// Será inexacto, pero más rápido. Solo lo queremos para saber qué entidad etiquetamos
+							// El problema con la unión es que para líneas va muy mal (no sabes lo que te va
+							// a etiquetar, y para polígonos será muy lenta. De todas formas, habría que evitar
+							// la conversión al JTS.
+//							Geometry jtsGeom = item.geom.toJTSGeometry().union(geom.toJTSGeometry());
+//							if (jtsGeom instanceof LineString) {
+//								CoordinateSequence cs = ((LineString) (jtsGeom)).getCoordinateSequence();
+//								CoordinateSequences.reverse(cs);
+//								jtsGeom = new LineString(cs, null);
+//							}
+//							item.geom = FConverter.jts_to_igeometry(jtsGeom);
+
+							Envelope auxBox = geome.getEnvelope();
+							double perimeterAux = 2 * (auxBox.getLength(0)+auxBox.getLength(1)); 
+							if (perimeterAux > item.savedPerimeter) {
+								item.geom = geome; //FConverter.jts_to_igeometry(jtsGeom);
+								item.savedPerimeter = perimeterAux;
+							}
+						} else {
+							int weigh = item.weigh;
+							
+							try {
+								Point pointFromLabel = item.geom.centroid();
+								Point pointGeome = geome.centroid();
+								item.geom = GeometryLocator.getGeometryManager().createPoint(
+										(pointFromLabel.getX()*weigh + pointGeome.getX())/(weigh+1),
+										(pointFromLabel.getY()*weigh + pointGeome.getY())/(weigh+1),
+										Geometry.SUBTYPES.GEOM2D);
+							} catch (Exception ex) {
+								throw new ReadException(layer.getFeatureStore().getProviderName(), ex);
+							}
+							
+						}
+					} else {
+						item.geom = geome;
+					}
+					item.weigh++;
+				} else {
+					// Check if size is a pixel
+					if (isOnePoint(viewPort, geome)) {
+						continue;
+					}
+//					lc.toCartographicSize(viewPort, dpi, null);
+
+					try {
+						drawLabelInGeom(
+								targetBI, targetGr,
+								lc, placement,
+								viewPort, geome, cancel, dpi,
+								bLabelsReallocatable);
+					} catch (GeometryException e) {
+						throw new ReadException(
+								layer.getFeatureStore().getProviderName(), e);
+					}
+					placedCount++;
+				}
+			}
+			
+			// ======= End iteration in feature set ====================
+			
+			if (duplicateMode == IPlacementConstraints.REMOVE_DUPLICATE_LABELS) {
+				Iterator<String[]> textsIt = labelsToPlace.keySet().iterator();
+				while ( !cancel.isCanceled() && textsIt.hasNext()) {
+					notPlacedCount++;
+					String[] texts = textsIt.next();
+
+					GeometryItem item = labelsToPlace.get(texts);
+					if(item != null){
+						lc.setTexts(texts);
+						// Check if size is a pixel
+						if (isOnePoint(viewPort, item.geom)) {
+							continue;
+						}
+
+//						lc.toCartographicSize(viewPort, dpi, null);
+						try {
+							drawLabelInGeom(targetBI, targetGr,
+									lc, placement, viewPort, item.geom,
+									cancel, dpi, bLabelsReallocatable);
+						} catch (GeometryException e) {
+							throw new ReadException(
+									layer.getFeatureStore().getProviderName(), e);
+						}
+					}
+				}
+			}
+
+			if (bLabelsReallocatable) {
+				targetGr.translate(x, y);
+				if (mapImage!=null) {
+					// Graphics2D aux = (Graphics2D) mapImage.getGraphics();
+					mapGraphics.drawImage(overlapDetectImage, null, null);
+				} else {
+					mapGraphics.drawImage(overlapDetectImage, null, null);
+				}
+			}
+
+
+		} // big iteration
+//		double totalTime = (System.currentTimeMillis()-t1);
+//
+//		int total = placedCount+notPlacedCount;
+//
+//		if (total>0)
+//		Logger.getLogger(getClass()).info("Labeled layer '"+layer.getName()+
+//		"' "+totalTime/1000D+" seconds. "+placedCount+"/"+total+
+//		" labels placed ("+NumberFormat.getInstance().
+//		format(100*placedCount/(double) total)+"%)");
+//
+//		if (cancel.isCanceled()) {
+//			Logger.getLogger(getClass()).info("Layer labeling canceled: '"+
+//					layer.getName()+"'");
+//		} else {
+//			Logger.getLogger(getClass()).info("Total labels parse time = "+
+//					parseTime+" ("+NumberFormat.getInstance().
+//					format(parseTime*100/totalTime)+"%)");
+//		}
+
+	}
+	
+	
+	private void drawLabelInGeom(
+			BufferedImage targetBI, Graphics2D targetGr, ILabelClass lc,
+			ILabelPlacement placement, ViewPort viewPort, Geometry geom,
+			Cancellable cancel,
+			double dpi, boolean bLabelsReallocatable) throws GeometryException {
+
+		lc.toCartographicSize(viewPort, dpi, null);
+		ArrayList<LabelLocationMetrics> llm = null;
+		llm = placement.guess(
+				lc,
+				geom,
+				getPlacementConstraints(),
+				0,
+				cancel,viewPort);
+
+		setReferenceSystem(lc.getReferenceSystem());
+		setUnit(lc.getUnit());
+
+		/*
+		 *  Esto provoca errores en el calculo del tamaño de la LabelClass
+		 * así que se ha diferido el calculo del tamaño con que debería
+		 * dibujarse el texto justo hasta el momento en que se dibuja éste,
+		 * en el metodo draw de la LabelClass.
+		 *
+		 * FIXME: Mantengo el código viejo comentarizado para enfatizar
+		 * este comentario. Eliminar cuando se asuma que es correcto el cambio.
+		 *
+		 */
+
+//		double sizeBefore = lc.getTextSymbol().getFont().getSize();
+
+//		sizeAfter = CartographicSupportToolkit.getCartographicLength(this,
+//				sizeBefore,
+//				viewPort,
+//				MapContext.getScreenDPI());
+
+
+		/*
+		 * search if there is room left by the previous and
+		 * with more priority labels, then check the current
+		 * level
+		 */
+//		if (
+		lookupAndPlaceLabel(targetBI, targetGr, llm,
+				placement, lc, geom, viewPort, cancel,	bLabelsReallocatable);  //{
+
+//			lc.getTextSymbol().setFontSize(sizeBefore);
+//		}
+//		lc.toCartographicSize(viewPort, dpi, null);
+
+	}
+
+	private int getDuplicateLabelsMode() {
+		if (getPlacementConstraints() == null) {
+			return IPlacementConstraints.DefaultDuplicateLabelsMode;
+		}
+		return getPlacementConstraints().getDuplicateLabelsMode();
+	}
+
+	private boolean lookupAndPlaceLabel(BufferedImage bi, Graphics2D g,
+			ArrayList<LabelLocationMetrics> llm, ILabelPlacement placement,
+			ILabelClass lc, Geometry geom,	ViewPort viewPort,
+			Cancellable cancel, boolean bLabelsReallocatable)
+	throws GeometryException {
+		
+		int i;
+		for (i = 0; !cancel.isCanceled() && i < llm.size(); i++) {
+			LabelLocationMetrics labelMetrics = llm.get(i);
+
+			IPlacementConstraints pc = getPlacementConstraints();
+			if(pc instanceof MultiShapePlacementConstraints) {
+				MultiShapePlacementConstraints mpc = (MultiShapePlacementConstraints)pc;
+				
+				GeometryManager gm = GeometryLocator.getGeometryManager();
+				GeometryType line_gt = null;
+				GeometryType polyg_gt = null;
+				GeometryType geom_gt = null;
+				
+				line_gt = gm.getGeometryType(TYPES.CURVE, SUBTYPES.GEOM2D);
+				polyg_gt = gm.getGeometryType(TYPES.SURFACE, SUBTYPES.GEOM2D);
+				geom_gt = gm.getGeometryType(geom.getType(), SUBTYPES.GEOM2D);
+
+				if (geom_gt.getType() == TYPES.POINT ||
+						geom_gt.getType() == TYPES.MULTIPOINT) {
+					pc = mpc.getPointConstraints();
+				} else {
+					if (geom_gt.isTypeOf(TYPES.CURVE) ||
+							geom_gt.getType() == TYPES.MULTICURVE) {
+						pc = mpc.getLineConstraints();
+					} else {
+						if (geom_gt.isTypeOf(TYPES.SURFACE) ||
+								geom_gt.getType() == TYPES.MULTISURFACE) {
+							pc = mpc.getPolygonConstraints();
+						}
+					}
+				}
+			}
+
+			/*
+			 * Ver comentario en el metodo drawLabelInGeom
+			 */
+//			lc.getTextSymbol().setFontSize(sizeAfter);// * FConstant.FONT_HEIGHT_SCALE_FACTOR);
+			if (bLabelsReallocatable) {
+				
+				Geometry aux_geom = null;
+				aux_geom = lc.getShape(labelMetrics);
+				
+				if (!isOverlapping(bi, aux_geom)) {
+
+					if(!pc.isFollowingLine()){
+						lc.draw(g, labelMetrics, geom);
+					} else {
+						
+						ILabelClass smsLc = SymbologyLocator.getSymbologyManager().createDefaultLabel();
+						SmartTextSymbol sms = new SmartTextSymbol(lc.getTextSymbol(), pc);
+
+						double sizeBefore = lc.getTextSymbol().getFont().getSize();
+						double sizeAfter = SymbolUtils.getCartographicLength(this,
+								sizeBefore,
+								viewPort,
+								MapContext.getScreenDPI());
+						sms.setFontSize(sizeAfter);
+
+						smsLc.setTextSymbol(sms);
+						geom.transform(viewPort.getAffineTransform());
+						smsLc.draw(g, null, geom);
+						sms.setFontSize(sizeBefore);
+
+					}
+					return true;
+				}
+			} else {
+				if(!pc.isFollowingLine()){
+					lc.draw(g, labelMetrics, null);
+				}
+				else{
+					ILabelClass smsLc = SymbologyLocator.getSymbologyManager().createDefaultLabel();
+					SmartTextSymbol sms = new SmartTextSymbol(lc.getTextSymbol(),pc);
+
+					double sizeBefore = lc.getTextSymbol().getFont().getSize();
+					double sizeAfter = SymbolUtils.getCartographicLength(this,
+							sizeBefore,
+							viewPort,
+							MapContext.getScreenDPI());
+					sms.setFontSize(sizeAfter);
+
+					smsLc.setTextSymbol(sms);
+					geom.transform(viewPort.getAffineTransform());
+					smsLc.draw(g, null, geom);
+
+					sms.setFontSize(sizeBefore);
+				}
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Divide una cadena de caracteres por el caracter dos puntos
+	 * siempre que no esté entre comillas.
+	 *
+	 * @param str
+	 *            Cadena de caracteres
+	 *
+	 * @return String[]
+	 *
+	 */
+	private String[] divideExpression(String str){
+		ArrayList<String> r = new ArrayList<String>();
+		boolean inQuotationMarks = false;
+		int lastIndex = 0;
+		for(int i=0; i<str.length(); i++){
+			if(str.substring(i, i+1).compareTo("\"")==0){
+				inQuotationMarks = !inQuotationMarks;
+				continue;
+			}
+			if(str.substring(i, i+1).compareTo(":")==0 && !inQuotationMarks){
+				if(lastIndex < i){
+					r.add(str.substring(lastIndex, i));
+				}
+				lastIndex = i+1;
+			}
+		}
+		if(lastIndex < str.length()-1){
+			r.add(str.substring(lastIndex));
+		}
+		String[] result = new String[r.size()];
+		r.toArray(result);
+		return result;
+	}
+
+	/**
+	 * Compute the texts to show in the label and store them in LabelClass.
+	 */
+	@SuppressWarnings("unchecked")
+	private boolean setupLabel(Feature featu, ILabelClass lc,
+			Cancellable cancel, String[] usedFields, ViewPort viewPort,
+			double dpi, int duplicateMode){//, TreeSet<?> placedLabels) {
+
+//		Value[] vv = feat.getAttributes();
+		String expr = lc.getStringLabelExpression();
+
+		long pt1 = System.currentTimeMillis();
+		String[] texts = NO_TEXT;
+		ArrayList<String> preTexts = new ArrayList<String>();
+//		String[] texts = {PluginServices.getText(this, "text_field")};
+		try {
+
+			for (int i = 0; !cancel.isCanceled() && i < usedFields.length; i++) {
+				try {
+					symbol_table.put(usedFields[i], featu.get(usedFields[i]));
+				} catch (Exception e) {
+					logger.error("While geatting feature values.", e);
+				}
+			}
+
+			if (expr != null) {
+
+				if (expr.equals("")) {
+					expr = texts[0];
+				}
+
+				String[] multiexpr = divideExpression(expr);
+				for (int i=0; i<multiexpr.length; i++) {
+					
+					expr = multiexpr[i];
+					Object res = LabelClassUtils.evaluate(expr, featu.getEvaluatorData());
+					if (res != null) {
+						preTexts.add(res.toString());
+					} else {
+						preTexts.add(expr);
+					}
+				}
+				texts = new String[preTexts.size()];
+				preTexts.toArray(texts);
+				parseTime += System.currentTimeMillis()-pt1;
+			}
+			lc.setTexts(texts);
+
+		} catch (Exception e) {
+			logger.error("While setting up label", e);
+			return false;
+		}
+		return true;
+	}
+	
+	private Hashtable<String, Object> symbol_table = new Hashtable<String, Object>();
+
+
+	/*
+	private Expression getEvaluator(String strExpr) {
+		Expression expr = evaluators.get(strExpr);
+		if (expr == null) {
+			LabelExpressionParser p = new LabelExpressionParser(
+					new StringReader(strExpr),symbol_table);
+
+			try {
+				p.LabelExpression();
+			} catch (ParseException e) {
+				logger.error("While getting expression.", e);
+			}
+			expr = (Expression) p.getStack().pop();
+			evaluators.put(strExpr, expr);
+		}
+		return expr;
+	}
+	*/
+
+	private boolean isOverlapping(BufferedImage bi, Geometry lblgeom) {
+		
+		if (lblgeom==null || lblgeom.getType() == TYPES.NULL) {
+			return false;
+		}
+		
+		Envelope rPixels = lblgeom.getEnvelope();
+		int minx = (int) rPixels.getMinimum(0);
+		int miny = (int) rPixels.getMinimum(1);
+		int maxx = (int) rPixels.getMaximum(0);
+		int maxy = (int) rPixels.getMaximum(1);
+		
+		for (int i = minx; i <= maxx; i++) {
+			for (int j = miny; j <= maxy; j++) {
+
+				if (!lblgeom.contains(i, j)
+						// contains seems to don't detect points
+						// placed in the rectangle boundaries
+						&& !lblgeom.intersects(i, j, i, j)) {
+					continue;
+				}
+
+				if (i<0 || j<0) {
+					continue;
+				}
+
+				if (bi.getWidth()<i+1 || bi.getHeight()<j+1) {
+					continue;
+				}
+
+				if (bi.getRGB(i,j)!=0){
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	private boolean isOnePoint(ViewPort viewPort, Geometry geom) {
+		
+		boolean onePoint = false;
+		int shapeType = geom.getType();
+		
+		if (shapeType != TYPES.POINT && shapeType != TYPES.MULTIPOINT) {
+
+			Envelope env = geom.getEnvelope();
+			double dist1Pixel = viewPort.getDist1pixel();
+			onePoint = (env.getLength(0) <= dist1Pixel
+					&& env.getLength(1) <= dist1Pixel);
+		}
+		return onePoint;
+	}
+
+
+	public boolean isAllowingOverlap() {
+		return allowOverlapping;
+	}
+
+	public void setAllowOverlapping(boolean allowOverlapping) {
+		this.allowOverlapping = allowOverlapping;
+	}
+
+	public IPlacementConstraints getPlacementConstraints() {
+		if (placementConstraints != null)
+			return placementConstraints;
+
+		GeometryType gt = null;
+		
+		try {
+			gt = layer.getGeometryType();
+			// force 2d for comparison
+			gt = GeometryLocator.getGeometryManager().getGeometryType(
+					gt.getType(), SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			logger.error("While getting placements constraints.", e);
+			return null;
+		}
+		
+		if (gt.isTypeOf(TYPES.POINT)
+				|| gt.isTypeOf(TYPES.MULTIPOINT)) {
+			return DefaultPointPlacementConstraints;
+		} else {
+			if (gt.isTypeOf(TYPES.CURVE)
+					|| gt.isTypeOf(TYPES.MULTICURVE)) {
+				return DefaultLinePlacementConstraints;
+			} else {
+				if (gt.isTypeOf(TYPES.SURFACE)
+						|| gt.isTypeOf(TYPES.MULTISURFACE)) {
+					return DefaultPolygonPlacementConstraints;
+				} else {
+					if (gt.isTypeOf(TYPES.AGGREGATE) ||
+							gt.isTypeOf(TYPES.GEOMETRY)) {
+						DefaultMultiShapePlacementConstratints.setPointConstraints(DefaultPointPlacementConstraints);
+						DefaultMultiShapePlacementConstratints.setLineConstraints(DefaultLinePlacementConstraints);
+						DefaultMultiShapePlacementConstratints.setPolygonConstraints(DefaultPolygonPlacementConstraints);
+						return DefaultMultiShapePlacementConstratints;
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	public void setPlacementConstraints(IPlacementConstraints constraints) {
+		this.placementConstraints = constraints;
+	}
+
+	public IZoomConstraints getZoomConstraints() {
+		return zoomConstraints;
+	}
+
+	public void setZoomConstraints(IZoomConstraints constraints) {
+		this.zoomConstraints = constraints;
+	}
+
+	public void print(
+			Graphics2D g, ViewPort viewPort,
+			Cancellable cancel, PrintAttributes properties)
+			throws ReadException {
+		
+		double dpi = 100;
+		int pq = properties.getPrintQuality();
+		if (pq == PrintAttributes.PRINT_QUALITY_NORMAL){
+			dpi = 300;
+		} else if (pq == PrintAttributes.PRINT_QUALITY_HIGH){
+			dpi = 600;
+		} else if (pq == PrintAttributes.PRINT_QUALITY_DRAFT){
+			dpi = 72;
+		}
+
+		viewPort.setOffset(new Point2D.Double(0,0));	
+		
+		/* signal printing output */
+		printMode = true;
+
+		draw(null,g,viewPort,cancel,dpi);
+	}
+
+	public String[] getUsedFields() {
+
+		/*
+		 * TODO Solve the problem with the [ and ].
+		 * Currently SQLJEP evaluator cannot tell which
+		 * fields are being used. Options: allow [] and remove them or
+		 * maybe while parsing the SQLJEP evaluator can inform with events like
+		 * "I have found a field"
+		 *  
+		 */
+		
+		FeatureAttributeDescriptor[] atts = null;
+		try {
+			atts = layer.getFeatureStore().getDefaultFeatureType().getAttributeDescriptors();
+		} catch (DataException e) {
+			logger.error("While getting atributes.", e);
+		}
+		
+		int n = atts.length;
+		String[] resp = new String[n];
+		for (int i=0; i<n; i++) {
+			resp[i] = atts[i].getName();
+		}
+		return resp;
+
+		/*
+		ILabelClass[] lcs = method.getLabelClasses();
+		ArrayList<String> fieldNames = new ArrayList<String>();
+		for (int i = 0; i < lcs.length; i++) {
+			if(lcs[i].getLabelExpressions() != null){
+				for (int j = 0; j < lcs[i].getLabelExpressions().length; j++) {
+					String expr = lcs[i].getLabelExpressions()[j];
+					int start;
+					while (expr != null &&
+							(start = expr.indexOf("[")) != -1) {
+						int end = expr.indexOf("]");
+						String field = expr.substring(start+1, end).trim();
+						if (!fieldNames.contains(field))
+							fieldNames.add(field);
+						expr = expr.substring(end+1, expr.length());
+					}
+				}
+			}
+		}
+		return fieldNames.toArray(new String[fieldNames.size()]);
+		*/
+	}
+
+
+	public boolean shouldDrawLabels(double scale) {
+		double minScaleView = -1;
+		double maxScaleView = -1;
+
+		if (zoomConstraints != null) {
+			minScaleView = zoomConstraints.getMinScale();
+			maxScaleView = zoomConstraints.getMaxScale();
+		}
+
+		if (minScaleView == -1 && maxScaleView == -1) {
+			// parameters not set, so the layer decides.
+			return layer.isWithinScale(scale);
+		}
+
+		if (minScaleView >= scale) {
+			return (maxScaleView != -1) ? maxScaleView <= scale : true;
+		}
+
+		return false;
+	}
+
+	public void setUnit(int unitIndex) {
+		unit = unitIndex;
+
+	}
+
+	public int getUnit() {
+		return unit;
+	}
+
+	public int getReferenceSystem() {
+		return referenceSystem;
+	}
+
+	public void setReferenceSystem(int referenceSystem) {
+		this.referenceSystem = referenceSystem;
+	}
+	
+	public static void registerPersistent() {
+		
+        PersistenceManager manager = ToolsLocator.getPersistenceManager();
+        if (manager.getDefinition(GENERAL_LABEL_STRATEGY_PERSISTENCE_NAME) == null) {
+        	DynStruct definition = manager.addDefinition(
+        			GeneralLabelingStrategy.class,
+        			GENERAL_LABEL_STRATEGY_PERSISTENCE_NAME,
+        			GENERAL_LABEL_STRATEGY_PERSISTENCE_NAME+" Persistence definition",
+        			null,
+        			null);
+        	definition.addDynFieldObject("labelingMethod")
+        	.setClassOfValue(ILabelingMethod.class).setMandatory(true);
+        	definition.addDynFieldObject("placementConstraints")
+        	.setClassOfValue(IPlacementConstraints.class).setMandatory(false);
+        	definition.addDynFieldObject("zoomConstraints")
+        	.setClassOfValue(IZoomConstraints.class).setMandatory(false);
+        	
+        	definition.addDynFieldBoolean("allowOverlapping").setMandatory(true);
+        	definition.addDynFieldInt("unit").setMandatory(true);
+        	definition.addDynFieldInt("referenceSystem").setMandatory(true);
+        }
+	}
+	
+	
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		
+		method = (ILabelingMethod) state.get("labelingMethod");
+		
+		if (state.hasValue("placementConstraints")) {
+			placementConstraints =
+					(IPlacementConstraints) state.get("placementConstraints");
+		}
+		
+		if (state.hasValue("zoomConstraints")) {
+			zoomConstraints = (IZoomConstraints) state.get("zoomConstraints");
+		}
+
+		this.allowOverlapping = state.getBoolean("allowOverlapping");
+		this.unit = state.getInt("unit");
+		this.referenceSystem = state.getInt("referenceSystem");
+	}
+
+	public void saveToState(PersistentState state) throws PersistenceException {
+		
+		state.set("labelingMethod", method);
+		
+		if (placementConstraints != null) {
+			state.set("placementConstraints", placementConstraints);
+		}
+
+		if (zoomConstraints != null) {
+			state.set("zoomConstraints", zoomConstraints);
+		}
+
+		state.set("allowOverlapping", allowOverlapping);
+		state.set("unit", unit);
+		state.set("referenceSystem", referenceSystem);
+
+	}
+
+	public double toCartographicSize(ViewPort vp, double dpi, Geometry geom) {
+		/*
+		 * This method is not used but we must implement CartographicSupport
+		 */
+		return 0;
+	}
+
+	public void setCartographicSize(double cartographicSize, Geometry geom) {
+		/*
+		 * This method is not used but we must implement CartographicSupport
+		 */
+	}
+
+	public double getCartographicSize(ViewPort vp, double dpi, Geometry geom) {
+		/*
+		 * This method is not used but we must implement CartographicSupport
+		 */
+		return 0;
+	}
+	
+	public Object clone() throws CloneNotSupportedException {
+		return LabelClassUtils.clone(this);
+	}
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingFactory.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingFactory.java	(revision 40911)
@@ -0,0 +1,81 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.label;
+
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints;
+import org.gvsig.symbology.SymbologyLocator;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelingFactory;
+import org.gvsig.tools.exception.DriverException;
+
+/**
+ * 
+ * ExtendedLabelingFactory.java
+ *
+ * 
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Mar 6, 2008
+ *
+ */
+public class GeneralLabelingFactory {
+
+	public static GeneralLabelingStrategy createStrategy(
+			FLayer layer,
+			ILabelingMethod method,
+			IPlacementConstraints placement_c,
+			IZoomConstraints zoom_c) {
+		
+		GeneralLabelingStrategy resp = new GeneralLabelingStrategy();
+		resp.setLayer(layer);
+		if (method != null) {
+			resp.setLabelingMethod(method);
+		}
+		if (placement_c != null) {
+			resp.setPlacementConstraints(placement_c);
+		}
+		if (zoom_c != null) {
+			resp.setZoomConstraints(zoom_c);
+		}
+		return resp;
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/LabelClassUtils.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/LabelClassUtils.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/LabelClassUtils.java	(revision 40911)
@@ -0,0 +1,133 @@
+package org.gvsig.labeling.lang;
+
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.evaluator.Evaluator;
+import org.gvsig.tools.evaluator.EvaluatorData;
+import org.gvsig.tools.evaluator.EvaluatorException;
+import org.gvsig.tools.evaluator.EvaluatorWithDescriptions;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.Persistent;
+import org.gvsig.tools.persistence.PersistentContext;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.gvsig.tools.persistence.spi.PersistentContextServices;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LabelClassUtils {
+
+    private static Logger logger =
+            LoggerFactory.getLogger(LabelClassUtils.class);
+
+	private static PersistenceManager persman =
+			ToolsLocator.getPersistenceManager();
+
+	public static boolean isUseSqlQuery(ILabelClass lbl) {
+		String str = lbl.getSQLQuery();
+		return str != null && str.trim().length() > 0;
+	}
+	
+	
+	public static Object clone(Persistent persi) {
+		
+		PersistentContext context = null;
+		Object resp = null;
+		PersistentState state = null;
+        try {
+			state = persman.getState(persi, true);
+		} catch (PersistenceException e) {
+			logger.error("While cloning ILabelClass", e);
+			return persi;
+		}
+        context = state.getContext();
+        if (context instanceof PersistentContextServices) {
+            /*
+             * Ensure that previous instances are not used,
+             * so objects are recreated
+             */
+            ((PersistentContextServices) context).clear();
+        }
+        try {
+			resp = persman.create(state);
+		} catch (Exception e) {
+			logger.error("While cloning ILabelClass", e);
+			return persi;
+		}
+        return resp;
+	}
+	
+	public static Object evaluate(String expr, EvaluatorData data) {
+		
+		Evaluator ev = EvaluatorCreator.getEvaluator(expr);
+        Object resp_obj = null;
+        try {
+            resp_obj = ev.evaluate(data);
+        } catch (EvaluatorException e) {
+            /*
+             * Parse exception or field not found or
+             * divison by zero, etc. Malformed expression, not valid
+             */
+            return null;
+        } catch (Exception e) {
+            /*
+             * All other exceptions. Should not happen often.
+             * We assume a strange exception (NPE, etc) and decide it's not a valid expression
+             */
+            return null;
+        }	
+        return resp_obj;
+	}
+	
+	
+	public static boolean validExpression(
+			String str, FeatureStore sto, boolean must_be_boolean) {
+		
+    	Feature dummyfeat = null;;
+		try {
+			dummyfeat = sto.createNewFeature(true);
+		} catch (DataException e1) {
+			logger.error("While getting dummy feature in labeling expression.", e1);
+			return false;
+		}
+		
+		
+        EvaluatorWithDescriptions evde = EvaluatorCreator.getEvaluator(str);
+        Object resp_obj = null;
+        try {
+            /*
+             * Try evaluate feature with default values
+             */
+            resp_obj = evde.evaluate(dummyfeat.getEvaluatorData());
+        } catch (EvaluatorException e) {
+            /*
+             * Parse exception or field not found or
+             * divison by zero, etc.
+             * Malformed expression, not valid
+             */
+            return false;
+        } catch (Exception e) {
+            /*
+             * All other exceptions.
+             * Should not happen often.
+             * We assume a strange
+             * exception (NPE, etc) and decide it's not a valid
+             * expression
+             *  
+             */
+            return false;
+        }
+
+        if (must_be_boolean) {
+        	return resp_obj.getClass() == Boolean.class;
+        } else {
+        	return true;
+        }
+		
+	}
+	
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/LabelFieldComparator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/LabelFieldComparator.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/LabelFieldComparator.java	(revision 40911)
@@ -0,0 +1,71 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.lang;
+
+import java.util.Comparator;
+
+public class LabelFieldComparator implements Comparator<LabelField> {
+
+	 public int compare(LabelField o1, LabelField o2)
+	   {
+	      if ( o1 != null && o2 == null )
+	         return -1;
+	      if ( o1 == null && o2 != null )
+	         return 1;
+	      if ( o1 == null && o2 == null )
+	         return 0;
+	      if ( o1.pos <= o2.pos )
+	         return -1;
+	      else
+	         return 1;
+	   }
+
+}
+class LabelField
+{
+   String text;
+   int pos;
+   public LabelField(String text,int pos)
+   {
+      this.text = text;
+      this.pos = pos;
+   }
+}
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/EvaluatorCreator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/EvaluatorCreator.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/lang/EvaluatorCreator.java	(revision 40911)
@@ -0,0 +1,68 @@
+package org.gvsig.labeling.lang;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.gvsig.tools.evaluator.EvaluatorWithDescriptions;
+import org.gvsig.tools.evaluator.sqljep.SQLJEPEvaluator;
+
+
+/**
+ * 
+ * Utility class to centralize the creation of an
+ * @link {@link EvaluatorWithDescriptions}
+ * 
+ * TODO Perhaps create a manager in Tools to perform this operation
+ * 
+ * @author jldominguez
+ *
+ */
+public class EvaluatorCreator {
+
+	private static Map<String, EvaluatorWithDescriptions> evCache =
+			new HashMap<String, EvaluatorWithDescriptions>();
+	
+	static {
+		for (int i=0; i<200; i++) {
+			String e = "XXX" + i;
+			SQLJEPEvaluator p = new SQLJEPEvaluator(e);
+			evCache.put(e, p);
+		}
+	}
+	
+	
+    /**
+     * Create an {@link EvaluatorWithDescriptions} that uses
+     * the string expression provided
+     * 
+     * @param expr
+     * @return
+     */
+    public static EvaluatorWithDescriptions getEvaluator(String expr) {
+    	
+    	EvaluatorWithDescriptions resp = evCache.get(expr);
+    	if (resp == null) {
+    		resp = new SQLJEPEvaluator(expr);
+    		if (evCache.size() > 100) {
+    			removeOne(evCache);
+    		}
+    		evCache.put(expr, resp);
+    	}
+        return resp; 
+    }
+    
+	private static void removeOne(
+			Map<String, EvaluatorWithDescriptions> themap) {
+		
+		Iterator<String> iter = themap.keySet().iterator();
+		int count = 50;
+		String k = null;
+		while (iter.hasNext() && count > 0) {
+			k = iter.next();
+			count--;
+		}
+		themap.remove(k);
+	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/IPlacementProperties.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/IPlacementProperties.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/IPlacementProperties.java	(revision 40911)
@@ -0,0 +1,35 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.event.ActionListener;
+
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+
+public interface IPlacementProperties extends IWindow, ActionListener {
+	public IPlacementConstraints getPlacementConstraints();
+
+	
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/DuplicateLayersMode.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/DuplicateLayersMode.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/DuplicateLayersMode.java	(revision 40911)
@@ -0,0 +1,125 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JRadioButton;
+
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
+import org.gvsig.i18n.Messages;
+
+public class DuplicateLayersMode extends GridBagLayoutPanel
+implements ActionListener {
+	
+	private static final long serialVersionUID = 1091963463412809652L;
+	private JRadioButton rdBtnRemoveDuplicates;
+	private JRadioButton rdBtnOnePerFeature;
+	private JRadioButton rdBtnOnePerFeaturePart;
+	
+	private ActionListener actListeneter = null;
+	
+	public DuplicateLayersMode(ActionListener act_lis) {
+		super();
+		actListeneter = act_lis;
+		initialize();
+	}
+	private void initialize() {
+		setBorder(BorderFactory.
+				createTitledBorder(null,
+						Messages.getText("duplicate_labels")));
+		addComponent(getRdBtnRemoveDuplicates());
+		addComponent(getRdBtnOnePerFeature());
+		addComponent(getRdBtnOnePerFeaturePart());
+
+		ButtonGroup group = new ButtonGroup();
+		group.add(getRdBtnOnePerFeature());
+		group.add(getRdBtnOnePerFeaturePart());
+		group.add(getRdBtnRemoveDuplicates());
+	}
+	
+
+	private JRadioButton getRdBtnOnePerFeaturePart() {
+		if (rdBtnOnePerFeaturePart == null) {
+			rdBtnOnePerFeaturePart = new JRadioButton(
+					Messages.getText("place_one_label_per_feature_part"));
+			rdBtnOnePerFeaturePart.addActionListener(this);
+			
+		}
+		return rdBtnOnePerFeaturePart;
+	}
+
+	private JRadioButton getRdBtnOnePerFeature() {
+		if (rdBtnOnePerFeature == null) {
+			rdBtnOnePerFeature = new JRadioButton(
+					Messages.getText("place_one_label_per_feature"));
+			rdBtnOnePerFeature.setSelected(true);
+			rdBtnOnePerFeature.addActionListener(this);
+		}
+		return rdBtnOnePerFeature;
+	}
+
+	private JRadioButton getRdBtnRemoveDuplicates() {
+		if (rdBtnRemoveDuplicates == null) {
+			rdBtnRemoveDuplicates = new JRadioButton(
+					Messages.getText("remove_duplicate_labels"));
+			rdBtnRemoveDuplicates.addActionListener(this);
+
+		}
+		return rdBtnRemoveDuplicates;
+	}
+	
+	public void setMode(int dupMode) {
+		
+		rdBtnRemoveDuplicates.setSelected(dupMode == IPlacementConstraints.REMOVE_DUPLICATE_LABELS);
+		rdBtnOnePerFeature.setSelected(dupMode == IPlacementConstraints.ONE_LABEL_PER_FEATURE);
+		rdBtnOnePerFeaturePart.setSelected(dupMode == IPlacementConstraints.ONE_LABEL_PER_FEATURE_PART);
+	}
+	
+	public int getMode() {
+		if (rdBtnRemoveDuplicates.isSelected()) {
+			return IPlacementConstraints.REMOVE_DUPLICATE_LABELS;
+		}
+		if (rdBtnOnePerFeature.isSelected()) {
+			return IPlacementConstraints.ONE_LABEL_PER_FEATURE;
+		}
+		if (rdBtnOnePerFeaturePart.isSelected()) {
+			return IPlacementConstraints.ONE_LABEL_PER_FEATURE_PART;
+		}
+		
+		throw new Error("Unsupported layer duplicates mode");
+	}
+	public void actionPerformed(ActionEvent e) {
+		
+		if (actListeneter != null) {
+			ActionEvent aev = new ActionEvent(this, 0, "");
+			actListeneter.actionPerformed(aev);
+		}
+		
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/MultiShapePlacementProperties.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/MultiShapePlacementProperties.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/MultiShapePlacementProperties.java	(revision 40911)
@@ -0,0 +1,160 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryException;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.placements.AbstractPlacementConstraints;
+import org.gvsig.labeling.placements.LinePlacementConstraints;
+import org.gvsig.labeling.placements.MultiShapePlacementConstraints;
+import org.gvsig.labeling.placements.PlacementManager;
+import org.gvsig.labeling.placements.PointPlacementConstraints;
+import org.gvsig.labeling.placements.PolygonPlacementConstraints;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class MultiShapePlacementProperties extends JPanel
+implements IPlacementProperties {
+	
+	private static Logger logger = LoggerFactory.getLogger(
+			MultiShapePlacementProperties.class);
+	private static final long serialVersionUID = 2935114466845029008L;
+	private PlacementProperties pointProperties;
+	private PlacementProperties lineProperties;
+	private PlacementProperties polygonProperties;
+	private DuplicateLayersMode dupMode;
+	
+	
+	public MultiShapePlacementProperties(
+			MultiShapePlacementConstraints constraints) throws Exception {
+		
+		MultiShapePlacementConstraints c = null;
+		if (constraints != null) {
+			c = (MultiShapePlacementConstraints) constraints.clone();
+		} else {
+			c = (MultiShapePlacementConstraints)
+					PlacementManager.createPlacementConstraints(TYPES.GEOMETRY);
+		}
+		
+		this.pointProperties = new PlacementProperties(
+				c.getPointConstraints(), TYPES.POINT, getDuplicatesMode());
+		this.lineProperties = new PlacementProperties(
+				c.getLineConstraints(), TYPES.CURVE, getDuplicatesMode());
+		this.polygonProperties = new PlacementProperties(
+				c.getPolygonConstraints(), TYPES.SURFACE, getDuplicatesMode());
+		initialize();
+	}
+	
+	private DuplicateLayersMode getDuplicatesMode() {
+		if (dupMode == null) {
+			dupMode = new DuplicateLayersMode(null);
+		}
+		return dupMode;
+	}
+	
+	private void initialize() { 
+		setLayout(new BorderLayout());
+		JPanel aux = new JPanel(new BorderLayout());
+		JTabbedPane p = new JTabbedPane();
+		
+		p.addTab(Messages.getText("points"), pointProperties);
+		p.addTab(Messages.getText("lines"), lineProperties);
+		p.addTab(Messages.getText("polygon"), polygonProperties);
+		setLayout(new BorderLayout());
+		aux.add(p, BorderLayout.CENTER);
+		aux.add(getDuplicatesMode(), BorderLayout.SOUTH);
+		add(aux, BorderLayout.CENTER);
+	}
+
+	public IPlacementConstraints getPlacementConstraints() {
+		return new MultiShapePlacementConstraints(
+				(PointPlacementConstraints) pointProperties.getPlacementConstraints(),
+				(LinePlacementConstraints) lineProperties.getPlacementConstraints(),
+				(PolygonPlacementConstraints) polygonProperties.getPlacementConstraints());
+				
+	}
+	
+	public WindowInfo getWindowInfo() {
+		return pointProperties.getWindowInfo();
+	}
+	
+	public Object getWindowProfile() {
+		return pointProperties.getWindowProfile();
+	}
+	
+	
+	public void actionPerformed(ActionEvent e) {
+		boolean okPressed = "OK".equals(e.getActionCommand()); 
+		boolean cancelPressed = "CANCEL".equals(e.getActionCommand());
+		if (okPressed || cancelPressed) {
+			if (okPressed) {
+				try {
+					pointProperties.applyConstraints();
+					lineProperties.applyConstraints();
+					polygonProperties.applyConstraints();
+				} catch (GeometryException e1) {
+					logger.error("While applying constraints.", e1);
+				}
+			}
+
+			if ("CANCEL".equals(e.getActionCommand())) {
+				pointProperties.constraints   = pointProperties.oldConstraints;
+				lineProperties.constraints    = lineProperties.oldConstraints;
+				polygonProperties.constraints = polygonProperties.oldConstraints;
+			}
+			
+			ApplicationLocator.getManager().getUIManager().closeWindow(this);
+			
+			return;
+		}
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/AbstractLabelingMethodPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/AbstractLabelingMethodPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/AbstractLabelingMethodPanel.java	(revision 40911)
@@ -0,0 +1,97 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.beans.PropertyChangeListener;
+
+import javax.swing.JPanel;
+
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+
+
+public abstract class AbstractLabelingMethodPanel extends JPanel implements PropertyChangeListener {
+	
+	public static final String PLACEMENT_CONSTRAINTS = "PLACEMENT_CONSTRAINTS";
+	public static final String ALLOW_OVERLAP = "ALLOW_OVERLAP";
+	public static final String ZOOM_CONSTRAINTS= "ZOOM_CONSTRAINTS";
+	
+	protected FLyrVect layer;
+	protected ILabelingMethod method;
+	
+	public abstract String getName();
+	public abstract Class<? extends ILabelingMethod> getLabelingMethodClass();
+	public void setModel(ILabelingMethod method, FLyrVect srcLayer)
+			throws ReadException {
+		
+		if (srcLayer == null) {
+			throw new ReadException("FLyrVect is null",
+					new Exception("FLyrVect is null"));
+		}
+		this.layer = srcLayer;
+
+		try {
+			if (method!= null && method.getClass().equals(getLabelingMethodClass())) {
+				this.method = method;
+			} else {
+				this.method = getLabelingMethodClass().newInstance();
+			}
+			initializePanel();
+			
+		} catch (Exception e) {
+			
+			throw new ReadException(
+					srcLayer.getFeatureStore().getName(), 
+					new Exception("Unable to load labeling method. Is it in your classpath?", e)); 
+		}
+		
+		try {
+			fillPanel(this.method, srcLayer.getFeatureStore().getDefaultFeatureType());
+		} catch (DataException de) {
+			throw new ReadException(srcLayer.getFeatureStore().getName(), de);
+		}
+		
+	}
+	
+	protected abstract void initializePanel() ;
+	public abstract void fillPanel(
+			ILabelingMethod method,
+			FeatureType ftype) throws ReadException;
+	
+	public String toString() {
+		return getName();
+	}
+	
+	public ILabelingMethod getMethod() {
+		return method; 
+	}
+	
+	public boolean equals(Object obj) {
+		if (obj == null) return false;
+		return getClass().equals(obj.getClass());
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/DefaultLabeling.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/DefaultLabeling.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/DefaultLabeling.java	(revision 40911)
@@ -0,0 +1,350 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.IllegalComponentStateException;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.beans.PropertyChangeEvent;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JPanel;
+import javax.swing.JSplitPane;
+
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureSelection;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints;
+import org.gvsig.gui.beans.swing.JBlank;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.gui.styling.LayerPreview;
+import org.gvsig.labeling.label.GeneralLabelingStrategy;
+import org.gvsig.labeling.lang.LabelClassUtils;
+import org.gvsig.symbology.SymbologyLocator;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.DefaultLabelingMethod;
+import org.gvsig.tools.dispose.DisposableIterator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class DefaultLabeling extends AbstractLabelingMethodPanel implements ActionListener {
+	
+	private static final Logger logger =
+			LoggerFactory.getLogger(DefaultLabeling.class);
+	
+	private static final long serialVersionUID = 7100208944546698724L;
+	private ILabelClass defaultLabel;
+	private IPlacementConstraints placementConstraints;
+	private LayerPreview layerPrev;
+	private JCheckBox enableLayerPrev;
+	private LabelClassPreview labelPrev;
+	private JButton btnProperties;
+	
+	private FeatureAttributeDescriptor[] fieldDescs;
+	
+	private boolean allowOverlap;
+	private IZoomConstraints zoomConstraints;
+	private LabelClassProperties lcProp;
+
+	public Class<? extends ILabelingMethod> getLabelingMethodClass() {
+		return DefaultLabelingMethod.class;
+	}
+
+
+	public String getName() {
+		return Messages.getText("label_features_in_the_same_way") + ".";
+	}
+
+	@Override
+	public void fillPanel(ILabelingMethod method, FeatureType fty) {
+		try {
+			if (enableLayerPrev.isSelected()) {
+				layerPrev.setLayer(layer);
+			} else {
+				layerPrev.setLayer(null);
+			}
+
+			fieldDescs = fty.getAttributeDescriptors();
+			
+			ILabelingStrategy labeling = layer.getLabelingStrategy();
+			if (!(labeling instanceof GeneralLabelingStrategy)) {
+				labeling = new GeneralLabelingStrategy();
+				labeling.setLayer(layer);
+				layer.setLabelingStrategy(labeling);
+			}
+
+		} catch (Exception e) {
+			NotificationManager.addWarning(e.getMessage(), e);
+		}
+
+		ILabelClass lc = null;
+		if (method.getLabelClasses() != null && method.getLabelClasses().length > 0) {
+			lc = method.getLabelClasses()[0];
+		} else {
+			lc = SymbologyLocator.getSymbologyManager().createDefaultLabel();
+		}
+		setLabel(lc);
+		getLcProp();
+	}
+
+	private JButton getBtnProperties(){
+		if (btnProperties == null){
+			btnProperties = new JButton(Messages.getText("properties"));
+			btnProperties.addActionListener(this);
+		}
+		return btnProperties;
+	}
+
+	private LabelClassPreview getLabelPrev(){
+		if (labelPrev == null){
+			labelPrev = new LabelClassPreview();
+		}
+		return labelPrev;
+	}
+
+	private JCheckBox getEnableLayerPreview(){
+		if(enableLayerPrev == null){
+			enableLayerPrev = new JCheckBox(
+					Messages.getText("Enable_layer_preview"));
+			enableLayerPrev.addItemListener(new ItemListener() {
+
+				public void itemStateChanged(ItemEvent e) {
+					try {
+						if (e.getStateChange()==ItemEvent.SELECTED) {
+							layerPrev.setLayer(layer);
+						}
+						else if (e.getStateChange()==ItemEvent.DESELECTED) {
+							layerPrev.setLayer(null);
+						}
+					} catch (ReadException e1) {
+						logger.error("While setting changing layer in preview", e1);
+					}
+				}
+			});
+		}
+		return enableLayerPrev;
+	}
+
+	private LayerPreview getLayerPreview(){
+		if (layerPrev == null){
+			layerPrev = new LayerPreview();
+		}
+		return layerPrev;
+	}
+	@Override
+	protected void initializePanel() {
+		setLayout(new BorderLayout());
+		JSplitPane scrl = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
+		scrl.add(getLayerPreview(), JSplitPane.LEFT);
+
+		labelPrev = getLabelPrev(); //new LabelClassPreview();
+		JPanel aux = new JPanel(new BorderLayout());
+		aux.add(new JBlank(10, 10), BorderLayout.NORTH );
+		aux.add(new JBlank(10, 10), BorderLayout.WEST );
+		aux.add(labelPrev, BorderLayout.CENTER);
+		aux.add(new JBlank(10, 10), BorderLayout.EAST );
+		JPanel aux2 = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 10));
+		btnProperties = getBtnProperties();
+		aux2.add(btnProperties);
+//		btnProperties.addActionListener(this);
+		aux.add(aux2, BorderLayout.SOUTH);
+		scrl.add(aux, JSplitPane.RIGHT);
+		add(scrl, BorderLayout.CENTER);
+		scrl.setDividerLocation(500);
+
+		getEnableLayerPreview().setSelected(false);
+		add(enableLayerPrev, BorderLayout.SOUTH);
+	}
+
+	private LabelClassProperties getLcProp(){
+		if(lcProp == null) {
+			
+			int n = this.fieldDescs.length;
+			String[] fnames = new String[n];
+			int[] ftypes = new int[n];
+			for (int i=0; i<n; i++) {
+				fnames[i] = fieldDescs[i].getName();
+				ftypes[i] = fieldDescs[i].getType();
+			}
+			lcProp = new LabelClassProperties(this.layer.getFeatureStore());
+			lcProp.setLabelClass(method.getLabelClasses()[0]);
+		}
+		return lcProp;
+
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource().equals(getBtnProperties())) {
+//			LabelClassProperties lcProp = new LabelClassProperties(fieldNames, fieldTypes);
+//			lcProp.setLabelClass(method.getLabelClasses()[0]);
+//			PluginServices.getMDIManager().addWindow(lcProp);
+//			setLabel(lcProp.getLabelClass());
+			LabelClassProperties lcProp = getLcProp();
+			ILabelClass lc = defaultLabel;
+			lcProp.setLabelClass(lc);
+			boolean eval = false;
+			while (!eval){
+				
+				ApplicationLocator.getManager().getUIManager().addWindow(lcProp);
+				if(!lcProp.isAccepted()){ break; };
+				lc = lcProp.getLabelClass();
+				eval = checkValidSQL(lc);
+			}
+			setLabel(lc);
+		}
+	}
+
+	private boolean checkValidSQL(ILabelClass lc){
+		
+		String sqlQuery = lc.getSQLQuery();
+		if (sqlQuery != null && sqlQuery.trim().length() > 0) {
+			return LabelClassUtils.validExpression(
+					sqlQuery, layer.getFeatureStore(), true);
+		} else {
+			return true;
+		}
+	
+	}
+
+	private void setLabel(ILabelClass labelClass) {
+		
+		defaultLabel = labelClass;
+		// defaultLabel = LabelingFactory.createLabelClassFromXML(labelClass.getXMLEntity());
+		labelPrev.setLabelClass(defaultLabel);
+		method = newMethodForThePreview(defaultLabel);
+
+		updatePreview();
+
+	}
+
+	protected ILabelingMethod newMethodForThePreview(ILabelClass defaultLabel) {
+		
+		ILabelingMethod resp =
+				SymbologyLocator.getSymbologyManager().createDefaultLabelingMethod();
+		resp.addLabelClass(defaultLabel);
+		return resp;
+	}
+
+	private void updatePreview() {
+		
+		ILabelingStrategy stra = layer.getLabelingStrategy();
+		if (method == null){
+			stra.setLabelingMethod(newMethodForThePreview(defaultLabel));
+		} else {
+			stra.setLabelingMethod(method);
+		}
+//		s.setPlacementConstraints(placementConstraints);
+//		s.setAllowOverlapping(allowOverlap);
+//		s.setZoomConstraints(zoomConstraints);
+
+		layer.setIsLabeled(true);
+		
+		DisposableIterator diter = null;
+		FeatureSelection fsel = null;
+		
+		try {
+			diter = layer.getFeatureStore().getFeatureSet().fastIterator();
+			fsel = layer.getFeatureStore().getFeatureSelection();
+			fsel.deselectAll();
+		} catch (DataException de) {
+			logger.error("While getting store selection", de);
+			return;
+		}
+		
+		long count = 0;
+		Feature feat = null;
+		while (diter.hasNext() && count < 200) {
+			feat = (Feature) diter.next();
+			if (count % 4 == 0) {
+				fsel.select(feat);
+			}
+			count++;
+		}
+		diter.dispose();
+
+		try {
+			Rectangle r = layerPrev.getBounds();
+			r.setLocation(layerPrev.getLocationOnScreen());
+			layerPrev.paintImmediately(r);
+			layerPrev.doLayout();
+		} catch (IllegalComponentStateException ex) {
+			// this happens when the component is not showing in the
+			// screen. If that is the case, then we don't need to do
+			// anything.
+		}
+
+	}
+
+	public void propertyChange(PropertyChangeEvent evt) {
+		
+		String prop = evt.getPropertyName();
+		ILabelingStrategy strat = layer.getLabelingStrategy();
+
+		if (AbstractLabelingMethodPanel.PLACEMENT_CONSTRAINTS.equals(prop)) {
+			placementConstraints = (IPlacementConstraints) evt.getNewValue();
+			strat.setPlacementConstraints(placementConstraints);
+		} else if ((strat instanceof GeneralLabelingStrategy) &&
+				AbstractLabelingMethodPanel.ALLOW_OVERLAP.equals(prop)) {
+			allowOverlap = (Boolean) evt.getNewValue();
+			((GeneralLabelingStrategy) strat).setAllowOverlapping(allowOverlap);
+		} else if (AbstractLabelingMethodPanel.ZOOM_CONSTRAINTS.equals(prop)) {
+			zoomConstraints = (IZoomConstraints) evt.getNewValue();
+			strat.setZoomConstraints(zoomConstraints);
+		}
+
+		updatePreview();
+	}
+
+	public void setEnabled(boolean enabled) {
+		super.setEnabled(enabled);
+		if (layerPrev!=null) {
+			layerPrev.setEnabled(enabled);
+		};
+		if (labelPrev!=null) {
+			labelPrev.setEnabled(enabled);
+		};
+		if (btnProperties!=null) {
+			btnProperties.setEnabled(enabled);
+		};
+	}
+	
+
+
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/FeatureDependent.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/FeatureDependent.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/FeatureDependent.java	(revision 40911)
@@ -0,0 +1,544 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.beans.PropertyChangeEvent;
+
+import javax.swing.AbstractCellEditor;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableCellEditor;
+import javax.swing.table.TableCellRenderer;
+import javax.swing.table.TableColumnModel;
+
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
+import org.gvsig.gui.beans.swing.JBlank;
+import org.gvsig.gui.beans.swing.celleditors.BooleanTableCellEditor;
+import org.gvsig.gui.beans.swing.cellrenderers.BooleanTableCellRenderer;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.label.FeatureDependentLabeled;
+import org.gvsig.symbology.SymbologyLocator;
+
+public class FeatureDependent extends AbstractLabelingMethodPanel implements ActionListener{
+	private static final long serialVersionUID = 5493451803343695650L;
+	private static int NAME_FIELD_INDEX = 0;
+	private static int PREVIEW_FIELD_INDEX = 1;
+	private static int FILTER_FIELD_INDEX = 2;
+	private static int LABEL_EXPRESSION_FIELD_INDEX = 3;
+	private static int VISIBLE_FIELD_INDEX = 4;
+	JTable tblClasses = null;
+	private JButton btnMoveUpClass;
+	private JButton btnAddClass;
+	private JCheckBox chkLabel;
+	private JCheckBox chkDefinePriorities;
+	private JScrollPane scrlPan;
+	private boolean openEditor = false;
+	private JButton btnMoveDownClass;
+	private JButton btnDelClass;
+	
+	/*
+	private String[] fieldNames;
+	private int[] fieldTypes;
+	*/
+	private JPanel buttonPanel;
+
+	@Override
+	public String getName() {
+		
+		return Messages.getText(
+				"define_classes_of_features_and_label_each_differently")+".";
+	}
+
+	@Override
+	public Class<? extends ILabelingMethod> getLabelingMethodClass() {
+		return FeatureDependentLabeled.class;
+	}
+
+
+	private JCheckBox getChkDefinePriorities() {
+		if (chkDefinePriorities == null) {
+			chkDefinePriorities = new JCheckBox(Messages.getText("label_priority"));
+			chkDefinePriorities.addActionListener(this);
+			chkDefinePriorities.setName("CHK_DEFINE_PRIORITIES");
+		}
+		return chkDefinePriorities;
+	}
+
+
+	private JButton getBtnDelClass() {
+		if (btnDelClass == null) {
+			btnDelClass = new JButton(Messages.getText("delete"));
+			btnDelClass.setName("BTNDELCLASS");
+			btnDelClass.addActionListener(this);
+		}
+		return btnDelClass;
+	}
+
+	private JButton getBtnAddClass() {
+		if (btnAddClass == null) {
+			btnAddClass = new JButton(Messages.getText("add"));
+			btnAddClass.setName("BTNADDCLASS");
+			btnAddClass.addActionListener(this);
+		}
+		return btnAddClass;
+	}
+
+	private JButton getBtnMoveUpClass() {
+		if (btnMoveUpClass == null) {
+			btnMoveUpClass = new JButton(Messages.getText("move_up"));
+			btnMoveUpClass.setName("BTNMOVEUPCLASS");
+			btnMoveUpClass.addActionListener(this);
+		}
+		return btnMoveUpClass;
+	}
+
+	private JButton getBtnMoveDownClass() {
+		if (btnMoveDownClass == null) {
+			btnMoveDownClass = new JButton(Messages.getText("move_down"));
+			btnMoveDownClass.setName("BTNMOVEDOWNCLASS");
+			btnMoveDownClass.addActionListener(this);
+		}
+		return btnMoveDownClass;
+	}
+
+	private JScrollPane getCenterScrl() {
+
+			scrlPan = new JScrollPane(getTblClasses());
+			scrlPan.setPreferredSize(new Dimension(180, 300));
+
+		return scrlPan;
+	}
+
+
+	private JTable getTblClasses() {
+
+			tblClasses = new JTable(new LabelClassTableModel());
+		tblClasses.setRowHeight(50);
+		tblClasses.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+		tblClasses.addMouseListener(new MouseAdapter() {
+			int prevRow =-1;
+			@Override
+			public void mouseClicked(MouseEvent e) {
+					if (!tblClasses.isEnabled()){
+						return;
+					}
+					int col = tblClasses.getColumnModel().getColumnIndexAtX(e.getX());
+					int row = (int) ((e.getY()-tblClasses.getLocation().getY()) / tblClasses.getRowHeight());
+					if(!(row > tblClasses.getRowCount()-1 || col > tblClasses.getColumnCount()-1))
+					{
+						openEditor = (row == prevRow && e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2
+						) ;
+						prevRow = row;
+						if (openEditor)
+							tblClasses.editCellAt(row, col);
+					}
+				}
+		});
+
+		tblClasses.getModel().addTableModelListener(new TableModelListener() {
+
+			public void tableChanged(TableModelEvent e) {
+				if (!tblClasses.isEnabled()){
+					return;
+				}
+
+				if(e.getColumn() == VISIBLE_FIELD_INDEX){
+					ILabelClass oldLc = (ILabelClass) tblClasses.getValueAt(e.getFirstRow(), PREVIEW_FIELD_INDEX);
+					oldLc.setVisible(Boolean.valueOf(tblClasses.getValueAt(e.getFirstRow(), VISIBLE_FIELD_INDEX).toString()));
+				}
+			}
+
+		});
+
+		TableColumnModel cm = tblClasses.getColumnModel();
+
+		tblClasses.getColumnModel().getColumn(PREVIEW_FIELD_INDEX).setCellRenderer(new TableCellRenderer() {
+
+			public Component getTableCellRendererComponent(JTable table,
+					Object value, boolean isSelected, boolean hasFocus,
+					int row, int column) {
+				LabelClassPreview lcPr = new LabelClassPreview();
+				lcPr.setLabelClass((ILabelClass) value);
+				return lcPr;
+			}
+
+		});
+		tblClasses.getColumnModel().getColumn(VISIBLE_FIELD_INDEX).setCellRenderer(new BooleanTableCellRenderer(false));
+		tblClasses.getColumnModel().getColumn(LABEL_EXPRESSION_FIELD_INDEX).setCellRenderer(new TableCellRenderer() {
+			public Component getTableCellRendererComponent(JTable table,
+					Object value, boolean isSelected, boolean hasFocus,
+					int row, int column) {
+				String expr = null;
+				if (value != null)
+					expr = (String) value;
+				if (expr == null)
+					expr = "";
+				// LabelExpressionParser.tokenFor(LabelExpressionParser.EOEXPR);
+
+//				expr = expr.replaceAll(LabelExpressionParser.tokenFor(LabelExpressionParser.EOFIELD), " | ");
+				// expr = expr.substring(0, expr.length()-1);
+				return new JLabel("<html><p>"+expr+"</p></html>", JLabel.CENTER);
+			}
+		});
+
+		// the editors
+
+		for (int i = 0; i < tblClasses.getColumnModel().getColumnCount(); i++) {
+			if (i!= VISIBLE_FIELD_INDEX) {
+				tblClasses.getColumnModel().getColumn(i).setCellEditor(
+						new LabelClassCellEditor(this.layer.getFeatureStore()));
+			} else {
+				tblClasses.getColumnModel().getColumn(VISIBLE_FIELD_INDEX).
+				setCellEditor(new BooleanTableCellEditor(tblClasses));
+			}
+		}
+		((DefaultTableModel)tblClasses.getModel()).fireTableDataChanged();
+		repaint();
+
+		return tblClasses;
+	}
+
+
+	private class LabelClassCellEditor extends AbstractCellEditor implements TableCellEditor {
+		
+		private static final long serialVersionUID = 6399823783851437400L;
+		private FeatureStore fsto = null;
+		
+		public LabelClassCellEditor(FeatureStore store) {
+			fsto = store;
+		}
+
+		public Component getTableCellEditorComponent(
+				JTable table, Object value, boolean isSelected, int row, int column) {
+			
+			if (openEditor) {
+				ILabelClass oldLc = (ILabelClass) tblClasses.getValueAt(row, PREVIEW_FIELD_INDEX);
+				oldLc.setVisible(Boolean.valueOf(tblClasses.getValueAt(row, VISIBLE_FIELD_INDEX).toString()));
+				LabelClassProperties lcProp = new LabelClassProperties(fsto);
+				oldLc.setTexts(new String[] {oldLc.getName()});
+				lcProp.setLabelClass(oldLc);
+				
+				ApplicationLocator.getManager().getUIManager().addWindow(lcProp);
+				ILabelClass newLc = lcProp.getLabelClass();
+
+				LabelClassTableModel m = (LabelClassTableModel) tblClasses.getModel();
+				Boolean changeDone = false;
+
+				if (!(oldLc.getName().equals(newLc.getName())))
+					if(!checSameLablClassName(m,newLc.getName())){
+
+						m.setValueAt(newLc.getStringLabelExpression(), row, LABEL_EXPRESSION_FIELD_INDEX);
+						m.setValueAt(newLc.getName(), row, NAME_FIELD_INDEX);
+						m.setValueAt(newLc, row, PREVIEW_FIELD_INDEX);
+						m.setValueAt(newLc.getSQLQuery(), row, FILTER_FIELD_INDEX);
+						m.setValueAt(newLc.isVisible(), row, VISIBLE_FIELD_INDEX);
+						fireEditingStopped(); //Make the renderer reappear.
+						changeDone = true;
+					} else {
+						JOptionPane.showMessageDialog(tblClasses,
+								Messages.getText(
+										"cannot_exist_two_label_classes_with_the_same_name")
+										+"\n",
+										Messages.getText("error"),
+										JOptionPane.ERROR_MESSAGE);
+						changeDone = true;
+					}
+				if (!changeDone){
+					m.setValueAt(newLc.getStringLabelExpression(), row, LABEL_EXPRESSION_FIELD_INDEX);
+					m.setValueAt(newLc.getName(), row, NAME_FIELD_INDEX);
+					m.setValueAt(newLc, row, PREVIEW_FIELD_INDEX);
+					m.setValueAt(newLc.getSQLQuery(), row, FILTER_FIELD_INDEX);
+					m.setValueAt(newLc.isVisible(), row, VISIBLE_FIELD_INDEX);
+					fireEditingStopped(); //Make the renderer reappear.
+					changeDone = true;
+				}
+			}
+
+			method.clearAllClasses();
+			ILabelClass[] classes = ((LabelClassTableModel)tblClasses.getModel()).toLabelClassArray();
+			for (int i = 0; i < classes.length; i++) {
+				method.addLabelClass(classes[i]);
+			}
+
+			openEditor = false;
+			return null;
+		}
+
+		public Object getCellEditorValue() {
+			return null;
+		}
+
+	}
+
+
+	private boolean checSameLablClassName(LabelClassTableModel mod, String name) {
+		for (int i = 0; i < mod.getRowCount(); i++) {
+			if(name.equals(mod.getLabelAtRow(i).getName()))
+				return true;
+		}
+		return false;
+	}
+
+
+	private class LabelClassTableModel extends DefaultTableModel {
+		
+		private static final long serialVersionUID = -9152998982339430209L;
+		Object[][] values;
+
+		private String[] classesTableFieldNames = new String[] {
+				Messages.getText("name"),
+				Messages.getText("preview"),
+				Messages.getText("filter"),
+				Messages.getText("label_expression"),
+				Messages.getText("visible"),
+		};
+
+
+		public LabelClassTableModel() {
+			super();
+			ILabelClass[] labelClasses = method.getLabelClasses();
+
+			values = new Object[labelClasses.length][classesTableFieldNames.length];
+			for (int i = 0; i < values.length; i++) {
+				values[i][PREVIEW_FIELD_INDEX] = labelClasses[i];
+				values[i][NAME_FIELD_INDEX] = labelClasses[i].getName();
+				values[i][FILTER_FIELD_INDEX] = labelClasses[i].getSQLQuery();
+				values[i][LABEL_EXPRESSION_FIELD_INDEX] = labelClasses[i].getStringLabelExpression();
+				values[i][VISIBLE_FIELD_INDEX] = labelClasses[i].isVisible();
+			}
+			setDataVector(values, classesTableFieldNames);
+		}
+
+		public String getColumnName(int col) {
+			return classesTableFieldNames[col];
+		}
+
+		public int getColumnCount() {
+			return classesTableFieldNames.length;
+		}
+
+		@Override
+		public boolean isCellEditable(int row, int column) {
+			return true;
+		}
+
+		public ILabelClass getLabelAtRow(int row) {
+			return (ILabelClass) getValueAt(row, PREVIEW_FIELD_INDEX);
+		}
+
+		public ILabelClass[] toLabelClassArray() {
+			ILabelClass[] classes = new ILabelClass[getRowCount()];
+			for (int i = 0; i < classes.length; i++) {
+				classes[i] = getLabelAtRow(i);
+				if (getChkDefinePriorities().isSelected()) {
+					classes[i].setPriority(i);
+				}
+			}
+			return classes;
+		}
+
+		public void setClassArray(ILabelClass[] classes) {
+			for (int i = 0; i < classes.length; i++) {
+					setValueAt(classes[i],i,PREVIEW_FIELD_INDEX);
+					setValueAt(classes[i].getName(),i,NAME_FIELD_INDEX);
+					setValueAt(classes[i].getSQLQuery(),i,FILTER_FIELD_INDEX);
+					setValueAt(classes[i].getStringLabelExpression(),i,LABEL_EXPRESSION_FIELD_INDEX);
+					setValueAt(classes[i].isVisible(),i,VISIBLE_FIELD_INDEX);
+			}
+
+		}
+
+	}
+
+	@Override
+	protected void initializePanel() {
+
+			setLayout(new BorderLayout());
+			JPanel panel = new JPanel(new BorderLayout());
+			
+			GridLayout gl = new GridLayout(4,1);
+			buttonPanel = new JPanel(gl);
+			buttonPanel.add(getBtnAddClass());
+			buttonPanel.add(getBtnDelClass());
+			// buttonPanel.addComponent(new JBlank(10, 10));
+			buttonPanel.add(getBtnMoveUpClass());
+			buttonPanel.add(getBtnMoveDownClass());
+			
+			JPanel auxp = new JPanel();
+			auxp.add(buttonPanel);
+			
+			panel.add(auxp, BorderLayout.EAST);
+			panel.add(getChkDefinePriorities(), BorderLayout.NORTH);
+			panel.add(getCenterScrl(), BorderLayout.CENTER);
+			add(panel,BorderLayout.CENTER);
+		}
+
+
+	public void fillPanel(ILabelingMethod method, FeatureType fty)
+	throws ReadException {
+		
+		if (method == null) {
+			this.method = new FeatureDependentLabeled();
+		}
+		chkDefinePriorities.setSelected(this.method.definesPriorities());
+		repaint();
+	}
+
+	private void swapClass(int classIndex, int targetPos,int numOfElements) {
+
+		ILabelClass[] classes = ((LabelClassTableModel)tblClasses.getModel()).toLabelClassArray();
+		ILabelClass aux = classes[targetPos];
+		classes[targetPos] = classes[classIndex];
+		classes[classIndex] = aux;
+		((LabelClassTableModel)tblClasses.getModel()).setClassArray(classes);
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (method == null) return;
+
+
+		JComponent c = (JComponent)e.getSource();
+		LabelClassTableModel mod = ((LabelClassTableModel) tblClasses.getModel());
+
+		if (c.equals(btnAddClass)) {
+
+			ILabelClass newClass =
+					SymbologyLocator.getSymbologyManager().createDefaultLabel();
+			
+			String name = Messages.getText("labeling")+
+			String.valueOf(1);
+
+			int count = 0;
+			while(checSameLablClassName(mod,name)){
+				count++;
+				name = Messages.getText("labeling")+
+				String.valueOf(count);
+			}
+			newClass.setName(name);
+			mod.addRow(new Object[] {
+					newClass.getName(),
+					newClass,
+					newClass.getSQLQuery(),
+					newClass.getStringLabelExpression(),
+					newClass.isVisible()});
+			
+		} else if (c.equals(btnDelClass)) {
+			if (mod.getRowCount()>=1) {
+				int[] sRows = tblClasses.getSelectedRows();
+
+				for (int i = sRows.length-1; i >= 0 ; i--) {
+					mod.removeRow(sRows[i]);
+				}
+			}
+		} else if (c.equals(chkDefinePriorities)) {
+
+			method.setDefinesPriorities(chkDefinePriorities.isSelected());
+
+		} else  if (c.equals(chkLabel)) {
+			int[] sRows = tblClasses.getSelectedRows();
+			for (int i = sRows.length-1; i >= 0 ; i--) {
+				ILabelClass lc = mod.getLabelAtRow(i);
+				lc.setVisible(chkLabel.isSelected());
+			}
+
+		} else if (c.equals(btnMoveUpClass)) {
+			int[] indices = tblClasses.getSelectedRows();
+			if (indices.length>0) {
+				int classIndex = indices[0];
+				int targetPos = Math.max(0, classIndex-1);
+				swapClass(classIndex, targetPos,indices.length);
+			}
+
+		} else if (c.equals(btnMoveDownClass)) {
+			int[] indices = tblClasses.getSelectedRows();
+			if (indices.length>0) {
+				int classIndex = indices[indices.length-1];
+				int targetPos = Math.min(tblClasses.getRowCount()-1, classIndex+1);
+				swapClass(classIndex, targetPos,indices.length);
+			}
+
+		}else if (c.equals(btnDelClass)) {
+			int[] indices = tblClasses.getSelectedRows();
+			if (indices.length>0) {
+				int classIndex = indices[0];
+				int targetPos = Math.min(tblClasses.getRowCount(), classIndex);
+				swapClass(classIndex, targetPos,indices.length);
+			}
+		}
+
+
+		mod.fireTableDataChanged();
+		method.clearAllClasses();
+		ILabelClass[] classes = ((LabelClassTableModel)tblClasses.getModel()).toLabelClassArray();
+		for (int i = 0; i < classes.length; i++) {
+			method.addLabelClass(classes[i]);
+		}
+		repaint();
+	}
+	public void propertyChange(PropertyChangeEvent evt) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setEnabled(boolean enabled) {
+		super.setEnabled(enabled);
+		getBtnAddClass().setEnabled(enabled);
+		getBtnDelClass().setEnabled(enabled);
+		getBtnMoveDownClass().setEnabled(enabled);
+		getBtnMoveUpClass().setEnabled(enabled);
+		getChkDefinePriorities().setEnabled(enabled);
+		scrlPan.setEnabled(enabled);
+		tblClasses.setEnabled(enabled);
+	}
+
+
+
+
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelClassProperties.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelClassProperties.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelClassProperties.java	(revision 40911)
@@ -0,0 +1,906 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.AbstractCellEditor;
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableCellEditor;
+import javax.swing.table.TableColumnModel;
+
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.gui.styling.SingleStyleSelectorFilter;
+import org.gvsig.app.gui.styling.StylePreviewer;
+import org.gvsig.app.gui.styling.StyleSelector;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle;
+import org.gvsig.gui.beans.AcceptCancelPanel;
+import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
+import org.gvsig.gui.beans.swing.JBlank;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.lang.LabelClassUtils;
+import org.gvsig.symbology.SymbologyLocator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ *
+ * LabelClassProperties.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es May 27, 2008
+ *
+ */
+public class LabelClassProperties extends JPanel implements IWindow,
+ActionListener {
+	
+	private static final Logger logger =
+			LoggerFactory.getLogger(LabelClassProperties.class);
+	
+	private static final String TEST_SQL = "TEST_SQL";
+	private static final String DELETE_FIELD = "DELETE_FIELD";
+	private static final long serialVersionUID = 6528513396536811057L;
+	private static final String ADD_FIELD = "ADD_FIELD";
+	private static final String SELECT_STYLE = "SELECT_STYLE";
+	private static final String CLEAR_STYLE = "CLEAR_STYLE";
+	private static final String VERIFY = "VERIFY";
+	private JTextField txtName;
+	private ILabelClass lc, clonedClass;
+	private JTable tblExpressions;
+	private JButton btnRemoveField;
+	private JButton btnAddField;
+	private JButton btnVerify;
+	private JComponent styPreviewer;
+	private JButton btnSelStyle;
+	private JRadioButton rdBtnFilteredFeatures;
+	private JRadioButton rdBtnAllFeatures;
+	private JTextField txtSQL;
+	private JCheckBox chkLabelFeatures;
+	private LabelTextStylePanel textStyle;
+	private JPanel sqlPnl;
+	private LabelClassPreview labelPreview;
+	
+	/*
+	private String[] fieldNames;
+	private int[] fieldTypes;
+	*/
+	private FeatureStore featureStore = null;
+	private JButton btnDontUseStyle;
+	private boolean accepted = true;
+
+
+
+	/**
+	 * <p>
+	 * Creates a new instance of the dialog that configures all the properties
+	 * of a LabelClass.
+	 * </p>
+	 * @param strategy
+	 * @param asWindow
+	 */
+	public LabelClassProperties(FeatureStore fsto) {
+
+		featureStore = fsto;
+		initialize();
+	}
+
+	private void initialize() {
+		setPreferredSize(new Dimension(810, 580));
+		setLayout(new BorderLayout(1, 1));
+
+		txtName = new JTextField(40);
+		JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 15, 2));
+		northPanel.add(new JLabel(Messages.getText("name") + ":"));
+		northPanel.add(txtName);
+		add(northPanel, BorderLayout.NORTH);
+
+		JPanel centerPanel = new JPanel(new BorderLayout(10, 10));
+		textStyle = new LabelTextStylePanel();
+		textStyle.addActionListener(this);
+		centerPanel.add(textStyle, BorderLayout.NORTH);
+
+		JPanel labelExpressionsPanel = new JPanel(new BorderLayout(1, 1));
+
+		labelExpressionsPanel.add(new JBlank(10, 30), BorderLayout.WEST);
+		labelExpressionsPanel.add(new JScrollPane(getTableFields()),
+				BorderLayout.CENTER);
+
+		JPanel a = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0));
+		a.add(new JLabel("<html><b>"+Messages.getText("text_fields")+"</b></html>"));
+		centerPanel.add(labelExpressionsPanel, BorderLayout.CENTER);
+		
+		
+		GridLayout gbl = new GridLayout(3, 1, 0, 6);
+		JPanel auxp = new JPanel(gbl);
+		auxp.add(getBtnVerify());
+		auxp.add(getBtnAddField());
+		auxp.add(getBtnRemoveField());
+		auxp.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
+		JPanel auxpp = new JPanel();
+		auxpp.add(auxp);
+		
+		centerPanel.add(auxpp, BorderLayout.EAST);
+
+
+		GridBagLayoutPanel aux = new GridBagLayoutPanel();
+//		aux.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(
+//		this, "features")));
+		rdBtnAllFeatures = new JRadioButton(Messages.getText("all_features"));
+		rdBtnFilteredFeatures = new JRadioButton(Messages.getText("filtered_features")
+				+" (SQL GDBMS)");
+
+		rdBtnAllFeatures.addActionListener(this);
+		rdBtnFilteredFeatures.addActionListener(this);
+
+		ButtonGroup g = new ButtonGroup();
+		g.add(rdBtnAllFeatures);
+		g.add(rdBtnFilteredFeatures);
+		aux.addComponent(chkLabelFeatures = new JCheckBox(
+				Messages.getText("label_features_in_this_class")));
+		aux.addComponent("", rdBtnAllFeatures);
+		aux.addComponent("", rdBtnFilteredFeatures);
+		sqlPnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
+		sqlPnl.add(new JLabel("   SQL: select * from "));
+		sqlPnl.add(new JLabel("%" + Messages.getText("layer_name")
+				+ "%"));
+		sqlPnl.add(new JLabel(" where  "));
+		sqlPnl.add(txtSQL = new JTextField(40));
+		sqlPnl.add(new JLabel(";"));
+		aux.addComponent("", sqlPnl);
+
+
+		JPanel auxPanel = new JPanel(new BorderLayout(1,1));
+
+		JPanel aux2 = new JPanel();
+		auxPanel.setBorder(BorderFactory.createTitledBorder(
+				Messages.getText("background_style")));
+
+		aux2.add(getStylePreviewer());
+
+		gbl = new GridLayout(2, 1, 0, 6);
+		JPanel aux3 = new JPanel(gbl);
+		aux3.add(getBtnSelectStyle());
+		aux3.add(getBtnDontUseStyle());
+		aux3.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
+		auxpp = new JPanel();
+		auxpp.add(aux3);
+
+		auxPanel.add(aux2,BorderLayout.CENTER);
+		auxPanel.add(auxpp,BorderLayout.EAST);
+
+		JPanel aux4 = new JPanel(new GridLayout(1,2));
+		aux4.add(auxPanel);
+		aux2 = new JPanel(new BorderLayout());
+		aux2.setBorder(BorderFactory.createTitledBorder(Messages.getText("preview")));
+		aux2.add(labelPreview = new LabelClassPreview(), BorderLayout.CENTER);
+		aux4.add(aux2);
+
+		GridBagLayoutPanel aux5 = new GridBagLayoutPanel();
+		aux5.addComponent("", aux);
+		aux5.addComponent(new JBlank(3, 5));
+		aux5.addComponent("", aux4);
+		centerPanel.add(aux5, BorderLayout.SOUTH);
+		add(centerPanel, BorderLayout.CENTER);
+
+		add(new AcceptCancelPanel(this, this), BorderLayout.SOUTH);
+
+		chkLabelFeatures.addActionListener(this);
+		txtName.addActionListener(this);
+
+	}
+
+	private JComponent getStylePreviewer() {
+
+		if (styPreviewer == null) {
+			styPreviewer = new StylePreviewer();
+			styPreviewer.setPreferredSize(new java.awt.Dimension(90,90));
+			styPreviewer.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
+			((StylePreviewer) styPreviewer).setShowOutline(true);
+		}
+		return styPreviewer;
+
+	}
+
+	private JButton getBtnSelectStyle() {
+		if (btnSelStyle == null) {
+			btnSelStyle = new JButton(Messages.getText("select"));
+			btnSelStyle.setActionCommand(SELECT_STYLE);
+			btnSelStyle.addActionListener(this);
+		}
+
+		return btnSelStyle;
+	}
+
+
+	private JButton getBtnRemoveField() {
+		if (btnRemoveField == null) {
+			btnRemoveField = new JButton(Messages.getText("remove"));
+			btnRemoveField.setActionCommand(DELETE_FIELD);
+			btnRemoveField.addActionListener(this);
+		}
+
+		return btnRemoveField;
+	}
+
+	private JButton getBtnAddField() {
+		if (btnAddField == null) {
+			btnAddField = new JButton(Messages.getText("add"));
+			btnAddField.setActionCommand(ADD_FIELD);
+			btnAddField.addActionListener(this);
+		}
+
+		return btnAddField;
+	}
+
+	private JButton getBtnVerify() {
+		if(btnVerify == null) {
+			btnVerify = new JButton(Messages.getText("verify"));
+			btnVerify.setActionCommand(VERIFY);
+			btnVerify.addActionListener(this);
+		}
+		return btnVerify;
+	}
+
+	private JButton getBtnDontUseStyle() {
+		if (btnDontUseStyle == null) {
+			btnDontUseStyle = new JButton(Messages.getText("no_style"));
+			btnDontUseStyle.setActionCommand(CLEAR_STYLE);
+			btnDontUseStyle.addActionListener(this);
+		}
+
+		return btnDontUseStyle;
+	}
+
+	private JTable getTableFields() {
+		if (tblExpressions == null) {
+			tblExpressions = new JTable();
+			tblExpressions.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+		}
+
+		return tblExpressions;
+	}
+
+
+	private void setComponentEnabled(Component c, boolean b) {
+		if (c instanceof JComponent) {
+			JComponent c1 = (JComponent) c;
+			for (int i = 0; i < c1.getComponentCount(); i++) {
+				setComponentEnabled(c1.getComponent(i), b);
+			}
+		}
+		c.setEnabled(b);
+	}
+
+
+
+	public void setLabelClass(ILabelClass labelClass) {
+		if (labelClass == null)
+			return;
+
+		lc = labelClass;
+		clonedClass = (ILabelClass) LabelClassUtils.clone(lc);
+
+		labelPreview.setLabelClass(clonedClass);
+		boolean clo_use_sql = LabelClassUtils.isUseSqlQuery(clonedClass); 
+		if (!clo_use_sql) {
+			rdBtnAllFeatures.setSelected(true);
+			txtSQL.setText("");
+		} else {
+			rdBtnFilteredFeatures.setSelected(true);
+			txtSQL.setText(clonedClass.getSQLQuery());
+		}
+
+		chkLabelFeatures.setSelected(clonedClass.isVisible());
+		rdBtnFilteredFeatures.setSelected(clo_use_sql);
+		rdBtnAllFeatures.setSelected(!clo_use_sql);
+		((StylePreviewer) styPreviewer).setStyle(clonedClass.getLabelStyle());
+		txtName.setText(clonedClass.getName());
+		
+		// String expr = lc.getStringLabelExpression();
+
+		/*
+		String EOExpr = LabelExpressionParser.tokenFor(LabelExpressionParser.EOEXPR);
+		if (expr == null)
+			expr = EOExpr;
+		expr = expr.trim();
+		if (!expr.endsWith(EOExpr)) {
+			throw new Error("Invalid expression. Missing EOExpr token ("+EOExpr+").\n"+expr);
+		}
+		expr = expr.substring(0, expr.length()-1);
+		*/
+
+		// expr = expr.trim();
+
+		ITextSymbol lcTextSymbol = lc.getTextSymbol();
+		ITextSymbol clonedSymbol = null;
+		
+		try {
+			clonedSymbol = (ITextSymbol) lcTextSymbol.clone();
+		} catch (CloneNotSupportedException e) {
+			logger.error("While clonin.", e);
+		}
+
+		textStyle.setModel(
+				clonedSymbol, //lc.getTextSymbol(),
+				lc.getUnit(),
+				lc.getReferenceSystem());
+
+		getTableFields().setRowHeight(22);
+		getTableFields().setModel(new FieldTableExpressions(lc.getLabelExpressions()));
+		TableColumnModel colMod = getTableFields().getColumnModel();
+		colMod.getColumn(0).setPreferredWidth(100);
+		colMod.getColumn(0).setWidth(100);
+		colMod.getColumn(1).setResizable(true);
+		colMod.getColumn(1).setPreferredWidth(513);
+		
+		FeatureAttributeDescriptor[] atts = null;
+		
+		try {
+			atts = featureStore.getDefaultFeatureType().getAttributeDescriptors();
+		} catch (DataException e) {
+			logger.error("While getting attributes.", e);
+		}
+		
+		getTableFields().setDefaultEditor(
+				Object.class,
+				new DefaultEditor(atts));
+		repaint();
+
+		actionPerformed(new ActionEvent(this, 0, null));
+	}
+
+	private class DefaultEditor extends AbstractCellEditor implements
+			TableCellEditor, ActionListener {
+
+		JPanel editor;
+		LabelExpressionEditorPanel dialog;
+		private JTextField text;
+		private JButton button;
+		protected static final String EDIT = "edit";
+
+		public DefaultEditor(FeatureAttributeDescriptor[] atts) {
+			editor = new JPanel();
+			editor.setLayout(new GridBagLayout());
+			GridBagConstraints cons = new GridBagConstraints();
+//			cons.anchor = GridBagConstraints.FIRST_LINE_START;
+			cons.fill = cons.BOTH;
+			cons.weightx=1.0;
+			cons.weighty =1.0;
+			text = new JTextField();
+			editor.add(text, cons);
+
+			GridBagConstraints cons1 = new GridBagConstraints();
+//			cons.anchor = GridBagConstraints.FIRST_LINE_END;
+			cons1.fill = cons1.VERTICAL;
+			cons1.weighty =1.0;
+//			cons.gridheight = GridBagConstraints.REMAINDER;
+			button = new JButton("...");
+			button.setActionCommand(DefaultEditor.EDIT);
+			button.addActionListener(this);
+			editor.add(button,cons1);
+
+			editor.updateUI();
+
+			// Set up the dialog that the button brings up.
+			dialog = new LabelExpressionEditorPanel(atts);
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			if (EDIT.equals(e.getActionCommand())) {
+
+				dialog.setValue(text.getText());
+				ApplicationLocator.getManager().getUIManager().addWindow(dialog);
+				//fireEditingStopped(); // Make the renderer reappear.
+				text.setText(dialog.getValue());
+			}
+		}
+
+		// Implement the one CellEditor method that AbstractCellEditor doesn't.
+		public Object getCellEditorValue() {
+			return text.getText();
+		}
+
+		// Implement the one method defined by TableCellEditor.
+		public Component getTableCellEditorComponent(JTable table,
+				Object value, boolean isSelected, int row, int column) {
+			text.setText((String) value);
+			return editor;
+		}
+	}
+
+
+
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo wi = new WindowInfo(WindowInfo.MODALDIALOG
+				| WindowInfo.RESIZABLE);
+		wi.setTitle(Messages.getText("label_class_properties"));
+		wi.setWidth(getPreferredSize().width + 8);
+		wi.setHeight(getPreferredSize().height);
+		return wi;
+	}
+
+	public Object getWindowProfile() {
+		return WindowInfo.DIALOG_PROFILE;
+	}
+
+
+	/*
+	 * Return a hashtable with example values.
+	 * Only for verification purposes.
+	private Hashtable<String, Value> getValuesTable(String[] fNames, int[] fTypes) {
+		
+		Hashtable<String, Value> parser_symbol_table = new Hashtable<String, Value>();
+
+		Random rand = new Random();
+		byte b = 0;
+    	short s = (short)rand.nextInt(Short.MAX_VALUE);
+    	int i = rand.nextInt();
+		long l = rand.nextLong();
+		boolean bool = rand.nextBoolean();
+		float f = rand.nextFloat();
+		double d = rand.nextDouble();
+
+		for (int j = 0; j < fNames.length; j++) {
+			Value value=null;
+
+			int type = fTypes[j];
+            switch (type) {
+            case Types.BIGINT:
+                value = ValueFactory.createValue(l);
+                break;
+            case Types.BIT:
+            case Types.BOOLEAN:
+                value = ValueFactory.createValue(bool);
+                break;
+            case Types.CHAR:
+            case Types.VARCHAR:
+            case Types.LONGVARCHAR:
+                value = ValueFactory.createValue("");
+                break;
+            case Types.DATE:
+                Date auxDate = new Date();
+            	if (auxDate != null){
+                    value = ValueFactory.createValue(auxDate);
+            	}
+                break;
+            case Types.DECIMAL:
+            case Types.NUMERIC:
+            case Types.FLOAT:
+            case Types.DOUBLE:
+                value = ValueFactory.createValue(d);
+                break;
+            case Types.INTEGER:
+                value = ValueFactory.createValue(i);
+                break;
+            case Types.REAL:
+                value = ValueFactory.createValue(f);
+                break;
+            case Types.SMALLINT:
+                value = ValueFactory.createValue(s);
+                break;
+            case Types.TINYINT:
+                value = ValueFactory.createValue(b);
+                break;
+            case Types.BINARY:
+            case Types.VARBINARY:
+            case Types.LONGVARBINARY:
+                byte[] auxByteArray = {b}; //new byte[1];
+                value = ValueFactory.createValue(auxByteArray);
+                break;
+            case Types.TIMESTAMP:
+           		value = ValueFactory.createValue(new Timestamp(l));
+                break;
+            case Types.TIME:
+            	value = ValueFactory.createValue(new Time(l));
+                break;
+            default:
+            	value = ValueFactory.createValue("");
+            	break;
+        }
+			parser_symbol_table.put(fNames[j], value);
+		}
+		return parser_symbol_table;
+	}
+		 */
+
+
+	/*
+	private boolean verifyExpresion(String expresion, Hashtable<String, Value> symbols){
+		LabelExpressionParser parser;
+		try {
+			parser = new LabelExpressionParser(new StringReader(expresion),symbols);
+			parser.LabelExpression();
+			Expression expr = ((Expression)parser.getStack().pop());
+			expr.evaluate();
+		} catch (ExpressionException e2) {
+			return false;
+		} catch (Exception e3) {
+			return false;
+		}
+		return true;
+	}
+	*/
+
+	private boolean verifyExpressions(){
+		
+		String[] expressions = ((FieldTableExpressions) getTableFields().getModel()).getExpression();
+		if(expressions.length == 1 && expressions[0].equals("")){
+			return true;
+		}
+		boolean result = true;
+		String message = "";
+		for (int i = 0; i < expressions.length; i++) {
+			String expresion = expressions[i];
+			
+			if( !LabelClassUtils.validExpression(expresion, featureStore, false) ){
+				result = false;
+				if(message.compareTo("")!=0){
+					message = message +	" , " + (i+1);
+				} else {
+					message = " " + Messages.getText("at_fields")+" "+(i+1);
+				}
+			}
+		}
+		message = message +".";
+		if(!result){
+			JOptionPane.showMessageDialog(
+					ApplicationLocator.getManager().getRootComponent(),
+					Messages.getText("malformed_or_empty_expression") + message,
+					Messages.getText("verify"),
+					JOptionPane.ERROR_MESSAGE);
+		} else {
+			JOptionPane.showMessageDialog(
+					ApplicationLocator.getManager().getRootComponent(),
+					Messages.getText("_Expressions_are_correct"),
+					Messages.getText("verify"),
+					JOptionPane.INFORMATION_MESSAGE);
+		}
+		return result;
+	}
+
+	public boolean isAccepted(){
+		return accepted;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		setComponentEnabled(sqlPnl, rdBtnFilteredFeatures.isSelected());
+		applySettings();
+		if ("OK".equals(e.getActionCommand())) {
+			clonedClass.setUnit(textStyle.getUnit());
+			clonedClass.setReferenceSystem(textStyle.getReferenceSystem());
+			clonedClass.setTextSymbol(textStyle.getTextSymbol());
+			lc = clonedClass;
+			accepted = true;
+			try {
+				ApplicationLocator.getManager().getUIManager().closeWindow(this);
+			} catch (Exception ex) {
+				// this only happens when running this as stand-alone app
+				// from main method;
+				logger.error("While closing window.", ex);
+			}
+		} else if ("CANCEL".equals(e.getActionCommand())) {
+			accepted = false;
+			setLabelClass(lc);
+			try {
+				ApplicationLocator.getManager().getUIManager().closeWindow(this);
+			} catch (Exception ex) {
+				// this only happens when running this as stand-alone app
+				// from main method;
+				logger.error("While closing window.", ex);
+			}
+		} else if (CLEAR_STYLE.equals(e.getActionCommand())) {
+			clonedClass.setLabelStyle(null);
+//			styPreviewer.setStyle(null);
+			((StylePreviewer) styPreviewer).setStyle(null);
+		} else if (TEST_SQL.equals(e.getActionCommand())) {
+			logger.info("TEST_SQL = " + TEST_SQL);
+		} else if (DELETE_FIELD.equals(e.getActionCommand())) {
+			int[] rowInd = getTableFields().getSelectedRows();
+			for (int i = rowInd.length-1; i >= 0 ; i--) {
+				delField(rowInd[i]);
+			}
+			clonedClass.setLabelExpressions(((FieldTableExpressions) getTableFields().getModel()).getExpression());
+			setLabelClass(clonedClass);
+		} else if (VERIFY.equals(e.getActionCommand())) {
+			verifyExpressions();
+		} else if (ADD_FIELD.equals(e.getActionCommand())) {
+			addField();
+		} else if (SELECT_STYLE.equals(e.getActionCommand())) {
+
+			IStyle myStyle = ((StylePreviewer)styPreviewer).getStyle();
+			
+			FeatureType fty = null;
+			
+			try {
+				fty = featureStore.getDefaultFeatureType();
+			} catch (DataException e1) {
+				logger.error("While getting feat type.", e1);
+			}
+			
+			int geotype = fty.getDefaultGeometryAttribute().getGeomType().getType();
+			
+			SingleStyleSelectorFilter filter =
+					new SingleStyleSelectorFilter(ILabelStyle.class);
+			StyleSelector stySel = null;
+			
+			try {
+				stySel = new StyleSelector(myStyle, geotype, filter);
+			} catch (IllegalArgumentException iae) {
+				JOptionPane.showMessageDialog(this,
+						Messages.getText("_Option_not_available_for_this_geometry_type"),
+						getWindowInfo().getTitle(),
+						JOptionPane.WARNING_MESSAGE);
+				return;
+			}
+			
+			ApplicationLocator.getManager().getUIManager().addWindow(stySel);
+			ILabelStyle sty = (ILabelStyle) stySel.getSelectedObject();
+
+			if (sty != null) {
+				// gather the style and apply to the class
+				clonedClass.setLabelStyle(sty);
+				clonedClass.setUnit(stySel.getUnit());
+				clonedClass.setReferenceSystem(stySel.getReferenceSystem());
+				setLabelClass(clonedClass);
+			}
+
+//			styPreviewer.setStyle(sty);
+			((StylePreviewer) styPreviewer).setStyle(sty);
+
+		}else if (e.getSource().equals(rdBtnAllFeatures) || e.getSource().equals(rdBtnFilteredFeatures)){
+			clonedClass.setUseSqlQuery(rdBtnFilteredFeatures.isSelected());
+		}
+
+		repaint();
+	}
+
+	private void applySettings() {
+		clonedClass.setVisible(chkLabelFeatures.isSelected());
+		clonedClass.setName(txtName.getText());
+		clonedClass.setSQLQuery(txtSQL.getText());
+		JTable tableFields=getTableFields();
+		TableCellEditor cellEditor=tableFields.getCellEditor();
+		if(cellEditor != null){
+			int row = tableFields.getEditingRow();
+			int column = tableFields.getEditingColumn();
+			cellEditor.stopCellEditing();
+			Object value = cellEditor.getCellEditorValue();
+
+			if (value != null) {
+				((FieldTableExpressions) tableFields.
+						getModel()).setValueAt(value, row, column);
+			}
+		}
+		clonedClass.setLabelExpressions(
+				((FieldTableExpressions) tableFields.
+						getModel()).getExpression());
+		clonedClass.setTextSymbol(textStyle.getTextSymbol());
+	}
+
+	private void addField() {
+		addField("");
+	}
+
+	private void addField(String fieldExpr) {
+		FieldTableExpressions m = ((FieldTableExpressions) getTableFields().getModel());
+		m.addRow(new Object[] { m.getRowCount()+1, fieldExpr });
+	}
+
+	private void delField(int fieldIndex) {
+		try {
+			((FieldTableExpressions) getTableFields().getModel()).removeRow(fieldIndex);
+		} catch (ArrayIndexOutOfBoundsException ex) {}
+	}
+
+
+	public ILabelClass getLabelClass() {
+		return lc;
+	}
+
+
+
+	private static final Object[] TABLE_HEADERS = new String[] {
+		
+		Messages.getText("field_number"),
+		Messages.getText("label_expression")
+	};
+	
+	/*
+	private static String fieldSeparator =
+	LabelExpressionParser.tokenImage[LabelExpressionParser.EOFIELD].replaceAll("\"", "");
+	*/
+	
+	private class FieldTableExpressions extends DefaultTableModel {
+		private static final long serialVersionUID = 2002427714889477770L;
+		public FieldTableExpressions(String[] expressions) {
+			super();
+
+			if(expressions != null && expressions.length > 0){
+				Integer[] aux = new Integer[expressions.length];
+				for (int i = 0; i < aux.length; i++) {
+					aux[i] = i+1;
+				}
+
+				Object[][] values = new Object[aux.length][2];
+				for (int i = 0; i < values.length; i++) {
+					values[i][0] = aux[i];
+					values[i][1] = expressions[i];
+				}
+				setDataVector(values, TABLE_HEADERS);
+			}
+			else{
+				Object[][] values = new Object[1][2];
+				values[0][0] = 1;
+				values[0][1] = "";
+				setDataVector(values,TABLE_HEADERS);
+			}
+
+		}
+
+
+		@Override
+		public boolean isCellEditable(int row, int column) {
+			return column == 1;
+		}
+
+		public String[] getExpression() {
+
+			String[] expressions = new String[getRowCount()];
+
+			for (int i = 0; i < getRowCount(); i++) {
+				expressions[i] = ""+(String) getValueAt(i,1);
+			}
+			return expressions;
+		}
+
+	}
+
+//	public static void main(String[] args) {
+//		JFrame f = new JFrame("Test LabelClassProperties panel");
+//
+//		String xmlString =
+//			"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" +
+//			"<xml-tag xmlns=\"http://www.gvsig.gva.es\">\n" +
+//			"    <property key=\"className\" value=\"com.iver.cit.gvsig.fmap.rendering.styling.labeling.LabelClass\"/>\n" +
+//			"    <property key=\"isVisible\" value=\"false\"/>\n" +
+//			"    <property key=\"name\" value=\"Default\"/>\n" +
+//			"    <property key=\"labelExpression\" value=\"[TIPO] : lao39805502232 : Substring([MOTO], 2,2);\"/>\n" +
+//			"    <property key=\"unit\" value=\"-1\"/>\n" +
+//			"    <property key=\"referenceSystem\" value=\"0\"/>\n" +
+//			"    <property key=\"sqlQuery\" value=\"TIPO = 'C'\"/>\n" +
+//			"    <property key=\"priority\" value=\"0\"/>\n" +
+//			"    <xml-tag>\n" +
+//			"        <property key=\"className\" value=\"org.gvsig.symbology.fmap.styles.SimpleLabelStyle\"/>\n" +
+//			"        <property key=\"desc\" value=\"Placa Carrer VLC.style\"/>\n" +
+//			"        <property key=\"markerPointX\" value=\"0.0\"/>\n" +
+//			"        <property key=\"markerPointY\" value=\"0.0\"/>\n" +
+//			"        <property key=\"minXArray\" value=\"0.35 ,0.25\"/>\n" +
+//			"        <property key=\"minYArray\" value=\"0.15 ,0.5\"/>\n" +
+//			"        <property key=\"widthArray\" value=\"0.5 ,0.6\"/>\n" +
+//			"        <property key=\"heightArray\" value=\"0.27 ,0.37\"/>\n" +
+//			"        <property key=\"id\" value=\"labelStyle\"/>\n" +
+//			"        <xml-tag>\n" +
+//			"            <property key=\"className\" value=\"org.gvsig.symbology.fmap.styles.RemoteFileStyle\"/>\n" +
+//			"            <property key=\"source\" value=\"http://www.boomlapop.com/boomlapop.jpg\"/>\n" +
+//			"            <property key=\"desc\"/>\n" +
+//			"            <property key=\"id\" value=\"LabelStyle\"/>\n" +
+//			"        </xml-tag>\n" +
+//			"    </xml-tag>\n" +
+//			"    <xml-tag>\n" +
+//			"        <property key=\"className\" value=\"com.iver.cit.gvsig.fmap.core.symbols.SimpleTextSymbol\"/>\n" +
+//			"        <property key=\"desc\"/>\n" +
+//			"        <property key=\"isShapeVisible\" value=\"true\"/>\n" +
+//			"        <property key=\"font\" value=\"Arial\"/>\n" +
+//			"        <property key=\"fontStyle\" value=\"1\"/>\n" +
+//			"        <property key=\"size\" value=\"12\"/>\n" +
+//			"        <property key=\"text\" value=\"GeneralLabeling.sample_text\"/>\n" +
+//			"        <property key=\"textColor\" value=\"255,255,0,255\"/>\n" +
+//			"        <property key=\"unit\" value=\"-1\"/>\n" +
+//			"        <property key=\"referenceSystem\" value=\"0\"/>\n" +
+//			"        <property key=\"id\" value=\"TextSymbol\"/>\n" +
+//			"    </xml-tag>\n" +
+//			"</xml-tag>\n" +
+//			"";
+//
+//		LabelClass lc = null;
+//		try {
+//			XMLEntity xml = new XMLEntity((XmlTag) XmlTag.unmarshal(
+//					XMLEncodingUtils.getReader(new ByteArrayInputStream(xmlString.getBytes()))));
+//			lc = new LabelClass();
+//			lc.setXMLEntity(xml);
+//		} catch (Exception e) {
+//			e.printStackTrace();
+//		}
+//		String[] names = new String[] { "Field1", "Field2", "Field3"	};
+//		int[] types = new int[] { Types.VARCHAR, Types.INTEGER, Types.DOUBLE };
+//		final LabelClassProperties lcp = new LabelClassProperties(
+//				names, types ) {
+//			private static final long serialVersionUID = -1843509415649666459L;
+//
+//			@Override
+//			public void actionPerformed(ActionEvent e) {
+//				super.actionPerformed(e);
+//				if ("OK".equals(e.getActionCommand())) {
+//					Sys tem.out.println(getLabelClass().getXMLEntity());
+//				}
+//			}
+//		};
+//		lcp.setLabelClass(lc);
+//		f.setContentPane(lcp);
+//		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+//		f.pack();
+//		f.setVisible(true);
+//
+//	}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/OnSelection.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/OnSelection.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/OnSelection.java	(revision 40911)
@@ -0,0 +1,86 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.label.OnSelectionLabeled;
+import org.gvsig.symbology.SymbologyLocator;
+
+public class OnSelection extends DefaultLabeling{
+
+	private static final long serialVersionUID = -3619706540747109386L;
+
+	@Override
+	public String getName() {
+		return Messages.getText("label_only_when_selected")+".";
+	}
+
+	@Override
+	public Class<? extends ILabelingMethod> getLabelingMethodClass() {
+		return OnSelectionLabeled.class;
+	}
+
+	@Override
+	public ILabelingMethod getMethod() {
+		
+		OnSelectionLabeled resp = null;
+		if (super.getMethod() instanceof OnSelectionLabeled) {
+			resp = (OnSelectionLabeled) super.getMethod(); 
+		} else {
+			resp = new OnSelectionLabeled();
+		}
+
+		if (resp.getLabelClasses() == null || resp.getLabelClasses().length == 0) {
+			ILabelClass lc = null;
+			lc = SymbologyLocator.getSymbologyManager().createDefaultLabel();
+			resp.addLabelClass(lc);
+		}
+		return resp;
+	}
+
+	protected ILabelingMethod newMethodForThePreview(ILabelClass defaultLabel) {
+		OnSelectionLabeled method = new OnSelectionLabeled();
+		method.addLabelClass(defaultLabel);
+		return method;
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelScaleRange.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelScaleRange.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelScaleRange.java	(revision 40911)
@@ -0,0 +1,240 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.TreeSet;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.gui.beans.AcceptCancelPanel;
+import org.gvsig.gui.beans.controls.comboscale.ComboScale;
+import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
+import org.gvsig.gui.beans.swing.JBlank;
+import org.gvsig.i18n.Messages;
+
+/**
+ * <p>Configuration panel to set the range of scales in which the labels
+ * will be visible.</p>
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Apr 4, 2008
+ *
+ */
+public class LabelScaleRange extends JPanel implements IWindow, ActionListener {
+
+	private static final long serialVersionUID = -450284029750650479L;
+	private static final long[] defaultScales = new long[] {
+		1000,
+		2000,
+		5000,
+		10000,
+		50000,
+		100000,
+		200000,
+		500000,
+	};
+	private long maxScale, minScale;
+	private ComboScale cmbMaxScale;
+	private ComboScale cmbMinScale;
+	private JRadioButton rdBtnUseSameRangeThanLayer;
+	private JRadioButton rdBtnDontShowLabelWhenZoomed;
+
+	public LabelScaleRange(long minScale, long maxScale) {
+		super();
+		setLayout(new BorderLayout());
+		this.maxScale = maxScale;
+		this.minScale = minScale;
+
+		getCmbMinScale().setScale(minScale);
+		getCmbMaxScale().setScale(maxScale);
+		GridBagLayoutPanel p = new GridBagLayoutPanel();
+		
+		p.addComponent(new JLabel(Messages.getText(
+				"specify_the_range_of_scales_at_which_labels_will_be_shown")+":"));
+		p.addComponent(new JBlank(10, 10));
+		p.addComponent(getRdUseSameRangeThanLayer());
+		p.addComponent(new JBlank(10, 10));
+		p.addComponent(getRdDontShowLabelsWhenZoomed());
+		p.addComponent(new JBlank(10, 10));
+		ButtonGroup group = new ButtonGroup();
+		group.add(getRdUseSameRangeThanLayer());
+		group.add(getRdDontShowLabelsWhenZoomed());
+		getRdUseSameRangeThanLayer().addActionListener(this);
+		getRdDontShowLabelsWhenZoomed().addActionListener(this);
+		getRdUseSameRangeThanLayer().setSelected(maxScale == -1 && minScale == -1);
+		getRdDontShowLabelsWhenZoomed().setSelected(!getRdUseSameRangeThanLayer().isSelected());
+		getCmbMinScale().setEnabled(getRdDontShowLabelsWhenZoomed().isSelected());
+		getCmbMaxScale().setEnabled(getRdDontShowLabelsWhenZoomed().isSelected());
+
+		JPanel aux;
+		JLabel l;
+		l  = new JLabel("    "+Messages.getText("out_beyond")+":", JLabel.RIGHT);
+		aux = new JPanel();
+		aux.add(getCmbMaxScale());
+//		aux.add(new JLabel("("+PluginServices.getText(this, "min_scale")+")"));
+		aux.add(new JLabel("("+Messages.getText("max_scale")+")"));
+		p.addComponent(l, aux);
+
+
+		l = new JLabel("    "+Messages.getText("in_beyond")+":", JLabel.RIGHT);
+		aux = new JPanel();
+		aux.add(getCmbMinScale());
+//		aux.add(new JLabel("("+PluginServices.getText(this, "max_scale")+")"));
+		aux.add(new JLabel("("+Messages.getText("min_scale")+")"));
+			p.addComponent(l, aux);
+
+
+		add(new JBlank(10, 10), BorderLayout.WEST);
+		add(new JBlank(10, 10), BorderLayout.EAST);
+		add(p, BorderLayout.CENTER);
+		add(new AcceptCancelPanel(this, this), BorderLayout.SOUTH);
+	}
+
+
+	private JRadioButton getRdDontShowLabelsWhenZoomed() {
+		if (rdBtnDontShowLabelWhenZoomed == null) {
+			rdBtnDontShowLabelWhenZoomed = new JRadioButton(
+					Messages.getText("dont_show_labels_when_zoomed"));
+		}
+		return rdBtnDontShowLabelWhenZoomed;
+	}
+
+	private JRadioButton getRdUseSameRangeThanLayer() {
+		if (rdBtnUseSameRangeThanLayer == null) {
+			rdBtnUseSameRangeThanLayer = new JRadioButton(
+					Messages.getText("use_the_same_scale_range_as_the_feature_layer"));
+		}
+		return rdBtnUseSameRangeThanLayer;
+	}
+
+	public long getMaxScale() {
+		return maxScale;
+	}
+
+	private ComboScale getCmbMaxScale() {
+		if (cmbMaxScale == null) {
+			cmbMaxScale = new ComboScale();
+			TreeSet<Long> ts = new TreeSet<Long>();
+			if (maxScale!=-1) ts.add(maxScale);
+			for (int i = 0; i < defaultScales.length; i++) {
+				ts.add(defaultScales[i]);
+			}
+			long[] items = new long[ts.size()];
+			for (int i = 0; i < items.length; i++) {
+				items[i] = ts.first();
+				ts.remove(ts.first());
+			}
+			cmbMaxScale.setItems(items);
+
+		}
+
+		return cmbMaxScale;
+	}
+
+	private ComboScale getCmbMinScale() {
+		if (cmbMinScale == null) {
+			cmbMinScale = new ComboScale();
+			TreeSet<Long> ts = new TreeSet<Long>();
+			if (minScale != -1)	ts.add(minScale);
+			for (int i = 0; i < defaultScales.length; i++) {
+				ts.add(defaultScales[i]);
+			}
+			long[] items = new long[ts.size()];
+			for (int i = 0; i < items.length; i++) {
+				items[i] = ts.first();
+				ts.remove(ts.first());
+			}
+			cmbMinScale.setItems(items);
+		}
+
+		return cmbMinScale;
+	}
+
+
+	public long getMinScale() {
+		return minScale;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo wi = new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE);
+		wi.setTitle(Messages.getText("scale_range_window_title"));
+		wi.setWidth(480);
+		wi.setHeight(200);
+		return wi;
+	}
+	
+	public Object getWindowProfile() {
+		return WindowInfo.DIALOG_PROFILE;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		Component c = (Component) e.getSource();
+		if (getRdDontShowLabelsWhenZoomed().equals(c) ||
+			getRdUseSameRangeThanLayer().equals(c)) {
+			getCmbMinScale().setEnabled(getRdDontShowLabelsWhenZoomed().isSelected());
+			getCmbMaxScale().setEnabled(getRdDontShowLabelsWhenZoomed().isSelected());
+
+		}
+
+		if ("OK".equals(e.getActionCommand())) {
+			maxScale = (getRdUseSameRangeThanLayer().isSelected()) ?
+				 -1 : getCmbMaxScale().getScale();
+			minScale = (getRdUseSameRangeThanLayer().isSelected()) ?
+				 -1 : getCmbMinScale().getScale();
+			
+			
+			ApplicationLocator.getManager().getUIManager().closeWindow(this);
+		}
+
+		if ("CANCEL".equals(e.getActionCommand())) {
+			ApplicationLocator.getManager().getUIManager().closeWindow(this);
+		}
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelTextStylePanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelTextStylePanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelTextStylePanel.java	(revision 40911)
@@ -0,0 +1,259 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import org.gvsig.app.gui.JComboBoxUnits;
+import org.gvsig.app.gui.panels.ColorChooserPanel;
+import org.gvsig.app.gui.styling.JComboBoxUnitsReferenceSystem;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol;
+import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
+import org.gvsig.gui.beans.swing.JComboBoxFonts;
+import org.gvsig.gui.beans.swing.JIncrementalNumberField;
+import org.gvsig.i18n.Messages;
+
+
+public class LabelTextStylePanel extends JPanel implements ActionListener{
+	private static final long serialVersionUID = 8351591938535233138L;
+	private ITextSymbol symbol;
+	private JComboBoxFonts cmbFont;
+	private ColorChooserPanel colorFont;
+	private JRadioButton rdBtnTextHeight;
+	private JRadioButton rdBtnFitOnTextArea;
+	private JIncrementalNumberField incrTextSize;
+	private JComboBoxUnits units;
+	private JComboBoxUnitsReferenceSystem referenceSystem;
+
+	private JCheckBox chkWithHalo;
+	private ColorChooserPanel colorHaloChooser;
+	private JIncrementalNumberField txtHaloWidth;
+
+	private ArrayList<ActionListener> listeners = new ArrayList<ActionListener>();
+	private boolean performAction = true;
+	
+	private JCheckBox getCheckHalo() {
+		if (chkWithHalo == null) {
+			chkWithHalo = new JCheckBox(Messages.getText("_Use_halo") + ": ");
+			chkWithHalo.setSelected(false);
+			chkWithHalo.setName("CHECK_HALO");
+		}
+		return chkWithHalo;
+	}
+	private ColorChooserPanel getHaloColorChooser() {
+		if (colorHaloChooser == null){
+			colorHaloChooser = new ColorChooserPanel(true);
+			colorHaloChooser.setColor(Color.WHITE);
+		}
+		return colorHaloChooser;
+	}
+	
+
+	private JIncrementalNumberField getTxtHaloWidth() {
+		if (txtHaloWidth == null) {
+			txtHaloWidth = new JIncrementalNumberField("3");
+		}
+		return txtHaloWidth;
+	}
+
+
+
+	public LabelTextStylePanel() {
+		setLayout(new BorderLayout(10, 2));
+		JPanel aux = new JPanel();
+		aux.setLayout(new BoxLayout(aux,BoxLayout.Y_AXIS));
+		JPanel auxA = new JPanel();
+		aux.setBorder(BorderFactory.createTitledBorder(Messages.getText("font")));
+		auxA.add(new JLabel(Messages.getText("font")));
+		auxA.add(cmbFont = new JComboBoxFonts(),BorderLayout.NORTH);
+		JPanel auxB = new JPanel();
+		auxB.add(new JLabel(Messages.getText("color")));
+		auxB.add(colorFont = new ColorChooserPanel(true),BorderLayout.SOUTH);
+		cmbFont.addActionListener(this);
+		colorFont.addActionListener(this);
+		aux.add(auxA);
+		aux.add(auxB);
+		add(aux, BorderLayout.WEST);
+
+		aux = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 2));
+		aux.setBorder(BorderFactory.createTitledBorder(Messages.getText("format")));
+		rdBtnTextHeight = new JRadioButton(Messages.getText("fixed_text_size"));
+		rdBtnFitOnTextArea = new JRadioButton(Messages.getText("fit_on_text_area"));
+		rdBtnFitOnTextArea.addActionListener(this);
+		rdBtnTextHeight.addActionListener(this);
+		ButtonGroup g = new ButtonGroup();
+		g.add(rdBtnFitOnTextArea);
+		g.add(rdBtnTextHeight);
+		incrTextSize = new JIncrementalNumberField(
+				"1",
+				7,
+				0,
+				Double.POSITIVE_INFINITY,
+				1);
+		incrTextSize.addActionListener(this);
+		units = new JComboBoxUnits();
+		referenceSystem = new JComboBoxUnitsReferenceSystem();
+		units.addActionListener(this);
+		referenceSystem.addActionListener(this);
+
+		GridBagLayoutPanel aux2 = new GridBagLayoutPanel();
+		JPanel aux3 = new JPanel(new FlowLayout(FlowLayout.LEFT, 3, 0));
+		aux3.add(rdBtnTextHeight);
+		aux3.add(incrTextSize);
+
+		aux3.add(units);
+		aux3.add(referenceSystem);
+
+		aux2.addComponent(aux3);
+		GridBagLayoutPanel aux4 = new GridBagLayoutPanel();
+		aux4.addComponent(rdBtnFitOnTextArea);
+		
+		// Para reflejar los cambios.
+		getCheckHalo().addActionListener(this);
+		getHaloColorChooser().addActionListener(this);
+		getTxtHaloWidth().addActionListener(this);
+
+		
+		aux4.addComponent(getCheckHalo(), getHaloColorChooser());
+		aux4.addComponent(Messages.getText("_Halo_width") + ": ", getTxtHaloWidth());
+
+	
+		aux2.addComponent(aux4);
+		aux.add(aux2);
+
+		add(aux, BorderLayout.CENTER);
+	}
+
+
+
+	public void setModel(ITextSymbol textSymbol, int unit, int referenceSystem) {
+		incrTextSize.setDouble(textSymbol.getFont().getSize());
+		rdBtnTextHeight.setSelected(!textSymbol.isAutoresizeEnabled());
+		rdBtnFitOnTextArea.setSelected(textSymbol.isAutoresizeEnabled());
+		getCheckHalo().setSelected(textSymbol.isDrawWithHalo());
+		if (textSymbol.isDrawWithHalo()) {
+			getHaloColorChooser().setColor(textSymbol.getHaloColor());
+			getTxtHaloWidth().setDouble(textSymbol.getHaloWidth());
+		}
+		performAction = false;
+		cmbFont.setSelectedItem(textSymbol.getFont().getName());
+		colorFont.setColor(textSymbol.getTextColor());
+		this.units.setSelectedUnitIndex(unit);
+		this.referenceSystem.setSelectedIndex(referenceSystem);
+		boolean enableSize = rdBtnTextHeight.isSelected();
+		this.units.setEnabled(enableSize);
+		this.referenceSystem.setEnabled(enableSize);
+		this.incrTextSize.setEnabled(enableSize);
+		performAction = true;
+		this.symbol = textSymbol;
+	}
+
+	public ITextSymbol getTextSymbol() {
+		symbol.setDrawWithHalo(chkWithHalo.isSelected());
+		if (symbol.isDrawWithHalo()) {
+			symbol.setHaloColor(colorHaloChooser.getColor());
+			symbol.setHaloWidth((float) txtHaloWidth.getDouble());
+		}
+
+		return symbol;
+	}
+
+
+	public void addActionListener(ActionListener l) {
+		listeners.add(l);
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (performAction) {
+			boolean enableSize = rdBtnTextHeight.isSelected();
+			incrTextSize.setEnabled(enableSize);
+			units.setEnabled(enableSize);
+			referenceSystem.setEnabled(enableSize);
+
+			if (symbol != null) {
+				symbol.setAutoresizeEnabled(rdBtnFitOnTextArea.isSelected());
+				symbol.setFont(
+						new Font(
+								(String) cmbFont.getSelectedItem(),
+								Font.PLAIN,
+								(int) incrTextSize.getDouble()));
+				symbol.setTextColor(colorFont.getColor());
+				symbol.setFontSize(incrTextSize.getDouble());
+
+				/* -------------- Add to API?
+				symbol.setUnit(units.getSelectedUnitIndex());
+				symbol.setReferenceSystem(referenceSystem.getSelectedIndex());
+				*/
+				symbol.setDrawWithHalo(chkWithHalo.isSelected());
+				if (symbol.isDrawWithHalo()) {
+					symbol.setHaloColor(colorHaloChooser.getColor());
+					symbol.setHaloWidth((float) txtHaloWidth.getDouble());
+				}
+
+			}
+			for (ActionListener l : listeners) {
+				l.actionPerformed(new ActionEvent(this, 0, null));
+			}
+		}
+	}
+
+	public int getUnit() {
+		return this.units.getSelectedUnitIndex();
+	}
+
+	public int getReferenceSystem() {
+		return this.referenceSystem.getSelectedIndex();
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/PlacementProperties.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/PlacementProperties.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/PlacementProperties.java	(revision 40911)
@@ -0,0 +1,1095 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: PlacementProperties.java 15674 2007-10-30 16:39:02Z jdominguez $
+* $Log$
+* Revision 1.7  2007-04-19 14:22:29  jaume
+* *** empty log message ***
+*
+* Revision 1.6  2007/04/13 12:43:08  jaume
+* *** empty log message ***
+*
+* Revision 1.5  2007/04/13 12:10:56  jaume
+* *** empty log message ***
+*
+* Revision 1.4  2007/04/12 16:01:32  jaume
+* *** empty log message ***
+*
+* Revision 1.3  2007/03/28 15:38:56  jaume
+* GUI for lines, points and polygons
+*
+* Revision 1.2  2007/03/09 11:25:00  jaume
+* Advanced symbology (start committing)
+*
+* Revision 1.1.2.2  2007/02/09 11:00:03  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.1  2007/02/01 12:12:41  jaume
+* theme manager window and all its components are now dynamic
+*
+*
+*/
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GridLayout;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.gui.styling.SingleStyleSelectorFilter;
+import org.gvsig.app.gui.styling.StylePreviewer;
+import org.gvsig.app.gui.styling.StyleSelector;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.store.shp.SHPStoreParameters;
+import org.gvsig.fmap.dal.store.shp.SHPStoreProvider;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryException;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.MapContextManager;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.fmap.mapcontext.rendering.legend.ISingleSymbolLegend;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle;
+import org.gvsig.gui.beans.AcceptCancelPanel;
+import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
+import org.gvsig.gui.beans.swing.JBlank;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.label.GeneralLabelingStrategy;
+import org.gvsig.labeling.lang.LabelClassUtils;
+import org.gvsig.labeling.placements.MultiShapePlacementConstraints;
+import org.gvsig.labeling.placements.PlacementManager;
+import org.gvsig.labeling.placements.PointLabelPositioner;
+import org.gvsig.labeling.placements.PointPlacementConstraints;
+import org.gvsig.symbology.SymbologyLocator;
+import org.gvsig.symbology.SymbologyManager;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.ISimpleFillSymbol;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ISimpleLineSymbol;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ISimpleLineStyle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+public class PlacementProperties extends JPanel implements
+IPlacementProperties, ActionListener {
+	
+	private static final Logger logger =
+			LoggerFactory.getLogger(PlacementProperties.class);
+	
+	private static final long serialVersionUID = 1022470370547576765L;
+	
+	private PointLabelPositioner defaultPointStyle = new PointLabelPositioner(
+			new int[] { 2, 2, 1, 3, 2, 3, 3, 2	},
+			Messages.getText("prefer_top_right_all_allowed")
+			);
+
+	public IPlacementConstraints constraints;
+
+	private PointLabelPositioner pointStyle = null;
+	private int shapeType;
+	private JPanel pnlContent = null;
+	private JPanel pnlCenter = null;
+	private GridBagLayoutPanel orientationPanel;
+	private DuplicateLayersMode	duplicateLabelsMode;
+	private JRadioButton rdBtnHorizontal;
+	private JRadioButton rdBtnParallel;
+	private JRadioButton rdBtnFollowingLine;
+	private JRadioButton rdBtnPerpendicular;
+	private JPanel positionPanel;
+	private MiniMapContext preview;
+	private ArrayList<String> linePositionItem = new ArrayList<String>();
+
+	private JPanel polygonSettingsPanel;
+	private JRadioButton rdBtnAlwaysHorizontal;
+	private JRadioButton rdBtnAlwaysStraight;
+	private GridBagLayoutPanel pointSettingsPanel;
+	private JRadioButton rdBtnOffsetLabelHorizontally;
+	private JRadioButton rdBtnOffsetLabelOnTopPoint;
+	private StylePreviewer stylePreview;
+	private JButton btnChangeLocation;
+	private JPanel locationPanel;
+	private JComboBox cmbLocationAlongLines;
+	private JRadioButton chkBellow;
+	private JRadioButton chkOnTheLine;
+	private JRadioButton chkAbove;
+	private JComboBox cmbOrientationSystem;
+	private JLabelHTML lblPointPosDesc = new JLabelHTML(""); //pointStyle.getDescription());
+	IPlacementConstraints oldConstraints;
+	private JCheckBox chkFitInsidePolygon;
+
+
+	/**
+	 * Constructs a new panel for PlacementProperties.
+	 *
+	 * @param constraints, if not null this parameters is used to fill the panel. If it is null
+	 * this PlacementProperties constructor creates a new default one that is ready to be used
+	 * for the shapetype passed as second parameter
+	 *
+	 * @param shapeType, defines the target shapetype of the IPlacementConstraints obtained;
+	 * @throws ReadDriverException
+	 */
+	public PlacementProperties(IPlacementConstraints constraints, int shapeType) {
+		initialize(constraints, shapeType, getPnlDuplicateLabels());
+	}
+
+	PlacementProperties(IPlacementConstraints costraints,
+			int shapeType, DuplicateLayersMode duplicatesMode) {
+
+		initialize( costraints, shapeType, duplicatesMode);
+		refreshComponents();
+	}
+
+	private void refreshComponents() {
+		getChkOnTheLine().setSelected(constraints.isOnTheLine());
+		getChkAbove().setSelected(constraints.isAboveTheLine());
+		getChkBelow().setSelected(constraints.isBelowTheLine());
+
+		getRdBtnHorizontal().setSelected(constraints.isHorizontal());
+		getRdBtnParallel().setSelected(constraints.isParallel());
+		getRdBtnFollowingLine().setSelected(constraints.isFollowingLine());
+		getRdBtnPerpendicular().setSelected(constraints.isPerpendicular());
+
+		getCmbOrientationSystem().setSelectedIndex(constraints.isPageOriented() ? 1 : 0);
+
+		// points mode
+		if (constraints.isOnTopOfThePoint()) {
+			getRdOffsetLabelOnTopPoint().setSelected(true);
+		} else if (constraints.isAroundThePoint()) {
+			getRdOffsetLabelHorizontally().setSelected(true);
+		}
+
+		// lines mode
+		if (constraints.isAtTheBeginingOfLine()) {
+			getCmbLocationAlongLines().setSelectedIndex(1);
+		} else if (constraints.isInTheMiddleOfLine()) {
+			getCmbLocationAlongLines().setSelectedIndex(0);
+		} else if (constraints.isAtTheEndOfLine()) {
+			getCmbLocationAlongLines().setSelectedIndex(2);
+		} else if (constraints.isAtBestOfLine()) {
+			getCmbLocationAlongLines().setSelectedIndex(3);
+		}
+
+		// polygon mode
+		getChkFitInsidePolygon().setSelected(constraints.isFitInsidePolygon());
+		if (constraints.isHorizontal()) {
+			getRdBtnAlwaysHorizontal().setSelected(true);
+		} else if (constraints.isParallel()) {
+			getRdBtnAlwaysStraight().setSelected(true);
+		}
+
+//		if(constraints.isFollowingLine()){
+//			setComponentEnabled(getPositionPanel(), false);
+//		}
+
+
+		// duplicates mode
+		int dupMode = constraints.getDuplicateLabelsMode();
+		duplicateLabelsMode.setMode(dupMode);
+		applyToPreview();
+	}
+
+	private void initialize(
+			IPlacementConstraints constraints,
+			int shapeType, DuplicateLayersMode duplicatesMode) {
+
+		this.duplicateLabelsMode = duplicatesMode;
+		this.shapeType = shapeType;
+		this.oldConstraints = constraints;
+//		this.constraints = constraints != null ?
+//				PlacementManager.createPlacementConstraints(constraints.getXMLEntity())	:
+//				PlacementManager.createPlacementConstraints(shapeType);
+		if( constraints != null ) {
+			
+			this.constraints = (IPlacementConstraints) LabelClassUtils.clone(constraints);
+			
+			if (constraints instanceof PointPlacementConstraints) {
+				PointLabelPositioner positioneer = ((PointPlacementConstraints)constraints).getPositioner();
+				if (positioneer != null) this.setPointStyle(positioneer);
+				this.lblPointPosDesc.setText(this.getPointStyle().getDescription());
+			}
+		} else {
+			try {
+				this.constraints = PlacementManager.createPlacementConstraints(shapeType);
+			} catch (Exception e) {
+				logger.error("While initializing placement constraints.", e);
+				return;
+			}
+		}
+
+		linePositionItem.add(Messages.getText("in_the_middle"));
+		linePositionItem.add(Messages.getText("at_begin"));
+		linePositionItem.add(Messages.getText("at_end"));
+		linePositionItem.add(Messages.getText("at_best"));
+
+        this.setLayout(new BorderLayout());
+        this.setSize(new Dimension(410,380));
+        this.add(getPnlContent(), BorderLayout.CENTER);
+ 	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo viewInfo = new WindowInfo(
+				WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE);
+		viewInfo.setWidth(getWidth());
+		viewInfo.setHeight(getHeight());
+		viewInfo.setTitle(Messages.getText("placement_properties"));
+		return viewInfo;
+	}
+
+	public Object getWindowProfile() {
+		return WindowInfo.DIALOG_PROFILE;
+	}
+
+	private JPanel getPnlContent() {
+		if (pnlContent == null) {
+			pnlContent = new JPanel();
+			pnlContent.setLayout(new BorderLayout());
+			pnlContent.add(getPnlCenter(), java.awt.BorderLayout.CENTER);
+			pnlContent.add(getPnlDuplicateLabels(), java.awt.BorderLayout.SOUTH);
+		}
+		return pnlContent;
+	}
+
+	private DuplicateLayersMode getPnlDuplicateLabels() {
+		if (duplicateLabelsMode == null) {
+			duplicateLabelsMode = new DuplicateLayersMode(this);
+		}
+		return duplicateLabelsMode;
+	}
+
+	private JPanel getPnlCenter() {
+		
+		if (pnlCenter == null) {
+			pnlCenter = new JPanel();
+			
+			GeometryType gt = null;
+			try {
+				gt = GeometryLocator.getGeometryManager().getGeometryType(
+						shapeType, SUBTYPES.GEOM2D);
+			} catch (Exception e) {
+				logger.error("While getting panel.", e);
+				return null;
+			}
+			
+			if (gt.isTypeOf(TYPES.POINT) || gt.isTypeOf(TYPES.MULTIPOINT)) {
+				pnlCenter.setBorder(BorderFactory.
+						createTitledBorder(null,
+						Messages.getText("point_settings")));
+				pnlCenter.add(getPointSettingsPanel());
+			} else {
+				if (gt.isTypeOf(TYPES.CURVE) || gt.isTypeOf(TYPES.MULTICURVE)) {
+					pnlCenter.setLayout(new BorderLayout());
+					pnlCenter.setBorder(BorderFactory.
+							createTitledBorder(null,
+									Messages.getText("line_settings")));
+					JPanel aux = new JPanel(
+							new GridLayout(1, 2));
+					aux.add(getOrientationPanel());
+					aux.add(getPositionPanel());
+					pnlCenter.add(aux, BorderLayout.CENTER);
+					pnlCenter.add(getLocationPanel(), BorderLayout.SOUTH);
+				} else {
+					if (gt.isTypeOf(TYPES.SURFACE) || gt.isTypeOf(TYPES.MULTISURFACE)) {
+						pnlCenter.setLayout(new BorderLayout());
+						pnlCenter.setBorder(BorderFactory.
+								createTitledBorder(null,
+										Messages.getText("polygon_settings")));
+						pnlCenter.add(getPolygonSettingsPanel(), BorderLayout.CENTER);
+					}
+				}
+			}
+		}
+		return pnlCenter;
+	}
+
+	private JPanel getLocationPanel() {
+		if (locationPanel == null) {
+			locationPanel = new JPanel(new FlowLayout(FlowLayout.LEADING));
+			locationPanel.setBorder(BorderFactory.
+					createTitledBorder(null,
+							Messages.getText("location")));
+			locationPanel.add(new JLabel(Messages.getText(
+					"location_along_the_lines")+":"));
+			locationPanel.add(getCmbLocationAlongLines());
+		}
+
+		return locationPanel;
+	}
+
+	private JComboBox getCmbLocationAlongLines() {
+		if (cmbLocationAlongLines == null) {
+			cmbLocationAlongLines = new JComboBox((String[]) linePositionItem.toArray(new String[linePositionItem.size()]));
+			cmbLocationAlongLines.addActionListener(this);
+		}
+
+		return cmbLocationAlongLines;
+	}
+
+	private PointLabelPositioner getPointStyle(){
+		if (pointStyle == null){
+			pointStyle = defaultPointStyle;
+			lblPointPosDesc.setText(pointStyle.getDescription());
+		}
+		return pointStyle;
+	}
+
+	private void setPointStyle(PointLabelPositioner pointStyle){
+		this.pointStyle = pointStyle;
+	}
+
+	private GridBagLayoutPanel getPointSettingsPanel() {
+		if (pointSettingsPanel == null) {
+			pointSettingsPanel = new GridBagLayoutPanel();
+			pointSettingsPanel.addComponent(getRdOffsetLabelHorizontally());
+			JPanel aux = new JPanel();
+			aux.add(getStylePreviewer());
+
+			JPanel aux2 = new JPanel();
+			aux2.setLayout(new BoxLayout(aux2, BoxLayout.Y_AXIS));
+			aux2.add(lblPointPosDesc);
+			aux2.add(new JBlank(20, 5));
+			aux2.add(getBtnChangeLocation());
+
+			aux.add(aux2);
+			pointSettingsPanel.addComponent("", aux);
+			pointSettingsPanel.addComponent("",
+					new JLabel(Messages.getText("label-point-priority-help")));
+			pointSettingsPanel.addComponent(getRdOffsetLabelOnTopPoint());
+			ButtonGroup group = new ButtonGroup();
+			group.add(getRdOffsetLabelHorizontally());
+			group.add(getRdOffsetLabelOnTopPoint());
+		}
+
+		return pointSettingsPanel;
+	}
+
+
+
+	private JButton getBtnChangeLocation() {
+		if (btnChangeLocation == null) {
+			btnChangeLocation = new JButton(Messages.getText("change_location"));
+			btnChangeLocation.addActionListener(this);
+		}
+
+		return btnChangeLocation;
+	}
+
+	private StylePreviewer getStylePreviewer() {
+		if (stylePreview == null) {
+			stylePreview = new StylePreviewer();
+			stylePreview.setStyle(getPointStyle());
+			stylePreview.setPreferredSize(new Dimension(80, 80));
+		}
+		return stylePreview;
+	}
+
+	private JRadioButton getRdOffsetLabelOnTopPoint() {
+		if (rdBtnOffsetLabelOnTopPoint == null) {
+			rdBtnOffsetLabelOnTopPoint = new JRadioButton(
+					Messages.getText("offset_labels_on_top_of_the_points")) ;
+
+		}
+
+		return rdBtnOffsetLabelOnTopPoint;
+	}
+
+	private JRadioButton getRdOffsetLabelHorizontally() {
+		if (rdBtnOffsetLabelHorizontally == null) {
+			rdBtnOffsetLabelHorizontally = new JRadioButton(
+					Messages.getText("offset_labels_horizontally"));
+
+		}
+
+		return rdBtnOffsetLabelHorizontally;
+	}
+
+	private JPanel getPolygonSettingsPanel() {
+		if (polygonSettingsPanel == null) {
+			polygonSettingsPanel = new JPanel(new BorderLayout(10, 10));
+			JPanel aux = new JPanel();
+			aux.setLayout(new BoxLayout(aux, BoxLayout.Y_AXIS));
+			aux.add(new JBlank(10,10));
+			aux.add(getRdBtnAlwaysHorizontal());
+			aux.add(new JBlank(10,10));
+			aux.add(getRdBtnAlwaysStraight());
+			aux.add(new JBlank(10,50));
+
+			polygonSettingsPanel.add(getPreview(), BorderLayout.CENTER);
+			polygonSettingsPanel.add(aux, BorderLayout.EAST);
+			ButtonGroup group = new ButtonGroup();
+			group.add(getRdBtnAlwaysHorizontal());
+			group.add(getRdBtnAlwaysStraight());
+			polygonSettingsPanel.add(getChkFitInsidePolygon(), BorderLayout.SOUTH);
+		}
+
+		return polygonSettingsPanel;
+	}
+
+	private JCheckBox getChkFitInsidePolygon() {
+		if (chkFitInsidePolygon == null) {
+			chkFitInsidePolygon = new JCheckBox(
+					Messages.getText("fit_inside_polygon"));
+			chkFitInsidePolygon.addActionListener(this);
+
+		}
+
+		return chkFitInsidePolygon;
+	}
+
+	private JRadioButton getRdBtnAlwaysStraight() {
+		if (rdBtnAlwaysStraight == null) {
+			rdBtnAlwaysStraight = new JRadioButton(
+					Messages.getText("always_straight"));
+			rdBtnAlwaysStraight.addActionListener(this);
+		}
+
+		return rdBtnAlwaysStraight;
+	}
+
+	private JRadioButton getRdBtnAlwaysHorizontal() {
+		if (rdBtnAlwaysHorizontal == null) {
+			rdBtnAlwaysHorizontal = new JRadioButton(
+					Messages.getText("always_horizontal"));
+			rdBtnAlwaysHorizontal.addActionListener(this);
+		}
+
+		return rdBtnAlwaysHorizontal;
+	}
+
+
+
+	private JPanel getPositionPanel() {
+		if (positionPanel == null) {
+			positionPanel = new JPanel(new BorderLayout());
+			positionPanel.setBorder(BorderFactory.
+					createTitledBorder(null,
+							Messages.getText("position")));
+			GridBagLayoutPanel aux2 = new GridBagLayoutPanel();
+			JPanel aux = new JPanel(new GridLayout(4, 1));
+
+			aux.add(getChkAbove());
+			getChkAbove().setSelected(true);
+			aux.add(getChkOnTheLine());
+			aux.add(getChkBelow());
+
+			ButtonGroup group = new ButtonGroup();
+			group.add(getChkAbove());
+			group.add(getChkOnTheLine());
+			group.add(getChkBelow());
+
+			aux2.addComponent(aux);
+			aux2.addComponent(
+					Messages.getText("orientation_system"), getCmbOrientationSystem());
+			positionPanel.add(getPreview(), BorderLayout.CENTER);
+			positionPanel.add(aux2, BorderLayout.SOUTH);
+		}
+		return positionPanel;
+	}
+
+	private Component getPreview() {
+		 if (preview == null) {
+			 preview = new MiniMapContext(shapeType);
+		 }
+		 return preview;
+	}
+
+	private JComboBox getCmbOrientationSystem() {
+		if (cmbOrientationSystem == null) {
+			cmbOrientationSystem = new JComboBox(new String[] {
+					Messages.getText("line"),
+					Messages.getText("page")
+			});
+			cmbOrientationSystem.setSelectedIndex(0);
+			cmbOrientationSystem.addActionListener(this);
+		}
+
+		return cmbOrientationSystem;
+	}
+
+	private JRadioButton getChkBelow() {
+		if (chkBellow == null) {
+			chkBellow = new JRadioButton(Messages.getText("below"));
+			chkBellow.addActionListener(this);
+		}
+		return chkBellow;
+	}
+
+	private JRadioButton getChkOnTheLine() {
+		if (chkOnTheLine == null) {
+			chkOnTheLine = new JRadioButton(
+					Messages.getText("on_the_line"));
+			chkOnTheLine.addActionListener(this);
+		}
+		return chkOnTheLine;
+	}
+
+	private JRadioButton getChkAbove() {
+		if (chkAbove == null) {
+			chkAbove = new JRadioButton(Messages.getText("above"));
+			chkAbove.addActionListener(this);
+		}
+		return chkAbove;
+	}
+
+	private GridBagLayoutPanel getOrientationPanel() {
+		if (orientationPanel == null) {
+			orientationPanel = new GridBagLayoutPanel();
+			orientationPanel.setBorder(BorderFactory.
+					createTitledBorder(null,
+							Messages.getText("orientation")));
+			orientationPanel.addComponent(getRdBtnHorizontal());
+			orientationPanel.addComponent(getRdBtnParallel());
+			orientationPanel.addComponent(getRdBtnFollowingLine());
+			orientationPanel.addComponent(getRdBtnPerpendicular());
+			ButtonGroup group = new ButtonGroup();
+			group.add(getRdBtnHorizontal());
+			group.add(getRdBtnParallel());
+			group.add(getRdBtnFollowingLine());
+			group.add(getRdBtnPerpendicular());
+
+
+
+		}
+		return orientationPanel;
+	}
+
+	private JRadioButton getRdBtnParallel() {
+		if (rdBtnParallel == null) {
+			rdBtnParallel = new JRadioButton(
+					Messages.getText("parallel"));
+
+			rdBtnParallel.addActionListener(this);
+		}
+		return rdBtnParallel;
+	}
+
+	private JRadioButton getRdBtnFollowingLine() {
+		if (rdBtnFollowingLine == null) {
+			rdBtnFollowingLine = new JRadioButton(
+					Messages.getText("following_line"));
+			rdBtnFollowingLine.addActionListener(this);
+		}
+		return rdBtnFollowingLine;
+	}
+
+	private JRadioButton getRdBtnPerpendicular() {
+		if (rdBtnPerpendicular == null) {
+			rdBtnPerpendicular = new JRadioButton(
+					Messages.getText("perpedicular"));
+			rdBtnPerpendicular.addActionListener(this);
+		}
+		return rdBtnPerpendicular;
+	}
+
+	private JRadioButton getRdBtnHorizontal() {
+		if (rdBtnHorizontal == null) {
+			rdBtnHorizontal = new JRadioButton(
+					Messages.getText("horizontal"));
+			rdBtnHorizontal.addActionListener(this);
+		}
+		return rdBtnHorizontal;
+	}
+
+
+
+
+	public void applyConstraints() throws GeometryException {
+		int mode=0;
+		GeometryType gt = null;
+		gt = GeometryLocator.getGeometryManager().getGeometryType(
+				shapeType, SUBTYPES.GEOM2D);
+		
+		if (gt.isTypeOf(TYPES.POINT) || gt.isTypeOf(TYPES.MULTIPOINT)) {
+			if (getRdOffsetLabelOnTopPoint().isSelected()) {
+				mode = IPlacementConstraints.ON_TOP_OF_THE_POINT;
+			} else if (getRdOffsetLabelHorizontally().isSelected()) {
+				mode = IPlacementConstraints.OFFSET_HORIZONTALY_AROUND_THE_POINT;
+			}
+			((PointPlacementConstraints) constraints).
+				setPositioner((PointLabelPositioner) stylePreview.getStyle());
+		} else {
+			if (gt.isTypeOf(TYPES.CURVE) || gt.isTypeOf(TYPES.MULTICURVE)) {
+				if (getRdBtnFollowingLine().isSelected()) {
+					mode = IPlacementConstraints.FOLLOWING_LINE;
+				} else if (getRdBtnParallel().isSelected()) {
+					mode = IPlacementConstraints.PARALLEL;
+				} else if (getRdBtnPerpendicular().isSelected()) {
+					mode = IPlacementConstraints.PERPENDICULAR;
+				} else {
+					mode = IPlacementConstraints.HORIZONTAL;
+				}
+
+				constraints.setAboveTheLine(getChkAbove().isSelected());
+				constraints.setBelowTheLine(getChkBelow().isSelected());
+				constraints.setOnTheLine(getChkOnTheLine().isSelected());
+
+				constraints.setPageOriented(
+						getCmbOrientationSystem().getSelectedIndex() == 1);
+				int i = getCmbLocationAlongLines().getSelectedIndex();
+				if (i == 0) {
+					i = IPlacementConstraints.AT_THE_MIDDLE_OF_THE_LINE;
+				} else if (i == 1) {
+					i = IPlacementConstraints.AT_THE_BEGINING_OF_THE_LINE;
+				} else if (i == 2) {
+					i = IPlacementConstraints.AT_THE_END_OF_THE_LINE;
+				} else if (i == 3) {
+					i = IPlacementConstraints.AT_BEST_OF_LINE;
+				}
+				constraints.setLocationAlongTheLine(i);
+			} else {
+				if (gt.isTypeOf(TYPES.SURFACE) || gt.isTypeOf(TYPES.MULTISURFACE)) {
+					mode = IPlacementConstraints.HORIZONTAL;
+					if (getRdBtnAlwaysHorizontal().isSelected()) {
+						mode = IPlacementConstraints.HORIZONTAL;
+					} else if (getRdBtnAlwaysStraight().isSelected()) {
+						mode = IPlacementConstraints.PARALLEL;
+					}
+
+					constraints.setFitInsidePolygon(getChkFitInsidePolygon().isSelected());
+				}
+			}
+		}		
+		
+		constraints.setPlacementMode(mode);
+		constraints.setDuplicateLabelsMode(duplicateLabelsMode.getMode());
+	}
+
+	private void setComponentEnabled(Component c, boolean b) {
+		if (c instanceof JComponent) {
+			JComponent c1 = (JComponent) c;
+			for (int i = 0; i < c1.getComponentCount(); i++) {
+				setComponentEnabled(c1.getComponent(i), b);
+			}
+		}
+		c.setEnabled(b);
+	}
+
+
+	public IPlacementConstraints getPlacementConstraints() {
+		return constraints;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		JComponent c = (JComponent) e.getSource();
+		boolean okPressed = "OK".equals(e.getActionCommand());
+		boolean cancelPressed = "CANCEL".equals(e.getActionCommand());
+		if (okPressed || cancelPressed) {
+			if (okPressed) {
+				try {
+					applyConstraints();
+				} catch (GeometryException e1) {
+					logger.error("While applying constraints.", e1);
+				}
+			}
+
+			if ("CANCEL".equals(e.getActionCommand()))
+				constraints = oldConstraints;
+			
+			ApplicationLocator.getManager().getUIManager().closeWindow(this);
+
+			return;
+		} else if (c.equals(rdBtnAlwaysHorizontal)
+				|| c.equals(rdBtnAlwaysStraight) ) {
+			
+			
+		} else if (c.equals(rdBtnHorizontal)) {
+			// lock position panel and location panel
+			setComponentEnabled(getPositionPanel(), false);
+			setComponentEnabled(getLocationPanel(), false);
+		} else if (c.equals(rdBtnParallel) || c.equals(rdBtnPerpendicular)) {
+			// unlock position panel and location panel but keep orientation system locked
+			setComponentEnabled(getLocationPanel(), true);
+			setComponentEnabled(getPositionPanel(), true);
+			getCmbOrientationSystem().setEnabled(true);
+		} else if (c.equals(rdBtnFollowingLine)) {
+			setComponentEnabled(getLocationPanel(), true);
+			setComponentEnabled(getPositionPanel(), true);
+			getCmbOrientationSystem().setSelectedItem(Messages.getText("line"));
+			getCmbOrientationSystem().setEnabled(false);
+		} else if (c.equals(btnChangeLocation)) {
+			StyleSelector stySel = new StyleSelector(
+				getPointStyle(),
+				TYPES.POINT,
+				new SingleStyleSelectorFilter(PointLabelPositioner.class));
+			
+			ApplicationLocator.getManager().getUIManager().addWindow(stySel);
+			
+			IStyle sty = (IStyle) stySel.getSelectedObject();
+			if (sty != null) {
+				stylePreview.setStyle(sty);
+				lblPointPosDesc.setText(sty.getDescription());
+			}
+		} else if (c == this.getChkFitInsidePolygon()) {
+			
+		} else if (c == getPnlDuplicateLabels()) {
+			
+		}
+		
+		applyToPreview();
+
+	}
+
+	private void applyToPreview() {
+		if (preview != null) {
+			try {
+				applyConstraints();
+			} catch (GeometryException e) {
+				logger.error("While applying constraints.", e);
+			}
+			preview.setConstraints(constraints);
+		}
+	}
+
+	private class JLabelHTML extends JLabel {
+		private static final long serialVersionUID = -5031405572546951108L;
+
+		public JLabelHTML(String text) {
+			super(text);
+			setPreferredSize(new Dimension(250, 60));
+		}
+
+		@Override
+		public void setText(String text) {
+			// silly fix to avoid too large text lines
+			super.setText("<html>"+text+"</html>");
+		}
+	}
+
+	public static IPlacementProperties createPlacementProperties(
+			IPlacementConstraints placementConstraints, int shapeType) {
+		return createPlacementProperties(placementConstraints, shapeType, null);
+	}
+
+	protected static IPlacementProperties createPlacementProperties(
+			IPlacementConstraints placementConstraints, int geotype,
+			DuplicateLayersMode duplicatesMode) {
+		
+		IPlacementProperties pp = null;
+		if (geotype == TYPES.GEOMETRY || geotype == TYPES.AGGREGATE) {
+			try {
+				pp = new MultiShapePlacementProperties(
+						(MultiShapePlacementConstraints) placementConstraints);
+			} catch (Exception e) {
+				logger.error("While creating MultiShapePlacementProperties", e);
+			}
+		} else {
+			pp = new PlacementProperties(placementConstraints, geotype, null);
+		}
+		((JPanel) pp).add(new AcceptCancelPanel(pp, pp), BorderLayout.SOUTH);
+		return pp;
+	}
+}  //  @jve:decl-index=0:visual-constraint="10,10"
+
+class MiniMapContext extends JComponent {
+	
+	private static final Logger minilogger =
+			LoggerFactory.getLogger(MiniMapContext.class);
+	
+	private static final long serialVersionUID = 229128782038834443L;
+	private MapContext theMapContext;
+	private FLyrVect line_layer;
+	private FLyrVect bgpoly_layer;
+	private int hMargin = 5, vMargin = 5;
+	private FLyrVect poly_layer;
+	
+	private int geotype;
+	private IPlacementConstraints placement;
+
+
+	public MiniMapContext(int type) {
+		setType(type);
+	}
+
+	public void setType(int type) {
+		
+		GeometryType gtype = null;
+		try {
+			gtype = GeometryLocator.getGeometryManager().getGeometryType(
+					type, SUBTYPES.GEOM2D);
+		} catch (Exception e) {
+			minilogger.error("While getting geo type", e);
+		}
+		
+		if (gtype.isTypeOf(TYPES.CURVE)
+				|| gtype.getType() == TYPES.MULTICURVE) {
+			this.geotype = TYPES.CURVE;
+		} else {
+			if (gtype.isTypeOf(TYPES.SURFACE)
+					|| gtype.getType() == TYPES.MULTISURFACE) {
+				this.geotype = TYPES.SURFACE;
+			} else {
+				// Should not get here
+				this.geotype = TYPES.GEOMETRY;
+			}
+		}
+		
+	}
+
+	public void setConstraints(IPlacementConstraints constraints) {
+		placement = constraints;
+		try {
+			getMapContext(null);
+		} catch (Exception e) {
+			minilogger.error("While getting mini map context", e);
+		}
+		repaint();
+	}
+
+	private MapContext getMapContext(Dimension img_size) throws Exception {
+		
+		Envelope ini_env = null;
+		ini_env = GeometryLocator.getGeometryManager().createEnvelope(
+				289600, 3973500, 289600 + 2000, 3973700 + 2000,
+				SUBTYPES.GEOM2D);
+
+		
+		if (theMapContext == null) {
+			
+			SymbologyManager symman = SymbologyLocator.getSymbologyManager();
+			MapContextManager mcoman = MapContextLocator.getMapContextManager();
+			
+			line_layer = this.createLayerFromShpDocFile("line.shp", "EPSG:23030");
+			ISimpleLineSymbol line_sym = symman.createSimpleLineSymbol();
+			line_sym.setColor(Color.red);
+			
+			ISimpleLineStyle line_sty = symman.createSimpleLineStyle();
+			IArrowDecoratorStyle arrow_style = symman.createArrowDecoratorStyle();
+			
+			arrow_style.getMarker().setSize(15);
+			arrow_style.setArrowMarkerCount(1);
+			arrow_style.getMarker().setColor(Color.red);
+			line_sty.setArrowDecorator(arrow_style);
+
+			line_sym.setLineStyle(line_sty);
+			line_sym.setLineWidth(2);
+			
+			ISingleSymbolLegend line_leg = (ISingleSymbolLegend) 
+			mcoman.createLegend(ISingleSymbolLegend.LEGEND_NAME);
+			
+			line_leg.setDefaultSymbol(line_sym);
+			line_layer.setLegend(line_leg);
+			// =====================================================
+			
+			bgpoly_layer = this.createLayerFromShpDocFile("bg-polygon.shp", "EPSG:23030");
+			poly_layer = this.createLayerFromShpDocFile("polygon.shp", "EPSG:23030");
+
+			ISimpleFillSymbol sym2 = symman.createSimpleFillSymbol();
+			sym2.setFillColor(new Color(50, 245, 125));
+			ISimpleLineSymbol outline = symman.createSimpleLineSymbol();
+			outline.setLineColor(Color.DARK_GRAY);
+			outline.setLineWidth(0.5);
+			sym2.setOutline(outline);
+
+			ISingleSymbolLegend poly_leg = (ISingleSymbolLegend) 
+			mcoman.createLegend(ISingleSymbolLegend.LEGEND_NAME);
+			poly_leg.setDefaultSymbol(sym2);
+			poly_layer.setLegend(poly_leg);
+			bgpoly_layer.setLegend(poly_leg);
+
+			GeneralLabelingStrategy labeling1 = new GeneralLabelingStrategy();
+			GeneralLabelingStrategy labeling2 = new GeneralLabelingStrategy();
+			ILabelingMethod def_method = symman.createDefaultLabelingMethod();
+
+			ILabelClass lc = null;
+			if (def_method.getLabelClasses() != null && def_method.getLabelClasses().length > 0) {
+				lc = def_method.getLabelClasses()[0];
+			} else {
+				lc = symman.createDefaultLabel();
+				def_method.addLabelClass(lc);
+			}
+
+			String[] sampleExpression = { Messages.getText("text") };
+			lc.setLabelExpressions(sampleExpression);
+
+			lc.getTextSymbol().setFontSize(16);
+
+			labeling1.setLabelingMethod(def_method);
+			labeling2.setLabelingMethod(def_method);
+			labeling1.setLayer(line_layer);
+			labeling2.setLayer(poly_layer);
+
+			line_layer.setLabelingStrategy(labeling1);
+			line_layer.setIsLabeled(true);
+			poly_layer.setLabelingStrategy(labeling2);
+			poly_layer.setIsLabeled(true);
+			
+			ViewPort theViewPort = new ViewPort(CRSFactory.getCRS("EPSG:23030"));
+			theMapContext = new MapContext(theViewPort);
+			
+			if (img_size != null) {
+				theViewPort.setImageSize(img_size);
+			} else {
+				theViewPort.setImageSize(new Dimension(200, 200));
+			}
+			theViewPort.setEnvelope(ini_env);
+			
+			theMapContext.getLayers().addLayer(bgpoly_layer);
+			theMapContext.getLayers().addLayer(poly_layer);
+			theMapContext.getLayers().addLayer(line_layer);
+		} else {
+			
+			if (img_size != null) {
+				theMapContext.getViewPort().setImageSize(img_size);
+			} else {
+				theMapContext.getViewPort().setImageSize(new Dimension(200, 200));
+			}
+			theMapContext.getViewPort().setEnvelope(ini_env);
+		}
+
+		line_layer.getLabelingStrategy().setPlacementConstraints(placement);
+		poly_layer.getLabelingStrategy().setPlacementConstraints(placement);
+		Dimension sz = getBounds().getSize();
+		sz.setSize(sz.width-2*hMargin, sz.height-2*vMargin);
+		theMapContext.getViewPort().setImageSize(sz);
+		theMapContext.getViewPort().setBackColor(new Color(255, 0, 0));
+		theMapContext.invalidate();
+		return theMapContext;
+	}
+
+	@Override
+	protected void paintComponent(Graphics g) {
+		try {
+			Rectangle bounds = getBounds();
+			Dimension sz = bounds.getSize();
+			sz.setSize(sz.width-2*vMargin, sz.height-2*hMargin);
+			Dimension imageSize = sz;
+			
+			MapContext mco = getMapContext(imageSize);
+			if (this.geotype == TYPES.CURVE) {
+				line_layer.setVisible(true);
+				poly_layer.setVisible(false);
+			} else {
+				if (this.geotype == TYPES.SURFACE) {
+					line_layer.setVisible(false);
+					poly_layer.setVisible(true);
+				}
+			}
+			bgpoly_layer.setVisible(line_layer.isVisible());
+
+			BufferedImage bi = new BufferedImage(imageSize.width, imageSize.height, BufferedImage.TYPE_4BYTE_ABGR);
+			mco.invalidate();
+			mco.draw(bi, bi.createGraphics(), mco.getScaleView());
+			g.setColor(new Color(150,180,255));
+			g.fillRect(vMargin, hMargin, bounds.width-2*hMargin, bounds.height-2*vMargin);
+			g.drawImage(bi, vMargin, vMargin, null);
+			bi = null;
+		} catch (Exception e) {
+			
+			minilogger.error("While painting.", e);
+			String noneSelected = "["+Messages.getText("preview_not_available")+"]";
+			int vGap = 5, hGap = 5;
+			Rectangle r = getBounds();
+			FontMetrics fm = g.getFontMetrics();
+			int lineWidth = fm.stringWidth(noneSelected);
+			float scale = (float) r.getWidth() / lineWidth;
+			Font f = g.getFont();
+			float fontSize = f.getSize()*scale;
+			g.setFont(	f.deriveFont( fontSize ) );
+			((Graphics2D) g).drawString(noneSelected, (r.x*scale) - (hGap/2), r.height/2+vGap*scale);
+		}
+
+	}
+	
+	private FLyrVect createLayerFromShpDocFile(
+			String shp_file_name, String epsg_code) throws Exception {
+		
+		File shpfile = getDocFolderFile(shp_file_name);
+		IProjection proj = CRSFactory.getCRS(epsg_code);
+		SHPStoreParameters ssp = (SHPStoreParameters)
+				DALLocator.getDataManager().createStoreParameters(
+				SHPStoreProvider.NAME);
+		ssp.setSHPFile(shpfile);
+		ssp.setCRS(proj);
+		FLyrVect resp = null;
+		resp = (FLyrVect) MapContextLocator.getMapContextManager().createLayer(
+				shp_file_name, ssp);
+		return resp;
+	}
+	
+	private File getDocFolderFile(String name) {
+		
+		URL resource = this.getClass().getClassLoader().getResource(
+				"docs" + File.separator + name);
+		File resp = new File(resource.getFile());
+		return resp;
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelExpressionEditorPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelExpressionEditorPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelExpressionEditorPanel.java	(revision 40911)
@@ -0,0 +1,278 @@
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.Component;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.ScrollPaneConstants;
+
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.i18n.Messages;
+
+public class LabelExpressionEditorPanel extends JPanel implements
+IWindow, ActionListener, MouseListener {
+	private static final String CANCEL_ACTION = "CANCEL";
+	private static final String ACCEPT_ACTION = "ACCEPT";
+	private static final String ADDFIELD_ACTION = "ADD_FIELD";
+	private String originalValue;
+	private String value;
+	private WindowInfo wInfo = null;
+	private String[] fieldNames;
+	private int[] fieldTypes;
+	private JButton botCancel;
+	private JButton botAccept;
+	private JButton botAddField;
+	private JScrollPane spExpression;
+	private JTextArea txtExpression;
+	private JScrollPane spFieldList;
+	private JList lstFields;
+
+	public LabelExpressionEditorPanel(FeatureAttributeDescriptor[] atts) {
+		super();
+		
+		int n = atts.length;
+		this.fieldNames = new String[n];
+		this.fieldTypes = new int[n];
+		for (int i=0; i<n; i++) {
+			this.fieldNames[i] = atts[i].getName();
+			this.fieldTypes[i] = atts[i].getType();
+		}
+		initialize();
+	}
+
+	private void initialize() {
+		this.setLayout(new GridBagLayout());
+
+		GridBagConstraints baseConst = new GridBagConstraints();
+		baseConst.ipadx = 2;
+		baseConst.ipady = 2;
+		baseConst.anchor = baseConst.CENTER;
+		baseConst.insets = new Insets(2,2,2,2);
+
+		GridBagConstraints con;
+
+		con = (GridBagConstraints) baseConst.clone();
+
+		con.gridx = 0;
+		con.gridy = 0;
+		con.gridheight = 3;
+		con.gridwidth = 2;
+		con.fill = con.BOTH;
+		con.weightx = 1;
+		con.weighty = 1;
+		this.add(getFieldListComposition(), con);
+
+		con = (GridBagConstraints) baseConst.clone();
+		con.gridx = 2;
+		con.gridy = 2;
+		con.fill = con.NONE;
+		this.add(getBotAddField(), con);
+
+		con.gridx = 0;
+		con.gridy = 3;
+		con.gridheight = 4;
+		con.gridwidth = 5;
+		con.fill = con.BOTH;
+		con.weightx = 1;
+		con.weighty = 1;
+		this.add(getExpressionComposition(), con);
+
+		con = (GridBagConstraints) baseConst.clone();
+		con.gridx = 3;
+		con.gridy = 8;
+		con.fill = con.NONE;
+		this.add(getBotAccept(), con);
+
+		con = (GridBagConstraints) baseConst.clone();
+		con.gridx = 4;
+		con.gridy = 8;
+		con.fill = con.NONE;
+		this.add(getBotCancel(), con);
+
+	}
+
+	private JButton getBotCancel() {
+		if (botCancel == null) {
+			
+			botCancel = new JButton(Messages.getText("cancel"));
+			botCancel.setActionCommand(CANCEL_ACTION);
+			botCancel.addActionListener(this);
+		}
+		return botCancel;
+	}
+
+	private JButton getBotAccept() {
+		if (botAccept == null) {
+			botAccept = new JButton(Messages.getText("accept"));
+			botAccept.setActionCommand(ACCEPT_ACTION);
+			botAccept.addActionListener(this);
+		}
+		return botAccept;
+
+	}
+
+	private Component getExpressionComposition() {
+		if (spExpression == null) {
+			spExpression = new JScrollPane();
+			spExpression.setViewportView(getTxtExpression());
+			spExpression.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
+			spExpression.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+			spExpression
+					.setBorder(BorderFactory.createTitledBorder(
+							Messages.getText("expression")));
+		}
+		return spExpression;
+	}
+
+	private JTextArea getTxtExpression() {
+		if (txtExpression == null){
+			txtExpression = new JTextArea();
+		}
+		return txtExpression;
+	}
+
+	public void setExpression(String expr){
+		this.getTxtExpression().setText(expr);
+	}
+
+	public String getExpression(){
+		return this.getTxtExpression().getText();
+	}
+
+	private JButton getBotAddField() {
+		if (botAddField == null) {
+			botAddField = new JButton(Messages.getText("add_field"));
+			botAddField.setActionCommand(ADDFIELD_ACTION);
+			botAddField.addActionListener(this);
+		}
+		return botAddField;
+
+	}
+
+	private Component getFieldListComposition() {
+		if (spFieldList == null){
+			spFieldList = new JScrollPane();
+			spFieldList.setViewportView(getLstFields());
+			spFieldList.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
+			spFieldList.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+			spFieldList
+					.setBorder(BorderFactory.createTitledBorder(
+							Messages.getText("fields")));
+
+		}
+		return spFieldList;
+	}
+
+	private JList getLstFields() {
+		if (lstFields == null){
+			lstFields = new JList(this.fieldNames);
+			lstFields.addMouseListener(this);
+		}
+		return lstFields;
+	}
+
+	public WindowInfo getWindowInfo() {
+		if (wInfo == null) {
+			wInfo = new WindowInfo(WindowInfo.RESIZABLE
+					+ WindowInfo.MODALDIALOG);
+			wInfo.setWidth(500);
+			wInfo.setHeight(400);
+			wInfo.setTitle(Messages.getText("expression"));
+		}
+		return wInfo;
+	}
+
+	public Object getWindowProfile() {
+		return WindowInfo.EDITOR_PROFILE;
+	}
+
+	public void setValue(String value) {
+		this.originalValue = value;
+		this.value = value;
+		this.setExpression(value);
+	}
+
+	public String getValue() {
+		return this.value;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		doAction(e.getActionCommand());
+	}
+
+	private void doAction(String action){
+		if (action.equals(ADDFIELD_ACTION)){
+			JTextArea txt = getTxtExpression();
+			StringBuffer strb = new StringBuffer();
+			String str = txt.getText();
+			int sini = txt.getSelectionStart();
+			int send = txt.getSelectionEnd();
+			if (sini > 0){
+				strb.append(str.substring(0, sini));
+				str = str.substring(sini);
+			}
+			// strb.append('[');
+			strb.append((String)getLstFields().getSelectedValue());
+			// strb.append(']');
+			send = send -sini;
+			if (send > 0){
+				str = str.substring(send);
+			}
+			strb.append(str);
+
+			getTxtExpression().setText(strb.toString());
+
+		} else {
+			// Accept or cancel
+			if (action.equals(ACCEPT_ACTION)){
+				this.value = getExpression();
+			} else {
+				this.value = this.originalValue;
+			}
+			ApplicationLocator.getManager().getUIManager().closeWindow(this);
+		}
+	}
+
+	public void mouseClicked(MouseEvent e) {
+		if (e.getSource() == getLstFields()){
+			if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() > 1){
+				doAction(ADDFIELD_ACTION);
+			}
+		}
+
+
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// Do nothing
+
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// Do nothing
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// Do nothing
+
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// Do nothing
+
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelClassPreview.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelClassPreview.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/LabelClassPreview.java	(revision 40911)
@@ -0,0 +1,146 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.geom.AffineTransform;
+
+import javax.swing.JPanel;
+
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle;
+import org.gvsig.i18n.Messages;
+
+public class LabelClassPreview extends JPanel {
+	private static final long serialVersionUID = 3788548343944220354L;
+	private Dimension sz = new Dimension(100, 200);
+	private ILabelClass labelClass;
+
+	@Override
+	public Dimension getPreferredSize() {
+		Dimension sz = labelClass == null ? this.sz : labelClass.getBounds().getSize();
+		int w = sz.width;
+		int h = sz.height;
+
+		if (w>300) {
+			w = 300;
+		}
+
+		if (h>200) {
+			h = 200;
+		}
+		sz.setSize(w, h);
+		return sz;
+	}
+
+	@Override
+	protected void paintComponent(Graphics g) {
+		if (labelClass == null)
+			return;
+		Rectangle r = getBounds();
+		r.setLocation(0, 0);
+		g.setColor(Color.white);
+		((Graphics2D) g).fill(r);
+		((Graphics2D) g).setStroke(new BasicStroke(2));
+		g.setColor(Color.black);
+		((Graphics2D) g).draw(r);
+		ILabelStyle sty = labelClass.getLabelStyle();
+		String cad;
+		if (sty != null) {
+			int fc = sty.getFieldCount();
+			String[] texts = new String[fc];
+			for (int i = 0; i < texts.length; i++) {
+				texts[i] = Messages.getText("text_field") + " "+(i+1);
+			}
+			labelClass.setTexts(texts);
+		} else {
+			labelClass.setTexts(new String[] {Messages.getText("text_field")});
+		}
+
+//		try {
+//			labelClass.drawInsideRectangle((Graphics2D) g, r);
+			ITextSymbol sym = labelClass.getTextSymbol();
+			Font myFont = new Font(sym.getFont().getName(),sym.getFont().getStyle(),35);
+			AffineTransform saveAT = ((Graphics2D)g).getTransform();
+			
+//			AffineTransform tx = new AffineTransform();
+//			tx.setToTranslation(0, -r.getCenterY());
+			saveAT.translate(0, r.getCenterY());
+			((Graphics2D) g).setTransform(saveAT);
+			FontRenderContext frc = new FontRenderContext(
+					saveAT, false, true);;
+			g.setFont(myFont);
+			String text = Messages.getText("text_field");
+			
+			if (sym.isDrawWithHalo()) {
+				BasicStroke haloStroke = new BasicStroke(sym.getHaloWidth());
+				char[] charText = new char[text.length()];
+				text.getChars(0, charText.length, charText, 0);
+				GlyphVector glyph = myFont.layoutGlyphVector(frc, charText, 0, charText.length, Font.LAYOUT_NO_LIMIT_CONTEXT);
+				g.setColor(sym.getHaloColor());
+				((Graphics2D) g).setStroke(haloStroke);
+				((Graphics2D) g).draw(glyph.getOutline());
+			}
+			g.setColor(sym.getTextColor());
+			g.drawString(Messages.getText("text_field"), 0, 0);
+//		} catch (SymbolDrawingException e) {
+//			SymbologyFactory
+//					.getWarningSymbol(
+//							PluginServices.getText(this,
+//									"cant_draw_preview"),
+//							SymbolDrawingException.STR_UNSUPPORTED_SET_OF_SETTINGS,
+//							SymbolDrawingException.UNSUPPORTED_SET_OF_SETTINGS);
+//		}
+	}
+
+	public void setLabelClass(ILabelClass labelClass) {
+		this.labelClass = labelClass;
+	}
+}
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/GeneralLabeling.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/GeneralLabeling.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/GeneralLabeling.java	(revision 40911)
@@ -0,0 +1,414 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.labeling.gui.layerproperties;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.beans.PropertyChangeEvent;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.TreeMap;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.project.documents.view.legend.gui.ILabelingStrategyPanel;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.label.GeneralLabelingFactory;
+import org.gvsig.labeling.label.GeneralLabelingStrategy;
+import org.gvsig.labeling.lang.LabelClassUtils;
+import org.gvsig.symbology.SymbologyLocator;
+
+public class GeneralLabeling extends JPanel implements
+ILabelingStrategyPanel, ActionListener {
+	
+	private static final long serialVersionUID = 8864709758980903351L;
+	private static Comparator comparator =
+			new Comparator<Class<? extends ILabelingMethod>>(){
+		public int compare(Class<? extends ILabelingMethod> o1,
+				Class<? extends ILabelingMethod> o2) {
+			return o1.getName().compareTo(o2.getName());
+		}};
+		
+	private static TreeMap<
+			Class<? extends ILabelingMethod>,
+			Class<? extends AbstractLabelingMethodPanel>
+		> methods
+		= new TreeMap<
+			Class<? extends ILabelingMethod>,
+			Class<? extends AbstractLabelingMethodPanel>
+		>(comparator);
+	
+	private JButton btnVisualization;
+	private JButton btnPlacement;
+	private JComboBox cmbMethod;
+	private JPanel methodPanel;
+	private IPlacementConstraints placementConstraints;
+	private IZoomConstraints zoomConstraints;
+	private boolean noEvent;
+	private FLyrVect targetLayer;
+	private JCheckBox chkAllowLabelOverlapping;
+	private FLyrVect auxLayer;
+	private GeneralLabelingStrategy gStr;
+	private AbstractLabelingMethodPanel previousMethodPanel = null;
+	public GeneralLabeling() {
+		initialize();
+	}
+
+	private void initialize() {
+		
+		setLayout(new BorderLayout());
+		JPanel center = new JPanel(new BorderLayout(10, 10));
+		center.setBorder(BorderFactory.createTitledBorder(
+				null, Messages.getText("classes")));
+		JPanel aux = new JPanel(new FlowLayout(FlowLayout.LEADING, 5,0));
+		aux.add(new JLabel(Messages.getText("method")+":"));
+		aux.add(getCmbMethod());
+		aux.setPreferredSize(new Dimension(605, 40));
+		center.add(aux, BorderLayout.NORTH);
+
+
+		// el panell del mètode de moltes FeatureDependantLabelingMethod
+		methodPanel = getMethodPanel();
+		center.add(methodPanel, BorderLayout.CENTER);
+		add(center, BorderLayout.CENTER);
+
+		JPanel south = new JPanel(new FlowLayout(FlowLayout.LEADING, 5, 0));
+		south.setBorder(BorderFactory.createTitledBorder(
+				null, Messages.getText("options")));
+		south.add(getBtnVisualization());
+		south.add(getBtnPlacement());
+		south.add(getChkAllowLabelOverlapping());
+		south.setPreferredSize(new Dimension(612, 60));
+
+		add(south, BorderLayout.SOUTH);
+	}
+
+
+	private JPanel getMethodPanel() {
+		if (methodPanel == null){
+			methodPanel = new JPanel(new BorderLayout(10, 0));
+		}
+		return methodPanel;
+	}
+
+	private JCheckBox getChkAllowLabelOverlapping() {
+		if (chkAllowLabelOverlapping == null) {
+			chkAllowLabelOverlapping = new JCheckBox(
+					Messages.getText("allow_label_overlapping"));
+			chkAllowLabelOverlapping.addActionListener(this);
+		}
+		return chkAllowLabelOverlapping;
+	}
+
+	private void refreshControls() {
+		// fires an event from the methods combo box
+		actionPerformed(new ActionEvent(getCmbMethod(), 0, null));
+	}
+
+	private JButton getBtnVisualization() {
+		if (btnVisualization == null) {
+			btnVisualization = new JButton(
+					Messages.getText("visualization")+"...");
+			btnVisualization.setName("BTNVISUALIZATION");
+			btnVisualization.addActionListener(this);
+		}
+		return btnVisualization;
+	}
+
+	private JButton getBtnPlacement() {
+		if (btnPlacement == null) {
+			btnPlacement = new JButton(
+					Messages.getText("placement")+"...");
+			btnPlacement.setName("BTNPLACEMENT");
+			btnPlacement.addActionListener(this);
+		}
+		return btnPlacement;
+	}
+
+	private JComboBox getCmbMethod() {
+		if (cmbMethod == null) {
+			Iterator<Class<? extends AbstractLabelingMethodPanel>> it = methods.values().iterator();
+			ArrayList<AbstractLabelingMethodPanel> panels = new ArrayList<AbstractLabelingMethodPanel>();
+			while (it.hasNext()) {
+				try {
+					panels.add(it.next().newInstance());
+				} catch (Exception e) {
+					throw new Error(e);
+				}
+			}
+			cmbMethod = new JComboBox(panels.toArray());
+			cmbMethod.setSize(new Dimension(300, 22));
+			cmbMethod.setName("CMBMETHOD");
+			cmbMethod.addActionListener(this);
+		}
+		return cmbMethod;
+	}
+
+	public ILabelingStrategy getLabelingStrategy() {
+		GeneralLabelingStrategy resp = GeneralLabelingFactory.
+						createStrategy((FLayer) targetLayer,
+								getMethod(),
+								getPlacementConstraints(),
+								getZoomConstraints());
+
+		resp.setAllowOverlapping(getChkAllowLabelOverlapping().isSelected());
+		return resp;
+	}
+
+	
+	public void setModel(FLayer layer, ILabelingStrategy str) {
+		if (layer instanceof FLyrVect) {
+			try {
+				targetLayer = (FLyrVect) layer;//.cloneLayer();
+				
+				auxLayer = (FLyrVect) targetLayer.cloneLayer();
+				auxLayer.setParentLayer(layer.getParentLayer());
+				auxLayer.setLegend((IVectorLegend)targetLayer.getLegend());
+				auxLayer.setProjection(targetLayer.getProjection());
+				
+				if (str instanceof GeneralLabelingStrategy) {
+					GeneralLabelingStrategy gls = (GeneralLabelingStrategy) str; 
+					gStr = (GeneralLabelingStrategy) gls.clone();
+					auxLayer.setLabelingStrategy(gStr);
+					gStr.setLayer(auxLayer);
+					setMethod(gStr.getLabelingMethod(), auxLayer);
+					placementConstraints = gStr.getPlacementConstraints();
+					zoomConstraints = gStr.getZoomConstraints();
+					getChkAllowLabelOverlapping().setSelected(gStr.isAllowingOverlap());
+				} else {
+					ILabelingStrategy ils = ((FLyrVect) layer).getLabelingStrategy();
+					if (ils != null) {
+						ils = (ILabelingStrategy) LabelClassUtils.clone(ils);
+						auxLayer.setLabelingStrategy(ils);
+					}
+				}
+			} catch (Exception e) {
+				NotificationManager.addError(
+						Messages.getText("While setting model."), e);
+			}
+			refreshControls();
+		}
+	}
+
+
+	public static void addLabelingMethod(Class<? extends AbstractLabelingMethodPanel> iLabelingMethodClass) {
+		try {
+			methods.put(
+					iLabelingMethodClass.newInstance().getLabelingMethodClass(),
+					iLabelingMethodClass);
+		} catch (Exception e) {
+			NotificationManager.addError(
+					Messages.getText("cannot_install_labeling_method"), e);
+		}
+	}
+
+	private void setMethod(ILabelingMethod labelingMethod, FLyrVect srcLayer) {
+		getMethodPanel().removeAll();
+		AbstractLabelingMethodPanel p;
+		try {
+			p = methods.get(labelingMethod.getClass()).newInstance();
+			p.setModel(labelingMethod, srcLayer);
+			cmbMethod.setSelectedItem(p);
+		} catch (Exception e) {
+			// should be impossible;
+			NotificationManager.addWarning(e.getLocalizedMessage());
+		}
+
+	}
+
+	private ILabelingMethod getMethod() {
+		AbstractLabelingMethodPanel p =
+				((AbstractLabelingMethodPanel)cmbMethod.getSelectedItem());
+		if (p != null){
+			return p.getMethod();
+		}
+
+		return SymbologyLocator.getSymbologyManager().createDefaultLabelingMethod();
+	}
+
+	private IZoomConstraints getZoomConstraints() {
+		if (zoomConstraints == null) {
+			zoomConstraints =
+					SymbologyLocator.getSymbologyManager().createDefaultZoomConstraints();
+			
+		}
+		return zoomConstraints;
+	}
+
+	private IPlacementConstraints getPlacementConstraints() {
+		return placementConstraints;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+
+		if (noEvent) return;
+		JComponent c = (JComponent)e.getSource();
+
+		if (c.equals(btnPlacement)) {
+
+			try {
+				IPlacementConstraints oldValue = getPlacementConstraints();
+				IPlacementProperties pp = PlacementProperties.createPlacementProperties(
+						getPlacementConstraints(),
+						((FLyrVect) auxLayer).getShapeType());
+				
+				ApplicationLocator.getManager().getUIManager().addWindow(pp);
+				
+				placementConstraints = pp.getPlacementConstraints();
+
+				((AbstractLabelingMethodPanel) cmbMethod.getSelectedItem()).
+					propertyChange(new PropertyChangeEvent(
+							this,
+							AbstractLabelingMethodPanel.PLACEMENT_CONSTRAINTS,
+							oldValue,
+							placementConstraints));
+
+			} catch (ClassCastException ccEx) {
+				NotificationManager.addError(
+						"Placement constraints not prepared for:"
+						+auxLayer.getClass().getName(),
+						ccEx);
+			} catch (ReadException dEx) {
+				NotificationManager.addError(
+						"While getting layer type", dEx);
+			}
+
+		} else if (c.equals(btnVisualization)) {
+			IZoomConstraints oldValue = getZoomConstraints();
+			LabelScaleRange lsr = new LabelScaleRange(oldValue.getMinScale(), oldValue.getMaxScale());
+			ApplicationLocator.getManager().getUIManager().addWindow(lsr);
+			zoomConstraints =
+					SymbologyLocator.getSymbologyManager().createDefaultZoomConstraints();
+			zoomConstraints.setMaxScale(lsr.getMaxScale());
+			zoomConstraints.setMinScale(lsr.getMinScale());
+			zoomConstraints.setMode(
+					lsr.getMaxScale() ==-1 && lsr.getMinScale() == -1 ?
+							IZoomConstraints.DEFINED_BY_THE_LAYER :
+							IZoomConstraints.DEFINED_BY_THE_USER);
+
+			((AbstractLabelingMethodPanel) cmbMethod.getSelectedItem()).
+			propertyChange(new PropertyChangeEvent(
+					this,
+					AbstractLabelingMethodPanel.ZOOM_CONSTRAINTS,
+					oldValue,
+					getZoomConstraints()));
+
+		} else if (c.equals(chkAllowLabelOverlapping)) {
+			boolean newValue = chkAllowLabelOverlapping.isSelected();
+			((AbstractLabelingMethodPanel) cmbMethod.getSelectedItem()).
+			propertyChange(new PropertyChangeEvent(
+					this,
+					AbstractLabelingMethodPanel.ALLOW_OVERLAP,
+					!newValue,
+					newValue));
+
+		} else if (c.equals(cmbMethod)) {
+			AbstractLabelingMethodPanel p = (AbstractLabelingMethodPanel) cmbMethod.getSelectedItem();
+			if(previousMethodPanel == null || previousMethodPanel != p ){
+				Container cont = methodPanel.getParent();
+				cont.remove(methodPanel);
+				emptyContainer(methodPanel);
+
+				try {
+					if(gStr != null){
+						if(gStr.getLabelingMethod() != null){
+							p.setModel(gStr.getLabelingMethod(), auxLayer);
+						}
+					} else {
+						p.setModel(getMethod(),auxLayer);
+					}
+					methodPanel.add(
+							p,
+							BorderLayout.CENTER);
+
+					methodPanel.repaint();
+					setVisible(false);
+					setVisible(true);
+				} catch (Exception e1) {
+					NotificationManager.addError(new Date(System.currentTimeMillis()).toString(), e1);
+				}
+				cont.add(methodPanel, BorderLayout.CENTER);
+			}
+			previousMethodPanel = p;
+		}
+		
+	}
+
+	private void emptyContainer(Container c) {
+		for (int i = 0; i < c.getComponentCount(); i++) {
+			if (c.getComponent(i) instanceof Container) {
+				emptyContainer((Container) c.getComponent(i));
+			}
+			c.remove(i);
+		}
+	}
+
+	public String getLabelingStrategyName() {
+		return Messages.getText("user_defined_labels");
+	}
+
+	public Class<? extends ILabelingStrategy> getLabelingStrategyClass() {
+		return GeneralLabelingStrategy.class;
+	}
+
+	public void setEnabled(boolean enabled) {
+		super.setEnabled(enabled);
+		getBtnPlacement().setEnabled(enabled);
+		getBtnVisualization().setEnabled(enabled);
+		getChkAllowLabelOverlapping().setEnabled(enabled);
+		getCmbMethod().setEnabled(enabled);
+		JPanel mp = getMethodPanel();//.setEnabled(enabled);
+		mp.setEnabled(enabled);
+		for (int i=0; i<mp.getComponentCount(); i++){
+			Component c = mp.getComponent(i);
+			c.setEnabled(enabled);
+		}
+
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStylePanTool.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStylePanTool.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStylePanTool.java	(revision 40911)
@@ -0,0 +1,265 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling.editortools;
+
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Point;
+import java.awt.Toolkit;
+import java.awt.event.MouseEvent;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import javax.swing.AbstractButton;
+import javax.swing.ImageIcon;
+import javax.swing.JComponent;
+import javax.swing.JToggleButton;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.app.gui.styling.EditorTool;
+import org.gvsig.app.gui.styling.StyleEditor;
+import org.gvsig.app.gui.styling.StylePreviewer;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle;
+import org.gvsig.i18n.Messages;
+
+/**
+ *
+ * SimpleLabelStylePanTool.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Jan 7, 2008
+ *
+ */
+public class LabelStylePanTool extends EditorTool {
+	private int NO_SELECTION_ON_STYLE = -1;
+	private int TEXT_FIELD_SELECTED = 0;
+	private int MARKER_POINT_SELECTED = 1;
+
+	private JToggleButton btnPan;
+	private Cursor cursor;
+	private Point pIni, pEnd;
+	private ILabelStyle style;
+	private int toolSelected = NO_SELECTION_ON_STYLE;
+	private int textFieldSelected = NO_SELECTION_ON_STYLE;
+
+	private Dimension bounds;
+	private int ownerHgap,ownerVgap;
+
+	public LabelStylePanTool(JComponent owner) {
+		super(owner);
+	}
+
+	private void getBounds() {
+
+		bounds = ((StyleEditor) owner).getStylePreviewer().getSize();
+		ownerHgap =  ((StyleEditor) owner).getStylePreviewer().getHGap();
+		ownerVgap = ((StyleEditor) owner).getStylePreviewer().getVGap();
+
+	}
+
+	public Cursor getCursor() {
+		if (cursor == null) {
+			
+			ImageIcon cursorImage = IconThemeHelper.getImageIcon("cursor-pan");
+			cursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImage.getImage(),
+					new Point(cursorImage.getIconWidth()/2,
+							cursorImage.getIconHeight()/2), //16, 16), "");
+							"");
+
+		}
+		return cursor;
+	}
+
+	public void mousePressed(MouseEvent e) {
+		getBounds();
+		Point2D marker = style.getMarkerPoint();
+		pIni = new Point((int) (marker.getX()*(bounds.width-ownerHgap)),(int) (marker.getY()*(bounds.height-ownerVgap)));
+		pEnd = e.getPoint();
+
+		Point selectedPoint = new Point((int) (pEnd.getX()-ownerHgap),(int) (pEnd.getY()-ownerVgap));
+		if((Math.abs(pIni.x - selectedPoint.x) < ownerHgap ) && (Math.abs(pIni.y - selectedPoint.y) < ownerVgap )){
+			toolSelected = MARKER_POINT_SELECTED;
+			return;
+		}
+
+		Point2D selPoint = screenPointToLabelPoint(pEnd);
+
+		for (int i = style.getTextBounds().length - 1; i >= 0 ; i--) {
+			Rectangle2D rectangle = style.getTextBounds()[i];
+			if((selPoint.getX() >= rectangle.getMinX()) &&
+					(selPoint.getX() <= rectangle.getMaxX()) &&
+					(selPoint.getY() >= rectangle.getMinY())&&
+					(selPoint.getY() <= rectangle.getMaxY())){
+				toolSelected = TEXT_FIELD_SELECTED;
+				textFieldSelected = i;
+				pIni = pEnd;
+				return;
+			}
+		}
+	}
+
+	public void mouseReleased(MouseEvent e) {
+
+		toolSelected = NO_SELECTION_ON_STYLE;
+		textFieldSelected = NO_SELECTION_ON_STYLE;
+
+	}
+
+	public void mouseDragged(MouseEvent e) {
+		pEnd = e.getPoint();
+		if((pEnd.getX() > bounds.width - ownerHgap) || ( pEnd.getY() > bounds.getHeight() - ownerVgap) ||
+				(pEnd.getX() < ownerHgap) || ( pEnd.getY() < ownerVgap))
+			return;
+
+		Point2D labelEndPoint = screenPointToLabelPoint(pEnd);
+
+		if(toolSelected == TEXT_FIELD_SELECTED){
+			if(textFieldSelected != NO_SELECTION_ON_STYLE){
+
+				Rectangle2D rectangle = style.getTextBounds()[textFieldSelected];
+
+				Point2D labelIniPoint = screenPointToLabelPoint(pIni);
+				Point maxPoint = new Point((int)bounds.getWidth(), (int)bounds.getHeight());
+				Point2D labelMaxPoint = screenPointToLabelPoint(maxPoint);
+
+				Point2D labelZero = screenPointToLabelPoint(new Point(0,0));
+				double x = rectangle.getX() + labelEndPoint.getX()-labelIniPoint.getX();
+				if (x<labelZero.getX()){ x=labelZero.getX(); }
+				if ((x+rectangle.getWidth())>=labelMaxPoint.getX()) { x =  labelMaxPoint.getX()-rectangle.getWidth();}
+
+				double y = rectangle.getY() + labelEndPoint.getY()-labelIniPoint.getY();
+				if (y<labelZero.getY()){ y=labelZero.getY(); }
+				if ((y+rectangle.getHeight())>=labelMaxPoint.getY()) { y =  labelMaxPoint.getY()-rectangle.getHeight();}
+
+				rectangle.setRect(x,
+						y,
+						rectangle.getWidth(),
+						rectangle.getHeight());
+				style.setTextFieldArea(textFieldSelected,rectangle);
+				pIni = pEnd;
+			}
+		}
+		else if (toolSelected == MARKER_POINT_SELECTED){
+			double xOffset = (pEnd.getX())/( bounds.getWidth()- ownerHgap );
+			double yOffset = (pEnd.getY())/( bounds.getHeight()- ownerVgap );
+
+			if(xOffset > 1) xOffset = 1;
+			if(xOffset < 0) xOffset = 0;
+			if(yOffset > 1) yOffset = 1;
+			if(yOffset < 0) yOffset = 0;
+
+			Point2D marker = style.getMarkerPoint();
+			marker.setLocation(xOffset, yOffset);
+		}
+		owner.repaint();
+	}
+
+	private Point2D screenPointToLabelPoint(Point pIni) {
+		//FIXME: Esto es un parche, habría que cambiar la API de los estilos y simbolos
+		//pero mientras tanto
+		int minx = pIni.x;
+		int miny = pIni.y;
+
+		StylePreviewer sp = ((StyleEditor) owner).getStylePreviewer();
+		Dimension bounds = sp.getSize();
+
+		IStyle style = sp.getStyle();
+		Dimension backgroundBounds = null;
+		if (style instanceof ILabelStyle){
+			backgroundBounds = ((ILabelStyle)style).getSize();
+		}
+		Point2D p;
+		if (backgroundBounds == null){
+			p = new Point2D.Double(
+					pIni.x/(bounds.getWidth()-sp.getHGap()/2),
+					pIni.y/(bounds.getHeight()-sp.getVGap()/2));
+		} else {
+			double xOffset = 0;
+			double yOffset = 0;
+			double scale = 1;
+			if (backgroundBounds.getWidth()>backgroundBounds.getHeight()) {
+				scale = (bounds.getWidth()-sp.getHGap())/backgroundBounds.getWidth();
+				yOffset = 0.5*(bounds.getHeight()-sp.getVGap() - backgroundBounds.getHeight()*scale);
+			} else {
+				scale = (bounds.getHeight()-sp.getVGap())/backgroundBounds.getHeight();
+				xOffset = 0.5*(bounds.getWidth()-sp.getHGap() - backgroundBounds.getWidth()*scale);
+			}
+			p = new Point2D.Double(
+					((minx-(sp.getHGap()/2)-xOffset)/scale)/backgroundBounds.getWidth(),
+					((miny-(sp.getVGap()/2)-yOffset)/scale)/backgroundBounds.getHeight());
+		}
+		return p;
+	}
+
+	@Override
+	public AbstractButton getButton() {
+		return getBtnPan();
+	}
+
+	private JToggleButton getBtnPan() {
+		if (btnPan == null) {
+			btnPan = new JToggleButton(
+					IconThemeHelper.getImageIcon("edit-shift-component"));
+			btnPan.setToolTipText(
+					Messages.getText("_Set_label_offset"));
+			btnPan.setPreferredSize(EditorTool.SMALL_BTN_SIZE);
+			btnPan.setSize(EditorTool.SMALL_BTN_SIZE);
+		}
+
+		return btnPan;
+	}
+
+	@Override
+	public String getID() {
+		return "1";
+	}
+
+	@Override
+	public boolean isSuitableFor(Object obj) {
+		return obj instanceof ILabelStyle;
+	}
+
+	@Override
+	public void setModel(Object objectToBeEdited) {
+		style = (ILabelStyle) objectToBeEdited;
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelNormalPrecedenceTool.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelNormalPrecedenceTool.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelNormalPrecedenceTool.java	(revision 40911)
@@ -0,0 +1,74 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling.editortools;
+
+import javax.swing.JComponent;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.placements.PointLabelPositioner;
+
+/**
+ * Implements an editor tool which can be used to select the position for the
+ * label when the user is performing a layer of points. There will be 4 different
+ * precedence levels for the 8 different places where the text for the specified point
+ * will be placed (see PointLabelPositioneer.java). This class implements the normal one,
+ * but the user can select a high, a low or a forbidden one.
+ *
+ *
+ * @author Pepe Vidal Salvador - jose.vidal.salvador@iver.es
+ *
+ */
+public class PointLabelNormalPrecedenceTool extends
+		PointLabelHighPrecedenceTool {
+
+	public PointLabelNormalPrecedenceTool(JComponent targetEditor) {
+		super(targetEditor);
+		precedenceValue = PointLabelPositioner.PREFERENCE_NORMAL;
+		buttonIcon = "set-normal-precedence";
+		this.getButton().setToolTipText(
+				Messages.getText("set_normal_precedence"));
+	}
+
+	@Override
+	public String getID() {
+		return "2";
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleNewTextFieldTool.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleNewTextFieldTool.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleNewTextFieldTool.java	(revision 40911)
@@ -0,0 +1,193 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling.editortools;
+
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Point;
+import java.awt.event.MouseEvent;
+import java.awt.geom.Rectangle2D;
+
+import javax.swing.AbstractButton;
+import javax.swing.JComponent;
+import javax.swing.JToggleButton;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.app.gui.styling.EditorTool;
+import org.gvsig.app.gui.styling.StyleEditor;
+import org.gvsig.app.gui.styling.StylePreviewer;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle;
+import org.gvsig.i18n.Messages;
+
+public class LabelStyleNewTextFieldTool extends EditorTool {
+	
+	private Point pIni, pEnd;
+	private final Cursor cursor = Cursor.getDefaultCursor();
+	private ILabelStyle style;
+	private JToggleButton btnNewTextArea;
+
+	public LabelStyleNewTextFieldTool(JComponent targetEditor) {
+		super(targetEditor);
+		// TODO Auto-generated constructor stub
+	}
+	public Cursor getCursor() {
+		return cursor;
+	}
+
+	public void mousePressed(MouseEvent e) {
+		pIni = e.getPoint();
+		pEnd = e.getPoint();
+		Rectangle2D rect = screenPointsToLabelRect(pIni, pEnd);
+		style.addTextFieldArea(rect);
+	}
+
+	public void mouseReleased(MouseEvent e) {
+
+	}
+
+	public void mouseDragged(MouseEvent e) {
+		Dimension bounds = ((StyleEditor) owner).getStylePreviewer().getSize();
+		pEnd = e.getPoint();
+
+		if (pEnd.getX() < 0)
+			pEnd.x = 0;
+		if (pEnd.getX() > bounds.getWidth())
+			pEnd.x = (int) bounds.getWidth();
+
+		if (pEnd.getY() < 0)
+			pEnd.y = 0;
+		if (pEnd.getY() > bounds.getHeight())
+			pEnd.y = (int) bounds.getHeight();
+
+		Rectangle2D rect = screenPointsToLabelRect(pIni, pEnd);
+		style.setTextFieldArea(style.getFieldCount()-1, rect);
+		owner.repaint();
+	}
+
+	private Rectangle2D screenPointsToLabelRect(Point pIni, Point pEnd) {
+		int minx = pIni.x;
+		int miny = pIni.y;
+
+		int width = pEnd.x-pIni.x;
+		int height = pEnd.y - pIni.y;
+		if (width < 0) {
+			minx += width;
+			width = -width;
+		}
+		if (height <0) {
+			miny += height;
+			height = -height;
+		}
+
+		StylePreviewer sp = ((StyleEditor) owner).getStylePreviewer();
+		Dimension bounds = sp.getSize();
+
+		IStyle style = sp.getStyle();
+		Dimension backgroundBounds = null;
+		if (style instanceof ILabelStyle){
+			backgroundBounds = ((ILabelStyle)style).getSize();
+		}
+		//FIXME: Esto es un parche, habría que cambiar la API de los estilos y simbolos
+		//pero mientras tanto
+		Rectangle2D rect;
+		if (backgroundBounds == null){
+			rect = new Rectangle2D.Double(
+					minx/(bounds.getWidth()-sp.getHGap()/2), //OJO, aquí ponía cuatro 10's a piñon fijo
+					miny/(bounds.getHeight()-sp.getVGap()/2),
+					width/(bounds.getWidth()-sp.getHGap()),
+					height/(bounds.getHeight()-sp.getVGap())
+			);
+		} else {
+
+			double xOffset = 0;
+			double yOffset = 0;
+			double scale = 1;
+			if (backgroundBounds.getWidth()>backgroundBounds.getHeight()) {
+				scale = (bounds.getWidth()-sp.getHGap())/backgroundBounds.getWidth();
+				yOffset = 0.5*(bounds.getHeight()-sp.getVGap() - backgroundBounds.getHeight()*scale);
+			} else {
+				scale = (bounds.getHeight()-sp.getVGap())/backgroundBounds.getHeight();
+				xOffset = 0.5*(bounds.getWidth()-sp.getHGap() - backgroundBounds.getWidth()*scale);
+			}
+
+			rect = new Rectangle2D.Double(
+					((minx-(sp.getHGap()/2)-xOffset)/scale)/backgroundBounds.getWidth(),
+					((miny-(sp.getVGap()/2)-yOffset)/scale)/backgroundBounds.getHeight(),
+					(width/scale)/backgroundBounds.getWidth(),
+					(height/scale)/backgroundBounds.getHeight()
+			);
+		}
+
+		return rect;
+	}
+
+	public AbstractButton getButton() {
+		return getBtnNewTextArea();
+	}
+
+	@Override
+	public String getID() {
+		return "2";
+	}
+
+	@Override
+	public boolean isSuitableFor(Object obj) {
+		return obj instanceof ILabelStyle;
+	}
+
+	@Override
+	public void setModel(Object objectToBeEdited) {
+		style = (ILabelStyle) objectToBeEdited;
+	}
+
+	private JToggleButton getBtnNewTextArea() {
+		if (btnNewTextArea == null) {
+			
+			btnNewTextArea = new JToggleButton(
+					IconThemeHelper.getImageIcon("edit-add-text"));
+			btnNewTextArea.setToolTipText(
+					Messages.getText("add_text_area"));
+			btnNewTextArea.setSize(EditorTool.SMALL_BTN_SIZE);
+		}
+		return btnNewTextArea;
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleOpenBackgroundFile.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleOpenBackgroundFile.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleOpenBackgroundFile.java	(revision 40911)
@@ -0,0 +1,170 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling.editortools;
+
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.io.File;
+import java.io.IOException;
+
+import javax.swing.AbstractButton;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.filechooser.FileFilter;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.app.gui.styling.EditorTool;
+import org.gvsig.app.gui.styling.StyleEditor;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle;
+import org.gvsig.gui.beans.swing.JFileChooser;
+import org.gvsig.i18n.Messages;
+import org.gvsig.symbology.SymbologyLocator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+/**
+ *
+ * LabelStyleOpenBackgroundFile.java
+ *
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es Jan 15, 2008
+ *
+ */
+public class LabelStyleOpenBackgroundFile extends EditorTool {
+
+	private static Logger logger =
+			LoggerFactory.getLogger(LabelStyleOpenBackgroundFile.class);
+	public static final String LABEL_STYLE_BACKGROUND_FILECHOOSER = "LABEL_STYLE_BACKGROUND_FILECHOOSER";
+	public static String DEFAULT_LABEL_BACKGROUND_FOLDER;
+
+	private JButton btnOpenFile;
+	private ILabelStyle style;
+
+	public LabelStyleOpenBackgroundFile(JComponent targetEditor) {
+		super(targetEditor);
+	}
+
+
+	@Override
+	public AbstractButton getButton() {
+		return getBtnOpenFile();
+	}
+
+	private JButton getBtnOpenFile() {
+		if (btnOpenFile== null) {
+			
+			btnOpenFile = new JButton(
+					IconThemeHelper.getImageIcon("edit-add-background-image"));
+			btnOpenFile.setToolTipText(Messages.getText(
+					"_Set_new_background_image"));
+			btnOpenFile.setSize(EditorTool.SMALL_BTN_SIZE);
+			btnOpenFile.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					JFileChooser jfChooser = new JFileChooser(
+							LABEL_STYLE_BACKGROUND_FILECHOOSER,
+							DEFAULT_LABEL_BACKGROUND_FOLDER);
+					FileFilter ff = new FileFilter() {
+
+						public boolean accept(File pathname) {
+							if (pathname.isDirectory()) return true;
+							String fileName = pathname.getAbsolutePath().toLowerCase();
+							return fileName.endsWith("jpg") ||
+									fileName.endsWith("png") ||
+									fileName.endsWith("gif") ||
+									fileName.endsWith("svg");
+						}
+
+						public String getDescription() {
+							return Messages.getText(
+									"all_supported_background_image_formats")+ " (*.svg, *.jpg, *.png, *.gif)";
+						}
+					};
+
+					jfChooser.setFileFilter(ff);
+					if (jfChooser.showOpenDialog(owner) == JFileChooser.APPROVE_OPTION) {
+						File f = jfChooser.getSelectedFile();
+
+						
+						try {
+							IBackgroundFileStyle bgStyle =
+									SymbologyLocator.getSymbologyManager()
+									.createBackgroundFileStyle(f.toURI().toURL());
+							style.setBackgroundFileStyle(bgStyle);
+						} catch (IOException e1) {
+							logger.error("While getting background style", e1);
+						}
+					}
+
+					((StyleEditor) owner).restorePreviousTool();
+					owner.repaint();
+				}
+			});
+		}
+		return btnOpenFile;
+	}
+
+	@Override
+	public Cursor getCursor() {
+		return Cursor.getDefaultCursor();
+	}
+
+	@Override
+	public String getID() {
+		return "4";
+	}
+
+	@Override
+	public boolean isSuitableFor(Object obj) {
+		return obj instanceof ILabelStyle;
+	}
+
+	@Override
+	public void setModel(Object objectToBeEdited) {
+		style = (ILabelStyle) objectToBeEdited;
+	}
+
+	public void mousePressed(MouseEvent e) { }
+	public void mouseReleased(MouseEvent e) { }
+	public void mouseDragged(MouseEvent e) { }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelForbiddenPrecedenceTool.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelForbiddenPrecedenceTool.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelForbiddenPrecedenceTool.java	(revision 40911)
@@ -0,0 +1,74 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling.editortools;
+
+import javax.swing.JComponent;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.placements.PointLabelPositioner;
+
+/**
+ * Implements an editor tool which can be used to select the position for the
+ * label when the user is performing a layer of points. There will be 4 different
+ * precedence levels for the 8 different places where the text for the specified point
+ * will be placed (see PointLabelPositioneer.java). This class implements the forbidden one,
+ * but the user can select a normal, a low or a high one.
+ *
+ *
+ * @author Pepe Vidal Salvador - jose.vidal.salvador@iver.es
+ *
+ */
+
+public class PointLabelForbiddenPrecedenceTool extends
+		PointLabelHighPrecedenceTool {
+	public PointLabelForbiddenPrecedenceTool(JComponent targetEditor) {
+		super(targetEditor);
+		buttonIcon = "set-forbidden-precedence";
+		precedenceValue = PointLabelPositioner.FORBIDDEN;
+		this.getButton().setToolTipText(
+				Messages.getText("set_forbidden_precedence"));
+	}
+
+	@Override
+	public String getID() {
+		return "4";
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelHighPrecedenceTool.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelHighPrecedenceTool.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelHighPrecedenceTool.java	(revision 40911)
@@ -0,0 +1,169 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling.editortools;
+
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Point;
+import java.awt.event.MouseEvent;
+
+import javax.swing.AbstractButton;
+import javax.swing.ImageIcon;
+import javax.swing.JComponent;
+import javax.swing.JToggleButton;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.app.gui.styling.EditorTool;
+import org.gvsig.app.gui.styling.StyleEditor;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.placements.PointLabelPositioner;
+
+/**
+ * Implements an editor tool which can be used to select the position for the
+ * label when the user is performing a layer of points. There will be 4 different
+ * precedence levels for the 8 different places where the text for the specified point
+ * will be placed (see PointLabelPositioneer.java). This class implements the highest one,
+ * but the user can select a normal, a low or a forbidden one.
+ *
+ *
+ * @author Pepe Vidal Salvador - jose.vidal.salvador@iver.es
+ *
+ */
+public class PointLabelHighPrecedenceTool extends EditorTool {
+	
+	protected String buttonIcon = "set-high-precedence";
+	protected byte precedenceValue = PointLabelPositioner.PREFERENCE_HIGH;
+	private final Cursor cursor = Cursor.getDefaultCursor();
+
+	private JToggleButton btnNewPrecedence;
+
+	private PointLabelPositioner positioneer;
+
+	/**
+	 * Constructor
+	 *
+	 * @param targetEditor
+	 */
+	public PointLabelHighPrecedenceTool(JComponent targetEditor) {
+		super(targetEditor);
+	}
+	/**
+	 * Implements the button for the tool
+	 *
+	 * @return
+	 */
+	private JToggleButton getBtnNewPrecedence() {
+		if (btnNewPrecedence == null) {
+			btnNewPrecedence = new JToggleButton();
+			btnNewPrecedence.setSize(EditorTool.SMALL_BTN_SIZE);
+			btnNewPrecedence.setIcon(getIconButton());
+			btnNewPrecedence.setToolTipText(
+					Messages.getText("set_high_precedence"));
+
+		}
+		return btnNewPrecedence;
+	}
+	/**
+	 * Obtains the image for the button of the tool
+	 *
+	 * @return
+	 */
+	protected ImageIcon getIconButton() {
+		return IconThemeHelper.getImageIcon(buttonIcon);
+	}
+	@Override
+	public AbstractButton getButton() {
+		return getBtnNewPrecedence();
+	}
+
+	@Override
+	public Cursor getCursor() {
+		return cursor;
+	}
+
+	@Override
+	public String getID() {
+		return "1";
+	}
+
+	@Override
+	public boolean isSuitableFor(Object obj) {
+		return obj instanceof PointLabelPositioner;
+	}
+
+	@Override
+	public void setModel(Object objectToBeEdited) {
+		positioneer = (PointLabelPositioner) objectToBeEdited;
+	}
+	/**
+	 * Obtains the position
+	 * @param p
+	 * @return
+	 */
+	private int getPositionerCellIndex(Point p) {
+		Dimension dim = ((StyleEditor) owner).getStylePreviewer().getSize();
+		int size = Math.min(dim.width, dim.height);
+		if(p.getX() > size || p.getY()>size)
+			return -1;
+		int cellSize = size/3;
+		int row = (int) p.getY() / cellSize;
+		int col = (int) p.getX() / cellSize;
+		int arrayPosition = (3 * row) + col;
+		if (arrayPosition==4) return -1;
+		if (arrayPosition>4) return arrayPosition-1;
+		return arrayPosition;
+
+	}
+	public void mousePressed(MouseEvent e) {
+		int[] pv = positioneer.getPreferenceVector();
+		int cellIndex = getPositionerCellIndex(e.getPoint());
+		if (cellIndex!=-1) {
+			pv[cellIndex] = precedenceValue;
+		}
+		owner.repaint();
+	}
+
+	public void mouseReleased(MouseEvent e) {
+	}
+
+	public void mouseDragged(MouseEvent e) {
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelLowPrecedenceTool.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelLowPrecedenceTool.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/PointLabelLowPrecedenceTool.java	(revision 40911)
@@ -0,0 +1,73 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling.editortools;
+
+import javax.swing.JComponent;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.placements.PointLabelPositioner;
+
+/**
+ * Implements an editor tool which can be used to select the position for the
+ * label when the user is performing a layer of points. There will be 4 different
+ * precedence levels for the 8 different places where the text for the specified point
+ * will be placed (see PointLabelPositioneer.java). This class implements the lowest one,
+ * but the user can select a normal, a high or a forbidden one.
+ *
+ *
+ * @author Pepe Vidal Salvador - jose.vidal.salvador@iver.es
+ *
+ */
+public class PointLabelLowPrecedenceTool extends PointLabelHighPrecedenceTool {
+	public PointLabelLowPrecedenceTool(JComponent targetEditor) {
+		super(targetEditor);
+		buttonIcon = "set-low-precedence";
+		precedenceValue = PointLabelPositioner.PREFERENCE_LOW;
+		this.getButton().setToolTipText(
+				Messages.getText("set_low_precedence"));
+	}
+
+	@Override
+	public String getID() {
+		return "3";
+	}
+}
+
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleRemoveLastTextField.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleRemoveLastTextField.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/editortools/LabelStyleRemoveLastTextField.java	(revision 40911)
@@ -0,0 +1,114 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling.editortools;
+
+import java.awt.Cursor;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+
+import javax.swing.AbstractButton;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.app.gui.styling.EditorTool;
+import org.gvsig.app.gui.styling.StyleEditor;
+import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle;
+
+
+public class LabelStyleRemoveLastTextField extends EditorTool {
+
+	public LabelStyleRemoveLastTextField(JComponent targetEditor) {
+		super(targetEditor);
+	}
+
+	private ILabelStyle style;
+	private JButton btnTextField;
+
+	public AbstractButton getButton() {
+		return getBtnRemoveTextField();
+	}
+
+	private JButton getBtnRemoveTextField() {
+		if (btnTextField == null) {
+			btnTextField = new JButton(
+					IconThemeHelper.getImageIcon("edit-remove-text"));
+			btnTextField.setSize(EditorTool.SMALL_BTN_SIZE);
+			btnTextField.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					int fCount = style.getFieldCount();
+					if (fCount>0)
+						style.deleteTextFieldArea(style.getFieldCount()-1);
+					((StyleEditor) owner).restorePreviousTool();
+					owner.repaint();
+				}
+			});
+		}
+
+		return btnTextField;
+	}
+
+	@Override
+	public Cursor getCursor() {
+		return Cursor.getDefaultCursor();
+	}
+
+	@Override
+	public String getID() {
+		return "1";
+	}
+
+	@Override
+	public boolean isSuitableFor(Object obj) {
+		return obj instanceof ILabelStyle;
+	}
+
+	@Override
+	public void setModel(Object objectToBeEdited) {
+		style = (ILabelStyle) objectToBeEdited;
+	}
+
+	public void mousePressed(MouseEvent e) {}
+	public void mouseReleased(MouseEvent e) {}
+	public void mouseDragged(MouseEvent e) {}
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/CharacterMarker.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/CharacterMarker.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/CharacterMarker.java	(revision 40911)
@@ -0,0 +1,581 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+*
+* $Id: CharacterMarker.java 13828 2007-09-19 11:06:36Z jvidal $
+* $Log$
+* Revision 1.20  2007-09-19 11:06:36  jvidal
+* bug solved
+*
+* Revision 1.19  2007/09/17 09:21:45  jaume
+* refactored SymboSelector (added support for multishapedsymbol)
+*
+* Revision 1.18  2007/08/08 11:45:38  jaume
+* some bugs fixed
+*
+* Revision 1.17  2007/08/07 11:21:05  jvidal
+* javadoc
+*
+* Revision 1.16  2007/08/03 11:29:13  jaume
+* refactored AbstractTypeSymbolEditorPanel class name to AbastractTypeSymbolEditor
+*
+* Revision 1.15  2007/07/30 12:56:04  jaume
+* organize imports, java 5 code downgraded to 1.4 and added PictureFillSymbol
+*
+* Revision 1.14  2007/07/12 10:43:55  jaume
+* *** empty log message ***
+*
+* Revision 1.13  2007/06/29 13:07:33  jaume
+* +PictureLineSymbol
+*
+* Revision 1.12  2007/05/31 09:36:22  jaume
+* *** empty log message ***
+*
+* Revision 1.11  2007/05/29 15:47:06  jaume
+* *** empty log message ***
+*
+* Revision 1.10  2007/05/21 10:38:27  jaume
+* *** empty log message ***
+*
+* Revision 1.9  2007/05/09 16:08:14  jaume
+* *** empty log message ***
+*
+* Revision 1.8  2007/04/26 11:40:09  jaume
+* added new components (JIncrementalNumberField)
+*
+* Revision 1.7  2007/04/20 07:54:38  jaume
+* *** empty log message ***
+*
+* Revision 1.6  2007/04/19 14:22:20  jaume
+* *** empty log message ***
+*
+* Revision 1.5  2007/04/05 16:08:34  jaume
+* Styled labeling stuff
+*
+* Revision 1.4  2007/04/04 16:01:13  jaume
+* *** empty log message ***
+*
+* Revision 1.3  2007/03/30 12:54:11  jaume
+* *** empty log message ***
+*
+* Revision 1.2  2007/03/09 11:25:00  jaume
+* Advanced symbology (start committing)
+*
+* Revision 1.1.2.7  2007/02/21 07:35:14  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.6  2007/02/08 15:43:05  jaume
+* some bug fixes in the editor and removed unnecessary imports
+*
+* Revision 1.1.2.5  2007/02/05 14:58:28  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.3  2007/02/04 16:57:22  jaume
+* working the map of characters
+*
+* Revision 1.1.2.2  2007/02/02 16:21:32  jaume
+* *** empty log message ***
+*
+* Revision 1.1.2.1  2007/01/26 13:49:03  jaume
+* *** empty log message ***
+*
+* Revision 1.1  2007/01/16 11:52:11  jaume
+* *** empty log message ***
+*
+* Revision 1.3  2006/11/06 17:08:45  jaume
+* *** empty log message ***
+*
+* Revision 1.2  2006/11/06 16:06:52  jaume
+* *** empty log message ***
+*
+* Revision 1.1  2006/10/31 16:16:34  jaume
+* *** empty log message ***
+*
+*
+*/
+package org.gvsig.labeling.gui.styling;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.ListCellRenderer;
+import javax.swing.ListModel;
+import javax.swing.event.ListDataListener;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.app.gui.panels.ColorChooserPanel;
+import org.gvsig.app.gui.styling.AbstractTypeSymbolEditor;
+import org.gvsig.app.gui.styling.EditorTool;
+import org.gvsig.app.gui.styling.SymbolEditor;
+import org.gvsig.app.gui.styling.SymbolPreviewer;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
+import org.gvsig.gui.beans.swing.JComboBoxFontSizes;
+import org.gvsig.gui.beans.swing.JComboBoxFonts;
+import org.gvsig.gui.beans.swing.JIncrementalNumberField;
+import org.gvsig.i18n.Messages;
+import org.gvsig.labeling.symbol.CharacterMarkerSymbol;
+/**
+* CharacterMarker allows the user to store and modify the properties that
+* define a <b>character marker</b>.<p>
+* <p>
+* This functionality is carried out thanks to two tabs (character marker and mask)which
+* are included in the panel to edit the properities of a symbol (SymbolEditor)how
+* is explained in AbstractTypeSymbolEditor.<p>
+* <p>
+* The first tab (Character marker)allows the user to change the font (<b>cmbFonts</b>)of
+* the symbol for the character marker, the size of that (<b>cmbFontSize</b>),the angle
+*(<b>numberAngle</b>)if the user wants to show the character with some rotation,the color
+* (<b>jcc</b>) and the offset (<b>txtYOffset,txtXOffset</b>).<p>
+* <p>
+* The second tab (<b>Mask</b>) modifies attributes of a mask for points such
+*  as style,size and symbol (to represent a point in the map).<p>
+*
+*@see Mask
+*@see AbstractTypeSymbolEditor
+*@author jaume dominguez faus - jaume.dominguez@iver.es
+*/
+public class CharacterMarker extends AbstractTypeSymbolEditor
+implements ActionListener {
+	
+	private ArrayList<JPanel> tabs = new ArrayList<JPanel>();
+	private JList jListSymbols;
+	private JScrollPane jScrollPane;
+	private JComboBoxFonts cmbFonts;
+	//TODO: Comentarizado hasta que mask esté acabado
+//	private Mask mask;
+	private JComboBoxFontSizes cmbFontSize;
+	private JIncrementalNumberField numberAngle;
+	private ColorChooserPanel jcc;
+	private JIncrementalNumberField txtYOffset;
+	private JIncrementalNumberField txtXOffset;
+	private Font font;
+	private int unicode;
+	private JCheckBox chkAdjustGlyph;
+
+	/**
+	 * contructor method
+	 * @param owner
+	 */
+	public CharacterMarker(SymbolEditor owner) {
+		super(owner);
+		initialize();
+	}
+	/**
+	 * Initializes the parameters that define a charactermarker.To do it, two tabs
+	 * are created inside the SymbolEditor panel with default values for the
+	 * different attributes of the character marker.This two tabs will be character
+	 * marker tab (options of font,size,angle,color and the offset of the character
+	 * marker)and a Mask added as a new tab.
+	 *
+	 */
+	private void initialize() {
+		JPanel myTab;
+		{
+			// Character marker tab
+			myTab = new JPanel(new BorderLayout(10, 10));
+			myTab.setName(Messages.getText("character_marker"));
+			myTab.setLayout(new BorderLayout(15,15));
+
+			JPanel aux = new JPanel(new BorderLayout(15, 15));
+			aux.add(new JLabel(Messages.getText("font")+":"), BorderLayout.NORTH);
+			aux.add(getCmbFonts(), BorderLayout.NORTH);
+
+			getJListSymbols().setModel(
+					new CharacterListModel(
+							new Font((String) getCmbFonts().getSelectedItem(), Font.PLAIN, 14)));
+			aux.add(getJScrollPane(), BorderLayout.CENTER);
+			myTab.add(aux, BorderLayout.CENTER);
+
+			GridBagLayoutPanel aux1 = new GridBagLayoutPanel();
+			aux1.addComponent(Messages.getText("size")+":", getCmbFontSize());
+			aux1.addComponent(Messages.getText("angle")+":", getNumberAngle());
+
+			aux1.addComponent(Messages.getText("color")+":", getColorChooser());
+
+			GridBagLayoutPanel aux2 = new GridBagLayoutPanel();
+			aux2.addComponent("X:", getTxtXOffset());
+			aux2.addComponent("Y:", getTxtYOffset());
+			aux2.setBorder(BorderFactory.createTitledBorder(
+					Messages.getText("offset")));
+			aux1.addComponent(aux2);
+
+			myTab.add(aux1, BorderLayout.EAST);
+			myTab.add(getChkAdjustGlyph(), BorderLayout.SOUTH);
+
+			tabs.add(myTab);
+		}
+
+		{
+			// Mask tab
+//			mask = new Mask(this);
+//
+//			tabs.add(mask);
+		}
+
+		jListSymbols.addListSelectionListener(new ListSelectionListener() {
+			public void valueChanged(ListSelectionEvent e) {
+				fireSymbolChangedEvent();
+			}
+		});
+	}
+
+	/**
+	 * JCheckBox that allows the user to apply visual correction to glyph for
+	 * precise size and position.
+	 * @return JCheckBox
+	 */
+	private JCheckBox getChkAdjustGlyph() {
+		if (chkAdjustGlyph == null) {
+			chkAdjustGlyph = new JCheckBox(
+					Messages.getText("apply_visual_correction_to_glyph_for_precise_size_and_position"));
+			chkAdjustGlyph.addActionListener(this);
+		}
+
+		return chkAdjustGlyph;
+	}
+
+	/**
+	 * JIncrementalNumberField that controls the YOffset for the character that the
+	 * user wants to use as a marker.
+	 * @return JIncrementalNumberField
+	 */
+	private JIncrementalNumberField getTxtYOffset() {
+		if (txtYOffset == null) {
+			txtYOffset = new JIncrementalNumberField(String.valueOf(0), 7);
+			txtYOffset.addActionListener(this);
+		}
+
+		return txtYOffset;
+	}
+	/**
+	 * JIncrementalNumberField that controls the XOffset for the character that the
+	 * user wants to use as a marker.
+	 * @return JIncrementalNumberField
+	 */
+	private JIncrementalNumberField getTxtXOffset() {
+		if (txtXOffset == null) {
+			txtXOffset = new JIncrementalNumberField(String.valueOf(0), 7);
+			txtXOffset.addActionListener(this);
+		}
+
+		return txtXOffset;
+	}
+	/**
+	 * ColorChooserPanel used to select the color for the character that the
+	 * user wants to use as a marker.
+	 * @return ColorChooserPanel
+	 */
+	private ColorChooserPanel getColorChooser() {
+		if (jcc == null) {
+			jcc = new ColorChooserPanel();
+			jcc.setAlpha(255);
+			jcc.addActionListener(this);
+		}
+
+		return jcc;
+	}
+	/**
+	 * JComboBoxFontSizes that allows the user to change the size of the character
+	 * selected as a marker
+	 * @return JComboBoxFontSizes
+	 */
+	private JComboBoxFontSizes getCmbFontSize() {
+		if (cmbFontSize == null) {
+			cmbFontSize = new JComboBoxFontSizes();
+			cmbFontSize.addActionListener(this);
+		}
+
+		return cmbFontSize;
+	}
+	/**
+	 * JIncrementalNumberField that controls the angle (if the user wants to show the
+	 * character with some rotation) for the character that the user wants to use as
+	 * a marker.
+	 * @return JIncrementalNumberField
+	 */
+
+	private JIncrementalNumberField getNumberAngle() {
+		if (numberAngle == null) {
+			numberAngle = new JIncrementalNumberField(String.valueOf(0), 5);
+			numberAngle.addActionListener(this);
+
+		}
+
+		return numberAngle;
+	}
+
+	/**
+	 * JComboBoxFonts its a combobox of fonts where the user can select the font
+	 * for the character marker.Depends on this font, the character will change its
+	 * appearance.
+	 * @returnJComboBoxFonts
+	 */
+	private JComboBoxFonts getCmbFonts() {
+		if (cmbFonts == null) {
+			cmbFonts = new JComboBoxFonts();
+			cmbFonts.addActionListener(this);
+		}
+		return cmbFonts;
+	}
+	/**
+	 * JScrollPane to select the exact character marker.The content of this pane
+	 * will change depending on the font that the user had selected.
+	 * @return JScrollPane
+	 */
+
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setViewportView(getJListSymbols());
+			jScrollPane.setPreferredSize(new Dimension(300, 180));
+		}
+		return jScrollPane;
+	}
+	/**
+	 * Used with the JScrollPane to create the pane that allows the user to select the
+	 * character marker.
+	 * @see getJScrollPane()
+	 * @return JList
+	 */
+	private JList getJListSymbols() {
+		if (jListSymbols == null) {
+			jListSymbols = new JList();
+			jListSymbols.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+			jListSymbols.setLayoutOrientation(JList.HORIZONTAL_WRAP);
+			jListSymbols.setVisibleRowCount(-1);
+			jListSymbols.addListSelectionListener(new ListSelectionListener() {
+
+				public void valueChanged(ListSelectionEvent e) {
+					CharacterItem theChar = (CharacterItem) jListSymbols.getSelectedValue();
+					if (theChar == null) return;
+					font = theChar.font;
+					unicode = theChar.glyph;
+					fireSymbolChangedEvent();
+				}
+			});
+			ListCellRenderer renderer = new ListCellRenderer() {
+				private Color mySelectedBGColor = new Color(255,145,100,255);
+				public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+					CharacterItem theChar = (CharacterItem) value;
+					CharacterMarkerSymbol sym = new CharacterMarkerSymbol(
+							theChar.font, theChar.glyph, Color.BLACK);
+					JPanel pnl = new JPanel();
+					BoxLayout layout = new BoxLayout(pnl, BoxLayout.Y_AXIS);
+					pnl.setLayout(layout);
+					Color bgColor = (isSelected) ? mySelectedBGColor
+							: getJListSymbols().getBackground();
+
+					pnl.setBackground(bgColor);
+					SymbolPreviewer sp = new SymbolPreviewer();
+					sp.setAlignmentX(Component.CENTER_ALIGNMENT);
+					int prevSize = 30;
+					sp.setPreferredSize(new Dimension(prevSize, prevSize));
+					sp.setSymbol(sym);
+					sp.setBackground(bgColor);
+					sym.setSize(prevSize*.8);
+//					sym.setVisuallyCorrected(getChkAdjustGlyph().isSelected());
+					pnl.add(sp);
+					JLabel lbl = new JLabel(sym.getDescription());
+					lbl.setBackground(bgColor);
+					lbl.setAlignmentX(Component.CENTER_ALIGNMENT);
+					pnl.add(lbl);
+
+					return pnl;
+				}
+			};
+			jListSymbols.setCellRenderer(renderer);
+		}
+		return jListSymbols;
+	}
+
+
+	public String getName() {
+		return Messages.getText("character_marker_symbol");
+	}
+
+	public JPanel[] getTabs() {
+		return (JPanel[]) tabs .toArray(new JPanel[0]);
+	}
+
+	public void refreshControls(ISymbol layer) {
+		CharacterMarkerSymbol sym;
+		try {
+			sym = (CharacterMarkerSymbol) layer;
+			font = sym.getFont();
+			unicode = sym.getUnicode();
+			getTxtXOffset().setDouble( sym.getOffset().getX() );
+			getTxtYOffset().setDouble( -sym.getOffset().getY() );
+
+			getColorChooser().setColor(sym.getColor());
+
+			getCmbFonts().setSelectedItem(sym.getFont().getName());
+			getCmbFontSize().setSelectedItem(new Integer(sym.getFont().getSize()));
+			getJListSymbols().setSelectedIndex(sym.getUnicode());
+			getNumberAngle().setDouble(
+					// convert to degrees
+					sym.getRotation() * 180.0 / Math.PI);
+
+			getChkAdjustGlyph().setSelected(sym.isVisuallyCorrected());
+			// TODO mask
+		} catch (IndexOutOfBoundsException ioEx) {
+			NotificationManager.addWarning("Symbol layer index out of bounds", ioEx);
+		} catch (ClassCastException ccEx) {
+			NotificationManager.addWarning(ccEx.getMessage(), ccEx);
+		}
+
+	}
+
+	public Class<? extends ISymbol> getSymbolClass() {
+		return CharacterMarkerSymbol.class;
+	}
+
+	public ISymbol getLayer() {
+		CharacterMarkerSymbol layer = new CharacterMarkerSymbol();
+		if (font == null) {
+			font = new Font((String) getCmbFonts().getSelectedItem(),
+					                 Font.PLAIN,
+					           (int) getCmbFontSize().getSelectedValue());
+		}
+		layer.setFont(font);
+		layer.setUnicode(unicode);
+		layer.setColor(getColorChooser().getColor());
+		layer.setSize(getCmbFontSize().getSelectedValue());
+		layer.setOffset(new Point2D.Double(
+				getTxtXOffset().getDouble(),
+				-getTxtYOffset().getDouble()));
+		layer.setRotation(
+				// convert to radians
+				getNumberAngle().getDouble() * Math.PI / 180.0); 
+
+		layer.setUnit(owner.getUnit());
+		layer.setReferenceSystem(owner.getUnitsReferenceSystem());
+//		layer.setMask(mask.getMask());
+		layer.setVisuallyCorrected(getChkAdjustGlyph().isSelected());
+		return layer;
+	}
+
+	/**
+	 * Creates a list with the specified items.
+	 *
+	 */
+	private class CharacterListModel implements ListModel {
+
+		private Font font;
+		private ArrayList<ListDataListener> listeners;
+
+		/**
+		 * constructor method
+		 * @param font
+		 */
+		public CharacterListModel(Font font) {
+			this.font = font;
+		}
+
+		public int getSize() {
+			return font.getNumGlyphs();
+		}
+
+		public Object getElementAt(int index) {
+			return new CharacterItem(font, index);
+		}
+
+		public void addListDataListener(ListDataListener l) {
+			if (listeners == null)
+				listeners = new ArrayList<ListDataListener>();
+			listeners.add(l);
+		}
+
+		public void removeListDataListener(ListDataListener l) {
+			if (listeners!=null)
+				listeners.remove(l);
+		}
+	}
+
+	private class CharacterItem {
+		int glyph;
+		Font font;
+		public CharacterItem(Font font, int glyph) {
+			this.font = font;
+			this.glyph = glyph;
+		}
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		JComponent c = (JComponent) e.getSource();
+		if (c.equals(getCmbFonts())) {
+			String fontName = (String) getCmbFonts().getSelectedItem();
+			getJListSymbols().setModel(
+					new CharacterListModel(
+							new Font(fontName, Font.PLAIN, 10)));
+			return;
+		}
+
+		fireSymbolChangedEvent();
+	}
+
+	public EditorTool[] getEditorTools() {
+		return null;
+	}
+	
+
+	public boolean canManageSymbol(ISymbol symbol) {
+		return symbol instanceof CharacterMarkerSymbol;
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/LayerPreview.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/LayerPreview.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/LayerPreview.java	(revision 40911)
@@ -0,0 +1,164 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+*
+* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*/
+package org.gvsig.labeling.gui.styling;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.util.Stack;
+
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.exception.CreateEnvelopeException;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelable;
+import org.gvsig.gui.beans.imagenavigator.IClientImageNavigator;
+import org.gvsig.gui.beans.imagenavigator.ImageNavigator;
+import org.gvsig.gui.beans.imagenavigator.ImageUnavailableException;
+import org.gvsig.tools.task.Cancellable;
+
+public class LayerPreview extends ImageNavigator implements IClientImageNavigator {
+	
+	private static final long serialVersionUID = -7554322442540714114L;
+	private FLayer layer = null;
+	private ViewPort vp;
+	private Stack<Cancellable> cancels = new Stack<Cancellable>();
+	private static GeometryManager geoman = GeometryLocator.getGeometryManager();
+
+	public LayerPreview() {
+		super(null);
+		setClientImageNavigator(this);
+	}
+
+	public void setLayer(FLayer layer) throws ReadException {
+		
+		this.layer = layer;
+		if (layer != null) {
+			vp = new ViewPort(layer.getProjection());
+			Envelope env = layer.getFullEnvelope();
+			setViewDimensions(
+					env.getMinimum(0),
+					env.getMaximum(1),
+					env.getMaximum(0),
+					env.getMinimum(1));
+		}
+		updateBuffer();
+		setEnabled(true);
+	}
+
+	/*
+	public static void main(String[] args) {
+		JFrame jFrame = new JFrame("test");
+		String fwAndamiDriverPath = "../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/drivers";
+		IProjection PROJ = CRSFactory.getCRS("EPSG:23030");
+		try {
+			LayerFactory.setDriversPath(new File(fwAndamiDriverPath).getAbsolutePath());
+			LayerPreview prev = new LayerPreview();
+
+			prev.setLayer(LayerFactory.
+					createLayer(
+							"line",
+							"gvSIG shp driver",
+							new File("/home/jaume/Documents/Cartografia/cv_300_polygons.shp"),
+							PROJ));
+
+			jFrame.setSize(new Dimension(598, 167));
+
+			jFrame.setContentPane(prev);
+
+			jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+			jFrame.setVisible(true);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+	*/
+
+	public void drawImage(
+			Graphics2D g,
+			double left, double top, double right, double bottom,
+			double zoom, int width, int height)
+	throws ImageUnavailableException {
+		
+		Cancellable c = new PreviewCancellable();
+		while (!cancels.isEmpty()) cancels.pop().setCanceled(true);
+
+		cancels.push(c);
+		if (layer == null || width <= 0 || height <= 0 || vp == null)
+			return;
+		
+		Envelope env = null;
+		try {
+			env = geoman.createEnvelope(
+					left,
+					bottom,
+					right,
+					top,
+					SUBTYPES.GEOM2D);
+		} catch (CreateEnvelopeException e1) {
+			
+			throw new ImageUnavailableException(
+					"Error while initializing layer preview", e1);
+		}
+		vp.setEnvelope(env);
+		vp.setImageSize(new Dimension(width, height));
+		BufferedImage bi = new BufferedImage(
+				width, height, BufferedImage.TYPE_4BYTE_ABGR);
+
+//		double scale = vp.getScale();
+		double scale = layer.getMapContext().getScaleView();
+		try {
+			layer.draw(bi, g, vp, c, scale);
+			if (layer instanceof ILabelable && ((ILabelable) layer).isLabeled()) {
+				((ILabelable) layer).drawLabels(bi, g, vp, c, scale,
+						MapContext.getScreenDPI());
+			}
+		} catch (ReadException e) {
+			
+			throw new ImageUnavailableException(
+					"Error while drawing layer '" + layer.getName() + "'", e);
+		}
+	}
+	
+	private class PreviewCancellable implements Cancellable {
+
+		private boolean canc = false;
+		
+		public PreviewCancellable() {
+			
+		}
+		
+		public boolean isCanceled() {
+			return canc;
+		}
+
+		public void setCanceled(boolean c) {
+			canc = c;
+		}
+		
+	}
+	
+
+
+}
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/JUrlFileChooser.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/JUrlFileChooser.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/styling/JUrlFileChooser.java	(revision 40911)
@@ -0,0 +1,119 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.labeling.gui.styling;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.swing.filechooser.FileFilter;
+
+import org.gvsig.gui.beans.swing.JFileChooser;
+import org.gvsig.i18n.Messages;
+
+public class JUrlFileChooser extends JFileChooser {
+
+	private static final long serialVersionUID = 1844355534608274984L;
+
+	public JUrlFileChooser(String fileChooserID, String defaultDirectory) {
+		super(fileChooserID, defaultDirectory);
+		this.setFileFilter(ff);
+		this.setFileSelectionMode(JFileChooser.FILES_ONLY);
+		this.setMultiSelectionEnabled(false);
+	}
+
+	FileFilter ff = new FileFilter() {
+		public boolean accept(File f) {
+			if (f.isDirectory()) return true;
+			String fName = f.getAbsolutePath();
+			if (fName!=null) {
+				fName = fName.toLowerCase();
+				return fName.endsWith(".png")
+				|| fName.endsWith(".gif")
+				|| fName.endsWith(".jpg")
+				|| fName.endsWith(".jpeg")
+				|| fName.endsWith(".bmp")
+				|| fName.endsWith(".svg");
+			}
+			return false;
+		}
+
+		public String getDescription() {
+			return Messages.getText("bitmap_and_svg_image_files")+ "," +
+					Messages.getText("URL");
+		}
+	};
+
+	public URL getSelectedURL() {
+		String path;
+		File f = getSelectedFile();  
+
+		try {
+			if(f.canRead()) {
+				return f.toURI().toURL();
+			}
+			else {
+				path = f.toString();
+
+				if (!path.startsWith("http"))
+					if(path.contains("http") && 
+							(path.endsWith(".png")
+									|| path.endsWith(".gif")
+									|| path.endsWith(".jpg")
+									|| path.endsWith(".jpeg")
+									|| path.endsWith(".bmp")
+									|| path.endsWith(".svg"))) {
+
+						path = path.substring(path.indexOf("http"), path.length());
+						path = path.replace('\\', '/');
+						path = path.replaceFirst("/", "//");
+
+						return new URL(path);
+					}
+			}
+		} catch (MalformedURLException e) {
+			return null;
+		}
+		return null;
+	}
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/SmartTextSymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/SmartTextSymbol.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/SmartTextSymbol.java	(revision 40911)
@@ -0,0 +1,703 @@
+package org.gvsig.labeling.symbol;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.Shape;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.font.LineMetrics;
+import java.awt.geom.AffineTransform;
+
+import org.gvsig.compat.print.PrintAttributes;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.exception.CreateGeometryException;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.geom.primitive.GeneralPathX;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.geom.primitive.Surface;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
+import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol;
+import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException;
+import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolPreferences;
+import org.gvsig.labeling.placements.PointPlacementConstraints;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.TextPath;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text.ISimpleTextSymbol;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Class used to create symbols composed using a text defined by
+ * the user.This text can be edited (changing the color, the font of the characters, and
+ * the rotation of the text)and has the property that can follow a path.If this path
+ * does not exist, the text is treated as a simpletextsymbol (when is drawn).
+ * @author   jaume dominguez faus - jaume.dominguez@iver.es
+ */
+public class SmartTextSymbol implements ISimpleTextSymbol, CartographicSupport {
+	
+	private static final Logger logger = LoggerFactory.getLogger(
+			SmartTextSymbol.class);
+	// ===========================
+	public static final String SMART_TEXT_SYMBOL_PERSISTENCE_DEFINITION_NAME =
+			"SMART_TEXT_SYMBOL_PERSISTENCE_DEFINITION_NAME";
+	
+	private static final String FIELD_UNIT = "unit";
+	private static final String FIELD_REFERENCE_SYSTEM = "referenceSystem";
+	private static final String FIELD_IS_SHAPE_VISIBLE = "isShapeVisible";
+	private static final String FIELD_DESCRIPTION = "description";
+	private static final String FIELD_TEXT = "text";
+	private static final String FIELD_FONT = "font";
+	private static final String FIELD_TEXT_COLOR = "textColor";
+	private static final String FIELD_ROTATION = "rotation";
+	private static final String FIELD_AUTO_RESIZE = "autoResize";
+	// ====================================
+	private static final String FIELD_HAS_HALO = "hasHalo";
+	private static final String FIELD_HALO_COLOR = "haloColor";
+	private static final String FIELD_HALO_WIDTH = "haloWidth";
+	// ====================================
+	public static final int SYMBOL_STYLE_TEXTALIGNMENT_LEFT = 0;
+	public static final int SYMBOL_STYLE_TEXTALIGNMENT_RIGHT = 1;
+	public static final int SYMBOL_STYLE_TEXTALIGNMENT_CENTERED = 2;
+
+	// ===========================
+	private static GeometryManager geoman = GeometryLocator.getGeometryManager();
+	
+	private String text;
+	private FontRenderContext frc = new FontRenderContext(
+			new AffineTransform(), false, true);
+	
+	// Background: ITextBackground
+//	Case
+	private double characterSpacing;
+	private double characterWidth;
+//	Direction
+	private IFillSymbol fillSymbol;
+	private double flipAngle;
+//	boolean kerning;
+	private double leading;
+//	Position: textPosition
+	private Color ShadowColor;
+	private double ShadowXOffset;
+	private double ShadowYOffset;
+//	TypeSetting: Boolean
+	private double wordSpacing;
+//	ISimpleTextSymbol : ITextSymbol
+//	BreakCharacter: Long
+//	Clip: Boolean
+	private TextPath textPath;
+	private double xOffset;
+	private double yOffset;
+	private double angle;
+//	Color: IColor
+
+//	HorizontalAlignment:
+//	esriTextHorizontalAlignment
+	private boolean rightToLeft;
+	//	VerticalAlignment
+	private double maskSize;
+//	MaskStyle
+	private  IFillSymbol maskSymbol;
+	private double margin;
+	private int alignment;
+	private boolean kerning = false;
+	private TextPath tp;
+	private IPlacementConstraints constraints;
+	
+	private boolean shapeVisible = true;
+	private int unit = -1;
+	private int referenceSystem = CartographicSupport.WORLD;
+	private double rotation = 0;
+	private String desc = "";
+	private Color textColor = Color.BLACK;
+	private Font font;
+	private boolean autoresize = false;
+	
+	// =======================
+	
+	private boolean hasHalo = false;
+	private Color haloColor = Color.WHITE;
+	private float haloWidth = 3;
+	private BasicStroke haloStroke = new BasicStroke(
+			6, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
+	
+	// =======================
+	
+
+	public SmartTextSymbol(ITextSymbol sym, IPlacementConstraints constraints) {
+
+//		if(sym instanceof SimpleTextSymbol){
+//			SimpleTextSymbol mySym = (SimpleTextSymbol)sym;
+
+			this.setAutoresizeEnabled(sym.isAutoresizeEnabled());
+			this.setDescription(sym.getDescription());
+			this.setFont(sym.getFont());
+			this.setFontSize(sym.getFont().getSize());
+			this.setIsShapeVisible(sym.isShapeVisible());
+			this.setText(sym.getText());
+			this.setTextColor(sym.getTextColor());
+			
+			this.setDrawWithHalo(sym.isDrawWithHalo());
+			this.setHaloColor(sym.getHaloColor());
+			this.setHaloWidth(sym.getHaloWidth());
+			
+			this.constraints = constraints;
+
+			setCharacterSpacing(2); //???
+			setWordSpacing(TextPath.DEFAULT_WORD_SPACING);
+			boolean rtl = false; // right to left text
+			if (constraints.isAtTheBeginingOfLine()) {
+				if (rtl) {
+					setAlignment(SYMBOL_STYLE_TEXTALIGNMENT_RIGHT);
+				}
+				else {
+					setAlignment(SYMBOL_STYLE_TEXTALIGNMENT_LEFT);
+				}
+			}
+			else if (constraints.isAtTheEndOfLine()) {
+				if (rtl) {
+					setAlignment(SYMBOL_STYLE_TEXTALIGNMENT_LEFT);
+				}
+				else {
+					setAlignment(SYMBOL_STYLE_TEXTALIGNMENT_RIGHT);
+				}
+			}
+			else { //constraints.isInTheMiddleOfLine() or constraints.isAtBestOfLine()
+				setAlignment(SYMBOL_STYLE_TEXTALIGNMENT_CENTERED);
+			}
+			setKerning(false);
+			setRightToLeft(rtl);
+		// }
+	}
+	
+	
+	public void setIsShapeVisible(boolean v) {
+		this.shapeVisible = v;
+	}
+	
+	public boolean isShapeVisible() {
+		return shapeVisible;
+	}
+	
+
+
+	public SmartTextSymbol() {
+		PointPlacementConstraints pc = new PointPlacementConstraints();
+		this.constraints = pc;
+		
+		SymbolPreferences preferences =
+				MapContextLocator.getSymbolManager().getSymbolPreferences();
+		font = preferences.getDefaultSymbolFont();
+		textColor = preferences.getDefaultSymbolColor();
+	}
+
+	/**
+	 * Draws the text according. If this symbol has the text path set, then
+	 * it is used as the text line, otherwise shp <b>must be an FPoint2D</b>
+	 * indicating the starting point of the text and then the text will
+	 * be rendered from there and following the rotation previously set.
+	 */
+	
+	public void draw(Graphics2D g, AffineTransform affineTransform,
+			Geometry geom, Feature f, Cancellable cancel) {
+	
+		if (!isShapeVisible()) return;
+
+		setMargin(0);
+
+
+		char[] text_chars = text.toCharArray();
+		tp = new TextPath(g, geom, text_chars, getFont(),
+				(float) characterSpacing, (float) characterWidth, kerning,
+				(float) leading, alignment, (float) wordSpacing, (float) margin, rightToLeft);
+		Font font = getFont();
+		g.setFont(font);
+		FontRenderContext frc = g.getFontRenderContext();
+		LineMetrics lineMetrics = font.getLineMetrics(getText(), frc);
+		
+//		GlyphVector glyph =  font.layoutGlyphVector(frc, charText, 0, charText.length, Font.LAYOUT_NO_START_CONTEXT);
+		double cons = 0;
+
+		/* Repartimos el leading (espacio de separación entre lineas)
+		 * arriba y abajo para que exista la misma separación entre la
+		 * caja de la letra y la linea tanto si se dibuja por abajo como
+		 * si se dibuja por arriba. 
+		 */
+		if(this.constraints.isAboveTheLine()) {
+			cons = lineMetrics.getDescent()+lineMetrics.getLeading()/2;
+		}
+		else if (this.constraints.isBelowTheLine()) {
+			cons = -(lineMetrics.getAscent()+lineMetrics.getLeading()/2);
+		}
+		/* Dibujamos la letra de tal manera que el centro de la caja de letra
+		 * coincida con la linea
+		 */
+		else if(this.constraints.isOnTheLine()) {
+//			cons = lineMetrics.getDescent()+(lineMetrics.getLeading()/2)-(lineMetrics.getHeight()/2);
+			cons = lineMetrics.getDescent()+lineMetrics.getLeading()-(lineMetrics.getHeight()/2);
+		}
+		
+		double[] coords = tp.nextPosForGlyph(0);
+
+		for (int i = 0; i < tp.getGlyphCount(); i++) {
+			coords = tp.nextPosForGlyph(i);
+			if (coords[0] == TextPath.NO_POS || coords[1] == TextPath.NO_POS)
+				continue;
+
+			// move the label 'cons" units above/below the line
+			double xOffset = cons * Math.sin(coords[2]);
+			double yOffset = cons * Math.cos(coords[2]);
+
+			g.translate(coords[0]+xOffset, coords[1]-yOffset);
+			g.rotate(coords[2]);
+
+			char[] aux = new char[1];
+			aux[0] = text_chars[i];
+			if (isDrawWithHalo()) {
+				GlyphVector glyph = font.createGlyphVector(frc, aux);
+				Shape outlineChar = glyph.getOutline();
+				g.setStroke(haloStroke);
+				g.setColor(getHaloColor());
+				
+				g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+						RenderingHints.VALUE_ANTIALIAS_ON);
+				g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
+						RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+				// =============================
+				g.draw(outlineChar);
+				// =============================
+				g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+						RenderingHints.VALUE_ANTIALIAS_OFF);
+			}
+			
+			g.setColor(this.getTextColor());
+			g.drawString(String.valueOf(text_chars[i]), 0, 0);
+			g.rotate(-coords[2]);
+			g.translate(-coords[0]-xOffset, -coords[1]+yOffset);
+		}
+	}
+
+	public void getPixExtentPlus(
+			Geometry shp, float[] distances, ViewPort viewPort, int dpi) {
+		
+		/*
+		 * TODO Is this used?
+		 */
+		distances[0] = 0;
+		distances[1] = 0;
+		// throw new RuntimeException("Not yet implemented!");
+	}
+
+	public int getOnePointRgb() {
+		return getTextColor().getRGB();
+	}
+
+	/*
+	public XMLEntity getXMLEntity() {
+		XMLEntity xml = new XMLEntity();
+		xml.putProperty("className", getClassName());
+		xml.putProperty("desc", getDescription());
+		xml.putProperty("isShapeVisible", isShapeVisible());
+		return xml;
+	}
+	*/
+
+	public int getSymbolType() {
+		return Geometry.TYPES.GEOMETRY;
+	}
+
+	public boolean isSuitableFor(Geometry geom) {
+		return geom.getGeometryType().isTypeOf(TYPES.CURVE);
+	}
+	
+	public void drawInsideRectangle(
+			Graphics2D g,
+			AffineTransform scaleInstance,
+			Rectangle r,
+			PrintAttributes properties) throws SymbolDrawingException {
+		// let's take the bottom segment of the rectangle as the line
+		
+		Surface surf = null;
+		try {
+			surf = geoman.createSurface(SUBTYPES.GEOM2D);
+		} catch (CreateGeometryException e) {
+			logger.info("Error while creating surface.", e);
+			throw new SymbolDrawingException(
+					SymbolDrawingException.UNSUPPORTED_SET_OF_SETTINGS);
+		}
+		surf.addVertex(r.getX(), r.getY());
+		surf.addVertex(r.getX() + r.getWidth(), r.getY());
+		
+		if (properties == null) {
+			draw(g, scaleInstance, surf, null, null);
+		} else {
+			print(g, scaleInstance, surf, properties);
+		}
+	}
+
+
+	/*
+	public void setXMLEntity(XMLEntity xml) {
+		setFont(new Font("Arial", Font.PLAIN, 18));
+		setText("this is my TEST text that follows a line");
+		setDescription(xml.getStringProperty("desc"));
+		setIsShapeVisible(xml.getBooleanProperty("isShapeVisible"));
+
+	}
+	*/
+
+	public void setText(String txt) {
+		this.text = txt;
+	}
+
+	public String getText() {
+		return text;
+	}
+
+	public void setCharacterSpacing(double charSpacing) {
+		this.characterSpacing = charSpacing;
+	}
+
+	public void setWordSpacing(double wordSpacing) {
+		this.wordSpacing = wordSpacing;
+	}
+
+	public void setAlignment(int alignment) {
+		this.alignment = alignment;
+	}
+
+	public void setKerning(boolean kerning) {
+		this.kerning = kerning;
+	}
+
+	public void setMargin(double margin) {
+		this.margin = margin;
+	}
+
+	public void setRightToLeft(boolean rightToLeft) {
+		this.rightToLeft = rightToLeft;
+	}
+	
+	// ==============================================
+	// ==============================================
+	// ==============================================
+
+	
+	public ISymbol getSymbolForSelection() {
+		return this;
+	}
+
+	public boolean isOneDotOrPixel(Geometry geom,
+			double[] positionOfDotOrPixel, ViewPort viewPort, int dpi) {
+		
+		int type = geom.getType();
+		switch (type) {
+		case Geometry.TYPES.NULL:
+		case Geometry.TYPES.POINT:
+		case Geometry.TYPES.MULTIPOINT:
+			return false;
+		default:
+			Envelope geomBounds = geom.getEnvelope();
+			double dist1Pixel = viewPort.getDist1pixel();
+
+			float[] distances = new float[2];
+			this.getPixExtentPlus(geom, distances, viewPort, dpi);
+
+			boolean onePoint =
+					((geomBounds.getLength(0) + distances[0] <= dist1Pixel)
+					&& (geomBounds.getLength(1) + distances[1] <= dist1Pixel));
+
+			if (onePoint) {
+				positionOfDotOrPixel[0] = geomBounds.getMinimum(0);
+				positionOfDotOrPixel[1] = geomBounds.getMinimum(1);
+			}
+			return onePoint;
+		}
+	}
+	
+
+
+	public String getDescription() {
+		return desc;
+	}
+
+
+	public void setDescription(String d) {
+		desc = d;
+	}
+
+
+	public Color getColor() {
+		return this.getTextColor();
+	}
+
+
+	public void setColor(Color color) {
+		this.setTextColor(color);
+	}
+
+
+	public void print(Graphics2D g, AffineTransform at, Geometry geom,
+			PrintAttributes properties) {
+		
+		/*
+		 * TODO Use properties
+		 * (perhaps when using things of CartographicSupport)
+		 */
+		this.draw(g,  at, geom, null, null);
+	}
+
+
+	public void setFont(Font fnt) {
+		this.font = fnt;
+	}
+
+
+	public Font getFont() {
+		return font;
+	}
+
+
+	public Color getTextColor() {
+		return this.textColor;
+	}
+
+
+	public void setTextColor(Color color) {
+		this.textColor = color;
+	}
+
+
+	public void setFontSize(double d) {
+		Font newFont = new Font(
+				font.getName(),
+				font.getStyle(),
+				Math.round((float) d));
+		this.font = newFont;		
+	}
+
+
+	public Geometry getTextWrappingShape(Point p) {
+		
+		Font font = getFont();
+		GlyphVector gv = font.createGlyphVector(frc, text);
+
+		Shape shape = gv.getOutline((float) p.getX(), (float) p.getY());
+		Geometry myFShape;
+		try {
+			myFShape = geoman.createSurface(new GeneralPathX(shape
+					.getBounds2D().getPathIterator(null)), SUBTYPES.GEOM2D);
+			myFShape.transform(AffineTransform.getTranslateInstance(p.getX(), p.getY()));
+
+			if (rotation != 0) {
+				myFShape.transform(AffineTransform.getRotateInstance(rotation));
+			}
+			return myFShape;
+		} catch (CreateGeometryException e) {
+			logger.error("Error creating a surface", e);
+		}
+		return null;
+	}
+
+
+	public Rectangle getBounds() {
+		
+		Rectangle bounds = null;
+		try {
+			Geometry aux = getTextWrappingShape(geoman.createPoint(0,0, SUBTYPES.GEOM2D));
+			Envelope env = aux.getEnvelope();
+			bounds = new Rectangle(
+					(int) env.getMinimum(0),
+					(int) env.getMinimum(1),
+					(int) env.getLength(0),
+					(int) env.getLength(1));
+		} catch (CreateGeometryException e) {
+			logger.error("Error creating a point", e);
+		}
+		return bounds;
+	}
+
+	public double getRotation() {
+		return this.rotation;
+	}
+
+
+	public void setRotation(double rot) {
+		this.rotation = rot;
+	}
+
+	public void setAutoresizeEnabled(boolean ar) {
+		autoresize = ar;
+	}
+
+
+	public boolean isAutoresizeEnabled() {
+		return autoresize;
+	}
+
+
+	public Color getHaloColor() {
+		return this.haloColor;
+	}
+
+
+	public void setHaloColor(Color co) {
+		this.haloColor = co;
+	}
+
+
+	public float getHaloWidth() {
+		return this.haloWidth;
+	}
+
+
+	public void setHaloWidth(float w) {
+		this.haloWidth = w;
+		this.haloStroke = new BasicStroke(
+				2*haloWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
+	}
+
+
+	public boolean isDrawWithHalo() {
+		return this.hasHalo;
+	}
+
+
+	public void setDrawWithHalo(boolean h) {
+		this.hasHalo = h;
+	}
+
+	// ==============================
+
+
+	public void setUnit(int unitIndex) {
+		unit = unitIndex;
+	}
+
+
+	public int getUnit() {
+		return unit;
+	}
+
+
+	public int getReferenceSystem() {
+		return this.referenceSystem;
+	}
+
+
+	public void setReferenceSystem(int rs) {
+		this.referenceSystem = rs;
+	}
+
+
+	public void setCartographicSize(double cartographicSize, Geometry geom) {
+		setFontSize(cartographicSize);
+	}
+
+	public double toCartographicSize(ViewPort viewPort, double dpi, Geometry geom) {
+		double oldSize = getFont().getSize();
+		setCartographicSize(getCartographicSize(viewPort, dpi, geom), geom);
+		return oldSize;
+	}
+
+	public double getCartographicSize(ViewPort viewPort, double dpi, Geometry geom) {
+		return SymbolUtils.	getCartographicLength(
+				this, getFont().getSize(), viewPort, dpi);
+	}
+
+	// ========================
+	
+	public Object clone() throws CloneNotSupportedException {
+		return super.clone();
+	}
+	
+	// ==========================
+	
+	public static void registerPersistent() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(SMART_TEXT_SYMBOL_PERSISTENCE_DEFINITION_NAME)==null ) {
+			DynStruct definition = manager.addDefinition(
+					SmartTextSymbol.class,
+					SMART_TEXT_SYMBOL_PERSISTENCE_DEFINITION_NAME,
+					SMART_TEXT_SYMBOL_PERSISTENCE_DEFINITION_NAME+" Persistence definition",
+					null, 
+					null
+			);
+			
+			definition.addDynFieldString(FIELD_DESCRIPTION).setMandatory(true);
+			definition.addDynFieldBoolean(FIELD_IS_SHAPE_VISIBLE).setMandatory(true);
+			definition.addDynFieldInt(FIELD_REFERENCE_SYSTEM).setMandatory(true);
+			definition.addDynFieldInt(FIELD_UNIT).setMandatory(true);
+			definition.addDynFieldBoolean(FIELD_AUTO_RESIZE).setMandatory(true);
+			definition.addDynFieldObject(FIELD_FONT).setClassOfValue(Font.class).setMandatory(true);
+			definition.addDynFieldDouble(FIELD_ROTATION).setMandatory(true);
+			definition.addDynFieldString(FIELD_TEXT).setMandatory(true);
+			definition.addDynFieldObject(FIELD_TEXT_COLOR).setClassOfValue(Color.class).setMandatory(true);
+			// halo
+			definition.addDynFieldBoolean(FIELD_HAS_HALO).setMandatory(true);
+			definition.addDynFieldObject(FIELD_HALO_COLOR).setClassOfValue(
+					Color.class).setMandatory(true);
+			definition.addDynFieldFloat(FIELD_HALO_WIDTH).setMandatory(true);
+		}
+		
+	}
+	
+	public void loadFromState(PersistentState state)
+			throws PersistenceException {
+		setDescription(state.getString(FIELD_DESCRIPTION));
+		setIsShapeVisible(state.getBoolean(FIELD_IS_SHAPE_VISIBLE));
+		setReferenceSystem(state.getInt(FIELD_REFERENCE_SYSTEM));
+		setUnit(state.getInt(FIELD_UNIT));
+		
+		setAutoresizeEnabled(state.getBoolean(FIELD_AUTO_RESIZE));
+		setFont((Font) state.get(FIELD_FONT));
+		setRotation(state.getDouble(FIELD_ROTATION));
+		setText(state.getString(FIELD_TEXT));
+		setTextColor((Color) state.get(FIELD_TEXT_COLOR));
+		// halo
+		this.setDrawWithHalo(state.getBoolean(FIELD_HAS_HALO));
+		this.setHaloColor((Color) state.get(FIELD_HALO_COLOR));
+		this.setHaloWidth(state.getFloat(FIELD_HALO_WIDTH));
+	}
+
+	public void saveToState(PersistentState state) throws PersistenceException {
+		state.set(FIELD_DESCRIPTION, getDescription());
+		state.set(FIELD_IS_SHAPE_VISIBLE, isShapeVisible());
+		state.set(FIELD_REFERENCE_SYSTEM, getReferenceSystem());
+		state.set(FIELD_UNIT, getUnit());
+		
+		state.set(FIELD_AUTO_RESIZE, isAutoresizeEnabled());
+		state.set(FIELD_FONT, getFont());
+		state.set(FIELD_ROTATION, getRotation());
+		state.set(FIELD_TEXT, getText());
+		state.set(FIELD_TEXT_COLOR, getTextColor());
+		// halo
+		state.set(FIELD_HAS_HALO, this.isDrawWithHalo());
+		state.set(FIELD_HALO_COLOR, this.getHaloColor());
+		state.set(FIELD_HALO_WIDTH, this.getHaloWidth());
+	}
+
+
+
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/CharacterMarkerSymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/CharacterMarkerSymbol.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/CharacterMarkerSymbol.java	(revision 40911)
@@ -0,0 +1,833 @@
+/* gvSIG. Sistema de Información Geogràfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+
+/* CVS MESSAGES:
+ *
+ * $Id: CharacterMarkerSymbol.java 14501 2007-10-08 15:47:31Z jdominguez $
+ * $Log$
+ * Revision 1.27  2007-09-21 12:25:32  jaume
+ * cancellation support extended down to the IGeometry and ISymbol level
+ *
+ * Revision 1.26  2007/08/09 07:20:03  jvidal
+ * javadoc
+ *
+ * Revision 1.25  2007/07/23 06:52:25  jaume
+ * default selection color refactored, moved to MapContext
+ *
+ * Revision 1.24  2007/07/18 06:54:34  jaume
+ * continuing with cartographic support
+ *
+ * Revision 1.23  2007/07/03 10:58:29  jaume
+ * first refactor on CartographicSupport
+ *
+ * Revision 1.22  2007/06/29 13:07:01  jaume
+ * +PictureLineSymbol
+ *
+ * Revision 1.21  2007/06/07 06:50:40  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.20  2007/05/29 15:46:37  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.19  2007/05/28 15:36:42  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.18  2007/05/17 09:32:06  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.17  2007/05/09 16:07:26  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.16  2007/05/09 11:05:28  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.15  2007/05/08 08:47:40  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.14  2007/04/26 11:41:00  jaume
+ * attempting to let defining size in world units
+ *
+ * Revision 1.13  2007/04/20 07:11:11  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.12  2007/04/19 16:01:27  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.11  2007/04/19 14:21:30  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.10  2007/03/26 14:24:13  jaume
+ * implemented Print
+ *
+ * Revision 1.9  2007/03/21 11:37:00  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.8  2007/03/21 11:02:17  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.7  2007/03/09 11:20:56  jaume
+ * Advanced symbology (start committing)
+ *
+ * Revision 1.5.2.8  2007/02/21 07:34:09  jaume
+ * labeling starts working
+ *
+ * Revision 1.5.2.7  2007/02/16 10:54:12  jaume
+ * multilayer splitted to multilayerline, multilayermarker,and  multilayerfill
+ *
+ * Revision 1.5.2.6  2007/02/15 16:23:44  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.5.2.5  2007/02/14 09:58:37  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.5.2.4  2007/02/12 15:15:20  jaume
+ * refactored interval legend and added graduated symbol legend
+ *
+ * Revision 1.5.2.3  2007/02/09 07:47:04  jaume
+ * Isymbol moved
+ *
+ * Revision 1.5.2.2  2007/02/05 14:59:04  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.5.2.1  2007/01/30 18:10:45  jaume
+ * start commiting labeling stuff
+ *
+ * Revision 1.5  2007/01/25 16:25:23  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.4  2007/01/24 17:58:22  jaume
+ * new features and architecture error fixes
+ *
+ * Revision 1.3  2007/01/16 11:50:44  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.2  2007/01/10 16:39:41  jaume
+ * ISymbol now belongs to com.iver.cit.gvsig.fmap.core.symbols package
+ *
+ * Revision 1.1  2007/01/10 16:31:36  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.6  2006/12/04 17:13:39  fjp
+ * *** empty log message ***
+ *
+ * Revision 1.5  2006/11/14 11:10:27  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.4  2006/11/09 18:39:05  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.3  2006/11/08 10:56:47  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.2  2006/11/06 17:08:45  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.1  2006/10/31 16:16:34  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.4  2006/10/30 19:30:35  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.3  2006/10/29 23:53:49  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.2  2006/10/26 16:27:33  jaume
+ * support for composite marker symbols (not tested)
+ *
+ * Revision 1.1  2006/10/25 10:50:41  jaume
+ * movement of classes and gui stuff
+ *
+ * Revision 1.3  2006/10/24 19:54:16  jaume
+ * added IPersistence
+ *
+ * Revision 1.2  2006/10/24 08:02:51  jaume
+ * *** empty log message ***
+ *
+ * Revision 1.1  2006/10/18 07:54:06  jaume
+ * *** empty log message ***
+ *
+ *
+ */
+package org.gvsig.labeling.symbol;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.image.BufferedImage;
+
+import org.gvsig.compat.print.PrintAttributes;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.exception.CreateGeometryException;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException;
+import org.gvsig.labeling.lang.LabelClassUtils;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.gvsig.tools.task.Cancellable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Allows to use a source of TrueType characters  to define the marker that will
+ * substitute the symbol.If the picture is defined in a source, the performance is
+ * more agile.
+ * @author   jaume dominguez faus - jaume.dominguez@iver.es
+ */
+public class CharacterMarkerSymbol implements IMarkerSymbol {
+	
+	private static Logger logger =
+			LoggerFactory.getLogger(CharacterMarkerSymbol.class);
+	
+	public static final String CHARACTER_MARKER_SYMBOL_PERSISTENCE_NAME =
+			"CHARACTER_MARKER_SYMBOL_PERSISTENCE_NAME";
+	
+	private Font font = new Font("Arial", Font.PLAIN, 20);
+	private int unicode;
+	private ISymbol selectionSymbol;
+	private VisualCorrection visualCorrection;
+	private double size;
+	
+	private boolean isShapeVisible = true;
+	private String desc = "";
+	
+	private IMask mask;
+	private int unit = -1;
+	private int referenceSystem = CartographicSupport.WORLD;
+	
+	private int alpha = 255;
+	private Point2D offset = new Point2D.Double();
+	
+	/*
+	 * 
+	 */
+	private double rotation_radians = 0;
+	private Color color = Color.BLACK;
+	
+	private static GeometryManager geoman = GeometryLocator.getGeometryManager();
+
+	/**
+	 * Creates a new instance of CharacterMarker with default values
+	 *
+	 */
+	public CharacterMarkerSymbol() {
+		super();
+	}
+
+	/**
+	 * Creates a new instance of CharacterMarker specifying the marker source
+	 * font, the character code corresponding to the symbol, and the color that
+	 * will be used in rendering time.
+	 *
+	 * @param font -
+	 *            src Font
+	 * @param charCode -
+	 *            character code of the symbol for this font
+	 * @param color -
+	 *            color to be used in when rendering.
+	 */
+	public CharacterMarkerSymbol(Font font, int charCode, Color color) {
+		super();
+		this.font = font;
+		unicode = charCode;
+		setColor(color);
+	}
+	/**
+	 * Returns the font that will be used to define the symbol
+	 * @return font
+	 */
+	public Font getFont() {
+		return font;
+	}
+	/**
+	 * Sets the font that will be used to define the symbol
+	 * @return font
+	 */
+	public void setFont(Font font) {
+		this.font = font;
+	}
+
+	public ISymbol getSymbolForSelection() {
+		if (selectionSymbol == null) {
+			selectionSymbol = (ISymbol) LabelClassUtils.clone(this);
+			selectionSymbol.setColor(MapContext.getSelectionColor());
+		}
+		return selectionSymbol;
+	}
+	
+	
+	public void draw(Graphics2D g,
+			AffineTransform affineTransform, Geometry geom,
+			Feature feat, Cancellable cancel) {
+		
+		g.setColor(getColor());
+		double theta = getRotation();
+
+		int xOffset = (int) getOffset().getX(); // * multiplicador d'unitats;
+		int yOffset = (int) getOffset().getY(); // * multiplicador d'unitats
+
+		double size = getSize();
+		if (size < 0.0001) {
+			return;
+		}
+		
+		org.gvsig.fmap.geom.primitive.Point cen = null;
+		try {
+			cen = geom.centroid();
+		} catch (Exception e) {
+			logger.error("While getting centroid", e);
+		}
+		
+		Point2D p = new Point2D.Double(cen.getX(), cen.getY());
+
+		if (isVisuallyCorrected()) {
+			size *= visualCorrection.sizeScale;
+			p.setLocation(p.getX() - xOffset*size*visualCorrection.xOffsetScale, p.getY() - yOffset*size*visualCorrection.yOffsetScale);
+
+		}
+		g.setFont(getFont().deriveFont((float)size));
+
+		g.translate((int) (p.getX() + xOffset), (int) (p.getY()  + yOffset));
+		if (theta != 0)	g.rotate(theta);
+
+		char[] text = new char[] { (char) unicode };
+
+		IMask mask = getMask();
+		if (mask != null) {
+			FontRenderContext frc = g.getFontRenderContext();
+
+			GlyphVector gv = font.createGlyphVector(frc, text );
+
+			Shape markerShape = gv.getOutline(0, 0);
+			mask.getFillSymbol().
+			 		draw(g, null, mask.getHaloShape(markerShape), feat, cancel);
+
+		}
+		g.drawChars(text, 0, text.length, - (int) (size*0.4), (int) (size*0.4));
+
+
+		if (theta!=0) g.rotate(-theta);
+		g.translate(-(int) (p.getX() + xOffset), - (int) (p.getY() + yOffset));
+	}
+
+
+
+	
+
+	/**
+	 * Sets the unicode for a symbol represented by a character
+	 * @param symbol, int
+	 */
+	public void setUnicode(int symbol) {
+		this.unicode = symbol;
+	}
+
+	/**
+	 * Obtains the unicode for a symbol
+	 * @return unicode, int
+	 */
+	public int getUnicode() {
+		return unicode;
+	}
+
+
+
+	/*
+	public void setXMLEntity(XMLEntity xml) {
+		setColor(StringUtilities.string2Color(xml.getStringProperty("color")));
+		Point p = new Point();
+		p.setLocation(xml.getDoubleProperty("xOffset"), xml.getDoubleProperty("yOffset"));
+
+		setDescription(xml.getStringProperty("desc"));
+		size = xml.getDoubleProperty("size");
+		font = new Font(xml.getStringProperty("font"),
+				xml.getIntProperty("fontStyle"),
+				(int) size);
+		setIsShapeVisible(xml.getBooleanProperty("isShapeVisible"));
+		unicode = xml.getIntProperty("symbolCode");
+		setOffset(p);
+		setRotation(xml.getDoubleProperty("rotation"));
+		setReferenceSystem(xml.getIntProperty("referenceSystem"));
+		setUnit(xml.getIntProperty("unit"));
+	}
+	*/
+
+
+	public double getSize() {
+		return size;
+	}
+
+	public void setSize(double size) {
+		this.size = size;
+		font = new Font(font.getName(), font.getStyle(), (int) Math.round(size));
+	}
+	/**
+	 * Returns true of false depending if the character marker symbol selected is visually
+	 * corrected.That is, if the character has been properly scaled to use a specific number
+	 * of pixels to be represented.
+	 *
+	 * @return boolean
+	 */
+	public boolean isVisuallyCorrected() {
+		return visualCorrection != null;
+	}
+	/**
+	 * Sets the visual correction for a character in order to scale it if it is necessary.
+	 *
+	 * @return boolean
+	 */
+	public void setVisuallyCorrected(boolean visuallyCorrected) {
+		if (visuallyCorrected && visualCorrection == null) {
+			CharacterMarkerSymbol clone =
+					(CharacterMarkerSymbol) LabelClassUtils.clone(this);
+			int frameSize = 200;
+			double symbolSize = 100;
+			BufferedImage bi = new BufferedImage(frameSize, frameSize, BufferedImage.TYPE_INT_ARGB);
+			Graphics2D aGraphics = bi.createGraphics();
+			clone.setOffset(new Point2D.Double(0,0));
+			clone.setSize(symbolSize);
+			clone.setColor(Color.PINK);
+
+
+			// draw it at center of the image
+			org.gvsig.fmap.geom.primitive.Point pCenter = null;
+			try {
+				pCenter = geoman.createPoint(
+						frameSize/2,frameSize/2, SUBTYPES.GEOM2D);
+			} catch (Exception e) {
+				logger.error("While creating point", e);
+			}
+			clone.draw(aGraphics, new AffineTransform(), pCenter, null, null);
+
+			int realTop    = -1;
+			int realBottom = -1;
+			int realLeft   = -1;
+			int realRight  = -1;
+
+			// let's see where the highest pixel is in Y-axis
+			boolean done = false;
+			for (int j = 0; !done && j < bi.getHeight(); j++) {
+				for (int i = 0; !done && i < bi.getWidth(); i++) {
+					if (bi.getRGB(i, j) != 0) {
+						realTop = j;
+						done = true;
+					}
+				}
+			}
+
+			// let's see where the lowest pixel is in Y-axis
+			done = false;
+			for (int j =  bi.getHeight()-1; !done &&  j >= 0; j--) {
+				for (int i = 0; !done &&  i < bi.getWidth(); i++) {
+					if (bi.getRGB(i, j) != 0) {
+						realBottom = i;
+						done = true;
+					}
+				}
+			}
+
+			// let's see where the first pixel at left is in X-axis
+			done = false;
+			for (int i = 0; !done &&  i < bi.getWidth(); i++) {
+				for (int j = 0; !done &&  j < bi.getHeight(); j++) {
+					if (bi.getRGB(i, j) != 0) {
+						realLeft = i;
+						done = true;
+					}
+				}
+			}
+
+			// let's see where the first pixel at right is in X-axis
+			done = false;
+			for (int i = bi.getWidth()-1; !done &&  i >=0 ; i--) {
+				for (int j = 0; !done &&  j < bi.getHeight(); j++) {
+					if (bi.getRGB(i, j) != 0) {
+						realRight = i;
+						done = true;
+					}
+				}
+			}
+			
+			int realWidth = bi.getWidth() - realRight-realLeft;
+			int realHeight = bi.getHeight() - realBottom - realTop;
+
+			visualCorrection = new VisualCorrection();
+			
+			if (realBottom!=-1 && realTop!=-1 && realLeft!=-1 && realRight != -1) {
+				double correctingSize = Math.max(realHeight, realWidth);
+				visualCorrection.sizeScale = clone.getSize() / correctingSize;
+			}
+
+			if (realLeft!=-1 && realRight!=-1) {
+				double correctingCenterX = (((realWidth)*0.5)+realLeft);
+				double correctingCenterY = (((realHeight)*0.5)+realBottom);
+				visualCorrection.xOffsetScale = (pCenter.getX() - correctingCenterX) / frameSize;
+				visualCorrection.yOffsetScale = (pCenter.getY() - correctingCenterY) / frameSize;
+			}
+		} else {
+			visualCorrection = null;
+		}
+	}
+	
+	
+	public Object clone() throws CloneNotSupportedException {
+		return LabelClassUtils.clone(this);
+	}
+	
+	
+	public void getPixExtentPlus(
+			Geometry geom, float[] distances,
+			ViewPort viewPort, int dpi) {
+		
+		float cs = (float) getCartographicSize(viewPort, dpi, geom);
+		distances[0] = cs;
+		distances[1] = cs;
+	}
+
+	public boolean isOneDotOrPixel(Geometry geom,
+			double[] positionOfDotOrPixel, ViewPort viewPort, int dpi) {
+
+		int type = geom.getType();
+		switch (type) {
+		case Geometry.TYPES.NULL:
+		case Geometry.TYPES.POINT:
+		case Geometry.TYPES.MULTIPOINT:
+			return false;
+		default:
+			org.gvsig.fmap.geom.primitive.Envelope geomBounds = geom
+			.getEnvelope();
+
+			double dist1Pixel = viewPort.getDist1pixel();
+
+			float[] distances = new float[2];
+			this.getPixExtentPlus(geom, distances, viewPort, dpi);
+
+			boolean onePoint =
+					(geomBounds.getLength(0) + distances[0] <= dist1Pixel && geomBounds
+					.getLength(1)
+					+ distances[1] <= dist1Pixel);
+
+			if (onePoint) {
+				Envelope bounds = geom.getEnvelope();
+				positionOfDotOrPixel[0] = bounds.getMinimum(0);
+				positionOfDotOrPixel[1] = bounds.getMinimum(1);
+			}
+			return onePoint;
+		}
+	}
+	
+	public int getOnePointRgb() {
+		return this.getColor().getRGB();
+	}
+
+	public String getDescription() {
+		return desc;
+	}
+
+	public boolean isShapeVisible() {
+		return isShapeVisible;
+	}
+
+	public void setDescription(String d) {
+		desc = d;
+	}
+
+	public int getSymbolType() {
+		return Geometry.TYPES.POINT;
+	}
+
+	public boolean isSuitableFor(Geometry geom) {
+		return geom.getType() == Geometry.TYPES.POINT
+				|| geom.getType() == Geometry.TYPES.MULTIPOINT;
+	}
+
+	public void drawInsideRectangle(Graphics2D g,
+			AffineTransform scaleInstance, Rectangle r,
+			PrintAttributes properties) throws SymbolDrawingException {
+		
+		
+		org.gvsig.fmap.geom.primitive.Point center = null;
+		try {
+			center = geoman.createPoint(
+					r.getCenterX(), r.getCenterY(), SUBTYPES.GEOM2D);
+		} catch (CreateGeometryException e) {
+			throw new SymbolDrawingException(TYPES.POINT);
+		}
+
+		if (properties==null) {
+			draw(g, scaleInstance, center, null, null);
+		} else {
+			double originalSize = getSize();
+			double size=originalSize;
+			int pq = properties.getPrintQuality();
+			if (pq == PrintAttributes.PRINT_QUALITY_HIGH) {
+				size *= (double) 600/72;
+			} else {
+				if (pq == PrintAttributes.PRINT_QUALITY_NORMAL) {
+					size *= (double) 300/72;
+				} else {
+//					unitFactor *= 72; (which is the same than doing nothing)
+				}
+			}
+			setSize(size);
+			print(g, scaleInstance, center, properties);
+			setSize(originalSize);
+		}
+		
+	}
+
+
+	public void print(Graphics2D g, AffineTransform at, Geometry geom,
+			PrintAttributes properties) {
+
+		/* TODO Use this?
+		double dpi = 100;
+		int pq = properties.getPrintQuality();
+		if (pq == PrintAttributes.PRINT_QUALITY_NORMAL){
+			dpi = 300;
+		} else if (pq == PrintAttributes.PRINT_QUALITY_HIGH){
+			dpi = 600;
+		} else if (pq == PrintAttributes.PRINT_QUALITY_DRAFT){
+			dpi = 72;
+		}
+		*/
+
+		draw(g,at,geom,null,null);	
+	}
+
+	public void setUnit(int unitIndex) {
+		unit = unitIndex;
+	}
+
+	public int getUnit() {
+		return unit;
+	}
+
+	public int getReferenceSystem() {
+		return this.referenceSystem;
+	}
+
+	public void setReferenceSystem(int rs) {
+		this.referenceSystem = rs;
+	}
+
+	public double toCartographicSize(ViewPort viewPort, double dpi,
+			Geometry geom) {
+		
+		double oldSize = getSize();
+		setCartographicSize(getCartographicSize(viewPort, dpi, geom), geom);
+		return oldSize;	}
+
+	public void setCartographicSize(double cartographicSize, Geometry geom) {
+		setSize(cartographicSize);
+	}
+
+	public double getCartographicSize(ViewPort viewPort, double dpi,
+			Geometry geom) {
+		
+		return SymbolUtils.getCartographicLength(this,
+									  getSize(),
+									  viewPort,
+									  dpi);
+	}
+
+	public double getRotation() {
+		return rotation_radians;
+	}
+
+	public void setRotation(double rot) {
+		rotation_radians = rot;
+	}
+
+	public Point2D getOffset() {
+		return offset;
+	}
+
+	public void setOffset(Point2D off) {
+		offset = off;
+	}
+
+	public Color getColor() {
+		return color;
+	}
+
+	public void setColor(Color co) {
+		color = co;
+	}
+
+	public void setAlpha(int a) {
+		alpha = a;
+	}
+
+	public IMask getMask() {
+		return mask;
+	}
+
+	public void setMask(IMask m) {
+		mask = m;
+	}
+	
+	// =========================================
+	
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		
+		if (state.hasValue("vc_xOffsetScale")) {
+			this.visualCorrection = new VisualCorrection();
+			this.visualCorrection.xOffsetScale = state.getDouble("vc_xOffsetScale");
+			this.visualCorrection.yOffsetScale = state.getDouble("vc_yOffsetScale");
+			this.visualCorrection.sizeScale = state.getDouble("vc_sizeScale");
+		} else {
+			this.visualCorrection = null;
+		}
+		if (state.hasValue("mask")) {
+			this.mask = (IMask) state.get("mask");
+		} else {
+			this.mask = null;
+		}
+		// ==============================================
+		this.color = (Color) state.get("color");
+		this.font = (Font) state.get("font");
+		
+		double aux = state.getDouble("size");
+		this.setSize(aux);
+		
+		this.unicode = state.getInt("unicode");
+		this.desc = state.getString("desc");
+		this.isShapeVisible = state.getBoolean("isShapeVisible");
+		
+		double x = state.getDouble("xOffset");
+		double y = state.getDouble("yOffset");
+		this.offset = new Point2D.Double(x, y);
+		
+		this.rotation_radians = state.getDouble("rotation");
+		this.unit = state.getInt("unit");
+		this.referenceSystem = state.getInt("referenceSystem");		
+	}
+
+	public void saveToState(PersistentState state) throws PersistenceException {
+		
+		if (this.visualCorrection != null) {
+			state.set("vc_xOffsetScale", this.visualCorrection.xOffsetScale);
+			state.set("vc_yOffsetScale", this.visualCorrection.yOffsetScale);
+			state.set("vc_sizeScale", this.visualCorrection.sizeScale);
+		}
+		if (this.mask != null) {
+			state.set("mask", this.mask);
+		}
+		// ==================================================
+		state.set("color", this.color);
+		state.set("font", this.font);
+		state.set("size", this.size);
+		state.set("unicode", this.unicode);
+		state.set("desc", this.desc);
+		state.set("isShapeVisible", this.isShapeVisible);
+		state.set("xOffset", this.offset.getX());
+		state.set("yOffset", this.offset.getY());
+		state.set("rotation", this.rotation_radians);
+		state.set("unit", this.unit);
+		state.set("referenceSystem", this.referenceSystem);		
+	}
+	
+	public static void registerPersistent() {
+		
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		if( manager.getDefinition(CHARACTER_MARKER_SYMBOL_PERSISTENCE_NAME)==null ) {
+			DynStruct definition = manager.addDefinition(
+					CharacterMarkerSymbol.class,
+					CHARACTER_MARKER_SYMBOL_PERSISTENCE_NAME,
+					CHARACTER_MARKER_SYMBOL_PERSISTENCE_NAME+" Persistence definition",
+					null, 
+					null
+			);
+			
+			definition.addDynFieldObject("color").setClassOfValue(Color.class).setMandatory(true);
+			definition.addDynFieldObject("font").setClassOfValue(Font.class).setMandatory(true);
+			definition.addDynFieldDouble("size").setMandatory(true);
+			definition.addDynFieldInt("unicode").setMandatory(true);
+			definition.addDynFieldString("desc").setMandatory(true);
+			definition.addDynFieldBoolean("isShapeVisible").setMandatory(true);
+			definition.addDynFieldDouble("xOffset").setMandatory(true);
+			definition.addDynFieldDouble("yOffset").setMandatory(true);
+			definition.addDynFieldDouble("rotation").setMandatory(true);
+			definition.addDynFieldInt("unit").setMandatory(true);
+			definition.addDynFieldInt("referenceSystem").setMandatory(true);
+			definition.addDynFieldObject("mask").setClassOfValue(IMask.class).setMandatory(false);
+			// =====================
+			definition.addDynFieldDouble("vc_xOffsetScale").setMandatory(false);
+			definition.addDynFieldDouble("vc_yOffsetScale").setMandatory(false);
+			definition.addDynFieldDouble("vc_sizeScale").setMandatory(false);
+		}		
+	}
+
+
+	/**
+	 * Class to be used for the methods that control the visual correction of a character.
+	 * This visual correction has the responsibility of modify the dimensions of the
+	 * character to be used as a symbol(in case that the user wants to use more or less
+	 * pixels to represent it )
+	 *
+	 */
+	private class VisualCorrection {
+		double xOffsetScale = 1;
+		double yOffsetScale = 1;
+		double sizeScale = 1;
+	}
+		
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/SymbolUtils.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/SymbolUtils.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/SymbolUtils.java	(revision 40911)
@@ -0,0 +1,47 @@
+package org.gvsig.labeling.symbol;
+
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport;
+
+public class SymbolUtils {
+	
+	/**
+	 * Calculates the distance in pixels corresponding to the provided length,
+	 * according to the current rendering context (output dpi, map scale, map units) and the
+	 * symbol cartographic settings (unit, size, and unit reference system).
+	 *
+	 * @param cartographicElement CartographicSupport object which contains the reference system
+	 * and the measuring units for the provided length
+	 * @param length The length to be computed in pixels. The length is supposed to be
+	 * provided in the units defined in the cartographicElement
+	 * @param viewPort The viewport, which defines the relationship between pixels and maps units
+	 * @param dpi The resolution (dots per inch) of the target display device
+	 * (printer, screen, etc)
+	 * @return The distance in pixels corresponding to the provided length
+	 */
+	public static double getCartographicLength(
+			CartographicSupport cartographicElement,
+			double length, ViewPort viewPort, double dpi) {
+		
+		int unit = cartographicElement.getUnit();
+		double lengthInPixel = length;
+
+		if (unit != -1) {
+			double[] trans2Meter=MapContext.getDistanceTrans2Meter();
+			if (cartographicElement.getReferenceSystem() == CartographicSupport.WORLD) {
+				double dist1PixelInMeters = viewPort.getDist1pixel()*trans2Meter[viewPort.getMapUnits()];
+				double realWidthMeter = length*trans2Meter[unit];
+				lengthInPixel = realWidthMeter/dist1PixelInMeters;
+			} else if (cartographicElement.getReferenceSystem() == CartographicSupport.PAPER) {
+				double lengthInInches = 1/trans2Meter[7]*trans2Meter[unit]*length;
+				lengthInPixel = lengthInInches*dpi;
+			}
+		} else{
+			double scale=dpi/72;
+			lengthInPixel=lengthInPixel*scale;
+		}
+		return  (lengthInPixel);
+
+	}
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_el.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_el.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_el.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [el]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=
+above=
+accept=\u0391\u03c0\u03bf\u03b4\u03bf\u03c7\u03ae
+accessing_file_structure=
+add=\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7
+add_class=
+add_expression=
+add_field=\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c0\u03b5\u03b4\u03af\u03bf\u03c5
+add_operator=
+add_text_area=
+all_features=
+all_supported_background_image_formats=
+allow_label_overlapping=
+always_circular=
+always_horizontal=
+always_straight=
+angle=\u0393\u03c9\u03bd\u03af\u03b1
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=
+at_best=
+at_end=
+at_fields=
+background=
+background_color=\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5
+background_style=
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=
+bitmap_and_svg_image_files=
+boolean_value=\u03a4\u03b9\u03bc\u03ae Boolean
+browse=\u03a0\u03bb\u03bf\u03ae\u03b3\u03b7\u03c3\u03b7
+buffered=
+cancel=\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7
+cannot_apply_to_a_non_polygon_layer=\u0391\u03b4\u03cd\u03bd\u03b1\u03c4\u03b7 \u03b7 \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae \u03c3\u03b5 \u03bc\u03b7 \u03c0\u03bf\u03bb\u03c5\u03b3\u03c9\u03bd\u03b9\u03ba\u03cc \u03b5\u03c0\u03af\u03c0\u03b5\u03b4\u03bf
+cannot_be_null=
+cannot_exist_two_label_classes_with_the_same_name=
+cannot_install_labeling_method=
+cant_draw_preview=
+change_location=
+character_marker=\u0395\u03c0\u03b9\u03c3\u03ae\u03bc\u03b1\u03bd\u03c3\u03b7 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd
+character_marker_symbol=\u03a3\u03cd\u03bc\u03b2\u03bf\u03bb\u03bf \u03b5\u03c0\u03b9\u03c3\u03ae\u03bc\u03b1\u03bd\u03c3\u03b7\u03c2 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd
+choose_marker=\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03b5\u03c0\u03b9\u03c3\u03ae\u03bc\u03b1\u03bd\u03c3\u03b7\u03c2
+circular=
+class=
+classes=
+classifying_field_name_not_found=
+clear=\u0395\u03ba\u03ba\u03b1\u03b8\u03ac\u03c1\u03b9\u03c3\u03b7
+color=\u03a7\u03c1\u03ce\u03bc\u03b1\:
+color_field=
+color_ramp=
+confirmation_dialog=\u0394\u03b9\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2 \u03b5\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03af\u03c9\u03c3\u03b7\u03c2
+constant=
+correct_expression=
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=\u0391\u03b4\u03cd\u03bd\u03b1\u03c4\u03b7 \u03b7 \u03b5\u03b3\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03c4\u03bf\u03c5 \u03c5\u03c0\u03bf\u03bc\u03bd\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2. \u03a0\u03b1\u03c1\u03b1\u03ba\u03b1\u03bb\u03ce \u03bd\u03b1 \u03b5\u03bb\u03ad\u03b3\u03be\u03b5\u03c4\u03b5 \u03c4\u03b9\u03c2 \u03c4\u03b9\u03bc\u03ad\u03c2.
+date_value=\u03a4\u03b9\u03bc\u03ae \u03b7\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1\u03c2
+default=\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=\u039a\u03b1\u03b8\u03bf\u03c1\u03af\u03b6\u03b5\u03b9 \u03ad\u03bd\u03b1 \u03c3\u03cd\u03bc\u03b2\u03bf\u03bb\u03bf \u03c3\u03b7\u03bc\u03b5\u03b9\u03b1\u03ba\u03ae\u03c2 \u03c0\u03c5\u03ba\u03bd\u03cc\u03c4\u03b7\u03c4\u03b1\u03c2 \u03b2\u03ac\u03c3\u03b7 \u03bc\u03b9\u03b1\u03c2 \u03c4\u03b9\u03bc\u03ae\u03c2 \u03c0\u03b1\u03c1\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf\u03c5 \u03c0\u03b5\u03b4\u03af\u03bf\u03c5 
+delete=
+delete_class=
+delete_filter_expression=
+densities=\u03a0\u03c5\u03ba\u03bd\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2
+depth_factor=
+description=\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u1f20
+divided_by_0=
+dont_show_labels_when_zoomed=
+dot_density=\u03a0\u03c5\u03ba\u03bd\u03cc\u03c4\u03b7\u03c4\u03b1 \u03ba\u03bf\u03c5\u03ba\u03ba\u03af\u03b4\u03c9\u03bd
+dot_size=\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03ba\u03bf\u03c5\u03ba\u03ba\u03af\u03b4\u03b1\u03c2
+dot_value=\u03a4\u03b9\u03bc\u03ae \u03ba\u03bf\u03c5\u03ba\u03ba\u03af\u03b4\u03b1\u03c2
+draw_quantities_for_each_category=
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=
+edit_expression=
+Enable_layer_preview=
+enter_new_name=
+error=\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=\u0397 \u03bc\u03bf\u03c1\u03c6\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03c4\u03bf\u03c5 \u03c6\u03af\u03bb\u03c4\u03c1\u03bf\u03c5 \u03b5\u03af\u03bd\u03b1\u03b9 \u03bb\u03b1\u03bd\u03b8\u03b1\u03c3\u03bc\u03ad\u03bd\u03b7\: \u03c3\u03c6\u1f00\u03bb\u03bc\u03b1 \u03c3\u03c4\u03b7\u03bd \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7
+error_trying_to_access_to_the_layer=
+error_validating_filter_query=
+expression=
+expression_creator=
+expressions=
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=
+field_number=
+fields=\u03a0\u03b5\u03b4\u03af\u03b1
+fields_exp=
+fill_color=\u03a7\u03c1\u03ce\u03bc\u03b1 \u03b3\u03b5\u03bc\u03af\u03c3\u03bc\u03b1\u03c4\u03bf\u03c2
+fill_properties=\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b3\u03b5\u03bc\u03af\u03c3\u03bc\u03b1\u03c4\u03bf\u03c2
+filter=\u03a6\u03af\u03bb\u03c4\u03c1\u03bf
+filtered_features=
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=
+following_line=
+font=
+foreground_alpha=
+format=\u03a6\u03bf\u03c1\u03bc\u03ac\u03c4
+from=\u0391\u03c0\u03cc
+fuente=\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=
+grid=\u039a\u03ac\u03bd\u03bd\u03b1\u03b2\u03bf\u03c2
+high=\u03a5\u03c8\u03b7\u03bb\u03ae
+horizontal=\u039f\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03bf\u03c2
+ignore_zero_values=
+in_beyond=
+in_layer=
+in_the_middle=
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=
+intervals=
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=
+label-point-priority-help=
+label_class_properties=
+label_expression=
+label_expression_editor=
+label_expression_help=
+label_features_in_the_same_way=
+label_features_in_this_class=
+label_only_when_selected=
+label_priority=
+label_style_could_not_be_painted=
+label_styles=
+labeled_point=
+labeling=
+labeling_field=
+layer_name=\u1f48\u03bd\u03bf\u03bc\u03b1 \u03b5\u03c0\u03b9\u03c0\u03ad\u03b4\u03bf\u03c5
+line=\u0393\u03c1\u03b1\u03bc\u03bc\u03ae
+line_fill=
+line_fill_symbol=
+line_settings=
+lineal=
+lines=
+location=\u03a4\u1f40\u03c0\u03bf\u03c2
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=\u03a7\u03b1\u03bc\u03b7\u03bb\u03ae
+malformed_or_empty_expression=
+marker_fill=\u0395\u03c0\u03b9\u03c3\u03ae\u03bc\u03b1\u03bd\u03c3\u03b7 \u03b3\u03b5\u03bc\u03af\u03c3\u03bc\u03b1\u03c4\u03bf\u03c2
+marker_fill_symbol=
+marker_line=
+marker_line_symbol=
+mas_de_100_simbolos=\u03a0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b1 \u03b1\u03c0\u03cc 100 \u03c3\u03cd\u03bc\u03b2\u03bf\u03bb\u03b1 \u03c3\u03c5\u03bd\u03ae\u03b8\u03c9\u03c2 \u03b4\u03b5\u03bd \u03c0\u03b1\u03c1\u03ad\u03c7\u03bf\u03c5\u03bd \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1 \u03c3\u03b5 \u03ad\u03bd\u03b1\u03bd \u03c7\u03ac\u03c1\u03c4\u03b7
+max_scale=\u039c\u03ad\u03b3\u03b9\u03c3\u03c4\u03b7 \u03ba\u03bb\u03af\u03bc\u03b1\u03ba\u03b1
+medium=\u039c\u03ad\u03c3\u03bf
+method=\u039b\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1
+min_scale=\u0395\u03bb\u03ac\u03c7\u03b9\u03c3\u03c4\u03b7 \u03ba\u03bb\u03af\u03bc\u03b1\u03ba\u03b1
+minimum_angle_to_draw=
+modify_filter_expression=
+move_down=
+move_up=
+name=\u038c\u03bd\u03bf\u03bc\u03b1
+names_and_types_count_are_disctint=
+new_filter_expression=
+no=\u038c\u03c7\u03b9
+no_expression_defined=
+no_style=
+no_symbol_especified=
+none=\u039a\u03b1\u03bd\u03ad\u03bd\u03b1
+normalization=
+not_save_empty_legend=
+numeric_value=\u0391\u03c1\u03b9\u03b8\u03bc\u03b7\u03c4\u03b9\u03ba\u03ae \u03c4\u03b9\u03bc\u03ae
+offset=\u039c\u03b5\u03c4\u03b1\u03c4\u03cc\u03c0\u03b9\u03c3\u03b7
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=
+options=\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2
+orientation=
+orientation_system=
+out_beyond=
+outline=\u03a0\u03b5\u03c1\u03af\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1
+outline_opacity=
+outline_width=\u03a0\u03ac\u03c7\u03bf\u03c2 \u03c0\u03b5\u03c1\u03b9\u03b3\u03c1\u03ac\u03bc\u03bc\u03b1\u03c4\u03bf\u03c2
+page=\u03a3\u03b5\u03bb\u03af\u03b4\u03b1
+parallel=
+pattern=
+percentage=
+perpedicular=
+picture_file=
+picture_fill=
+picture_fill_symbol=
+picture_line_symbol=
+picture_marker=
+picture_marker_symbol=
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=
+place_one_label_per_feature_part=
+placement=
+placement_priorities_selector=
+placement_properties=
+point_settings=
+points=
+polygon=\u03a0\u03bf\u03bb\u03cd\u03b3\u03c9\u03bd\u03bf
+polygon_settings=
+position=
+prefer_top_right_all_allowed=
+preview=\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03c3\u03ba\u03cc\u03c0\u03b7\u03c3\u03b7
+preview_not_available=
+properties=\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2
+proportional_symbols=
+quantity_by_category=
+quiere_continuar=\u0395\u03af\u03c3\u03c4\u03b5 \u03b2\u03ad\u03b2\u03b1\u03b9\u03bf\u03b9 \u03cc\u03c4\u03b9 \u03b8\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03c3\u03c5\u03bd\u03b5\u03c7\u03af\u03c3\u03b5\u03c4\u03b5;
+Quitar=\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7
+Quitar_todos=\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd
+random=\u03a4\u03c5\u03c7\u03b1\u03af\u03bf
+recovering_recordset=
+rectangular=
+remane_class=
+remove=\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7
+remove_duplicate_labels=
+resto_valores=\u039b\u03bf\u03b9\u03c0\u03ad\u03c2 \u03c4\u03b9\u03bc\u03ad\u03c2
+scale=\u039a\u03bb\u03af\u03bc\u03b1\u03ba\u03b1
+scale_range_window_title=
+select=\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae
+select_one_row=
+selection_picture_file=
+separation=\u0394\u03b9\u03b1\u03c7\u03c9\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2
+SLD_grammar=
+some_arguments_are_incorrect=
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=
+statistics=\u03a3\u03c4\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ae
+string_value=\u0391\u03bb\u03c6\u03b1\u03c1\u03b9\u03b8\u03bc\u03b7\u03c4\u03b9\u03ba\u03ae \u03c4\u03b9\u03bc\u03ae
+style=\u03a3\u03c4\u03c5\u03bb
+style_selector=
+symbol=
+symbol_field=
+symbol_shapetype_mismatch=
+syntax_error=
+template=
+text=\u0394\u03bf\u03ba\u03b9\u03bc\u03ae
+text_field=
+text_fields=
+text_string=
+text_symbol=
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=
+the_result_is_not_a_boolean_value=
+to=\u039c\u03ad\u03c7\u03c1\u03b9
+URL=
+use_outline=
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=
+usupported_layer_type=
+value=\u03a4\u03b9\u03bc\u03ae
+value_fields=
+variation_by=
+verify=
+visible=\u039f\u03c1\u03b1\u03c4\u03cc\u03c2
+visualization=
+warning=\u0395\u03b9\u03b4\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7
+width=\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2
+x_offset=
+y_offset=
+yes=\u039d\u03b1\u03b9
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_gl.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_gl.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_gl.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [gl]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=Ser\u00e1 utilizado un s\u00edmbolo por defecto
+above=Arriba
+accept=Aceptar
+accessing_file_structure=Accedendo \u00e1 estructura do arquivo
+add=Engadir
+add_class=Engadir clase
+add_expression=Engadir Expresi\u00f3n
+add_field=Engadir campo
+add_operator=Engadir Operador
+add_text_area=Engadir campo de texto
+all_features=Todos os elementos
+all_supported_background_image_formats=Todos os formatos de imaxe de fondo soportados
+allow_label_overlapping=Permitir superposici\u00f3n das etiquetas
+always_circular=
+always_horizontal=Sempre horizontal
+always_straight=Sempre vertical
+angle=\u00c1ngulo
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Aplicar correcci\u00f3n visual ao car\u00e1cter para precisi\u00f3n en tama\u00f1o e posici\u00f3n.
+arguments_added_to_a_costant=Argumento engadido a unha constante
+at_begin=Ao principio
+at_best=Na mellor
+at_end=Ao final
+at_fields=nos campos
+background=
+background_color=C\u00f3r de fondo
+background_style=Estilo do fondo
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Abaixo
+bitmap_and_svg_image_files=Imaxes SVG e de mapa de bits
+boolean_value=Valor booleano
+browse=Examinar
+buffered=Forma do pol\u00edgono
+cancel=Cancelar
+cannot_apply_to_a_non_polygon_layer=Non se pode aplicar a unha capa non poligonal
+cannot_be_null=Non pode ser nulo
+cannot_exist_two_label_classes_with_the_same_name=Non poden existir d\u00faas etiquetas co mesmo nome
+cannot_install_labeling_method=Non se pode instalar o m\u00e9todo de etiquetado
+cant_draw_preview=Non se pode dibuxar a previsualizaci\u00f3n
+change_location=Cambiar ubicaci\u00f3n
+character_marker=Marcador de car\u00e1cter
+character_marker_symbol=S\u00edmbolo de Marcador de car\u00e1cter
+choose_marker=Seleccionar marcador
+circular=Circular
+class=Clase
+classes=Clases
+classifying_field_name_not_found=Campo de clasificaci\u00f3n non atopado
+clear=Limpar
+color=Cor\:
+color_field=Campo de cores
+color_ramp=Rampa de cor
+confirmation_dialog=Di\u00e1logo de confirmaci\u00f3n
+constant=constante
+correct_expression=Expresi\u00f3n correcta
+could_not_get_shape_type=Non se pudo obter o tipo de xeometr\u00eda.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Non se pudo cargar a lenda
+date_value=Valor data
+default=Por defecto
+define_classes_of_features_and_label_each_differently=Definir diferentes clases de entidades e etiquetala de xeito diferente
+Defines_a_dot_density_symbol_based_on_a_field_value=Define unha lenda de densidade de puntos baseada no valor dun determinado campo.
+delete=Eliminar
+delete_class=Eliminar clase
+delete_filter_expression=Eliminar expresi\u00f3n de filtrado
+densities=Densidades
+depth_factor=
+description=Descripci\u00f3n
+divided_by_0=Divisi\u00f3n por 0
+dont_show_labels_when_zoomed=Non amosar as etiquetas cando se faga zoom
+dot_density=Densidade de puntos
+dot_size=Tama\u00f1o de punto
+dot_value=Valor do punto
+draw_quantities_for_each_category=Representa cantidades para cada categor\u00eda.
+draw_quantities_using_symbol_size_to_show_exact_values=Representa cantidades ao trav\u00e9s do tama\u00f1o do s\u00edmbolo amosando valores exactos
+draw_quantities_using_symbol_size_to_show_relative_values=Representa cantidades mediante o tama\u00f1o dun s\u00edmbolo amosando valores relativos.
+duplicate_labels=Etiquetas repetidas
+edit_expression=Editar expresi\u00f3n
+Enable_layer_preview=Activar previsualizaci\u00f3n da capa
+enter_new_name=Introduzca o novo nome
+error=Erro
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Filtro con formato incorrecto\: erro ao codificar
+error_trying_to_access_to_the_layer=Erro ao tentar acceder \u00e1 capa
+error_validating_filter_query=Erro ao validar a consulta SQL
+expression=Expresi\u00f3n
+expression_creator=Crear expresi\u00f3n de filtrado
+expressions=Expresi\u00f3ns
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Erro aplicando o etiquetado seguindo a li\u00f1a. Utilizarase a configuraci\u00f3n por defecto
+failed_computing_intervals=Erro ao calcular intervalos
+features=Obxectos
+field_number=N\u00famero de campo
+fields=Campos
+fields_exp=Campos
+fill_color=Cor de recheo
+fill_properties=Propiedade de recheo
+filter=Filtro
+filtered_features=Elementos filtrados
+fit_inside_polygon=Acoplar dentro do pol\u00edgono
+fit_on_text_area=Axustar o \u00e1rea de texto
+fixed_text_size=Tama\u00f1o fixo do texto
+following_line=Seguindo a li\u00f1a
+font=Fonte
+foreground_alpha=
+format=Formato
+from=Dende
+fuente=Fonte
+GeneralLabeling.sample_text=
+generating_intervals=A Xerar Intervalos
+getting_layer_shape_type=A obter o tipo de shape
+gradient_color=Cor gradente
+gradient_fill=Recheo gradente
+gradient_fill_symbol=S\u00edmbolo de recheo gradente
+graduated_symbols=S\u00edmbolos graduados
+grid=Grella
+high=Alta
+horizontal=Horizontal
+ignore_zero_values=
+in_beyond=Por baixo de
+in_layer=na capa
+in_the_middle=Na metade
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Expresi\u00f3n incorrecta
+intervals=Intervalos
+invalid_filter_expression=
+invalid_url=Localizador de servidor WFS con formato non v\u00e1lido.
+it_will_not_be_added=Non ser\u00e1 engadida
+label-point-priority-help=Prioridade\: 0 \= Bloqueado, 1 \= M\u00e1is alta, 3 \= M\u00e1is baixa
+label_class_properties=Propiedades da clase de etiquetado
+label_expression=Expresi\u00f3n de etiquetado
+label_expression_editor=Editor de expresi\u00f3ns de etiqueta
+label_expression_help=
+label_features_in_the_same_way=Etiquetar todas as entidades do mesmo xeito
+label_features_in_this_class=Etiquetar entidades dentro desta clase
+label_only_when_selected=Etiquetar soamente cando as s\u00faas entidades est\u00e9n seleccionadas
+label_priority=Prioridade no etiquetado
+label_style_could_not_be_painted=
+label_styles=Estilos de etiqueta
+labeled_point=
+labeling=Etiquetado
+labeling_field=Campo de etiquetado
+layer_name=Nome da capa
+line=Li\u00f1a
+line_fill=Encher li\u00f1as
+line_fill_symbol=S\u00edmbolo de recheo de li\u00f1as
+line_settings=Configuraci\u00f3n da li\u00f1a
+lineal=Lineal
+lines=Li\u00f1as
+location=Ubicaci\u00f3n
+location_along_the_lines=Ubicaci\u00f3n ao longo das li\u00f1as
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Parece un valor para o punto demasiado baixo, pode causar que o sistema responda de xeito lento.
+low=Baixa
+malformed_or_empty_expression=Expresi\u00f3n valeira ou err\u00f3nea
+marker_fill=Recheo de marcadores
+marker_fill_symbol=S\u00edmbolo de recheo de marcadores
+marker_line=Li\u00f1a de marcadores
+marker_line_symbol=S\u00edmbolo de Li\u00f1a de marcadores
+mas_de_100_simbolos=M\u00e1is de 100 s\u00edmbolos non adoitan aportar informaci\u00f3n nun plano
+max_scale=Escala m\u00e1xima
+medium=Media
+method=Operaci\u00f3n
+min_scale=Escala m\u00ednima
+minimum_angle_to_draw=
+modify_filter_expression=Modificar expresi\u00f3n de filtrado
+move_down=Baixar
+move_up=Subir
+name=Nome
+names_and_types_count_are_disctint=N\u00famero de campos e n\u00famero de tipos de campos distintos
+new_filter_expression=Nova expresi\u00f3n de filtrado
+no=Non
+no_expression_defined=Expresi\u00f3n non definida
+no_style=Sen estilo
+no_symbol_especified=S\u00edmbolo non especificado
+none=Nada
+normalization=Normalizaci\u00f3n
+not_save_empty_legend=Lenda vac\u00eda, non se gardar\u00e1.
+numeric_value=Valor num\u00e9rico
+offset=Desprazamento
+offset_label=Desprazar etiqueta
+offset_labels_horizontally=Desprazar etiquetas horizontalmente ao redor do punto
+offset_labels_on_top_of_the_points=Situar etiquetas sobre os puntos.
+on_the_line=Sobre a li\u00f1a
+operators=Operadores
+options=Opci\u00f3ns
+orientation=Orientaci\u00f3n
+orientation_system=Orientaci\u00f3n
+out_beyond=Por riba de
+outline=Marxe
+outline_opacity=Opacidade da marxe
+outline_width=Ancho da marxe
+page=P\u00e1xina
+parallel=Paralela
+pattern=Patr\u00f3n
+percentage=Porcentaxe
+perpedicular=Perpendicular
+picture_file=Arquivo imaxe
+picture_fill=Recheo de imaxe
+picture_fill_symbol=S\u00edmbolo de recheo de imaxe
+picture_line_symbol=S\u00edmbolo de li\u00f1a de imaxe
+picture_marker=Marcador de imaxe
+picture_marker_symbol=S\u00edmbolo de marcador de imaxe
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Situar unha \u00fanica etiqueta por entidade
+place_one_label_per_feature_part=Situar unha etiqueta por cada parte da entidade
+placement=Ubicaci\u00f3n
+placement_priorities_selector=Selector de prioridades de ubicaci\u00f3n
+placement_properties=Propiedades de ubicaci\u00f3n
+point_settings=Configuraci\u00f3n de punto
+points=Puntos
+polygon=Pol\u00edgono
+polygon_settings=Configuraci\u00f3n de pol\u00edgono
+position=Posici\u00f3n
+prefer_top_right_all_allowed=Preferentemente arriba \u00e1 dereita, pero permitindo calquer ubicaci\u00f3n
+preview=Previsualizaci\u00f3n
+preview_not_available=Vista previa non dispo\u00f1ible
+properties=Propiedades
+proportional_symbols=S\u00edmbolos proporcionais
+quantity_by_category=Cantidades por categor\u00eda
+quiere_continuar=Est\u00e1 seguro de que quere continuar?
+Quitar=Quitar
+Quitar_todos=Quitar todos
+random=Aleatorio
+recovering_recordset=A recuperar recordset
+rectangular=Rectangular
+remane_class=Renomear clase
+remove=Quitar
+remove_duplicate_labels=Eliminar etiquetas repetidas
+resto_valores=Resto de valores
+scale=Escalar
+scale_range_window_title=Rango de escalas
+select=Seleccionar
+select_one_row=Seleccione unha fila
+selection_picture_file=Imaxe de selecci\u00f3n
+separation=Separaci\u00f3n
+set_forbidden_precedence=Establecer precedencia nula
+set_high_precedence=Establecer m\u00e1xima precedencia
+set_low_precedence=Establecer baixa precedencia
+set_normal_precedence=Establecer precedencia normal
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Amosa os elementos da capa en funci\u00f3n dunha determinada expresi\u00f3n de filtrado
+size=Tama\u00f1o
+SLD_grammar=Gram\u00e1tica SLD
+some_arguments_are_incorrect=Alg\u00fans comentarios son incorrectos
+specify_the_range_of_scales_at_which_labels_will_be_shown=Especificar o rango de escalas no que as etiquetas ser\u00e1n amosadas
+SQL_query=Sentencia SQL
+statistics=Estat\u00edsticas
+string_value=Valor String
+style=Estilo
+style_selector=Selector de estilos
+symbol=S\u00edmbolo
+symbol_field=Campo de s\u00edmbolo graduado
+symbol_shapetype_mismatch=
+syntax_error=Erro de sintaxis
+template=Patr\u00f3n
+text=Texto
+text_field=Texto
+text_fields=Campos de texto
+text_string=Texto
+text_symbol=S\u00edmbolo de texto
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=O n\u00famero de argumentos non \u00e9 correcto
+the_result_is_not_a_boolean_value=O resultado non \u00e9 un boolean
+to=Hata
+URL=
+use_outline=Usar borde
+use_the_same_scale_range_as_the_feature_layer=Usar o mesmo rango de escalas que o elemento da capa
+user_defined_labels=Etiquetas definidas polo usuario
+usupported_layer_type=Tipo de capa non soportado
+value=Valor
+value_fields=Campos de valores
+variation_by=Variaci\u00f3n por
+verify=Verificar
+visible=Visible
+visualization=Visualizaci\u00f3n
+warning=Aviso
+width=Ancho
+x_offset=Desprazamento en X
+y_offset=Desprazamento en Y
+yes=Si
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties	(revision 40911)
@@ -0,0 +1,318 @@
+#Translations for language [en]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=A default symbol will be used
+above=Above
+accept=Accept
+accessing_file_structure=Acessing file structure
+add=Add
+add_class=Add class
+add_expression=Add expression
+add_field=Add field
+add_operator=Add operator
+add_text_area=Add text area
+all_features=All features
+all_supported_background_image_formats=All supported background image formats
+allow_label_overlapping=Allow label overlapping
+always_circular=
+always_horizontal=Always horizontal
+always_straight=Always straight
+angle=Angle
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Apply visual correction to glyph for precise size and positioning
+arguments_added_to_a_costant=Arguments added to a constant
+at_begin=At begin
+at_best=At best
+at_end=At end
+at_field=at field
+at_fields=at fields
+background=Background\:
+background_color=Background color
+background_style=Background Style
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Below
+bitmap_and_svg_image_files=Bitmaps and SVG image files
+boolean_value=Boolean value
+browse=Browse
+buffered=Buffered
+cancel=Cancel
+cannot_apply_to_a_non_polygon_layer=Cannot apply to a non-polygon layer
+cannot_be_null=Cannot be null
+cannot_exist_two_label_classes_with_the_same_name=Cannot exist two label classes with the same name
+cannot_install_labeling_method=Cannot install the labeling method
+cant_draw_preview=Can't draw preview
+Capa=Layer
+change_location=Change location
+character_marker=Character marker
+character_marker_symbol=Character marker symbol
+choose_marker=Choose marker
+circular=Circular
+class=Class
+classes=Classes
+classifying_field_name_not_found=Classifying field name not found
+clear=Clear
+color=Color\:
+color_field=Color field
+color_ramp=Color ramp
+confirmation_dialog=Confirmation dialog
+constant=Constant
+correct_expression=Correct expression
+could_not_get_shape_type=Could not get shape type.
+could_not_restore_color_field=Could not restore color field.
+could_not_restore_rotation_field=Could not restore rotation field.
+could_not_restore_text_field=Could not restore text field.
+could_not_restore_text_height_field=Could not restore text height field.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Could not setup the legend
+date_value=Date value
+default=Default
+define_classes_of_features_and_label_each_differently=Define classes of features and label each differently
+Defines_a_dot_density_symbol_based_on_a_field_value=Defines a dot density symbol based on the value of a field
+delete=Delete
+delete_class=Delete class
+delete_filter_expression=Delete filter expression
+densities=Densities
+depth_factor=
+description=Description
+divided_by_0=Divided by 0
+dont_show_labels_when_zoomed=Dont show labels when zoomed
+dot_density=Dot density
+dot_size=Dot size
+dot_value=Dot value
+draw_quantities_for_each_category=Draw quantities for each category.
+draw_quantities_using_symbol_size_to_show_exact_values=Draws quantities using symbol size to show exact values.
+draw_quantities_using_symbol_size_to_show_relative_values=Draws quantities using symbol size to show relative values.
+duplicate_labels=Duplicate layers
+edit_expression=Edit expression
+enable_labeling=Enable labeling
+Enable_layer_preview=Enable layer preview
+enter_new_name=Enter new name
+error=Error
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Error parsing SQL query.
+error_trying_to_access_to_the_layer=Error trying to access to the layer
+error_validating_filter_query=Error validating SQL query.
+Etiquetados=Labelling
+expression=Expression
+expression_creator=Expression creator
+expressions=Expressions
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Failed applying following line labeling.It will use the default configuration
+failed_computing_intervals=Failed to compute intervals.
+false=False
+features=Features
+field_number=Field number
+field_to_be_labeled=Field to be labeled
+fields=Fields
+fields_exp=Fields
+fill_color=Fill color
+fill_properties=Fill properties
+filter=Filter
+filtered_features=Filtered features
+fit_inside_polygon=Fit inside polygon
+fit_on_text_area=Fit on text area
+fixed_color=Fixed color
+fixed_height=Fixed height
+fixed_text_size=Fixed text size
+following_line=Following the line
+font=Font
+foreground_alpha=
+format=Format
+from=From
+fuente=Font
+general=General
+GeneralLabeling.sample_text=
+generating_intervals=Generating Intervals
+getting_layer_shape_type=Getting layer shape type
+gradient_color=Gradient color
+gradient_fill=Gradient fill
+gradient_fill_symbol=Gradient fill symbol
+graduated_symbols=Graduated symbols
+grid=Grid
+high=High
+horizontal=Horizontal
+ignore_zero_values=
+in_beyond=In beyond
+in_layer=in layer
+in_the_middle=In the middle
+in_the_world=In the world
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Incorrect expression
+intervals=Intervals
+invalid_filter_expression=
+invalid_url=Invalid format in WFS server URL.
+it_will_not_be_added=It will not be added
+label-point-priority-help=Priority\: 0 \= Blocked, 1 \= Highest, 3 \= Lowest
+label_attributes_defined_in_table=Label attributes defined in table
+label_class_properties=Label class properties
+label_expression=Label expression
+label_expression_editor=Label expression editor
+label_expression_help=
+label_features_in_the_same_way=Label features in the same way
+label_features_in_this_class=Label features in this class
+label_only_when_selected=Label only when the feature is selected
+label_priority=Label priority
+label_style_could_not_be_painted=
+label_styles=Label styles
+labeled_point=
+labeling=Labeling
+labeling_field=Labeling field
+layer_name=Layer name
+layer_Selector=Layer Selector
+line=Line
+line_fill=Line fill
+line_fill_symbol=Line fill symbol
+line_settings=Line settings
+lineal=Lineal
+lines=Lines
+location=Location
+location_along_the_lines=Location along the lines
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Looks like too low value for this field. May cause the system to run slow.
+low=Low
+malformed_or_empty_expression=Malformed or empty expression
+marker_fill=Marker fill
+marker_fill_symbol=Marker fill symbol
+marker_line=Marker line
+marker_line_symbol=Marker line symbol
+mas_de_100_simbolos=More than 100 symbols usually do not give any information in a map
+max_scale=Max. scale
+medium=Medium
+method=Method
+min_scale=Min. scale
+minimum_angle_to_draw=
+modify_filter_expression=Modify Filter Expression
+move_down=Move down
+move_up=Move up
+name=Name
+names_and_types_count_are_disctint=Names and types count are disctint
+new_filter_expression=New filter expression
+no=No
+no_expression_defined=No expression defined
+no_style=No Style
+no_symbol_especified=No symbol specified
+none=none
+normalization=Normalization
+not_save_empty_legend=Cannot save an empty legend.
+numeric_or_boolean_value=Numeric or boolean value
+numeric_value=Numeric value
+offset=Offset
+offset_label=Offset label
+offset_labels_horizontally=Offest labels horizontally around the point.
+offset_labels_on_top_of_the_points=Offset labels on top of the points
+on_the_line=On the line
+operand=Operand
+operation_not_allowed_for_SingleLabelingStrategy=Operation not allowed for Single Labeling Strategy
+operators=Operators
+options=Options
+orientation=Orientation
+orientation_system=Orientation system
+out_beyond=Out beyond
+outline=Outline
+outline_opacity=Outline opacity
+outline_width=Border width
+page=Page
+parallel=Parallel
+pattern=Pattern
+percentage=Percentage
+perpedicular=Perpendicular
+picture_file=Picture file
+picture_fill=Picture fill
+picture_fill_symbol=Picture fill symbol
+picture_line_symbol=Picture line symbol
+picture_marker=Picture marker
+picture_marker_symbol=Picture marker symbol
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Place one label per feature
+place_one_label_per_feature_part=Place one label per feature part
+placement=Placement
+placement_priorities_selector=Placement priorities selector
+placement_properties=Placement properties
+point_settings=Point settings
+points=Points
+polygon=Polygon
+polygon_settings=Polygon settings
+position=Position
+prefer_top_right_all_allowed=Preferable at the right top corner, but all positions are allowed
+preview=Preview
+preview_not_available=Preview is not available
+properties=Properties
+proportional_symbols=Proportional symbols
+quantity_by_category=Quantity by category
+quiere_continuar=Would you like to continue?
+Quitar=Remove
+Quitar_todos=Remove all
+random=Random
+recovering_recordset=Recovering recordset.
+rectangular=Rectangular
+remane_class=Rename class
+remove=Remove
+remove_duplicate_labels=Remove duplicate labels
+resto_valores=Other values
+rotation_height=Rotation field
+scale=Scale
+scale_range_window_title=Scale Range
+select=Select
+select_one_row=Select one row
+selection_picture_file=Selection picture file
+separation=Separation
+set_forbidden_precedence=Set forbidden precedence
+set_high_precedence=Set high precedence
+set_low_precedence=Set low precedence
+set_normal_precedence=Set normal precedence
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Shows the elements of the layer depending on the value of a filter expression
+simple_marker=Simple marker
+single_labeling=Single labeling
+single_labeling_setup=Single labeling setup
+size=Size
+SLD_grammar=SLD grammar
+some_arguments_are_incorrect=Some arguments are incorrect
+specify_the_range_of_scales_at_which_labels_will_be_shown=Specify the range of scales at which labels will be shown
+SQL_query=SQL query
+statistics=Statistics
+string_value=String value
+style=Style
+style_selector=Style Selector
+symbol=Symbol
+symbol_field=Symbol field
+symbol_shapetype_mismatch=
+syntax_error=Syntax error
+template=Template
+text=Text
+text_field=Text
+text_fields=Text fields
+text_height_field=Text height field
+text_string=Text
+text_symbol=Text symbol
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=The number of arguments is not correct
+the_result_is_not_a_boolean_value=The result is not a boolean value
+to=To
+Tools_Select=Tools select
+true=True
+units=Units
+URL=
+use_default_symbol=Default symbol
+use_outline=Use outline
+use_the_same_scale_range_as_the_feature_layer=Use the same scale range as the feature layer
+user_defined_labels=User defined labels
+usupported_layer_type=Unsupported layer type
+value=Value
+value_fields=Fields with values
+variation_by=Variation by
+verify=Verify
+visible=Visible
+visualization=Visualization
+warning=Warning
+width=Width
+x_offset=X offset
+y_offset=Y offset
+yes=Yes
+_Set_new_background_image=Set background image
+_Set_label_offset=Set label offset
+_Expressions_are_correct=Expressions are valid
+_Use_halo=Use halo
+_Halo_width=Halo width
+
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_cs.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_cs.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_cs.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [cs]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=
+above=
+accept=Budi\u017e
+accessing_file_structure=
+add=P\u0159idat
+add_class=
+add_expression=
+add_field=P\u0159idej atribut
+add_operator=
+add_text_area=
+all_features=
+all_supported_background_image_formats=
+allow_label_overlapping=
+always_circular=
+always_horizontal=
+always_straight=
+angle=
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=
+at_best=
+at_end=
+at_fields=
+background=
+background_color=Barva pozad\u00ed
+background_style=
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=
+bitmap_and_svg_image_files=
+boolean_value=Boolean hodnota
+browse=Vyhledej
+buffered=
+cancel=Zru\u0161it
+cannot_apply_to_a_non_polygon_layer=
+cannot_be_null=
+cannot_exist_two_label_classes_with_the_same_name=
+cannot_install_labeling_method=
+cant_draw_preview=
+change_location=
+character_marker=
+character_marker_symbol=
+choose_marker=
+circular=
+class=
+classes=
+classifying_field_name_not_found=
+clear=Vy\u010distit
+color=Barva\:
+color_field=
+color_ramp=
+confirmation_dialog=
+constant=
+correct_expression=
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=
+date_value=Datum
+default=Implicitn\u00ed
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=
+delete=
+delete_class=
+delete_filter_expression=
+densities=
+depth_factor=
+description=Popis
+divided_by_0=
+dont_show_labels_when_zoomed=
+dot_density=
+dot_size=
+dot_value=
+draw_quantities_for_each_category=
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=
+edit_expression=
+Enable_layer_preview=
+enter_new_name=
+error=Error
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=
+error_trying_to_access_to_the_layer=
+error_validating_filter_query=
+expression=V\u00fdraz
+expression_creator=
+expressions=V\u00fdrazy
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=
+field_number=
+fields=
+fields_exp=
+fill_color=
+fill_properties=
+filter=Filtr
+filtered_features=
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=
+following_line=
+font=
+foreground_alpha=
+format=Form\u00e1t
+from=Od
+fuente=P\u00edsmo
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=
+grid=
+high=
+horizontal=Horizont\u00e1ln\u00ed
+ignore_zero_values=
+in_beyond=
+in_layer=
+in_the_middle=
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=
+intervals=
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=
+label-point-priority-help=
+label_class_properties=
+label_expression=
+label_expression_editor=
+label_expression_help=
+label_features_in_the_same_way=
+label_features_in_this_class=
+label_only_when_selected=
+label_priority=
+label_style_could_not_be_painted=
+label_styles=
+labeled_point=
+labeling=
+labeling_field=
+layer_name=N\u00e1zev vrstvy
+line=Line
+line_fill=
+line_fill_symbol=
+line_settings=
+lineal=
+lines=
+location=
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=
+malformed_or_empty_expression=
+marker_fill=
+marker_fill_symbol=
+marker_line=
+marker_line_symbol=
+mas_de_100_simbolos=V\u00edce ne\u017e 100 symbol\u016f obvykle nevn\u00e1\u0161\u00ed do mapy \u017e\u00e1dn\u00e9 informace
+max_scale=Maxim\u00e1ln\u00ed m\u011b\u0159\u00edtko
+medium=
+method=
+min_scale=Minim\u00e1ln\u00ed m\u011b\u0159\u00edtko
+minimum_angle_to_draw=
+modify_filter_expression=
+move_down=
+move_up=
+name=Jm\u00e9no
+names_and_types_count_are_disctint=
+new_filter_expression=
+no=No
+no_expression_defined=
+no_style=
+no_symbol_especified=
+none=\u017e\u00e1dn\u00e9
+normalization=
+not_save_empty_legend=
+numeric_value=\u010c\u00edseln\u00e1 hodnota
+offset=
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=
+options=Mo\u017enosti
+orientation=
+orientation_system=
+out_beyond=
+outline=Osnova
+outline_opacity=
+outline_width=
+page=Strana
+parallel=
+pattern=
+percentage=
+perpedicular=
+picture_file=
+picture_fill=
+picture_fill_symbol=
+picture_line_symbol=
+picture_marker=
+picture_marker_symbol=
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=
+place_one_label_per_feature_part=
+placement=
+placement_priorities_selector=
+placement_properties=
+point_settings=
+points=
+polygon=Polygon
+polygon_settings=
+position=
+prefer_top_right_all_allowed=
+preview=
+preview_not_available=
+properties=Vlastnosti
+proportional_symbols=
+quantity_by_category=
+quiere_continuar=Chcete pokra\u010dovat?
+Quitar=Odstranit
+Quitar_todos=Odstranit v\u0161e
+random=
+recovering_recordset=
+rectangular=
+remane_class=
+remove=Odstranit
+remove_duplicate_labels=
+resto_valores=Ostatn\u00ed hodnoty
+scale=M\u011b\u0159\u00edtko
+scale_range_window_title=
+select=Vyber
+select_one_row=
+selection_picture_file=
+separation=
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=Velikost
+SLD_grammar=
+some_arguments_are_incorrect=
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=
+statistics=Statistika
+string_value=Hodnota \u0159et\u011bzce
+style=Styl
+style_selector=
+symbol=
+symbol_field=
+symbol_shapetype_mismatch=
+syntax_error=
+template=
+text=Text
+text_field=
+text_fields=
+text_string=
+text_symbol=
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=
+the_result_is_not_a_boolean_value=
+to=Do
+URL=
+use_outline=
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=
+usupported_layer_type=
+value=Hodnota
+value_fields=
+variation_by=
+verify=
+visible=Viditeln\u00fd
+visualization=
+warning=Varov\u00e1n\u00ed
+width=Ampl\u00e0ria
+x_offset=
+y_offset=
+yes=Ano
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pt_BR.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pt_BR.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pt_BR.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [pt_BR]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=S\u00edmbolo utilizado por padr\u00e3o.
+above=Acima
+accept=Aceitar
+accessing_file_structure=Acessando estrutura do arquivo
+add=Adicionar
+add_class=Adicionar classe
+add_expression=Adicionar express\u00e3o
+add_field=Adicionar campo
+add_operator=Adicionar operador
+add_text_area=Adicionar campo de texto
+all_features=Todas as caracter\u00edsticas
+all_supported_background_image_formats=Todos os formatos de imagem suportados
+allow_label_overlapping=Permitir sobreposi\u00e7\u00e3o de r\u00f3tulos
+always_circular=
+always_horizontal=Sempre horizontal
+always_straight=Sempre reto
+angle=\u00c2ngulo
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Aplique a corre\u00e7\u00e3o visual para ter precis\u00e3o no tamanho e posi\u00e7\u00e3o 
+arguments_added_to_a_costant=Argumento inserido na mesma constante.
+at_begin=Ao principio
+at_best=Ao melhor
+at_end=Ao final
+at_fields=nos campos
+background=
+background_color=Cor de fundo
+background_style=Estilo de fundo
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Abaixo
+bitmap_and_svg_image_files=Arquivos de imagem Bitmaps e SVG
+boolean_value=Valor booleano
+browse=Procurar
+buffered=Forma do pol\u00edgono
+cancel=Cancelar
+cannot_apply_to_a_non_polygon_layer=N\u00e3o \u00e9 possivel aplicar em um plano de informa\u00e7\u00e3o que n\u00e3o seja poligonal
+cannot_be_null=N\u00e3o pode ser nulo
+cannot_exist_two_label_classes_with_the_same_name=N\u00e3o pode existir duas etiquetas com o mesmo nome
+cannot_install_labeling_method=N\u00e3o \u00e9 possivel instalar o m\u00e9todo de etiqueta
+cant_draw_preview=N\u00e3o \u00e9 possivel visualizar
+change_location=Alterar localiza\u00e7\u00e3o
+character_marker=Marcador de car\u00e1cter
+character_marker_symbol=S\u00edmbolo do Marcador de car\u00e1cter
+choose_marker=Selecionar marcador
+circular=Circular
+class=Classe
+classes=Classes
+classifying_field_name_not_found=Campo de classifica\u00e7\u00e3o n\u00e3o encontrado
+clear=Limpar
+color=Cor\:
+color_field=Campo de cores
+color_ramp=Rampa de cor
+confirmation_dialog=Di\u00e1logo de configura\u00e7\u00e3o
+constant=constante
+correct_expression=Express\u00e3o correta
+could_not_get_shape_type=N\u00e3o \u00e9 possivel obter o tipo de geometria.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=N\u00e3o \u00e9 poss\u00edvel carregar a legenda.
+date_value=Valor da data
+default=Padr\u00e3o
+define_classes_of_features_and_label_each_differently=Definir diferentes classes de entidades e etiqueta-las de maneira diferente
+Defines_a_dot_density_symbol_based_on_a_field_value=Define uma lejenda de densidade de pontos baseada no valor de um determinado campo.
+delete=Apagar
+delete_class=Apagar classe
+delete_filter_expression=Apagar expre\u00e7\u00e3o filtrada
+densities=Densidades
+depth_factor=
+description=Descri\u00e7\u00e3o
+divided_by_0=Divis\u00e3o por 0
+dont_show_labels_when_zoomed=N\u00e3o mostrar as etiquetas quando dar o zoom
+dot_density=Densidade de pontos
+dot_size=Tamanho do ponto
+dot_value=Valor do ponto
+draw_quantities_for_each_category=Representar quantidades para cada categoria.
+draw_quantities_using_symbol_size_to_show_exact_values=Representa quantidade atrav\u00e9s do tamanho do s\u00edmbolo mostrando valores exatos.
+draw_quantities_using_symbol_size_to_show_relative_values=Representar quantidades mediante o tamanho de um s\u00edmbolo mostrando valores relativos.
+duplicate_labels=Etiquetas repetidas
+edit_expression=Editar express\u00e3o
+Enable_layer_preview=Ativar pr\u00e9-visualiza\u00e7\u00e3o do plano de informa\u00e7\u00e3o
+enter_new_name=Entre com o novo nome
+error=Erro
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Erro codificando a consulta SQL.
+error_trying_to_access_to_the_layer=Erro tentando acessar o plano de informa\u00e7\u00e3o.
+error_validating_filter_query=Erro validando a consulta SQL
+expression=Express\u00e3o
+expression_creator=Criador de express\u00e3o
+expressions=Express\u00f5es
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Falha aplicando etiqueta seguindo a linha. Foi utilizada a configura\u00e7\u00e3o padr\u00e3o.
+failed_computing_intervals=Falha calculando intervalos.
+features=Objetos
+field_number=N\u00famero do campo
+fields=Campos
+fields_exp=Campos
+fill_color=Cor de preenchimento
+fill_properties=Propriedades do preenchimento
+filter=Filtro
+filtered_features=Elementos filtrados
+fit_inside_polygon=Acoplar dentro do pol\u00edgono
+fit_on_text_area=Ajustar a \u00e1rea do texto
+fixed_text_size=Tamanho fixo do texto
+following_line=Seguindo a linha
+font=Fontes
+foreground_alpha=
+format=Formato
+from=De
+fuente=Fonte
+GeneralLabeling.sample_text=
+generating_intervals=Gerando intervalos
+getting_layer_shape_type=Obtendo o tipo de shape
+gradient_color=Cor gradiente
+gradient_fill=Preenchimento gradiente
+gradient_fill_symbol=S\u00edmbolo de preenchimento gradiente
+graduated_symbols=S\u00edmbolos graduados
+grid=Grade
+high=Alta
+horizontal=Horizontal
+ignore_zero_values=
+in_beyond=Por baixo de
+in_layer=no plano de informa\u00e7\u00e3o
+in_the_middle=No meio
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Express\u00e3o incorreta
+intervals=Intervalos
+invalid_filter_expression=
+invalid_url=Localizador de servidor WFS com formato inv\u00e1lido
+it_will_not_be_added=N\u00e3o ser\u00e1 inser\u00edda.
+label-point-priority-help=Prioridade\: 0 \= Bloqueado, 1 \= Mais alta, 3 \= Mais baixa
+label_class_properties=Propriedade da classe de etiquetas
+label_expression=Express\u00e3o de etiquetas
+label_expression_editor=Editor de express\u00e3o de etiqueta
+label_expression_help=
+label_features_in_the_same_way=Etiquetar todas as entidades da mesma maneira
+label_features_in_this_class=Etiquetar entidades dentro desta classe
+label_only_when_selected=Etiquetar somente quando suas entidades estejam selecioandas
+label_priority=Prioridade da etiqueta
+label_style_could_not_be_painted=
+label_styles=Estilo de etiqueta
+labeled_point=
+labeling=Etiquetando
+labeling_field=Campo de etiquetado
+layer_name=Nome do Plano de informa\u00e7\u00e3o
+line=Linha
+line_fill=Preenchimento da linha
+line_fill_symbol=S\u00edmbolo de preenchimento da linha
+line_settings=Configura\u00e7\u00e3o da linha
+lineal=Linear
+lines=Linhas
+location=Localiza\u00e7\u00e3o
+location_along_the_lines=Localizador de acordo com as linhas
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Parece um valor para o ponto muito baixo, pode ocorrer que o sistema responda lentamente.
+low=Baixo
+malformed_or_empty_expression=Express\u00e3o vazia ou errada
+marker_fill=Preenchimento de marcadores
+marker_fill_symbol=S\u00edmbolo de preenchimento de marcadores
+marker_line=Linah de marcadores.
+marker_line_symbol=S\u00edmbolo de linha de marcadores.
+mas_de_100_simbolos=Mais de 100 s\u00edmbolos n\u00e3o contribuem para uma clara informa\u00e7\u00e3o de um mapa.
+max_scale=Escala m\u00e1xima
+medium=M\u00e9dia
+method=Opera\u00e7\u00e3o
+min_scale=Escala m\u00ednima
+minimum_angle_to_draw=
+modify_filter_expression=Modificar filtro de express\u00e3o 
+move_down=Mover para cima.
+move_up=Subir
+name=Nome
+names_and_types_count_are_disctint=N\u00famero de campos e n\u00famero de tipos de campos distintos
+new_filter_expression=Novo filtro de express\u00e3o
+no=N\u00e3o
+no_expression_defined=Express\u00e3o n\u00e3o definida
+no_style=Sem est\u00edlo
+no_symbol_especified=S\u00edmbolo n\u00e3o especificado
+none=Nenhum
+normalization=Normaliza\u00e7\u00e3o
+not_save_empty_legend=Legenda vaz\u00eda n\u00e3o ser\u00e1 salva.
+numeric_value=Valor num\u00e9rico
+offset=Deslocamento
+offset_label=Deslocar etiqueta
+offset_labels_horizontally=Deslocar etiquetas horizontalmente ao redor do ponto
+offset_labels_on_top_of_the_points=Situar etiqueta sobre os pontos.
+on_the_line=Sobre a linha
+operators=Operadores
+options=Op\u00e7\u00f5es
+orientation=Orienta\u00e7\u00e3o
+orientation_system=Sistema de orienta\u00e7\u00e3o
+out_beyond=Por cima de
+outline=Borda
+outline_opacity=Opacidade da borda
+outline_width=Largura da borda
+page=P\u00e1gina
+parallel=Paralela
+pattern=Padr\u00e3o
+percentage=Porcentagem
+perpedicular=Perpendicular
+picture_file=Arquivo de imagem
+picture_fill=Preencher imagem
+picture_fill_symbol=S\u00edmbolo de preenchimento de imagem
+picture_line_symbol=S\u00edmbolo de linha de imagem
+picture_marker=Marcador de imagem
+picture_marker_symbol=S\u00edmbolo de marcador de imagem
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Situar unicamente uma etiqueta por entidade
+place_one_label_per_feature_part=Situar uma etiqueta a cada parte da entidade
+placement=Coloca\u00e7\u00e3o
+placement_priorities_selector=Seletor de propriedades de coloca\u00e7\u00e3o
+placement_properties=Propriedades de coloca\u00e7\u00e3o
+point_settings=Configura\u00e7\u00e3o de ponto
+points=Pontos
+polygon=Pol\u00edgono
+polygon_settings=Configura\u00e7\u00e3o do pol\u00edgono
+position=Posi\u00e7\u00e3o
+prefer_top_right_all_allowed=Preferencialmente encima a direita, por\u00e9m permitindo qualquer posi\u00e7\u00e3o
+preview=Previsualiza\u00e7\u00e3o
+preview_not_available=Pr\u00e9visualiza\u00e7\u00e3o n\u00e3o dispon\u00edvel
+properties=Propriedades
+proportional_symbols=S\u00edmbolos proporcionais
+quantity_by_category=Quantidades por categoria
+quiere_continuar=Tem certeza de que quer continuar?
+Quitar=Remover
+Quitar_todos=Remover tudo
+random=Aleat\u00f3rio
+recovering_recordset=Recuperando recordset
+rectangular=Ret\u00e2ngular
+remane_class=Renomear classe
+remove=Remover
+remove_duplicate_labels=Apagar etiquetas repetidas
+resto_valores=Resto de valores
+scale=Escala
+scale_range_window_title=Gama de escalas
+select=Selecioanr
+select_one_row=Selecione uma linha
+selection_picture_file=Imagem de sele\u00e7\u00e3o
+separation=Separa\u00e7\u00e3o
+set_forbidden_precedence=Estabelecer preced\u00eancia nula
+set_high_precedence=Estabelecer m\u00e1xima preced\u00eancia
+set_low_precedence=Estabelecer baixa prioridade
+set_normal_precedence=Estabelecer proced\u00eancia normal
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Mostra os elementos do plano de informa\u00e7\u00e3o em fun\u00e7\u00e3o de um determinado filtro de expre\u00e7\u00e3o
+size=Tamanho
+SLD_grammar=Gram\u00e1tica SLD
+some_arguments_are_incorrect=Alguns argumentos s\u00e3o incorretos.
+specify_the_range_of_scales_at_which_labels_will_be_shown=Especifique o intervalo de escalas em que os r\u00f3tulos ser\u00e3o mostrados
+SQL_query=Consulta SQL
+statistics=Estat\u00edsticas
+string_value=Valor String
+style=Estilo
+style_selector=Seletor de estilos
+symbol=S\u00edmbolo
+symbol_field=Campo de s\u00edmbolo graduado
+symbol_shapetype_mismatch=
+syntax_error=Erro de sintaxe
+template=Modelo
+text=Texto
+text_field=Texto
+text_fields=Campos de texto
+text_string=Texto
+text_symbol=S\u00edmbolo do texto
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=O n\u00famero de argumentos n\u00e3o \u00e9 correto
+the_result_is_not_a_boolean_value=O resultado n\u00e3o \u00e9 um boolean
+to=At\u00e9
+URL=
+use_outline=Usar borda
+use_the_same_scale_range_as_the_feature_layer=Usar a mesma gama de escalas que o elemento do plano de informa\u00e7\u00e3o
+user_defined_labels=Etiquetas definidas pelo usu\u00e1rio
+usupported_layer_type=Tipo de plano de informa\u00e7\u00e3o n\u00e3o suportado
+value=Valor
+value_fields=Campos de valores
+variation_by=Varia\u00e7\u00e3o por
+verify=Verificar
+visible=Vis\u00edvel
+visualization=Visualiza\u00e7\u00e3o
+warning=Aviso
+width=Largura
+x_offset=Deslocamento em X
+y_offset=Deslocamento em Y
+yes=Sim
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_fr.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_fr.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_fr.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [fr]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=Un symbole par d\u00e9faut sera utilis\u00e9.
+above=Haut
+accept=Accepter
+accessing_file_structure=Acc\u00e8s \u00e0 la structure du fichier en cours...
+add=Ajouter
+add_class=Ajouter classe
+add_expression=Ajouter expression
+add_field=Ajouter une colone
+add_operator=Ajouter op\u00e9rateur
+add_text_area=Ajouter une zone de texte
+all_features=Tous les \u00e9l\u00e9ments
+all_supported_background_image_formats=Tous les formats d'images de fond sont support\u00e9s.
+allow_label_overlapping=Permettre la superposition des \u00e9tiquettes
+always_circular=
+always_horizontal=Toujours horizontal
+always_straight=Toujours rectiligne
+angle=Angle
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Appliquer une correction au caract\u00e8re pour visualiser la taille et la position.
+arguments_added_to_a_costant=Arguments ajout\u00e9s \u00e0 une constante.
+at_begin=Au d\u00e9but
+at_best=Au mieux
+at_end=A la fin
+at_fields=aux champs
+background=Arri\u00e8re plan \:
+background_color=Couleur d'arri\u00e8re plan
+background_style=Style d'arri\u00e8re-plan
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Sous
+bitmap_and_svg_image_files=Fichiers images Bitmap et SVG
+boolean_value=Valeur bool\u00e9enne
+browse=Parcourir
+buffered=Comme tampon
+cancel=Annuler
+cannot_apply_to_a_non_polygon_layer=Ne peut pas s'appliquer \u00e0 une couche non polygone
+cannot_be_null=Ne peut pas \u00eatre nul
+cannot_exist_two_label_classes_with_the_same_name=Il ne peut pas y avoir deux classes d'\u00e9tiquettes portant le m\u00eame nom
+cannot_install_labeling_method=Impossible d'installer la m\u00e9thode d'\u00e9tiquettes
+cant_draw_preview=Impossible de g\u00e9n\u00e9rer l'aper\u00e7u.
+change_location=Changer la localisation
+character_marker=Ponctuel caract\u00e8re
+character_marker_symbol=Ponctuel caract\u00e8re
+choose_marker=S\u00e9lectionner symbole...
+circular=Circulaire
+class=Classe
+classes=Classes
+classifying_field_name_not_found=Champ de classification non trouv\u00e9
+clear=Effacer
+color=Couleur \:
+color_field=Champ couleur
+color_ramp=D\u00e9grad\u00e9 de couleurs
+confirmation_dialog=Demande de confirmation
+constant=constante
+correct_expression=Expression correcte
+could_not_get_shape_type=Impossible de d\u00e9terminer le type d'objet.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Impossible de param\u00e9trer la l\u00e9gende
+date_value=Valeur de date
+default=Par d\u00e9faut
+define_classes_of_features_and_label_each_differently=Etiqueter par classes d'entit\u00e9s
+Defines_a_dot_density_symbol_based_on_a_field_value=D\u00e9finir un symbole de densit\u00e9 de points sur le contenu d'un champ
+delete=Supprimer
+delete_class=Supprimer classe
+delete_filter_expression=Effacer l'expression du filtre
+densities=Densit\u00e9s
+depth_factor=
+description=Description
+divided_by_0=Division par 0
+dont_show_labels_when_zoomed=Ne pas afficher les \u00e9tiquettes apr\u00e8s zoom
+dot_density=Densit\u00e9 de points
+dot_size=Taille du point
+dot_value=Valeur du point
+draw_quantities_for_each_category=Repr\u00e9sente les valeurs quantitatives de deux champs ind\u00e9pendants par des couleurs et/ou styles diff\u00e9rents.
+draw_quantities_using_symbol_size_to_show_exact_values=Repr\u00e9sente les quantit\u00e9s en utilisant une taille de symbole diff\u00e9rente pour afficher les valeurs exactes.
+draw_quantities_using_symbol_size_to_show_relative_values=Repr\u00e9sente les quantit\u00e9s en utilisant une taille de symbole diff\u00e9rente pour afficher les valeurs absolues.
+duplicate_labels=Etiquettes doublons
+edit_expression=Editer expression
+Enable_layer_preview=Activer aper\u00e7u de couche
+enter_new_name=Saisir un nouveau nom
+error=Erreur
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Erreur de codification dans la requ\u00eate du filtre
+error_trying_to_access_to_the_layer=Erreur lors de l'acc\u00e8s \u00e0 la couche
+error_validating_filter_query=Erreur lors de la validation de la requ\u00eate de filtre
+expression=Expression
+expression_creator=Cr\u00e9er une expression de filtre
+expressions=Expressions
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Echec lors de l'application de l'"\u00e9tiquetage suivant la ligne". Le mode d'\u00e9tiquetage par d\u00e9faut sera utilis\u00e9.
+failed_computing_intervals=Echec lors du calcul des intervalles.
+features=Entit\u00e9s
+field_number=Num\u00e9ro du champ
+fields=Champs
+fields_exp=Champs
+fill_color=Remplissage
+fill_properties=Propri\u00e9t\u00e9s de remplissage
+filter=Filtre
+filtered_features=El\u00e9ments filtr\u00e9s
+fit_inside_polygon=Ajuster \u00e0 l'int\u00e9rieur du polygone
+fit_on_text_area=Ajuster \u00e0 la zone de texte
+fixed_text_size=Taille fixe du texte
+following_line=Suivant la ligne
+font=Police
+foreground_alpha=
+format=Format
+from=Depuis
+fuente=Fonte
+GeneralLabeling.sample_text=
+generating_intervals=Cr\u00e9ation d'intervalles
+getting_layer_shape_type=R\u00e9cup\u00e9rer le type de shape
+gradient_color=D\u00e9grad\u00e9 de couleurs
+gradient_fill=Remplissage par d\u00e9grad\u00e9
+gradient_fill_symbol=Remplissage par d\u00e9grad\u00e9
+graduated_symbols=Symboles gradu\u00e9s
+grid=Grille
+high=Haute
+horizontal=Horizontal
+ignore_zero_values=
+in_beyond=En de\u00e7\u00e0
+in_layer=dans la couche
+in_the_middle=Au centre
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Expression incorrecte
+intervals=Intervalles
+invalid_filter_expression=
+invalid_url=L'adresse url du serveur WFS n'est pas valide.
+it_will_not_be_added=Ne sera pas ajout\u00e9
+label-point-priority-help=Priorit\u00e9 \: 0 \= bloqu\u00e9, 1 \= la plus haute, 3 \= la plus basse
+label_class_properties=Propri\u00e9t\u00e9s de la classe d'\u00e9tiquettes
+label_expression=Expression de l'\u00e9tiquette
+label_expression_editor=Editeur d'expression d'\u00e9tiquettes
+label_expression_help=
+label_features_in_the_same_way=Etiqueter toutes les entit\u00e9s de la m\u00eame mani\u00e8re
+label_features_in_this_class=Etiqueter des entit\u00e9s dans cette classe \:
+label_only_when_selected=Etiqueter uniquement  les entit\u00e9s s\u00e9lectionn\u00e9es
+label_priority=Priorit\u00e9 des \u00e9tiquettes
+label_style_could_not_be_painted=
+label_styles=Styles d'\u00e9tiquette
+labeled_point=
+labeling=Etiquetage
+labeling_field=Champ d'\u00e9tiquetage
+layer_name=Nom de la couche
+line=Ligne
+line_fill=Remplissage par lignes
+line_fill_symbol=Remplissage par lignes
+line_settings=Configuration de lignes
+lineal=Ligne directe
+lines=Lignes
+location=Localisation
+location_along_the_lines=Localisation le long des lignes
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Il semble que l'une des valeurs du champ est trop basse. Ceci peut provoquer un ralentissement du syst\u00e8me.
+low=Bas
+malformed_or_empty_expression=Expression vide ou erron\u00e9e
+marker_fill=Remplissage
+marker_fill_symbol=Remplissage symboles multiples
+marker_line=Ligne en ponctuel
+marker_line_symbol=Ponctuel de lignes
+mas_de_100_simbolos=Plus de 100 symboles n'apportent plus d'information dans un plan
+max_scale=Echelle maxi
+medium=Moyenne
+method=Op\u00e9ration
+min_scale=Echelle mini
+minimum_angle_to_draw=
+modify_filter_expression=Modifier filtre...
+move_down=Descendre
+move_up=Monter
+name=Nom
+names_and_types_count_are_disctint=Le nom du champ et le  type de champ sont diff\u00e9rents
+new_filter_expression=Nouveau filtre...
+no=Non
+no_expression_defined=Aucune expression d\u00e9finie
+no_style=Aucun style
+no_symbol_especified=Aucun symbole sp\u00e9cifi\u00e9
+none=Aucun
+normalization=Normalisation
+not_save_empty_legend=Il n'est pas possible de sauvegarder une l\u00e9gende vide
+numeric_value=Valeur num\u00e9rique
+offset=D\u00e9placement
+offset_label=D\u00e9placer \u00e9tiquette
+offset_labels_horizontally=D\u00e9placer \u00e9tiquettes horizontalement.
+offset_labels_on_top_of_the_points=D\u00e9placer \u00e9tiquettes au dessus des points.
+on_the_line=Sur la ligne
+operators=Op\u00e9rateurs
+options=Options
+orientation=Orientation
+orientation_system=Orientation
+out_beyond=Au-del\u00e0
+outline=Contour
+outline_opacity=Transparence contour
+outline_width=Largeur contour
+page=Page
+parallel=Parall\u00e8le
+pattern=Mod\u00e8le
+percentage=Pourcentage
+perpedicular=Perpendiculaire
+picture_file=Image
+picture_fill=Remplissage par image
+picture_fill_symbol=Remplissage par image
+picture_line_symbol=Ligne en image
+picture_marker=Image
+picture_marker_symbol=Ponctuel image
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Placer une seule \u00e9tiquette par objet
+place_one_label_per_feature_part=Placer une \u00e9tiquette pour chaque partie de l'objet
+placement=Mise en place
+placement_priorities_selector=S\u00e9lectionner la position prioritaire
+placement_properties=Propri\u00e9t\u00e9s de mise en place
+point_settings=Param\u00e8tres de point
+points=Points
+polygon=Polygone
+polygon_settings=Param\u00e8tres de polygone
+position=Position
+prefer_top_right_all_allowed=De pr\u00e9f\u00e9rence dans le coin en haut, \u00e0 droite, mais tous les autres positionnement sont autoris\u00e9s.
+preview=Aper\u00e7u
+preview_not_available=Aper\u00e7u non disponible
+properties=Propri\u00e9t\u00e9s
+proportional_symbols=Symboles proportionnels
+quantity_by_category=Quantit\u00e9 par cat\u00e9gorie
+quiere_continuar=S\u00fbr de vouloir continuer?
+Quitar=Retirer
+Quitar_todos=Tout retirer
+random=Al\u00e9atoire
+recovering_recordset=R\u00e9cup\u00e9ration du jeu d'enregistrements
+rectangular=Rectangulaire
+remane_class=Renommer la classe
+remove=Retirer
+remove_duplicate_labels=Supprimer les \u00e9tiquettes en doublons
+resto_valores=Autres valeurs
+scale=Echelle
+scale_range_window_title=Plage d'\u00e9chelle
+select=S\u00e9lectionner
+select_one_row=S\u00e9lectionner une colonne
+selection_picture_file=S\u00e9lection
+separation=S\u00e9paration
+set_forbidden_precedence=D\u00e9finir priorit\u00e9 nulle
+set_high_precedence=D\u00e9finir priorit\u00e9 haute
+set_low_precedence=D\u00e9finir priorit\u00e9 basse
+set_normal_precedence=D\u00e9finir priorit\u00e9 normale
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=A partir du r\u00e9sultat d'une requ\u00eate filtre, les entit\u00e9ts sont repr\u00e9sent\u00e9es en utilisant une couleur et/ou un style diff\u00e9rent.
+size=Taille
+SLD_grammar=Grammaire SLD
+some_arguments_are_incorrect=Certains arguments sont incorrects
+specify_the_range_of_scales_at_which_labels_will_be_shown=Sp\u00e9cifie une plage de valeurs d'\u00e9chelles pour l'affichage des \u00e9tiquettes
+SQL_query=Requ\u00eate SQL
+statistics=Statistiques
+string_value=Valeur
+style=Style
+style_selector=S\u00e9lecteur de style
+symbol=Symbole
+symbol_field=Champ de symbole
+symbol_shapetype_mismatch=
+syntax_error=Erreur de syntaxe
+template=Mod\u00e8le
+text=Texte
+text_field=Texte
+text_fields=Champs texte
+text_string=Texte
+text_symbol=Symbole text
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=Le nombre d'arguments est incorrect
+the_result_is_not_a_boolean_value=Le r\u00e9sultat n'est pas une valeur bool\u00e9enne
+to=Jusqu'\u00e0
+URL=
+use_outline=Utiliser cadre
+use_the_same_scale_range_as_the_feature_layer=Utiliser le m\u00eame intervalle d'\u00e9chelles que les \u00e9l\u00e9ments de la couche
+user_defined_labels=Etiquettes personnalis\u00e9es
+usupported_layer_type=Type de couche non support\u00e9e
+value=Valeur
+value_fields=Champs contenant les valeurs
+variation_by=Variation par
+verify=V\u00e9rifier
+visible=Visible
+visualization=Niveau d'\u00e9chelle
+warning=Attention
+width=Largeur
+x_offset=D\u00e9calage en X
+y_offset=D\u00e9calage en Y
+yes=Oui
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_en_US.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_en_US.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_en_US.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [en_US]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=A default symbol will be used.
+above=Above
+accept=Ok
+accessing_file_structure=File system access in progress
+add=Add
+add_class=Add class
+add_expression=Add field
+add_field=Add field
+add_operator=Add operator
+add_text_area=Add text area
+all_features=All features
+all_supported_background_image_formats=All supported background image formats
+allow_label_overlapping=Allow overlapping labels
+always_circular=
+always_horizontal=Always horizontal
+always_straight=Always straight
+angle=Angle
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Apply visual glyph correction
+arguments_added_to_a_costant=Arguments added to a constant.
+at_begin=At start
+at_best=Optimal
+at_end=At end
+at_fields=at fields
+background=Background\:
+background_color=Background color
+background_style=Background style
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Below
+bitmap_and_svg_image_files=Bitmaps and SVG drawings
+boolean_value=Boolean value
+browse=Choose...
+buffered=Buffered
+cancel=Cancel
+cannot_apply_to_a_non_polygon_layer=Not applicable to a non-polygon layer.
+cannot_be_null=Cannot be null
+cannot_exist_two_label_classes_with_the_same_name=There cannot be two label classes with the same name.
+cannot_install_labeling_method=Cannot set up labeling method.
+cant_draw_preview=Cannot generate preview.
+change_location=Change...
+character_marker=Character marker
+character_marker_symbol=Character marker
+choose_marker=Choose marker...
+circular=Circular
+class=Class
+classes=Classes
+classifying_field_name_not_found=Classification field not found.
+clear=Clear
+color=Color
+color_field=Color field
+color_ramp=Color ramp...
+confirmation_dialog=Confirmation dialog
+constant=Constant
+correct_expression=Expression is valid.
+could_not_get_shape_type=Cannot determine geometry type.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Cannot set up legend.
+date_value=Date value
+default=Default
+define_classes_of_features_and_label_each_differently=Define individual labeling classes
+Defines_a_dot_density_symbol_based_on_a_field_value=Show differences in field values using dot densities
+delete=Delete
+delete_class=Delete class
+delete_filter_expression=Delete filter
+densities=Densities
+depth_factor=
+description=Description
+divided_by_0=Division by 0.
+dont_show_labels_when_zoomed=Do not show labels when zoomed ...
+dot_density=Dot densities
+dot_size=Dot size\:
+dot_value=Dot value\:
+draw_quantities_for_each_category=Vary color and symbol styles for two independent fields. This can be used to visualize the relationship of two attributes with each other.
+draw_quantities_using_symbol_size_to_show_exact_values=Vary symbol sizes proportionally to normalized field values. This exactly relates value differences to symbol size differences.
+draw_quantities_using_symbol_size_to_show_relative_values=Vary symbol sizes gradually to show quantitative differences in field values.
+duplicate_labels=Repeated labels
+edit_expression=Edit expression
+Enable_layer_preview=Enable layer preview
+enter_new_name=Enter new name
+error=Error
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Error parsing SQL query.
+error_trying_to_access_to_the_layer=Error on attempting layer access
+error_validating_filter_query=Error validating SQL query.
+expression=Expression
+expression_creator=Create filter expression
+expressions=Expressions
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Failed to apply follow-line labeling. Default mode will be used instead.
+failed_computing_intervals=Failed to compute intervals.
+features=Basic
+field_number=Label no.
+fields=Fields
+fields_exp=Fields
+fill_color=Fill color
+fill_properties=Fill properties
+filter=Filter
+filtered_features=Filtered features
+fit_inside_polygon=Fit inside polygon
+fit_on_text_area=Fit into text area
+fixed_text_size=Fixed text size\:
+following_line=Follow line
+font=Font
+foreground_alpha=
+format=Format
+from=From
+fuente=Format
+GeneralLabeling.sample_text=
+generating_intervals=Generating intervals...
+getting_layer_shape_type=Retrieving layer shape type...
+gradient_color=Gradient color
+gradient_fill=Gradient fill
+gradient_fill_symbol=Gradient fill
+graduated_symbols=Graduated symbols
+grid=Grid
+high=Height
+horizontal=Horizontal
+ignore_zero_values=
+in_beyond=... in beyond
+in_layer=in layer
+in_the_middle=In the middle
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Invalid expression.
+intervals=Intervals
+invalid_filter_expression=
+invalid_url=Invalid format in WFS server URL.
+it_will_not_be_added=It will not be added
+label-point-priority-help=Priority\: 0\=blocked, 1\=highest, 3\=lowest
+label_class_properties=Label class properties
+label_expression=Label expression
+label_expression_editor=Label expression editor
+label_expression_help=
+label_features_in_the_same_way=Label all features in the same way
+label_features_in_this_class=Label features in this class\:
+label_only_when_selected=Label selected features only
+label_priority=Labeling priority
+label_style_could_not_be_painted=
+label_styles=Label styles
+labeled_point=
+labeling=Labeling
+labeling_field=Select field
+layer_name=Layer name
+line=Line
+line_fill=Line fill
+line_fill_symbol=Line fill
+line_settings=Line settings
+lineal=Linear
+lines=Lines
+location=Location
+location_along_the_lines=Along lines
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=It seems that one of the values for the field is too low. This may cause the system to slow down and become unresponsive.
+low=Low
+malformed_or_empty_expression=Invalid or empty expression.
+marker_fill=Marker fill
+marker_fill_symbol=Marker fill
+marker_line=Marker line
+marker_line_symbol=Marker line
+mas_de_100_simbolos=There are more than 100 unique values. Add all?
+max_scale=Maximum scale
+medium=Medium
+method=Method
+min_scale=Minimum scale
+minimum_angle_to_draw=
+modify_filter_expression=Modify filter...
+move_down=Move down
+move_up=Move up
+name=Name
+names_and_types_count_are_disctint=Number of fields differs from number of field types
+new_filter_expression=New filter...
+no=No
+no_expression_defined=Expression not defined.
+no_style=No style
+no_symbol_especified=No symbol specified
+none=none
+normalization=Normalize by
+not_save_empty_legend=Cannot save an empty legend.
+numeric_value=Numeric value
+offset=Offset
+offset_label=Offset label
+offset_labels_horizontally=Place labels by priority around points\:
+offset_labels_on_top_of_the_points=Simply place labels on top of points
+on_the_line=On the line
+operators=Operators
+options=Options
+orientation=Orientation
+orientation_system=Orientation\:
+out_beyond=... out beyond
+outline=Outline
+outline_opacity=Outline opacity
+outline_width=Outline width
+page=Page
+parallel=Parallel
+pattern=Syntax
+percentage=Percentage
+perpedicular=Perpendicular
+picture_file=Picture file
+picture_fill=Picture fill
+picture_fill_symbol=Picture fill
+picture_line_symbol=Picture line
+picture_marker=Picture marker
+picture_marker_symbol=Picture marker
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Place one label per feature
+place_one_label_per_feature_part=Place one label per feature part
+placement=Placement
+placement_priorities_selector=Select placement priority
+placement_properties=Placement properties
+point_settings=Point settings
+points=Points
+polygon=Polygon
+polygon_settings=Polygon settings
+position=Position
+prefer_top_right_all_allowed=Preferably in the upper right corner, but all positions are allowed.
+preview=Preview
+preview_not_available=No preview.
+properties=Properties...
+proportional_symbols=Proportional symbols
+quantity_by_category=Quantities by category
+quiere_continuar=Would you like to continue?
+Quitar=Remove
+Quitar_todos=Remove all
+random=Random
+recovering_recordset=Recovering recordset...
+rectangular=Rectangular
+remane_class=Rename class
+remove=Remove
+remove_duplicate_labels=Remove duplicate labels
+resto_valores=Other values
+scale=Scale
+scale_range_window_title=Scale range
+select=Select...
+select_one_row=Please select a row with a filter expression first.
+selection_picture_file=For selected features
+separation=Separation
+set_forbidden_precedence=Set to "blocked"
+set_high_precedence=Set to "high" priority
+set_low_precedence=Set to "low" priority
+set_normal_precedence=Set to "normal" priority
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Build symbology classes using filter expressions and assign individual styles to them
+size=Size
+SLD_grammar=SLD grammar
+some_arguments_are_incorrect=Some options are incorrect
+specify_the_range_of_scales_at_which_labels_will_be_shown=Set the scale range within which labels will be drawn
+SQL_query=SQL query
+statistics=Statistics
+string_value=String value
+style=Style
+style_selector=Style selection
+symbol=Symbol...
+symbol_field=Symbol field
+symbol_shapetype_mismatch=
+syntax_error=Syntax error
+template=Template\:
+text=Text
+text_field=Text\:
+text_fields=Text fields
+text_string=Text\:
+text_symbol=Text symbol\:
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=Wrong number of arguments.
+the_result_is_not_a_boolean_value=Result is not a boolean (i.e. 'false/0' or 'true/1') value.
+to=To
+URL=
+use_outline=Use outline
+use_the_same_scale_range_as_the_feature_layer=Use the same scale range as the layer's features
+user_defined_labels=Advanced settings
+usupported_layer_type=Unsupported layer type
+value=Value
+value_fields=Fields with values
+variation_by=Styles
+verify=Verify
+visible=Visible
+visualization=Visualization
+warning=Warning
+width=Width
+x_offset=X offset
+y_offset=Y offset
+yes=Yes
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_eu.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_eu.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_eu.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [eu]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=Lehenetsitako sinboloa erabiliko da
+above=Gora
+accept=Ados
+accessing_file_structure=Fitxategiaren egitura atzitzen
+add=Gehitu
+add_class=Gehitu klasea
+add_expression=Gehitu adierazpena
+add_field=Gehitu eremua
+add_operator=Gehitu operadorea
+add_text_area=Gehitu testu eremua
+all_features=Elementu guztiak
+all_supported_background_image_formats=Atzeko planoko irudi formatu onargarriak
+allow_label_overlapping=Baimendu etiketen gainjartzea
+always_circular=
+always_horizontal=Beti horizontal
+always_straight=Beti zuzen
+angle=Angelua
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Aplikatu karaktereari zuzenketa bisuala tamaina eta kokapenaren zehaztapenerako
+arguments_added_to_a_costant=Argumentuak gehituta konstanteari
+at_begin=Hasieran
+at_best=Onenean
+at_end=Amaieran
+at_fields=Eremuetan
+background=
+background_color=Atzeko kolorea
+background_style=Atzeko estiloa
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Behean
+bitmap_and_svg_image_files=Bit-mapa eta SVG irudi-fitxategiak
+boolean_value=Balio boolear
+browse=Aztertu
+buffered=Poligonoaren forma
+cancel=Utzi
+cannot_apply_to_a_non_polygon_layer=Ezin da aplikatu poligonoduna ez den geruzan
+cannot_be_null=Ezin da nulua izan
+cannot_exist_two_label_classes_with_the_same_name=Ezin dira izen bereko bi etiketa egon
+cannot_install_labeling_method=Ezin da etiketatuen metodoa instalatu
+cant_draw_preview=Ezin da aurrebistaratzea marraztu
+change_location=Aldatu kokapena
+character_marker=Karaktere-markatzailea
+character_marker_symbol=Karaktere-markatzailearen ikurra
+choose_marker=Hautatu markatzailea
+circular=Zirkular
+class=Klasea
+classes=Klaseak
+classifying_field_name_not_found=Sailkapen eremua ez da aurkitu
+clear=Garbitu
+color=Kolorea\:
+color_field=Kolore eremua
+color_ramp=Kolore-arrapala
+confirmation_dialog=Berrespen-elkarrizketa
+constant=Konstantea
+correct_expression=Espresio zuzena
+could_not_get_shape_type=Ezin izan da geometria mota lortu
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Ezin izan da legenda kargatu
+date_value=Data balioa
+default=Lehenetsia
+define_classes_of_features_and_label_each_differently=Definitu entitate klase ezberdinak eta era ezberdinean etiketatu
+Defines_a_dot_density_symbol_based_on_a_field_value=Eremu baten balioan oinarrituta puntu-dentsitate legenda definitzen du
+delete=Ezabatu
+delete_class=Ezabatu klasea
+delete_filter_expression=Ezabatu iragazkiaren espresioa
+densities=Dentsitateak
+depth_factor=
+description=Deskripzioa
+divided_by_0=0-rekiko zatiketa
+dont_show_labels_when_zoomed=Ez erakitsi etiketak zooma egiten denean
+dot_density=Puntu dentsitatea
+dot_size=Puntu tamaina
+dot_value=Puntuaren balioa
+draw_quantities_for_each_category=Adierazi kategoria bakoitzaren kantitatea 
+draw_quantities_using_symbol_size_to_show_exact_values=Adierazi kantitateak sinbolo-tamainiaren bidez eta erakutsi balio zehatzak
+draw_quantities_using_symbol_size_to_show_relative_values=Adierazi kantitateak sinbolo-tamainiaren bidez eta erakutsi balio erlatiboak
+duplicate_labels=Etiketa errepikatuak
+edit_expression=Editatu espresioa
+Enable_layer_preview=Geruzaren aurrebista aktibatu
+enter_new_name=Idatzi izen berria
+error=Errorea
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Iragazkiaren formatua ez da zuzena\: errorea kodifikatzean
+error_trying_to_access_to_the_layer=Errorea geruza atzitzean
+error_validating_filter_query=Errorea SQL kontsulta balidatzean
+expression=Adierazpena
+expression_creator=Iragazteko espresioa sortu
+expressions=Adierazpenak
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Hutsegitea lerroa jarraitutako etiketatua aplikatzean. Lehenetsitako konfigurazioa erabiliko da. 
+failed_computing_intervals=Hutsegitea bitarteak kalkulatzean
+features=Objektuak
+field_number=Eremu-zenbakia
+fields=Eremuak
+fields_exp=Eremuak
+fill_color=Kolore betegarria
+fill_properties=Betegarriaren ezaugarriak
+filter=Iragazkia
+filtered_features=Elementu 
+fit_inside_polygon=Jarri poligonoaren barruan
+fit_on_text_area=Egokitu testu-gunera
+fixed_text_size=Testu tamaina finkoa
+following_line=Lerroa jarraituz
+font=Letra-tipoa
+foreground_alpha=
+format=Formatua
+from=Hemendik\:
+fuente=Letra-tipoa
+GeneralLabeling.sample_text=
+generating_intervals=Tarteak sortzen
+getting_layer_shape_type=Shape mota lortzen 
+gradient_color=Gradiente kolorea
+gradient_fill=Gradiente betegarria
+gradient_fill_symbol=Gradiente betegarri ikurra
+graduated_symbols=Sinbolo graduatuak
+grid=Sareta
+high=Altua
+horizontal=Horizontala
+ignore_zero_values=
+in_beyond=Honen azpitik\:
+in_layer=Geruzan
+in_the_middle=Erdian
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Espresio okerra
+intervals=Tarteak
+invalid_filter_expression=
+invalid_url=WFS zerbitzari-bilatzailearen formatu okerra
+it_will_not_be_added=Ez da gehituko
+label-point-priority-help=Lehentasuna\: 0 \= Blokeatuta, 1 \= Altuago, 3 \= Baxuago
+label_class_properties=Etiketatu klasearen ezaugarriak 
+label_expression=Etiketatuaren espresioa
+label_expression_editor=Etiketa espresioen editorea
+label_expression_help=
+label_features_in_the_same_way=Etiketatu entitate guztiak berdin
+label_features_in_this_class=Klase honetako entitateak etiketatu
+label_only_when_selected=Etiketatu bakarrik entitateak hautatuta daudenean
+label_priority=Etiketatuaren lehentasunak
+label_style_could_not_be_painted=
+label_styles=Etiketa estiloak
+labeled_point=
+labeling=Etiketatua
+labeling_field=Etiketatuaren eremua
+layer_name=Geruzaren izena
+line=Lerroa
+line_fill=Lerro betegarria
+line_fill_symbol=Lerro betegarriaren sinboloa
+line_settings=Linea-konfigurazioa
+lineal=Lineala
+lines=Lerroak
+location=Kokalekua
+location_along_the_lines=Kokalekua lerroetan zehar
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Balioak baxuegia dirudi. Sistema astirotu daiteke.
+low=Behe
+malformed_or_empty_expression=Espresio hutsa edo okerra
+marker_fill=Markatzile betegarria
+marker_fill_symbol=Markatzile betegarriaren ikurra
+marker_line=Markatzaile lerroa
+marker_line_symbol=Markatzaile lerroaren ikurra
+mas_de_100_simbolos=100 sinbolo baino gehiagok ez diote planoari informaziorik eransten.
+max_scale=Eskala geh.
+medium=Batez beste
+method=Eragiketa
+min_scale=Eskala gutx.
+minimum_angle_to_draw=
+modify_filter_expression=Aldatu iragazketa-espresioa
+move_down=Jeitsi
+move_up=Igo
+name=Izena
+names_and_types_count_are_disctint=Eremu kopurua eta eremu-mota kopurua ezberdinak dira
+new_filter_expression=Iragazkiaren espresio berria
+no=Ez
+no_expression_defined=Definitu gabeko espresioa
+no_style=Estilorik gabe
+no_symbol_especified=Ikurra zehaztu gabe
+none=None
+normalization=Normalizazioa
+not_save_empty_legend=Legenda hutsa ez da gordeko
+numeric_value=Zenbakizko balioa
+offset=Lekualdaketa
+offset_label=Etiketa lekuz aldatu
+offset_labels_horizontally=Etiketa lekuz aldatu horizontalki puntuaren inguruan
+offset_labels_on_top_of_the_points=Etiketak puntuen gainean jarri
+on_the_line=Lerroaren gainean
+operators=Operadoreak
+options=Aukerak
+orientation=Orientazioa
+orientation_system=Orientazioa
+out_beyond=Honen gainetik\:
+outline=Ertza
+outline_opacity=Ertzaren opakotasuna
+outline_width=Ertzaren zabalera
+page=Orrialdea
+parallel=Paraleloa
+pattern=Patroi
+percentage=Ehunekoa
+perpedicular=Perpendikular
+picture_file=Irudi-fitxategia
+picture_fill=Irudi betegarria
+picture_fill_symbol=Irudi betegarriaren ikurra
+picture_line_symbol=Irudi lerroaren ikurra
+picture_marker=Irudi markatzailea
+picture_marker_symbol=Irudi markatzailearen ikurra
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Jarri etiketa bakarra entitateko
+place_one_label_per_feature_part=Jarri etiketa bat entitatearen zati bakoitzeko
+placement=Kokamendu
+placement_priorities_selector=Kokapen lehentasunen hautatzailea
+placement_properties=Kokamendu propietateak
+point_settings=Puntuaren ezarpenak
+points=Puntuak
+polygon=Poligonoa
+polygon_settings=Poligonoaren ezarpenak
+position=Kokalekua
+prefer_top_right_all_allowed=Hobe goi-eskuman, baina edozein kokapenek balio du
+preview=Aurrebista
+preview_not_available=aurrebista ez dago ikusgarri
+properties=Ezaugarriak
+proportional_symbols=Ikur proportzionalak
+quantity_by_category=kopurua kategoria bakoitzeko
+quiere_continuar=Ziur zaude irten nahi duzula?
+Quitar=Kendu
+Quitar_todos=Kendu denak
+random=Ausazkoa
+recovering_recordset=Recordset-a berreskuratzen
+rectangular=Angeluzuzen
+remane_class=Klasea berriro izendatu
+remove=Kendu
+remove_duplicate_labels=Kendu errepikatutako etiketak
+resto_valores=Gainerako balioak
+scale=Eskala
+scale_range_window_title=Eskala bitarteak
+select=Hautatu
+select_one_row=Hautatu lerro bat
+selection_picture_file=Hautaketa irudia
+separation=Banaketa
+set_forbidden_precedence=Ezarri lehentasun nulua
+set_high_precedence=Ezarri lehentasun maximoa
+set_low_precedence=Ezarri lehentasun baxua
+set_normal_precedence=Ezarri lehentasun normala
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Iragazki-espresioaren araberako geruza-elementuak erakusten ditu
+size=Tamaina
+SLD_grammar=SLD gramatika
+some_arguments_are_incorrect=Argumentu batzuk okerrak dira
+specify_the_range_of_scales_at_which_labels_will_be_shown=Zehaztu etiketak bistaratzeko eskala-bitartea
+SQL_query=SQL sententzia
+statistics=Estatistikak
+string_value=Kate-balioa
+style=Estiloa
+style_selector=Estilo-hautagailua
+symbol=Ikurra
+symbol_field=Sinbolo graduatuaren eremua
+symbol_shapetype_mismatch=
+syntax_error=Sintaxi errorea
+template=Txantiloi
+text=Testua
+text_field=Testua
+text_fields=Testu eremuak
+text_string=Testua
+text_symbol=Testu ikurra
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=Argumentu kopurua okerra da
+the_result_is_not_a_boolean_value=Emaitza ez da boolearra
+to=Honaino
+URL=
+use_outline=Erabili ertza
+use_the_same_scale_range_as_the_feature_layer=Erabili geruzaren elementuaren eskala bitarte berberak
+user_defined_labels=Erabiltzaileak definitutako etiketak
+usupported_layer_type=Geruza mota ez da jasangarria
+value=Balioa
+value_fields=Balio eremuak
+variation_by=Honekiko bariazioa
+verify=Egiaztatu
+visible=Ikusgai
+visualization=Bistaratzea
+warning=Oharra
+width=Zabalera
+x_offset=Desplazamendua X-n
+y_offset=Desplazamendua Y-n
+yes=Bai
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_nl.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_nl.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_nl.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [nl]
+#Tue Aug 11 10:49:15 CEST 2009
+a_default_symbol_will_be_used=
+above=
+accept=
+accessing_file_structure=
+add=
+add_class=
+add_expression=
+add_field=
+add_operator=
+add_text_area=
+all_features=
+all_supported_background_image_formats=
+allow_label_overlapping=
+always_circular=
+always_horizontal=
+always_straight=
+angle=
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=
+at_best=
+at_end=
+at_fields=
+background=
+background_color=
+background_style=
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=
+bitmap_and_svg_image_files=
+boolean_value=
+browse=
+buffered=
+cancel=Afbreken
+cannot_apply_to_a_non_polygon_layer=
+cannot_be_null=
+cannot_exist_two_label_classes_with_the_same_name=
+cannot_install_labeling_method=
+cant_draw_preview=
+change_location=
+character_marker=
+character_marker_symbol=
+choose_marker=
+circular=
+class=
+classes=
+classifying_field_name_not_found=
+clear=
+color=
+color_field=
+color_ramp=
+confirmation_dialog=
+constant=
+correct_expression=
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=
+date_value=
+default=
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=
+delete=
+delete_class=
+delete_filter_expression=
+densities=
+depth_factor=
+description=
+divided_by_0=
+dont_show_labels_when_zoomed=
+dot_density=
+dot_size=
+dot_value=
+draw_quantities_for_each_category=
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=
+edit_expression=
+Enable_layer_preview=
+enter_new_name=
+error=
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=
+error_trying_to_access_to_the_layer=
+error_validating_filter_query=
+expression=
+expression_creator=
+expressions=
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=
+field_number=
+fields=
+fields_exp=
+fill_color=
+fill_properties=
+filter=
+filtered_features=
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=
+following_line=
+font=
+foreground_alpha=
+format=
+from=
+fuente=
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=
+grid=
+high=
+horizontal=
+ignore_zero_values=
+in_beyond=
+in_layer=
+in_the_middle=
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=
+intervals=
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=
+label-point-priority-help=
+label_class_properties=
+label_expression=
+label_expression_editor=
+label_expression_help=
+label_features_in_the_same_way=
+label_features_in_this_class=
+label_only_when_selected=
+label_priority=
+label_style_could_not_be_painted=
+label_styles=
+labeled_point=
+labeling=
+labeling_field=
+layer_name=
+line=
+line_fill=
+line_fill_symbol=
+line_settings=
+lineal=
+lines=
+location=
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=
+malformed_or_empty_expression=
+marker_fill=
+marker_fill_symbol=
+marker_line=
+marker_line_symbol=
+mas_de_100_simbolos=
+max_scale=
+medium=
+method=
+min_scale=
+minimum_angle_to_draw=
+modify_filter_expression=
+move_down=
+move_up=
+name=
+names_and_types_count_are_disctint=
+new_filter_expression=
+no=
+no_expression_defined=
+no_style=
+no_symbol_especified=
+none=
+normalization=
+not_save_empty_legend=
+numeric_value=
+offset=
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=
+options=
+orientation=
+orientation_system=
+out_beyond=
+outline=
+outline_opacity=
+outline_width=
+page=
+parallel=
+pattern=
+percentage=
+perpedicular=
+picture_file=
+picture_fill=
+picture_fill_symbol=
+picture_line_symbol=
+picture_marker=
+picture_marker_symbol=
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=
+place_one_label_per_feature_part=
+placement=
+placement_priorities_selector=
+placement_properties=
+point_settings=
+points=
+polygon=
+polygon_settings=
+position=
+prefer_top_right_all_allowed=
+preview=
+preview_not_available=
+properties=
+proportional_symbols=
+quantity_by_category=
+quiere_continuar=
+Quitar=
+Quitar_todos=
+random=
+recovering_recordset=
+rectangular=
+remane_class=
+remove=
+remove_duplicate_labels=
+resto_valores=
+scale=
+scale_range_window_title=
+select=
+select_one_row=
+selection_picture_file=
+separation=
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=
+SLD_grammar=
+some_arguments_are_incorrect=
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=
+statistics=
+string_value=
+style=
+style_selector=
+symbol=
+symbol_field=
+symbol_shapetype_mismatch=
+syntax_error=
+template=
+text=
+text_field=
+text_fields=
+text_string=
+text_symbol=
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=
+the_result_is_not_a_boolean_value=
+to=
+URL=
+use_outline=
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=
+usupported_layer_type=
+value=
+value_fields=
+variation_by=
+verify=
+visible=
+visualization=
+warning=
+width=
+x_offset=
+y_offset=
+yes=
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pl.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pl.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pl.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [pl]
+#Thu Oct 29 12:16:22 CET 2009
+a_default_symbol_will_be_used=
+above=
+accept=
+accessing_file_structure=
+add=Dodaj
+add_class=
+add_expression=
+add_field=Dodaj pole
+add_operator=
+add_text_area=
+all_features=
+all_supported_background_image_formats=
+allow_label_overlapping=
+always_circular=
+always_horizontal=
+always_straight=
+angle=
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=
+at_best=
+at_end=
+at_fields=
+background=
+background_color=Kolor t\u0142a
+background_style=
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=
+bitmap_and_svg_image_files=
+boolean_value=
+browse=Przegl\u0105daj
+buffered=
+cancel=Anuluj
+cannot_apply_to_a_non_polygon_layer=
+cannot_be_null=
+cannot_exist_two_label_classes_with_the_same_name=
+cannot_install_labeling_method=
+cant_draw_preview=
+change_location=
+character_marker=
+character_marker_symbol=
+choose_marker=
+circular=
+class=
+classes=
+classifying_field_name_not_found=
+clear=Wyczy\u015b\u0107
+color=Kolor\:
+color_field=
+color_ramp=
+confirmation_dialog=
+constant=
+correct_expression=
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=
+date_value=
+default=
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=
+delete=
+delete_class=
+delete_filter_expression=
+densities=
+depth_factor=
+description=Opis
+divided_by_0=
+dont_show_labels_when_zoomed=
+dot_density=
+dot_size=
+dot_value=
+draw_quantities_for_each_category=
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=
+edit_expression=
+Enable_layer_preview=
+enter_new_name=
+error=B\u0142\u0105d
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=
+error_trying_to_access_to_the_layer=
+error_validating_filter_query=
+expression=
+expression_creator=
+expressions=
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=
+field_number=
+fields=
+fields_exp=
+fill_color=
+fill_properties=
+filter=Filtr
+filtered_features=
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=
+following_line=
+font=
+foreground_alpha=
+format=Format
+from=
+fuente=Czcionka
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=
+grid=
+high=
+horizontal=Poziomo
+ignore_zero_values=
+in_beyond=
+in_layer=
+in_the_middle=
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=
+intervals=
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=
+label-point-priority-help=
+label_class_properties=
+label_expression=
+label_expression_editor=
+label_expression_help=
+label_features_in_the_same_way=
+label_features_in_this_class=
+label_only_when_selected=
+label_priority=
+label_style_could_not_be_painted=
+label_styles=
+labeled_point=
+labeling=
+labeling_field=
+layer_name=Nazwa warstwy
+line=Linia
+line_fill=
+line_fill_symbol=
+line_settings=
+lineal=
+lines=
+location=
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=
+malformed_or_empty_expression=
+marker_fill=
+marker_fill_symbol=
+marker_line=
+marker_line_symbol=
+mas_de_100_simbolos=Wi\u0119cej ni\u017c 100 symboli przewa\u017cnie znacz\u0105co zmniejsza warto\u015b\u0107 informacyjn\u0105 mapy
+max_scale=
+medium=
+method=
+min_scale=
+minimum_angle_to_draw=
+modify_filter_expression=
+move_down=
+move_up=
+name=Nazwa
+names_and_types_count_are_disctint=
+new_filter_expression=
+no=Nie
+no_expression_defined=
+no_style=
+no_symbol_especified=
+none=Brak
+normalization=
+not_save_empty_legend=
+numeric_value=
+offset=
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=
+options=Opcje
+orientation=
+orientation_system=
+out_beyond=
+outline=Obramowanie
+outline_opacity=
+outline_width=
+page=
+parallel=
+pattern=
+percentage=
+perpedicular=
+picture_file=
+picture_fill=
+picture_fill_symbol=
+picture_line_symbol=
+picture_marker=
+picture_marker_symbol=
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=
+place_one_label_per_feature_part=
+placement=
+placement_priorities_selector=
+placement_properties=
+point_settings=
+points=
+polygon=Wielobok
+polygon_settings=
+position=
+prefer_top_right_all_allowed=
+preview=
+preview_not_available=
+properties=W\u0142a\u015bciwo\u015bci
+proportional_symbols=
+quantity_by_category=
+quiere_continuar=Czy chcesz kontynuowa\u0107?
+Quitar=Usu\u0144
+Quitar_todos=Usu\u0144 wszystko
+random=
+recovering_recordset=
+rectangular=
+remane_class=
+remove=Usu\u0144
+remove_duplicate_labels=
+resto_valores=Inne warto\u015bci
+scale=Skala
+scale_range_window_title=
+select=Zaznacz
+select_one_row=
+selection_picture_file=
+separation=
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=Rozmiar
+SLD_grammar=
+some_arguments_are_incorrect=
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=
+statistics=Statystyki
+string_value=
+style=Styl
+style_selector=
+symbol=
+symbol_field=
+symbol_shapetype_mismatch=
+syntax_error=
+template=
+text=
+text_field=
+text_fields=
+text_string=
+text_symbol=
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=
+the_result_is_not_a_boolean_value=
+to=do
+URL=
+use_outline=
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=
+usupported_layer_type=
+value=warto\u015b\u0107
+value_fields=
+variation_by=
+verify=
+visible=Widoczna
+visualization=
+warning=Ostrze\u017cenie
+width=Szeroko\u015b\u0107
+x_offset=
+y_offset=
+yes=Tak
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_it.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_it.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_it.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [it]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=Sar\u00e0 utilizzato un simbolo predefinito
+above=Sopra
+accept=Accetta
+accessing_file_structure=Analizzo struttura dei file
+add=Aggiungi
+add_class=Aggiungi classe
+add_expression=Aggiungi espressione
+add_field=Agguingi campo
+add_operator=Aggiungi operatore
+add_text_area=Aggiungi campo di testo
+all_features=Tutti gli elementi
+all_supported_background_image_formats=Tutte le immagini di sfondo supportate
+allow_label_overlapping=Permetti sovrapposizione delle etichette
+always_circular=
+always_horizontal=Sempre orizzontale
+always_straight=Sempre dritto
+angle=Angolo
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Applica correzione visiva ai caratteri per dimensione e posizionamento precisi
+arguments_added_to_a_costant=Argomento aggiunto a una costante
+at_begin=All'inizio
+at_best=Al meglio
+at_end=Alla fine
+at_fields=nei campi
+background=
+background_color=Colore sfondo
+background_style=Stile sfondo
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Sotto
+bitmap_and_svg_image_files=File immagine Bitmap e SVG
+boolean_value=Valore boleano
+browse=Sfoglia
+buffered=Buffered
+cancel=Cancella
+cannot_apply_to_a_non_polygon_layer=Impossibile applicare a un Livello non poligonale
+cannot_be_null=Non pu\u00f2 essere nullo
+cannot_exist_two_label_classes_with_the_same_name=Non possono esistere due etichette con lo stesso nome
+cannot_install_labeling_method=Impossibile installare il metodo di etichettatura
+cant_draw_preview=Impossibile disegnare anteprima
+change_location=Modifica posizione
+character_marker=Marker carattere
+character_marker_symbol=Simbolo marker carattere
+choose_marker=Seleziona marker
+circular=Circolare
+class=Classe
+classes=Classi
+classifying_field_name_not_found=Campo di classificazione non trovato
+clear=Pulisci
+color=Colore\:
+color_field=Campo colore
+color_ramp=Scala colori
+confirmation_dialog=Dialog di conferma
+constant=Costante
+correct_expression=Espressione corretta
+could_not_get_shape_type=Impossibile individuare il tipo di geometria.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Impossibile configurare legenda
+date_value=Valore della data
+default=Default
+define_classes_of_features_and_label_each_differently=Definire classi di elementi ed etichettatura indipendentemente
+Defines_a_dot_density_symbol_based_on_a_field_value=Definisce un simbolo di densit\u00e0 di punti basato sul valore di un determinato campo
+delete=Elimina
+delete_class=Elimina classe
+delete_filter_expression=Elimina espressione di filtro
+densities=Densit\u00e0
+depth_factor=
+description=Descrizione
+divided_by_0=Divisione per 0
+dont_show_labels_when_zoomed=Non mostrare etichette quando zoomato
+dot_density=Densit\u00e0 puntuale
+dot_size=Dimensione del punto
+dot_value=Valore del punto
+draw_quantities_for_each_category=Rappresenta quantit\u00e0 per ogni categoria.
+draw_quantities_using_symbol_size_to_show_exact_values=Rappresenta le quantit\u00e0 utilizzando le dimensioni del simbolo per mostrare i valori esatti.
+draw_quantities_using_symbol_size_to_show_relative_values=Rappresenta le quantit\u00e0 utilizzando le dimensioni del simbolo per mostrare i valori relativi.
+duplicate_labels=Etichette ripetute
+edit_expression=Modifica espressione
+Enable_layer_preview=Abilita anteprima del Livello
+enter_new_name=Inserire il nuovo nome
+error=Errore
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Filtro con formato errato\: errore di codifica
+error_trying_to_access_to_the_layer=Errore d'accesso al Livello
+error_validating_filter_query=Errore di validazione query SQL
+expression=Espressione
+expression_creator=Creatore di espressioni per filtri
+expressions=Espressioni
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=FALLITA Applicazione dell'etichettatura seguendo la linea. Verr\u00e0 utilizzata la configurazione predefinita
+failed_computing_intervals=FALLITO Calcolo intervalli
+features=Elementi
+field_number=Numero campo
+fields=Campi
+fields_exp=Campi
+fill_color=Colore di riempimento
+fill_properties=Propriet\u00e0 di riempimento
+filter=Filtro
+filtered_features=Elementi filtrati
+fit_inside_polygon=Adatta all'interno del poligono
+fit_on_text_area=Adatta all'area del testo
+fixed_text_size=Dimensione fissa del testo
+following_line=Seguendo la linea
+font=Font
+foreground_alpha=
+format=Formato
+from=Da\:
+fuente=Font
+GeneralLabeling.sample_text=
+generating_intervals=Elaborazione intervalli
+getting_layer_shape_type=Recupero tipologia forme dal Livello in corso
+gradient_color=Colore gradiente
+gradient_fill=Riempimento gradiente
+gradient_fill_symbol=Simbolo del riempimento gradiente
+graduated_symbols=Simboli graduati
+grid=Griglia
+high=Alto
+horizontal=Orizzontale
+ignore_zero_values=
+in_beyond=Al di sotto
+in_layer=nel Livello
+in_the_middle=Nel mezzo
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Espressione errata
+intervals=Intervalli
+invalid_filter_expression=
+invalid_url=URL del server con formato errato
+it_will_not_be_added=Non verr\u00e0 aggiunto
+label-point-priority-help=Priorit\u00e0\: 0 \= Bloccato, 1 \= Massima, 3 \= Minima
+label_class_properties=Propriet\u00e0 della classe etichetta
+label_expression=Espressione di etichetta
+label_expression_editor=Editor di espressioni d'etichetta
+label_expression_help=
+label_features_in_the_same_way=Etichettare tutti gli elementi nello stesso modo
+label_features_in_this_class=Etichettare gli elementi in questa classe
+label_only_when_selected=Etichettare solo quando l'elemento \u00e8 selezionato
+label_priority=Priorit\u00e0 nell'etichettare
+label_style_could_not_be_painted=
+label_styles=Stile dell'etichetta
+labeled_point=
+labeling=Etichettato
+labeling_field=Campo d'etichettatura
+layer_name=Nome del layer
+line=Linea
+line_fill=Riempimento Linee
+line_fill_symbol=Simbolo di riempimento linee
+line_settings=Impostazioni Linea
+lineal=Lineare
+lines=Linee
+location=Ubicazione
+location_along_the_lines=Ubicazione lungo le linee
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Il valore per il punto appare troppo basso. E' possibile che il sistema risponda molto lentamente.
+low=Bassa
+malformed_or_empty_expression=Espressione nulla o incorretta
+marker_fill=Riempimento dei marcatori
+marker_fill_symbol=Simbolo di riempimento dei marcatori
+marker_line=Linea dei marcatori
+marker_line_symbol=Simbolo della linea dei marcatori
+mas_de_100_simbolos=Pi\u00fa di 100 simboli non apportano informazioni al piano
+max_scale=Scala massima
+medium=Mezzo
+method=Operazione
+min_scale=Scala min
+minimum_angle_to_draw=
+modify_filter_expression=Modifica l'espressione di filtro
+move_down=Sposta in gi\u00f9
+move_up=Muovi in alto
+name=Nome
+names_and_types_count_are_disctint=Numero dei campi e numero delle tipologia di campo distinte.
+new_filter_expression=Nuova espressione di filtro
+no=No
+no_expression_defined=Espressione non definita
+no_style=Senza stile
+no_symbol_especified=Simbolo non specificato
+none=Nessuno
+normalization=Normalizzazione
+not_save_empty_legend=Legende vuote non verranno salvate.
+numeric_value=Valore numerico
+offset=Spostamento
+offset_label=Sposta etichetta
+offset_labels_horizontally=Sposta etichette orizzontalmente attorno al punto
+offset_labels_on_top_of_the_points=Posiziona etichette sui punti
+on_the_line=Sulla linea
+operators=Operatori
+options=Opzioni
+orientation=Orientazione
+orientation_system=Sistema di orientamento
+out_beyond=Out beyond
+outline=Bordo
+outline_opacity=Trasparenza bordo
+outline_width=Larghezza bordo
+page=Pagina
+parallel=Parallela
+pattern=Modello
+percentage=Percentuale
+perpedicular=Perpendicolare
+picture_file=File immagine
+picture_fill=Riempimento immagine
+picture_fill_symbol=Motivo di riempimento immagine
+picture_line_symbol=Motivo della linea dell'immagine
+picture_marker=Marcatore dell'immagine
+picture_marker_symbol=Simbolo del marcatore dell'immagine
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Posiziona un'etichetta per elemento
+place_one_label_per_feature_part=Posiziona un'etichetta per ciascuna parte dell'elemento
+placement=Collocazione
+placement_priorities_selector=Selettore di priorit\u00e0 di collocazione
+placement_properties=Propriet\u00e0 di collocazione
+point_settings=Configurazione del punto
+points=Punti
+polygon=Poligono
+polygon_settings=Configurazione poligono
+position=Posizione
+prefer_top_right_all_allowed=Preferibilmente all'angolo alto a destra, ma qualunque posizione ammessa
+preview=Anteprima
+preview_not_available=Anteprima non disponibile
+properties=Propriet\u00e1
+proportional_symbols=Simboli proporzionali
+quantity_by_category=Quantit\u00e0 per categoria
+quiere_continuar=Sei sicuro di voler continuare?
+Quitar=Rimuovi
+Quitar_todos=Elimina tutto
+random=Casuale
+recovering_recordset=Recupero recordset in corso.
+rectangular=Rettangolare
+remane_class=Rinomina classe
+remove=Rimuovi
+remove_duplicate_labels=Elimina etichette doppie
+resto_valores=Resto dei valori
+scale=Scala
+scale_range_window_title=Intervallo scale
+select=Seleziona
+select_one_row=Seleziona una riga
+selection_picture_file=Immagine di selezione
+separation=Separazione
+set_forbidden_precedence=Imposta priorit\u00e0 nulla
+set_high_precedence=Imposta alta priorit\u00e0
+set_low_precedence=Imposta bassa priorit\u00e0
+set_normal_precedence=Imposta priorit\u00e0 normale
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Mostra gli elementi del Livello in funzione di una determinata espressione di selezione
+size=Dimensione
+SLD_grammar=Grammatica SLD
+some_arguments_are_incorrect=Alcuni argomenti errati
+specify_the_range_of_scales_at_which_labels_will_be_shown=Specificare l'intervallo delle scale nel quale le etichette saranno mostrate
+SQL_query=Query SQL
+statistics=Statistica
+string_value=Valore stringa
+style=Stile
+style_selector=Selettore di stili
+symbol=Simbolo
+symbol_field=Campo del simbolo graduato
+symbol_shapetype_mismatch=
+syntax_error=Errore di sintassi
+template=Template
+text=Testo
+text_field=Testo
+text_fields=Campi di testo
+text_string=Testo
+text_symbol=Simbolo di testo
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=Numero di argomenti non corretto
+the_result_is_not_a_boolean_value=Il risultato non \u00e8 booleano
+to=A\:
+URL=
+use_outline=Utilizza bordo
+use_the_same_scale_range_as_the_feature_layer=Utilizza lo stesso intervallo di scale dell'elemento del Livello
+user_defined_labels=Etichette definite dall'utente
+usupported_layer_type=Tipologia di Livello non supportata
+value=Valore
+value_fields=Campi dei valori
+variation_by=Variazione per
+verify=Verifica
+visible=Visibile
+visualization=Visualizzazione
+warning=Attenzione
+width=Larghezza
+x_offset=Spostamento X
+y_offset=Spostamento in Y
+yes=Si
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text.properties	(revision 40911)
@@ -0,0 +1,317 @@
+#Translations for language [es]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=Ser\u00e1 utilizado un s\u00edmbolo por defecto
+above=Arriba
+accept=Aceptar
+accessing_file_structure=Accediendo a la estructura del fichero
+add=A\u00f1adir
+add_class=A\u00f1adir clase
+add_expression=A\u00f1adir Expresi\u00f3n
+add_field=A\u00f1adir campo
+add_operator=A\u00f1adir Operador
+add_text_area=A\u00f1adir campo de texto
+all_features=Todos los elementos
+all_supported_background_image_formats=Todos los formatos de imagen de fondo soportados
+allow_label_overlapping=Permitir superposici\u00f3n de las etiquetas
+always_circular=
+always_horizontal=Siempre horizontal
+always_straight=Siempre recto
+angle=\u00c1ngulo
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Aplicar correcci\u00f3n visual al car\u00e1cter para precisi\u00f3n en tama\u00f1o y posici\u00f3n.
+arguments_added_to_a_costant=Argumento a\u00f1adido a una constante
+at_begin=Al principio
+at_best=En la mejor
+at_end=Al final
+at_field=en el campo
+at_fields=en los campos
+background=
+background_color=Color de fondo
+background_style=Estilo de fondo
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Abajo
+bitmap_and_svg_image_files=Im\u00e1genes SVG y de mapa de bits
+boolean_value=Valor booleano
+browse=Examinar
+buffered=Forma del pol\u00edgono
+cancel=Cancelar
+cannot_apply_to_a_non_polygon_layer=No puede aplicarse a una capa no poligonal
+cannot_be_null=No puede ser nulo
+cannot_exist_two_label_classes_with_the_same_name=No pueden existir dos etiquetas con el mismo nombre
+cannot_install_labeling_method=No se puede instalar el m\u00e9todo de etiquetado
+cant_draw_preview=No se puede dibujar la previsualizaci\u00f3n
+Capa=Capa
+change_location=Cambiar ubicaci\u00f3n
+character_marker=Marcador de car\u00e1cter
+character_marker_symbol=S\u00edmbolo de Marcador de car\u00e1cter
+choose_marker=Seleccionar marcador
+circular=Circular
+class=Clase
+classes=Clases
+classifying_field_name_not_found=Campo de clasificaci\u00f3n no encontrado
+clear=Limpiar
+color=Color\:
+color_field=Campo de colores
+color_ramp=Rampa de color
+confirmation_dialog=Di\u00e1logo de confirmaci\u00f3n
+constant=constante
+correct_expression=Expresion correcta
+could_not_get_shape_type=No se pudo obtener el tipo de geometr\u00eda.
+could_not_restore_color_field=No se pudo recuperar el campo para el color del texto.
+could_not_restore_rotation_field=No se pudo recuperar el campo para la rotaci\u00f3n del texto.
+could_not_restore_text_field=No se pudo recuperar el campo del texto.
+could_not_restore_text_height_field=No se pudo recuperar el campo para la altura del texto.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=No se puede cargar la leyenda
+date_value=Valor fecha
+default=Por defecto
+define_classes_of_features_and_label_each_differently=Definir diferentes clases de entidades y etiquetarlas de manera diferente
+Defines_a_dot_density_symbol_based_on_a_field_value=Define una leyenda de densidad de puntos basada en el valor de un determinado campo.
+delete=Eliminar
+delete_class=Eliminar clase
+delete_filter_expression=Eliminar expresi\u00f3n de filtrado
+densities=Densidades
+depth_factor=
+description=Descripci\u00f3n
+divided_by_0=Divisi\u00f3n por 0
+dont_show_labels_when_zoomed=No mostrar las etiquetas cuando se haga zoom
+dot_density=Densidad de puntos
+dot_size=Tama\u00f1o de punto
+dot_value=Valor del punto
+draw_quantities_for_each_category=Representa cantidades para cada categor\u00eda.
+draw_quantities_using_symbol_size_to_show_exact_values=Representa cantidades a trav\u00e9s del tama\u00f1o del s\u00edmbolo mostrando valores exactos
+draw_quantities_using_symbol_size_to_show_relative_values=Representa cantidades mediante el tama\u00f1o de un s\u00edmbolo mostrando valores relativos.
+duplicate_labels=Etiquetas repetidas
+edit_expression=Editar expresi\u00f3n
+enable_labeling=Habilitar etiquetado
+Enable_layer_preview=Activar previsualizaci\u00f3n de capa
+enter_new_name=Introduzca el nuevo nombre
+error=Error
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Error codificando la consulta SQL
+error_trying_to_access_to_the_layer=Error intentando acceder a la capa
+error_validating_filter_query=Error validando la consulta SQL
+Etiquetados=Etiquetados
+expression=Expresi\u00f3n
+expression_creator=Crear expresi\u00f3n de filtrado
+expressions=Expresiones
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Fallo aplicando el etiquetado siguiendo la l\u00ednea. Se utilizar\u00e1 la configuraci\u00f3n por defecto
+failed_computing_intervals=Fallo calculando intervalos
+false=Falso
+features=Objetos
+field_number=N\u00famero de campo
+field_to_be_labeled=Campo a etiquetar
+fields=Campos
+fields_exp=Campos
+fill_color=Color de relleno
+fill_properties=Propiedades de relleno
+filter=Filtro
+filtered_features=Elementos filtrados
+fit_inside_polygon=Acoplar dentro del pol\u00edgono
+fit_on_text_area=Ajustar al area de texto
+fixed_color=Color fijo
+fixed_height=Tama\u00f1o fijo
+fixed_text_size=Tama\u00f1o fijo del texto
+following_line=Siguiendo la l\u00ednea
+font=Fuente
+foreground_alpha=
+format=Formato
+from=Desde
+fuente=Fuente
+general=General
+GeneralLabeling.sample_text=
+generating_intervals=Generando Intervalos
+getting_layer_shape_type=Obteniendo el tipo de shape
+gradient_color=Color gradiente
+gradient_fill=Relleno gradiente
+gradient_fill_symbol=S\u00edmbolo de relleno gradiente
+graduated_symbols=S\u00edmbolos graduados
+grid=Malla
+high=Alta
+horizontal=Horizontal
+ignore_zero_values=
+in_beyond=Por debajo de
+in_layer=en capa
+in_the_middle=En mitad
+in_the_world=en el mundo
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Expresi\u00f3n incorrecta
+intervals=Intervalos
+invalid_filter_expression=
+invalid_url=Localizador de servidor WFS con formato no v\u00e1lido.
+it_will_not_be_added=No ser\u00e1 a\u00f1adida
+label-point-priority-help=Prioridad\: 0 \= Bloqueado, 1 \= M\u00e1s alta, 3 \= M\u00e1s baja
+label_attributes_defined_in_table=Atributos de la etiqueta definidos en tabla
+label_class_properties=Propiedades de la clase de etiquetado
+label_expression=Expresi\u00f3n de etiquetado
+label_expression_editor=Editor de expresiones de etiqueta
+label_expression_help=
+label_features_in_the_same_way=Etiquetar todas las entidades de la misma manera
+label_features_in_this_class=Etiquetar entidades dentro de esta clase
+label_only_when_selected=Etiquetar solamente cuando sus entidades est\u00e9n seleccionadas
+label_priority=Prioridad en el etiquetado
+label_style_could_not_be_painted=
+label_styles=Estilos de etiqueta
+labeled_point=
+labeling=Etiquetado
+labeling_field=Campo de etiquetado
+layer_name=Nombre de la capa
+layer_Selector=Selector de capa
+line=L\u00ednea
+line_fill=Relleno l\u00edneas
+line_fill_symbol=S\u00edmbolo de relleno de l\u00edneas
+line_settings=Configuraci\u00f3n de l\u00ednea
+lineal=Lineal
+lines=L\u00edneas
+location=Ubicaci\u00f3n
+location_along_the_lines=Ubicaci\u00f3n a lo largo de las l\u00edneas
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Parece un valor para el punto demasiado bajo, puede causar que el sistema responda muy lentamente.
+low=Baja
+malformed_or_empty_expression=Expresi\u00f3n vac\u00eda o err\u00f3nea
+marker_fill=Relleno de marcadores
+marker_fill_symbol=S\u00edmbolo de Relleno de marcadores
+marker_line=L\u00ednea de marcadores
+marker_line_symbol=S\u00edmbolo de L\u00ednea de marcadores
+mas_de_100_simbolos=M\u00e1s 100 de s\u00edmbolos no suelen aportar informaci\u00f3n en un plano.
+max_scale=Escala m\u00e1x
+medium=Media
+method=Operaci\u00f3n
+min_scale=Escala m\u00edn
+minimum_angle_to_draw=
+modify_filter_expression=Modificar expresi\u00f3n de filtrado
+move_down=Bajar
+move_up=Subir
+name=Nombre
+names_and_types_count_are_disctint=N\u00famero de campos y n\u00famero de tipos de campo distintos
+new_filter_expression=Nueva expresi\u00f3n de filtrado
+no=No
+no_expression_defined=Expresion no definida
+no_style=Sin estilo
+no_symbol_especified=S\u00edmbolo no especificado
+none=None
+normalization=Normalizaci\u00f3n
+not_save_empty_legend=Leyenda vac\u00eda no se guardar\u00e1.
+numeric_or_boolean_value=valor num\u00e9rico o boolean
+numeric_value=Valor num\u00e9rico
+offset=Desplazamiento
+offset_label=Desplazar etiqueta
+offset_labels_horizontally=Desplazar etiquetas horizontalmente alrededor del punto.
+offset_labels_on_top_of_the_points=Situar etiquetas sobre los puntos.
+on_the_line=Sobre la l\u00ednea
+operand=operando
+operation_not_allowed_for_SingleLabelingStrategy=Operaci\u00f3n no permitida para la estrategia de etiquetado simple
+operators=Operadores
+options=Opciones
+orientation=Orientaci\u00f3n
+orientation_system=Orientaci\u00f3n
+out_beyond=Por encima de
+outline=Borde
+outline_opacity=Opacidad del borde
+outline_width=Ancho del borde
+page=P\u00e1gina
+parallel=Paralela
+pattern=Patr\u00f3n
+percentage=Porcentaje
+perpedicular=Perpendicular
+picture_file=Fichero imagen
+picture_fill=Relleno de imagen
+picture_fill_symbol=S\u00edmbolo de Relleno de imagen
+picture_line_symbol=S\u00edmbolo de L\u00ednea de imagen
+picture_marker=Marcador de imagen
+picture_marker_symbol=S\u00edmbolo de marcador de imagen
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Situar \u00fanicamente una etiqueta por entidad
+place_one_label_per_feature_part=Situar una etiqueta por cada parte de la entidad
+placement=Colocaci\u00f3n
+placement_priorities_selector=Selector de prioridades de colocaci\u00f3n
+placement_properties=Propiedades de colocaci\u00f3n
+point_settings=Configuraci\u00f3n de punto
+points=Puntos
+polygon=Pol\u00edgono
+polygon_settings=Configuraci\u00f3n de pol\u00edgono
+position=Posici\u00f3n
+prefer_top_right_all_allowed=Preferiblemente arriba a la derecha, pero permitiendo cualquier posici\u00f3n
+preview=Previsualizaci\u00f3n
+preview_not_available=Vista previa no disponible
+properties=Propiedades
+proportional_symbols=S\u00edmbolos proporcionales
+quantity_by_category=Cantidades por categor\u00eda
+quiere_continuar=\u00bfEst\u00e1 seguro de que quiere continuar?
+Quitar=Quitar
+Quitar_todos=Quitar todos
+random=Aleatorio
+recovering_recordset=Recuperando recordset.
+rectangular=Rectangular
+remane_class=Renombrar clase
+remove=Quitar
+remove_duplicate_labels=Eliminar etiquetas repetidas
+resto_valores=Resto de valores
+rotation_height=Rotaci\u00f3n
+scale=Escalar
+scale_range_window_title=Rango de escalas
+select=Seleccionar
+select_one_row=Selecciona una fila
+selection_picture_file=Imagen de selecci\u00f3n
+separation=Separaci\u00f3n
+set_forbidden_precedence=Establecer precedencia nula
+set_high_precedence=Establecer m\u00e1xima precedencia
+set_low_precedence=Establecer baja precedencia
+set_normal_precedence=Establecer precedencia normal
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Muestra los elementos de la capa en funci\u00f3n de una determinada expresi\u00f3n de filtrado
+simple_marker=Marcador simple
+single_labeling=Etiquetado simple
+single_labeling_setup=Configuraci\u00f3n del etiquetado simple
+size=Tama\u00f1o
+SLD_grammar=Gram\u00e1tica SLD
+some_arguments_are_incorrect=Algunos argumentos son incorrectos
+specify_the_range_of_scales_at_which_labels_will_be_shown=Especificar el rango de escalas en el que las etiquetas ser\u00e1n mostradas
+SQL_query=Sentencia SQL
+statistics=Estad\u00edsticas
+string_value=Valor String
+style=Estilo
+style_selector=Selector de estilos
+symbol=S\u00edmbolo
+symbol_field=Campo de s\u00edmbolo graduado
+symbol_shapetype_mismatch=
+syntax_error=Error de sintaxis
+template=Plantilla
+text=Texto
+text_field=Texto
+text_fields=Campos de texto
+text_height_field=Altura del texto
+text_string=Texto
+text_symbol=S\u00edmbolo de texto
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=El n\u00famero de argumentos no es correcto
+the_result_is_not_a_boolean_value=El resultado no es un boolean
+to=Hasta
+Tools_Select=Selecci\u00f3n de herramientas
+true=Verdadero
+units=Unidades
+URL=
+use_default_symbol=S\u00edmbolo por defecto
+use_outline=Usar borde
+use_the_same_scale_range_as_the_feature_layer=Usar el mismo rango de escalas que el elemento de la capa
+user_defined_labels=Etiquetas definidas por el usuario
+usupported_layer_type=Tipo de capa no soportado
+value=Valor
+value_fields=Campos de valores
+variation_by=Variaci\u00f3n por
+verify=Verificar
+visible=Visible
+visualization=Visualizaci\u00f3n
+warning=Aviso
+width=Ancho
+x_offset=Desplazamiento en X
+y_offset=Desplazamiento en Y
+yes=Si
+_Set_new_background_image=Establecer imagen de fondo
+_Set_label_offset=Ajustar posición de etiqueta
+_Expressions_are_correct=Las expresiones son válidas
+_Use_halo=Usar halo
+_Halo_width=Anchura de halo
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ro.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ro.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ro.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [ro]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=Va fi utilizat un simbol prestabilit
+above=Deasupra
+accept=Accept
+accessing_file_structure=Se acceseaz\u0103 structura fi\u015fierului
+add=Adaug\u0103
+add_class=Adaug\u0103 clas\u0103
+add_expression=Adaug\u0103 expresie
+add_field=Adaug\u0103 c\u00e2mp
+add_operator=Adaug\u0103 operator
+add_text_area=Adaug\u0103 c\u00e2mp text
+all_features=Toate elementele
+all_supported_background_image_formats=Toate formatele de imagini de fundal suportate
+allow_label_overlapping=Permite etichete suprapuse
+always_circular=
+always_horizontal=\u00centotdeauna orizontal
+always_straight=\u00centotdeauna drept
+angle=Unghi
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Aplic\u0103 corec\u021bie vizual\u0103 simbolurilor pentru m\u0103rime \u0219i pozi\u021bie precise
+arguments_added_to_a_costant=Argumente ad\u0103ugate la o constant\u0103
+at_begin=La \u00eenceput
+at_best=La cea mai bun\u0103
+at_end=La sf\u00e2r\u0219it
+at_fields=\u00cen c\u00e2mpuri
+background=
+background_color=Culoare fundal
+background_style=Stil fundal
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Jos
+bitmap_and_svg_image_files=Imagini bitmap \u0219i svg
+boolean_value=Valoare boolen\u0103
+browse=R\u0103sfoie\u015fte
+buffered=Form\u0103 poligon
+cancel=Anulez
+cannot_apply_to_a_non_polygon_layer=Nu se poate aplica la un strat non-poligon
+cannot_be_null=Nu poate fi nul
+cannot_exist_two_label_classes_with_the_same_name=Nu pot exista dou\u0103 clase etichet\u0103 cu acela\u0219i nume
+cannot_install_labeling_method=Nu se poate instala metoda de etichetare
+cant_draw_preview=Imposibil de previzualizat
+change_location=Schimb\u0103 pozi\u021bia
+character_marker=Marcator de caracter
+character_marker_symbol=Simbolul marcatorului de caracter
+choose_marker=Alege\u021bi marcator
+circular=Circular
+class=Clas\u0103
+classes=Clase
+classifying_field_name_not_found=Imposibil de g\u0103sit numele c\u00e2mpului de clasificare
+clear=Elimin\u0103
+color=Culoare\:
+color_field=C\u00e2mp culoare
+color_ramp=Ramp\u0103 de culori
+confirmation_dialog=Dialog de confirmare
+constant=Constant\u0103
+correct_expression=Expresie corect\u0103
+could_not_get_shape_type=Imposibil de citit tipul geometriei.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Nu e poate \u00eenc\u0103rca legenda
+date_value=Valoare dat\u0103
+default=Predefinit
+define_classes_of_features_and_label_each_differently=Definire clase de elemente \u0219i etichetare diferit\u0103 a fiec\u0103rei
+Defines_a_dot_density_symbol_based_on_a_field_value=Define\u015fte un simbol de densitate prin puncte pe baza valorii unui c\u00e2mp
+delete=\u0218terge
+delete_class=\u0218terge clas\u0103
+delete_filter_expression=\u0218terge expresie de filtrare
+densities=Densit\u0103\u021bi
+depth_factor=
+description=Descriere
+divided_by_0=\u00cemp\u0103r\u0163it la 0
+dont_show_labels_when_zoomed=Nu afi\u015fa etichetele la zoom
+dot_density=Densitate puncte
+dot_size=M\u0103rime puncte
+dot_value=Valoare puncte
+draw_quantities_for_each_category=Reprezint\u0103 cantit\u0103\u021bile pentru fiecare categorie.
+draw_quantities_using_symbol_size_to_show_exact_values=Reprezint\u0103 cantit\u0103\u021bile folosind m\u0103rimea simbolurilor pentru a reprezenta valoarea exact\u0103.
+draw_quantities_using_symbol_size_to_show_relative_values=Reprezint\u0103 cantit\u0103\u021bile folosind m\u0103rimea simbolurilor pentru a reprezenta valorile relative.
+duplicate_labels=Strate dublicate
+edit_expression=Editeaz\u0103 expresie
+Enable_layer_preview=Activa\u021bi previzualizare strat
+enter_new_name=Introduce\u021bi nume nou
+error=Eroare
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Filtru incorect\: eroare de codificare
+error_trying_to_access_to_the_layer=Eroare \u00een \u00eencercarea de accesare a stratului
+error_validating_filter_query=Eroare de validare interogare SQL
+expression=Expresii
+expression_creator=Creator expresii
+expressions=Expresii
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=E\u0219ec aplicare etichetare linie. Se va utiliza configura\u021bia predefinit\u0103
+failed_computing_intervals=E\u0219ec calcul intervale
+features=Elemente
+field_number=Num\u0103r c\u00e2mp
+fields=C\u00e2mpuri
+fields_exp=C\u00e2mpuri
+fill_color=Culoare umplere
+fill_properties=Propriet\u0103\u021bi umplere
+filter=Filtru
+filtered_features=Elemente filtrate
+fit_inside_polygon=Potrive\u0219te \u00een interiorul poligonului
+fit_on_text_area=Potrive\u0219te \u00een interiorul casetei de text
+fixed_text_size=M\u0103rime fix\u0103 text
+following_line=Urm\u0103rind linia
+font=Caracter
+foreground_alpha=
+format=Format
+from=De la
+fuente=Caracter
+GeneralLabeling.sample_text=
+generating_intervals=Generare intervale
+getting_layer_shape_type=Ob\u021binere tip strat
+gradient_color=Culoare gradient
+gradient_fill=Umplere gradient
+gradient_fill_symbol=Simbol umplere gradient
+graduated_symbols=Simboluri graduale
+grid=Grid
+high=\u00cen\u0103l\u021bime
+horizontal=Orizontal
+ignore_zero_values=
+in_beyond=Mai jos
+in_layer=\u00een strat
+in_the_middle=La mijloc
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Expresie incorect\u0103
+intervals=Intervale
+invalid_filter_expression=
+invalid_url=Localizator de servicii WFS cu format nevalid.
+it_will_not_be_added=Nu vor fi ad\u0103ugate
+label-point-priority-help=Prioritate\: 0 \= Blocat, 1 \= Cea mai mare, 3 \= Cea mai mic\u0103
+label_class_properties=Propriet\u0103\u021bi clas\u0103 etichetare
+label_expression=Expresie etichetare
+label_expression_editor=Editor expresii etichetare
+label_expression_help=
+label_features_in_the_same_way=Eticheteaz\u0103 elemente la fel
+label_features_in_this_class=Eticheteaz\u0103 elemente din aceast\u0103 clas\u0103
+label_only_when_selected=Eticheteaz\u0103 doar c\u00e2nd elementul este selectat
+label_priority=Prioritate de etichetare
+label_style_could_not_be_painted=
+label_styles=Stiluri etichetare
+labeled_point=
+labeling=Etichetare
+labeling_field=C\u00e2mp de etichetare
+layer_name=Nume strat
+line=Linie
+line_fill=Umplere linie
+line_fill_symbol=Simbol umplere linie
+line_settings=Set\u0103ri linie
+lineal=Liniar
+lines=Linii
+location=Loca\u021bie
+location_along_the_lines=Loca\u021bie de-a lungul liniilor
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Pare a fi o valoare prea mic\u0103 pentru acest c\u00e2mp. Ar putea cauza \u00eencetinirea sistemului.
+low=Jos
+malformed_or_empty_expression=Expresie eronat\u0103 sau goal\u0103
+marker_fill=Umplere marcator
+marker_fill_symbol=Simbol umplere marcator
+marker_line=Linie marcator
+marker_line_symbol=Simbol linie marcator
+mas_de_100_simbolos=Mai mult de o sut\u0103 de simboluri nu permit o citire eficient\u0103 a h\u0103r\u0163ii
+max_scale=Scar\u0103 maxim\u0103
+medium=Mediu
+method=Metoda
+min_scale=Scar\u0103 minim\u0103
+minimum_angle_to_draw=
+modify_filter_expression=Modific\u0103 expresie filtru
+move_down=Mut\u0103 jos
+move_up=Ridic\u0103
+name=Nume
+names_and_types_count_are_disctint=Num\u0103rul de c\u00e2mpuri cu nume \u0219i tipuri difer\u0103
+new_filter_expression=Expresie nou\u0103 filtru
+no=Nu
+no_expression_defined=Nici o expresie definit\u0103
+no_style=F\u0103r\u0103 stil
+no_symbol_especified=Nu exist\u0103 simbol specificat
+none=Nimic
+normalization=Normalizare
+not_save_empty_legend=Legenda goal\u0103 nu va fi salvat\u0103
+numeric_value=Valoare numeric\u0103
+offset=Deplasare
+offset_label=Deplasare etichet\u0103
+offset_labels_horizontally=Deplasare etichete orizontal \u00een jurul unui punct.
+offset_labels_on_top_of_the_points=Deplasare etichete \u00een partea de sus a punctelor.
+on_the_line=Pe linie
+operators=Operatori
+options=Op\u0163iuni
+orientation=Orientare
+orientation_system=Sistem de orientare
+out_beyond=Peste
+outline=Contur
+outline_opacity=Opacitate contur
+outline_width=Grosime contur
+page=Pagin\u0103
+parallel=Paralel
+pattern=Model
+percentage=Procentaj
+perpedicular=Perpendicular
+picture_file=Fi\u0219ier imagine
+picture_fill=Umplere imagine
+picture_fill_symbol=Simbol umplere imagine
+picture_line_symbol=Simbol linie imagine
+picture_marker=Marcator imagine
+picture_marker_symbol=Simbol marcator imagine
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Plaseaz\u0103 c\u00e2te o etichet\u0103 de element
+place_one_label_per_feature_part=Plaseaz\u0103 c\u00e2te o etichet\u0103 pentru fiecare parte de element
+placement=Amplasare
+placement_priorities_selector=Selector priorit\u0103\u021bi de amplasare
+placement_properties=Propriet\u0103\u021bi de amplasare
+point_settings=Set\u0103ri punct
+points=Puncte
+polygon=Poligon
+polygon_settings=Set\u0103ri poligon
+position=Pozi\u021bie
+prefer_top_right_all_allowed=De preferin\u021b\u0103, \u00een col\u021bul din dreapta-sus, dar toate pozi\u0163ie se accept\u0103
+preview=Previzualizare
+preview_not_available=Previzualizare indisponibil\u0103
+properties=Propriet\u0103\u0163i
+proportional_symbols=Simboluri propor\u021bionale
+quantity_by_category=Cantit\u0103\u021bi pe categorie
+quiere_continuar=Dori\u0163i s\u0103 continua\u0163i?
+Quitar=Elimin\u0103
+Quitar_todos=Elimin\u0103 totul
+random=Aleator
+recovering_recordset=Recuperare recordset.
+rectangular=Rectangular
+remane_class=Redenumire clas\u0103
+remove=\u015eterge
+remove_duplicate_labels=Elimin\u0103 etichete suprapuse
+resto_valores=Alte valori
+scale=Scar\u0103
+scale_range_window_title=Domeniu de scar\u0103
+select=Select
+select_one_row=Selecteaz\u0103 un r\u00e2nd
+selection_picture_file=Imaginea selec\u021biei
+separation=Separare
+set_forbidden_precedence=Stabile\u0219te preceden\u021b\u0103 nul\u0103
+set_high_precedence=Stabile\u0219te preceden\u021b\u0103 maxim\u0103
+set_low_precedence=Stabile\u0219te preceden\u021b\u0103 joas\u0103
+set_normal_precedence=Stabile\u0219te preceden\u021b\u0103 normal\u0103
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Aratp elemente le stratului dependent de valoarea expresiei filtrului
+size=M\u0103rime
+SLD_grammar=Gramatica SLD
+some_arguments_are_incorrect=Unele argumante sunt incorecte
+specify_the_range_of_scales_at_which_labels_will_be_shown=Specific\u0103 domeniile de scar\u0103 la care etichetele vor fi afi\u0219ate
+SQL_query=Inrerogare SQL
+statistics=Statistici
+string_value=Valoare \u0219ir (string)
+style=Stil
+style_selector=Selector de stiluri
+symbol=Simbol
+symbol_field=C\u00e2mp simboluri
+symbol_shapetype_mismatch=
+syntax_error=Eroare de sintax\u0103
+template=\u0218ablon
+text=Text
+text_field=Text
+text_fields=C\u00e2mpuri text
+text_string=Text
+text_symbol=Simbol text
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=Num\u0103rul de argumente nu este corect
+the_result_is_not_a_boolean_value=Rezultatul nu este o valoare boolean\u0103
+to=C\u0103tre
+URL=
+use_outline=Utilizeaz\u0103 contur
+use_the_same_scale_range_as_the_feature_layer=Utilizeaz\u0103 acela\u0219i interval de scar\u0103 ca \u0219i elementul stratului
+user_defined_labels=Etichete definite de utilizator
+usupported_layer_type=Tip nesuportat
+value=Valoare
+value_fields=C\u00e2mpuri cu valori
+variation_by=Varian\u021b\u0103 dup\u0103
+verify=Verific\u0103
+visible=Vizibil
+visualization=Vizualizare
+warning=Aten\u0163ie
+width=L\u0103\u0163ime
+x_offset=Deplasare X
+y_offset=Deplasare Y
+yes=Da
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_zh.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_zh.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_zh.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [zh]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=
+above=
+accept=\u786e\u5b9a
+accessing_file_structure=
+add=\u6dfb\u52a0
+add_class=
+add_expression=
+add_field=\u6dfb\u52a0\u5b57\u6bb5
+add_operator=
+add_text_area=
+all_features=
+all_supported_background_image_formats=
+allow_label_overlapping=
+always_circular=
+always_horizontal=
+always_straight=
+angle=
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=
+at_best=
+at_end=
+at_fields=
+background=
+background_color=\u80cc\u666f\u989c\u8272
+background_style=
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=
+bitmap_and_svg_image_files=
+boolean_value=
+browse=\u6d4f\u89c8
+buffered=
+cancel=\u53d6\u6d88
+cannot_apply_to_a_non_polygon_layer=
+cannot_be_null=
+cannot_exist_two_label_classes_with_the_same_name=
+cannot_install_labeling_method=
+cant_draw_preview=
+change_location=
+character_marker=
+character_marker_symbol=
+choose_marker=
+circular=
+class=
+classes=
+classifying_field_name_not_found=
+clear=\u6e05\u9664
+color=\u989c\u8272\:
+color_field=
+color_ramp=
+confirmation_dialog=
+constant=
+correct_expression=
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=
+date_value=
+default=\u9ed8\u8ba4
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=
+delete=
+delete_class=
+delete_filter_expression=
+densities=
+depth_factor=
+description=\u63cf\u8ff0
+divided_by_0=
+dont_show_labels_when_zoomed=
+dot_density=
+dot_size=
+dot_value=
+draw_quantities_for_each_category=
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=
+edit_expression=
+Enable_layer_preview=
+enter_new_name=
+error=\u9519\u8bef
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=
+error_trying_to_access_to_the_layer=
+error_validating_filter_query=
+expression=
+expression_creator=
+expressions=
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=
+field_number=
+fields=
+fields_exp=
+fill_color=
+fill_properties=
+filter=\u7b5b\u9009
+filtered_features=
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=
+following_line=
+font=
+foreground_alpha=
+format=\u683c\u5f0f
+from=\u6765\u81ea
+fuente=\u5b57\u4f53
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=
+grid=
+high=
+horizontal=\u6c34\u5e73\u7684
+ignore_zero_values=
+in_beyond=
+in_layer=
+in_the_middle=
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=
+intervals=
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=
+label-point-priority-help=
+label_class_properties=
+label_expression=
+label_expression_editor=
+label_expression_help=
+label_features_in_the_same_way=
+label_features_in_this_class=
+label_only_when_selected=
+label_priority=
+label_style_could_not_be_painted=
+label_styles=
+labeled_point=
+labeling=
+labeling_field=
+layer_name=\u56fe\u5c42\u540d
+line=\u76f4\u7ebf
+line_fill=
+line_fill_symbol=
+line_settings=
+lineal=
+lines=
+location=\u4f4d\u7f6e
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=
+malformed_or_empty_expression=
+marker_fill=
+marker_fill_symbol=
+marker_line=
+marker_line_symbol=
+mas_de_100_simbolos=\u6709100\u591a\u4e2a\u7b26\u53f7\uff0c\u4e00\u822c\u5728\u5e73\u9762\u4e0a\u4e0d\u4f1a\u63d0\u4f9b\u4fe1\u606f\u3002
+max_scale=\u6700\u5927\u6bd4\u4f8b
+medium=
+method=
+min_scale=\u6700\u5c0f\u6bd4\u4f8b
+minimum_angle_to_draw=
+modify_filter_expression=
+move_down=
+move_up=
+name=\u540d\u79f0
+names_and_types_count_are_disctint=
+new_filter_expression=
+no=\u5426
+no_expression_defined=
+no_style=
+no_symbol_especified=
+none=None
+normalization=
+not_save_empty_legend=
+numeric_value=
+offset=
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=
+options=\u9009\u9879
+orientation=
+orientation_system=
+out_beyond=
+outline=
+outline_opacity=
+outline_width=
+page=\u9875
+parallel=
+pattern=
+percentage=
+perpedicular=
+picture_file=
+picture_fill=
+picture_fill_symbol=
+picture_line_symbol=
+picture_marker=
+picture_marker_symbol=
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=
+place_one_label_per_feature_part=
+placement=
+placement_priorities_selector=
+placement_properties=
+point_settings=
+points=
+polygon=\u591a\u8fb9\u5f62
+polygon_settings=
+position=
+prefer_top_right_all_allowed=
+preview=
+preview_not_available=
+properties=\u5c5e\u6027
+proportional_symbols=
+quantity_by_category=
+quiere_continuar=\u60a8\u8981\u7ee7\u7eed\u5417?
+Quitar=\u5220\u9664
+Quitar_todos=\u5168\u90e8\u5220\u9664
+random=
+recovering_recordset=
+rectangular=
+remane_class=
+remove=\u5220\u9664
+remove_duplicate_labels=
+resto_valores=\u5176\u5b83\u6570\u636e
+scale=\u6bd4\u4f8b
+scale_range_window_title=
+select=\u9009\u62e9
+select_one_row=
+selection_picture_file=
+separation=
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=\u5927\u5c0f
+SLD_grammar=
+some_arguments_are_incorrect=
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=
+statistics=\u7edf\u8ba1
+string_value=
+style=\u98ce\u683c
+style_selector=
+symbol=
+symbol_field=
+symbol_shapetype_mismatch=
+syntax_error=
+template=
+text=
+text_field=
+text_fields=
+text_string=
+text_symbol=
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=
+the_result_is_not_a_boolean_value=
+to=\u5230
+URL=
+use_outline=
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=
+usupported_layer_type=
+value=\u6570\u636e
+value_fields=
+variation_by=
+verify=
+visible=\u660e\u663e\u7684
+visualization=
+warning=\u8b66\u544a
+width=\u5bbd\u5ea6
+x_offset=
+y_offset=
+yes=\u662f
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ca.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ca.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ca.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [ca]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=S'utilitzar\u00e0 un s\u00edmbol per defecte
+above=Amunt
+accept=Acceptar
+accessing_file_structure=Accedint a l'estructura del fitxer
+add=Afegir
+add_class=Afegir classe
+add_expression=Afegir expressi\u00f3
+add_field=Afegir camp
+add_operator=Afegir operador
+add_text_area=Afegir camp de text
+all_features=Tots els elements
+all_supported_background_image_formats=Tots els formats d'imatge de fons suportats
+allow_label_overlapping=Permetre superposici\u00f3 de les etiquetes
+always_circular=
+always_horizontal=Sempre horitzontal
+always_straight=Sempre recte
+angle=Angle
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Aplicar correcci\u00f3 visual al car\u00e0cter per a precisi\u00f3 en dimensi\u00f3 i posici\u00f3.
+arguments_added_to_a_costant=Argument afegit a una constant
+at_begin=Al principi
+at_best=En la millor
+at_end=Al final
+at_fields=en els camps
+background=
+background_color=Color de fons
+background_style=Estil de fons
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Davall
+bitmap_and_svg_image_files=Imatges SVG i de mapa de bits
+boolean_value=Valor boole\u00e0
+browse=Examinar
+buffered=Forma del pol\u00edgon
+cancel=Cancel\u00b7lar
+cannot_apply_to_a_non_polygon_layer=No pot aplicar-se a una capa no poligonal
+cannot_be_null=No pot ser nul
+cannot_exist_two_label_classes_with_the_same_name=No poden haver dos etiquetes amb el mateix nom
+cannot_install_labeling_method=No es pot instal\u00b7lar el m\u00e8tode d'etiquetatge
+cant_draw_preview=No es pot dibuixar la previsualitzaci\u00f3
+change_location=Canviar ubicaci\u00f3
+character_marker=Marcador de car\u00e0cter
+character_marker_symbol=S\u00edmbol de marcador de car\u00e0cter
+choose_marker=Elegir marcador
+circular=Circular
+class=Classe
+classes=Classes
+classifying_field_name_not_found=Camp de classificaci\u00f3 no trobat
+clear=Netejar
+color=Color\:
+color_field=Camp de colors
+color_ramp=Rampa de color
+confirmation_dialog=Di\u00e0leg de confirmaci\u00f3
+constant=constant
+correct_expression=Expressi\u00f3 correcta
+could_not_get_shape_type=No s'ha pogut obtindre el tipus de geometria
+could_not_retreive_layer_field_names=
+could_not_setup_legend=No es pot carregar la llegenda
+date_value=Valor data
+default=Per defecte
+define_classes_of_features_and_label_each_differently=Definir diferents classes d'entitats i etiquetar-les de manera diferent
+Defines_a_dot_density_symbol_based_on_a_field_value=Definix una llegenda de densitat de punts basada en el valor d'un determinat camp.
+delete=Eliminar
+delete_class=Eliminar classe
+delete_filter_expression=Eliminar expressi\u00f3 de filtratge
+densities=Densitats
+depth_factor=
+description=Descripci\u00f3
+divided_by_0=Divisi\u00f3 per 0
+dont_show_labels_when_zoomed=No mostrar les etiquetes quan es fa\u00e7a zoom
+dot_density=Densitat de punts
+dot_size=Dimensi\u00f3 de punt
+dot_value=Valor del punt
+draw_quantities_for_each_category=Representa quantitats per a cada categoria.
+draw_quantities_using_symbol_size_to_show_exact_values=Representa quantitats a trav\u00e9s de la dimensi\u00f3 del s\u00edmbol mostrant valors exactes
+draw_quantities_using_symbol_size_to_show_relative_values=Representa quantitats a trav\u00e9s de la dimensi\u00f3 d'un s\u00edmbol mostrant valors relatius.
+duplicate_labels=Etiquetes repetides
+edit_expression=Editar expressi\u00f3
+Enable_layer_preview=Activar previsualitzaci\u00f3 de capa
+enter_new_name=Introdu\u00efsca el nom nou
+error=Error
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Filtre amb format incorrecte\: error en codificar
+error_trying_to_access_to_the_layer=Error en intentar accedir a la capa
+error_validating_filter_query=Error en validar la consulta SQL
+expression=Expressi\u00f3
+expression_creator=Crear expressi\u00f3 de filtrat
+expressions=Expressions
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Ha fallat en aplicar l'etiquetatge seguint la l\u00ednia. S'utilitzar\u00e0 la configuraci\u00f3 per defecte
+failed_computing_intervals=Ha fallat en calcular intervals
+features=Objectes
+field_number=N\u00famero de camp
+fields=Camps
+fields_exp=Camps
+fill_color=Color d'ompliment
+fill_properties=Propietats d'ompliment
+filter=Filtre
+filtered_features=Elements filtrats
+fit_inside_polygon=Acoblar dins del pol\u00edgon
+fit_on_text_area=Ajustar a l'\u00e0rea de text
+fixed_text_size=Dimensi\u00f3 fixa del text
+following_line=Seguint la l\u00ednia
+font=Font
+foreground_alpha=
+format=Format
+from=Des de
+fuente=Font
+GeneralLabeling.sample_text=
+generating_intervals=Generant intervals
+getting_layer_shape_type=Obtenint el tipus de shape
+gradient_color=Color gradient
+gradient_fill=Ompliment gradient
+gradient_fill_symbol=S\u00edmbol d'ompliment gradient
+graduated_symbols=S\u00edmbols graduats
+grid=Malla
+high=Alta
+horizontal=Horitzontal
+ignore_zero_values=
+in_beyond=Per davall de
+in_layer=en capa
+in_the_middle=En meitat
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Expressi\u00f3 incorrecta
+intervals=Intervals
+invalid_filter_expression=
+invalid_url=Localitzador de servidor WFS amb format no v\u00e0lid.
+it_will_not_be_added=No s'hi afegir\u00e0
+label-point-priority-help=Prioritat\: 0 \= Blocatge, 1 \= M\u00e9s alta, 3 \= M\u00e9s baixa
+label_class_properties=Propietats de la classe d'etiquetatge
+label_expression=Expressi\u00f3 d'etiquetatge
+label_expression_editor=Editor d'expressions d'etiqueta
+label_expression_help=
+label_features_in_the_same_way=Etiquetar totes les entitats de la mateixa manera
+label_features_in_this_class=Etiquetar entitats dins d'esta classe
+label_only_when_selected=Etiquetar solament quan les entitats estiguen seleccionades
+label_priority=Prioritat en l'etiquetatge
+label_style_could_not_be_painted=
+label_styles=Estils d'etiqueta
+labeled_point=
+labeling=Etiquetatge
+labeling_field=Camp d'etiquetatge
+layer_name=Nom de la capa
+line=L\u00ednia
+line_fill=Ompliment de l\u00ednies
+line_fill_symbol=S\u00edmbol d'ompliment de l\u00ednies 
+line_settings=Configuraci\u00f3 de l\u00ednia
+lineal=Lineal
+lines=L\u00ednies
+location=Ubicaci\u00f3
+location_along_the_lines=Ubicaci\u00f3 al llarg de les l\u00ednies
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Sembla un valor per al punt massa baix, pot causar que el sistema responga molt lentament.
+low=Baixa
+malformed_or_empty_expression=Expressi\u00f3 buida o err\u00f2nia
+marker_fill=Ompliment de marcadors
+marker_fill_symbol=S\u00edmbol d'ompliment de marcadors
+marker_line=L\u00ednia de marcadors
+marker_line_symbol=S\u00edmbol de l\u00ednia de marcadors
+mas_de_100_simbolos=M\u00e9s de 100 s\u00edmbols no solen aportar informaci\u00f3 en un pla
+max_scale=Escala m\u00e0x.
+medium=Mitjana
+method=Operaci\u00f3
+min_scale=Escala m\u00edn.
+minimum_angle_to_draw=
+modify_filter_expression=Modificar expressi\u00f3 de filtratge
+move_down=Baixar
+move_up=Pujar
+name=Nom
+names_and_types_count_are_disctint=Nombre de camps i nombre de tipus de camp distints
+new_filter_expression=Nova expressi\u00f3 de filtratge
+no=No
+no_expression_defined=Expressi\u00f3 no definida
+no_style=Sense estil
+no_symbol_especified=S\u00edmbol no espec\u00edficat
+none=None
+normalization=Normalitzaci\u00f3
+not_save_empty_legend=Llegenda buida no es guardar\u00e0.
+numeric_value=Valor num\u00e8ric
+offset=Despla\u00e7ament
+offset_label=Despla\u00e7ar etiqueta
+offset_labels_horizontally=Despla\u00e7ar etiquetes horitzontalment al voltant del punt.
+offset_labels_on_top_of_the_points=Situar etiquetes sobre els punts.
+on_the_line=Sobre la l\u00ednia
+operators=Operadors
+options=Opcions
+orientation=Orientaci\u00f3
+orientation_system=Orientaci\u00f3
+out_beyond=Per damunt de
+outline=Vora
+outline_opacity=Opacitat de la vora
+outline_width=Ampl\u00e0ria de la vora
+page=P\u00e0gina
+parallel=Paral\u00b7lela
+pattern=Patr\u00f3
+percentage=Percentatge
+perpedicular=Perpendicular
+picture_file=Fitxer imatge
+picture_fill=Ompliment d'imatge
+picture_fill_symbol=S\u00edmbol d'ompliment d'imatge
+picture_line_symbol=S\u00edmbol de l\u00ednia d'imatge
+picture_marker=Marcador d'imatge
+picture_marker_symbol=S\u00edmbol de marcador d'imatge
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Situar \u00fanicament una etiqueta per entitat
+place_one_label_per_feature_part=Situar una etiqueta per cada part de l'entitat
+placement=Col\u00b7locaci\u00f3
+placement_priorities_selector=Selector de prioritats de col\u00b7locaci\u00f3
+placement_properties=Propietats de col\u00b7locaci\u00f3
+point_settings=Configuraci\u00f3 de punt
+points=Punts
+polygon=Pol\u00edgon
+polygon_settings=Configuraci\u00f3 de pol\u00edgon
+position=Posici\u00f3
+prefer_top_right_all_allowed=Preferiblement dalt a la dreta, per\u00f2 permetent qualsevol posici\u00f3
+preview=Previsualitzaci\u00f3
+preview_not_available=Vista pr\u00e8via no disponible
+properties=Propietats
+proportional_symbols=S\u00edmbols proporcionals
+quantity_by_category=Quantitats per categoria
+quiere_continuar=Est\u00e0 segur que vol continuar?
+Quitar=Llevar
+Quitar_todos=Llevar tots
+random=Aleatori
+recovering_recordset=Recuperant recordset.
+rectangular=Rectangular
+remane_class=Reanomenar classe
+remove=Llevar
+remove_duplicate_labels=Eliminar etiquetes repetides
+resto_valores=Resta de valors
+scale=Escalar
+scale_range_window_title=Rang d'escales
+select=Seleccionar
+select_one_row=Selecciona una fila
+selection_picture_file=Imatge de selecci\u00f3
+separation=Separaci\u00f3
+set_forbidden_precedence=Establir preced\u00e8ncia nul\u00b7la
+set_high_precedence=Establir m\u00e0xima preced\u00e8ncia
+set_low_precedence=Establir baixa preced\u00e8ncia
+set_normal_precedence=Establir preced\u00e8ncia normal
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Mostra els elements de la capa en funci\u00f3 d'una determinada expressi\u00f3 de filtratge
+size=Dimensi\u00f3
+SLD_grammar=Gram\u00e0tica SLD
+some_arguments_are_incorrect=Alguns arguments s\u00f3n incorrectes
+specify_the_range_of_scales_at_which_labels_will_be_shown=Especificar el rang d'escales en el qual les etiquetes seran mostrades
+SQL_query=Sent\u00e8ncia SQL
+statistics=Estad\u00edstiques
+string_value=Valor cadena
+style=Estil
+style_selector=Selector d'estils
+symbol=S\u00edmbol
+symbol_field=Camp de s\u00edmbol graduat
+symbol_shapetype_mismatch=
+syntax_error=Error de sintaxi
+template=Plantilla
+text=Text
+text_field=Text
+text_fields=Camps de text
+text_string=Text
+text_symbol=S\u00edmbol de text
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=El nombre d'arguments no \u00e9s correcte
+the_result_is_not_a_boolean_value=El resultat no \u00e9s un boolean
+to=Fins a
+URL=
+use_outline=Usar vora
+use_the_same_scale_range_as_the_feature_layer=Usar el mateix rang d'escales que l'element de la capa
+user_defined_labels=Etiquetes definides per l'usuari
+usupported_layer_type=Tipus de capa no suportat
+value=Valor
+value_fields=Camps de valors
+variation_by=Variaci\u00f3 per
+verify=Verificar
+visible=Visible
+visualization=Visualitzaci\u00f3
+warning=Av\u00eds
+width=Amplada
+x_offset=Despla\u00e7ament en X
+y_offset=Despla\u00e7ament en Y
+yes=S\u00ed
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pt.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pt.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_pt.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [pt]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=
+above=
+accept=Aceitar
+accessing_file_structure=
+add=Adicionar
+add_class=
+add_expression=
+add_field=Adicionar campo
+add_operator=
+add_text_area=
+all_features=
+all_supported_background_image_formats=
+allow_label_overlapping=
+always_circular=
+always_horizontal=
+always_straight=
+angle=
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=
+at_best=
+at_end=
+at_fields=
+background=
+background_color=Cor de fundo
+background_style=
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=
+bitmap_and_svg_image_files=
+boolean_value=
+browse=Procurar
+buffered=
+cancel=Cancelar
+cannot_apply_to_a_non_polygon_layer=
+cannot_be_null=
+cannot_exist_two_label_classes_with_the_same_name=
+cannot_install_labeling_method=
+cant_draw_preview=
+change_location=
+character_marker=
+character_marker_symbol=
+choose_marker=
+circular=
+class=
+classes=
+classifying_field_name_not_found=
+clear=Limpar
+color=Cor\:
+color_field=
+color_ramp=
+confirmation_dialog=
+constant=
+correct_expression=
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=
+date_value=
+default=Por defeito
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=
+delete=
+delete_class=
+delete_filter_expression=
+densities=
+depth_factor=
+description=Descri\u00e7\u00e3o
+divided_by_0=
+dont_show_labels_when_zoomed=
+dot_density=
+dot_size=
+dot_value=
+draw_quantities_for_each_category=
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=
+edit_expression=
+Enable_layer_preview=
+enter_new_name=
+error=Error
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Formato do filtro incorrecto, erro codificando
+error_trying_to_access_to_the_layer=
+error_validating_filter_query=
+expression=
+expression_creator=
+expressions=
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=
+field_number=
+fields=Campos
+fields_exp=
+fill_color=
+fill_properties=
+filter=Filtro
+filtered_features=
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=
+following_line=
+font=
+foreground_alpha=
+format=Formato
+from=Desde
+fuente=Fonte
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=
+grid=
+high=
+horizontal=Horizontal
+ignore_zero_values=
+in_beyond=
+in_layer=
+in_the_middle=
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=
+intervals=
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=
+label-point-priority-help=
+label_class_properties=
+label_expression=
+label_expression_editor=
+label_expression_help=
+label_features_in_the_same_way=
+label_features_in_this_class=
+label_only_when_selected=
+label_priority=
+label_style_could_not_be_painted=
+label_styles=
+labeled_point=
+labeling=
+labeling_field=
+layer_name=Nome da capa
+line=Linha
+line_fill=
+line_fill_symbol=
+line_settings=
+lineal=
+lines=
+location=
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=
+malformed_or_empty_expression=
+marker_fill=
+marker_fill_symbol=
+marker_line=
+marker_line_symbol=
+mas_de_100_simbolos=Mais de 100 s\u00edmbolos n\u00e3o contribuem para uma clara informa\u00e7\u00e3o de um mapa.
+max_scale=Valor m\u00e1ximo da escala
+medium=
+method=
+min_scale=Valor m\u00ednimo da escala
+minimum_angle_to_draw=
+modify_filter_expression=
+move_down=
+move_up=
+name=Nome
+names_and_types_count_are_disctint=
+new_filter_expression=
+no=No
+no_expression_defined=
+no_style=
+no_symbol_especified=
+none=Nenhum
+normalization=
+not_save_empty_legend=
+numeric_value=
+offset=
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=
+options=Op\u00e7\u00f5es
+orientation=
+orientation_system=
+out_beyond=
+outline=Borde
+outline_opacity=
+outline_width=
+page=P\u00e1gina
+parallel=
+pattern=
+percentage=
+perpedicular=
+picture_file=
+picture_fill=
+picture_fill_symbol=
+picture_line_symbol=
+picture_marker=
+picture_marker_symbol=
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=
+place_one_label_per_feature_part=
+placement=
+placement_priorities_selector=
+placement_properties=
+point_settings=
+points=
+polygon=Pol\u00edgono
+polygon_settings=
+position=
+prefer_top_right_all_allowed=
+preview=
+preview_not_available=
+properties=Propriedades
+proportional_symbols=
+quantity_by_category=
+quiere_continuar=Tem a certeza de que quer continuar?
+Quitar=Remover
+Quitar_todos=Remover todos
+random=
+recovering_recordset=
+rectangular=
+remane_class=
+remove=Remover
+remove_duplicate_labels=
+resto_valores=Resto de valores
+scale=Escala
+scale_range_window_title=
+select=Seleccionar
+select_one_row=
+selection_picture_file=
+separation=
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=Tamanho
+SLD_grammar=
+some_arguments_are_incorrect=
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=
+statistics=Estat\u00edsticas
+string_value=
+style=Estilo
+style_selector=
+symbol=S\u00edmbolo
+symbol_field=
+symbol_shapetype_mismatch=
+syntax_error=
+template=
+text=Texto
+text_field=
+text_fields=
+text_string=
+text_symbol=
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=
+the_result_is_not_a_boolean_value=
+to=At\u00e9
+URL=
+use_outline=
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=
+usupported_layer_type=
+value=Valor
+value_fields=
+variation_by=
+verify=
+visible=Vis\u00edvel
+visualization=
+warning=Aviso
+width=Ampl\u00e0ria
+x_offset=
+y_offset=
+yes=Sim
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_sr.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_sr.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_sr.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [sr]
+#Mon Nov 02 08:36:03 CET 2009
+a_default_symbol_will_be_used=Bi\u0107e upotrebljen default simbol
+above=Iznad
+accept=Prihvati
+accessing_file_structure=Pristup strukturi datoteke u toku
+add=Dodaj
+add_class=Dodaj klasu
+add_expression=Dodaj izraz
+add_field=Dodaj polje
+add_operator=Dodaj operater
+add_text_area=Dodaj tekstualno polje
+all_features=Svi elementi
+all_supported_background_image_formats=Svi podr\u017eani formati pozadina 
+allow_label_overlapping=Odobri preklapanje etiketa
+always_circular=
+always_horizontal=Uvek horizontalno
+always_straight=Uvek pravo 
+angle=Ugao
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=Primeni vizualnu korekciju na karakter u cilju preciziranja veli\u010dine i pozicije.
+arguments_added_to_a_costant=Argument je dodat konstanti
+at_begin=Na po\u010detku
+at_best=Na najboljem
+at_end=Na kraju
+at_fields=u poljima
+background=
+background_color=Boja pozadine
+background_style=Stil podloge
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Ispod
+bitmap_and_svg_image_files=Datoteke sa slikama SVG i bit mapom
+boolean_value=Boolean vrednost
+browse=Pretra\u017ei
+buffered=Oblik poligona
+cancel=Odustani
+cannot_apply_to_a_non_polygon_layer=Ne mo\u017ee se primeniti na "ne-poligonski" lejer
+cannot_be_null=Ne mo\u017ee biti 0
+cannot_exist_two_label_classes_with_the_same_name=Ne mogu postojati dve etikete sa istim imenom
+cannot_install_labeling_method=Ne mo\u017ee se instalirati metod etiketiranja
+cant_draw_preview=Ne mo\u017ee se nacrtati pretprikaz
+change_location=Promeni lokaciju
+character_marker=Marker karaktera
+character_marker_symbol=Simbol markera karaktera
+choose_marker=Izaberi marker
+circular=Kru\u017eni
+class=Klasa
+classes=Klase
+classifying_field_name_not_found=Klasifikaciono polje nije prona\u0111eno
+clear=Izbri\u0161i
+color=Boja\:
+color_field=Polje sa bojama
+color_ramp=Rampa za boje
+confirmation_dialog=Dijalog za potvrdu
+constant=konstanta
+correct_expression=Ispravan izraz
+could_not_get_shape_type=Ne mo\u017ee se dobiti tip geometrije.
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Nije se mogla u\u010ditati legenda
+date_value=Vrednost datuma
+default=Default (podrazumevana vrednost)
+define_classes_of_features_and_label_each_differently=Defini\u0161i razli\u010dite klase entiteta i dodeli ima razli\u010dite etikete
+Defines_a_dot_density_symbol_based_on_a_field_value=Defini\u0161e legendu gustine ta\u010daka koja je zasnovana na vrednosti odre\u0111enog polja
+delete=Izbri\u0161i
+delete_class=Izbri\u0161i klasu
+delete_filter_expression=Izbri\u0161i izraz filtera
+densities=Gustine
+depth_factor=
+description=Opis
+divided_by_0=Podeljeno sa 0
+dont_show_labels_when_zoomed=Ne prikazivati etikete prilikom zumiranja
+dot_density=Gustina ta\u010daka
+dot_size=Veli\u010dina ta\u010daka
+dot_value=Vrednost ta\u010dke
+draw_quantities_for_each_category=Predstavlja koli\u010dine za svaku kategoriju.
+draw_quantities_using_symbol_size_to_show_exact_values=Predstavlja koli\u010dine preko veli\u010dine simbola prikazivanjem ta\u010dnih vrednosti.
+draw_quantities_using_symbol_size_to_show_relative_values=Predstavlja koli\u010dine posredstvom veli\u010dine simbola prikazuju\u0107i relativne vrednosti.
+duplicate_labels=Ponovljene etikete
+edit_expression=Izmeni izraz
+Enable_layer_preview=Aktivirati pregled lejera
+enter_new_name=Unesite novi naziv
+error=Gre\u0161ka
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Filter sa pogre\u0161nim formatom\: gre\u0161ka pri kodifikovanju
+error_trying_to_access_to_the_layer=Gre\u0161ka pri poku\u0161aju da se pristupi lejeru
+error_validating_filter_query=Gre\u0161ka pri validaciji SQL upita 
+expression=Izraz
+expression_creator=Kreiraj izraz filtera
+expressions=Izrazi
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Neuspe\u0161na primena etiketa slede\u0107i liniju. Upotrebi\u0107e se default konfiguracija
+failed_computing_intervals=Neuspe\u0161no izra\u010dunavanje intervala
+features=Objekti
+field_number=Broj polja
+fields=Polja
+fields_exp=Polja
+fill_color=Boja za popunjavanje
+fill_properties=Karakteristike za popunjavanje
+filter=Filter
+filtered_features=Filtrirani elementi
+fit_inside_polygon=Smesti u okviru poligona
+fit_on_text_area=Podesi u skladu sa prostorom za tekst
+fixed_text_size=Fiksna veli\u010dina teksta
+following_line=Slede\u0107a linija
+font=Font
+foreground_alpha=
+format=Format
+from=Od
+fuente=Font
+GeneralLabeling.sample_text=
+generating_intervals=Kreiranje intervala
+getting_layer_shape_type=Dobijanje shape tipa u toku
+gradient_color=Boja gradijenta
+gradient_fill=Gradient fill (Stepenasto popunjavanje)
+gradient_fill_symbol=Simbol gradient fill (Simbol stepenastog popunjavanja)
+graduated_symbols=Stepenovani simboli
+grid=Re\u0161etka
+high=Visoka
+horizontal=Horizontalno
+ignore_zero_values=
+in_beyond=Ispod
+in_layer=u lejeru
+in_the_middle=U sredini
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Pogre\u0161an izraz.
+intervals=Intervali
+invalid_filter_expression=
+invalid_url=Lokator WFS servera sa pogre\u0161nim formatom.
+it_will_not_be_added=Ne\u0107e biti dodata
+label-point-priority-help=Prioritet\: 0 \= Blokiran, 1 \= Najvi\u0161i, 3 \= Najni\u017ei
+label_class_properties=Osobine klase etikete
+label_expression=Izraz etikete
+label_expression_editor=Editor izraza etikete
+label_expression_help=
+label_features_in_the_same_way=Etiketiraj sve entitete na isti na\u010din
+label_features_in_this_class=Etiketiraj entitete u okviru ove klase
+label_only_when_selected=Etiketiraj samo kada su entiteti ozna\u010deni
+label_priority=Prioritet u etiketiranju
+label_style_could_not_be_painted=
+label_styles=Stilovi etikete
+labeled_point=
+labeling=Etiketiranje
+labeling_field=Polje za etiketiranje
+layer_name=Naziv lejera
+line=Linija
+line_fill=Popunjavanje linija
+line_fill_symbol=Simbol popunjavanja linija
+line_settings=Konfiguracija linije
+lineal=Linearno
+lines=Linije
+location=Lokacija
+location_along_the_lines=Lociranje du\u017e linija
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=\u010cini se da je zadata preniska vrednost za ovo polje \u0161to mo\u017ee uzrokovati usporen rad sistema.
+low=Niska
+malformed_or_empty_expression=Prazan ili pogre\u0161an izraz
+marker_fill=Punjenje markera
+marker_fill_symbol=Simbol punjenja markera
+marker_line=L linija markera
+marker_line_symbol=Simbol linije markera
+mas_de_100_simbolos=Vi\u0161e od 100 simbola obi\u010dno ne daju nikakvu informaciju na planu.
+max_scale=Maksimalna proporcija
+medium=Srednja
+method=Operacija
+min_scale=Minimalna proporcija
+minimum_angle_to_draw=
+modify_filter_expression=Izmeni izraz filtera
+move_down=Pomeri na dole
+move_up=Pomeri na gore
+name=Naziv
+names_and_types_count_are_disctint=Broj polja i broj tipova razli\u010ditih polja
+new_filter_expression=Novi izraz filtera
+no=Ne
+no_expression_defined=Izraz nije definisan
+no_style=Nema stila
+no_symbol_especified=Simbol nije definisan
+none=Nijedan
+normalization=Normalizacija
+not_save_empty_legend=Prazna legenda ne\u0107e biti sa\u010duvana.
+numeric_value=Numeri\u010dka vrednost
+offset=Pomeranje
+offset_label=Pomeranje etikete
+offset_labels_horizontally=Pomeranje etiketa po horizontali oko ta\u010dke.
+offset_labels_on_top_of_the_points=Sme\u0161tanje etiketa povrh ta\u010daka.
+on_the_line=Na liniji
+operators=Operateri
+options=Opcije
+orientation=Orijentacija
+orientation_system=Sistem orijentacije
+out_beyond=Iznad
+outline=Konture
+outline_opacity=Neprozirnost ivice
+outline_width=\u0160irina ivice
+page=Stranica
+parallel=Paralelna
+pattern=\u0160ema
+percentage=Procenat
+perpedicular=Perpendikularan
+picture_file=Datoteka sa slikama
+picture_fill=Popunjavanj eslike
+picture_fill_symbol=Simbol popunjavanja slike
+picture_line_symbol=Simbol linije slike
+picture_marker=Marker slike
+picture_marker_symbol=Simbol markera slike
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Postaviti samo jednu etiketu po entitetu
+place_one_label_per_feature_part=Postaviti jednu etiketu za svaki deo entiteta
+placement=Postavljanje
+placement_priorities_selector=Selektor osobina postavljanja
+placement_properties=Osobine postavljanja
+point_settings=Pode\u0161avanje ta\u010dke
+points=Ta\u010dke
+polygon=Poligon
+polygon_settings=Pode\u0161avanje poligona
+position=Pozicija
+prefer_top_right_all_allowed=Najradije gore desno, ali mogu\u0107a i bilo koja druga pozicija
+preview=Prikaz
+preview_not_available=Prikaz nije na raspolaganju
+properties=Karakteristike
+proportional_symbols=Proporcionalni sistemi
+quantity_by_category=Koli\u010dine po kategoriji
+quiere_continuar=\u017delite li da nastavite?
+Quitar=Ukloni
+Quitar_todos=Ukloni sve
+random=Slu\u010dajan
+recovering_recordset=Povratiti recordset.
+rectangular=Pravougaono
+remane_class=Promeni naziv klase
+remove=Ukloni
+remove_duplicate_labels=Ukloni etikete koje se ponavljaju
+resto_valores=Ostale vrednosti
+scale=Proporcija
+scale_range_window_title=Rang razmere
+select=Izaberi
+select_one_row=Izaberi jedan red
+selection_picture_file=Slika izbora
+separation=Razdvajanje
+set_forbidden_precedence=Utvrditi prioritet nula
+set_high_precedence=Utvrditi maksimalan prioritet 
+set_low_precedence=Uspostaviti niski prioritet
+set_normal_precedence=Navedi normalan prioritet
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Prikazuje elemente lejera u zavisnosti od vrednosti izraza filtera
+size=Dimenzije
+SLD_grammar=SLD gramatika
+some_arguments_are_incorrect=Neki argumenti su pogre\u0161ni
+specify_the_range_of_scales_at_which_labels_will_be_shown=Podesi rang razmere u okviru koga \u0107e se prikazati etikete
+SQL_query=SQL upit
+statistics=Statistika
+string_value=Vrednost lanca
+style=Stil
+style_selector=Selektor stilova
+symbol=Simbol
+symbol_field=Polje sa stepenovanim simbolom
+symbol_shapetype_mismatch=
+syntax_error=Gre\u0161ka u sintaksi
+template=\u0160ablon
+text=Tekst
+text_field=Tekst
+text_fields=Tekstualna polja
+text_string=Tekst
+text_symbol=Tekstualni simbol
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=Broj argumenata je neispravan
+the_result_is_not_a_boolean_value=Rezultat nije vrednost boolean
+to=Do
+URL=
+use_outline=Upotrebi ivicu
+use_the_same_scale_range_as_the_feature_layer=Upotrebi isti rang razmera koji ima element lejera.
+user_defined_labels=Korisnik je definisao etikete
+usupported_layer_type=Tip lejera nije podr\u017ean
+value=Vrednost
+value_fields=Polja sa vrednostima
+variation_by=Varijacija po
+verify=Proveriti
+visible=Vidljiv
+visualization=Vizualizacija
+warning=Upozorenje
+width=\u0160irina
+x_offset=Premestiti na X
+y_offset=Pomeranje na Y
+yes=Da
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_tr.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_tr.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_tr.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [tr]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=
+above=\u00dcst
+accept=Kabul et
+accessing_file_structure=Dosya yap\u0131s\u0131na eri\u015filiyor
+add=Ekle
+add_class=S\u0131n\u0131f ekle
+add_expression=\u0130fade ekle
+add_field=Alan ekle
+add_operator=\u0130\u015fletmen ekle
+add_text_area=Metin alan\u0131 ekle
+all_features=T\u00fcm objeler
+all_supported_background_image_formats=T\u00fcm desteklenen arkaplan g\u00f6r\u00fcnt\u00fc bi\u00e7imleri
+allow_label_overlapping=Etiketleri \u00fcst\u00fcne bindir
+always_circular=
+always_horizontal=Daima yatay
+always_straight=
+angle=A\u00e7\u0131
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=Ba\u015flang\u0131\u00e7ta
+at_best=En iyisi
+at_end=Sonunda
+at_fields=alanlarda
+background=
+background_color=Artalan rengi
+background_style=Artalan bi\u00e7emi
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=Alt\u0131nda
+bitmap_and_svg_image_files=Bite\u015flem ve SVG g\u00f6r\u00fcnt\u00fc dosyalar\u0131
+boolean_value=Boole de\u011feri
+browse=G\u00f6zat
+buffered=Tamponlanm\u0131\u015f
+cancel=\u0130ptal
+cannot_apply_to_a_non_polygon_layer=Poligon olmayan katmana uygulanam\u0131yor
+cannot_be_null=Bo\u015f de\u011fer olamaz
+cannot_exist_two_label_classes_with_the_same_name=\u0130ki etiket s\u0131n\u0131f\u0131 ayn\u0131 isimde olamaz
+cannot_install_labeling_method=Etiketleme y\u00f6ntemi y\u00fcklenemiyor
+cant_draw_preview=\u00d6ng\u00f6r\u00fcn\u00fc\u015f \u00e7izilemiyor
+change_location=Konumu de\u011fi\u015ftir
+character_marker=\u0130\u015faretleyiciyi de\u011fi\u015ftir
+character_marker_symbol=\u0130\u015faretleyici simgesini de\u011fi\u015ftir
+choose_marker=\u0130\u015faretleyiciyi se\u00e7
+circular=Dairesel
+class=S\u0131n\u0131f
+classes=S\u0131n\u0131flar
+classifying_field_name_not_found=S\u0131n\u0131fland\u0131r\u0131lan alan ad\u0131 bulunamad\u0131
+clear=Sil
+color=Renk
+color_field=Renk alan\u0131
+color_ramp=
+confirmation_dialog=Onaylama diyalo\u011fu
+constant=Sabit
+correct_expression=Do\u011fru ifade
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Lejand ayarlanamad\u0131
+date_value=Tarih de\u011feri
+default=Varsay\u0131lan
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=
+delete=Sil
+delete_class=S\u0131n\u0131f sil
+delete_filter_expression=S\u00fczge\u00e7 ifadesini sil
+densities=Yo\u011funluklar
+depth_factor=
+description=Tan\u0131m
+divided_by_0=
+dont_show_labels_when_zoomed=Yak\u0131nla\u015ft\u0131r\u0131ld\u0131\u011f\u0131nda etiketleri g\u00f6sterme
+dot_density=Nokta yo\u011funlu\u011fu
+dot_size=Nokta boyutu
+dot_value=Nokta de\u011feri
+draw_quantities_for_each_category=Her kategorinin say\u0131s\u0131n\u0131 \u00e7iz.
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=Tekrarl\u0131 etiketler
+edit_expression=\u0130fadeyi d\u00fczenle
+Enable_layer_preview=Katman \u00f6ng\u00f6r\u00fcn\u00fc\u015f\u00fcn\u00fc etkinle\u015ftir
+enter_new_name=Yeni isim gir
+error=Hata
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=
+error_trying_to_access_to_the_layer=Katmana eri\u015fmede hata
+error_validating_filter_query=
+expression=\u0130fade
+expression_creator=\u0130fade olu\u015fturucu
+expressions=\u0130fadeler
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=Objeler
+field_number=Alan numaras\u0131
+fields=Alanlar
+fields_exp=Alanlar
+fill_color=Doldurma rengi
+fill_properties=Doldurma \u00f6zellikleri
+filter=S\u00fczge\u00e7
+filtered_features=S\u00fczge\u00e7lenen objeler
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=Sabit metin boyutu
+following_line=
+font=Yaz\u0131 tipi
+foreground_alpha=
+format=Bi\u00e7im
+from=
+fuente=Yaz\u0131 tipi
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=Derecelenmi\u015f simgeler
+grid=Grid
+high=Y\u00fcksek
+horizontal=Yatay
+ignore_zero_values=
+in_beyond=
+in_layer=katman\u0131n i\u00e7inde
+in_the_middle=ortas\u0131nda
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Hatal\u0131 ifade
+intervals=Aral\u0131klar
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=Eklenemeyecek
+label-point-priority-help=\u00d6ncelik\: 0 \= Bloklanm\u0131\u015f, 1 \= En y\u00fcksek, 3 \= En d\u00fc\u015f\u00fck
+label_class_properties=Etiket s\u0131n\u0131f \u00f6zellikleri
+label_expression=Etiket ifadesi
+label_expression_editor=Etiket ifadesi d\u00fczenleyici
+label_expression_help=
+label_features_in_the_same_way=Objeleri ayn\u0131 \u015fekilde etiketle
+label_features_in_this_class=bu s\u0131n\u0131ftaki etiket objeleri
+label_only_when_selected=Sadece obje se\u00e7ildi\u011finde etiketle
+label_priority=
+label_style_could_not_be_painted=
+label_styles=Etiket bi\u00e7emleri
+labeled_point=
+labeling=Etiketleme
+labeling_field=Etiketleme alan\u0131
+layer_name=Katman ad\u0131
+line=\u00c7izgi
+line_fill=\u00c7izgi doldur
+line_fill_symbol=\u00c7izgi doldurma simgesi
+line_settings=\u00c7izgi ayarlar\u0131
+lineal=
+lines=\u00c7izgiler
+location=Mevki
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=
+malformed_or_empty_expression=
+marker_fill=\u0130\u015faretleyici doldurma
+marker_fill_symbol=\u0130\u015faretleyici doldurma simgesi
+marker_line=\u0130\u015faretleyici \u00e7izgi
+marker_line_symbol=\u0130\u015faretleyici \u00e7izgi simgesi
+mas_de_100_simbolos=Bir haritada 100 den fazla simge genellikle herhangi bir bilgi vermez
+max_scale=En b\u00fcy\u00fck \u00f6l\u00e7ek
+medium=
+method=Y\u00f6ntem
+min_scale=
+minimum_angle_to_draw=
+modify_filter_expression=S\u00fczge\u00e7 ifadesini de\u011fi\u015ftir
+move_down=A\u015fa\u011f\u0131 ta\u015f\u0131
+move_up=Yukar\u0131 ta\u015f\u0131
+name=Ad
+names_and_types_count_are_disctint=
+new_filter_expression=Yeni s\u00fczge\u00e7 ifadesi
+no=Hay\u0131r
+no_expression_defined=Hi\u00e7 ifade belirlenmedi
+no_style=Bi\u00e7em yok
+no_symbol_especified=Hi\u00e7bir bi\u00e7em belirlenmedi
+none=Hi\u00e7biri
+normalization=Normalle\u015ftirme
+not_save_empty_legend=
+numeric_value=Rakamsal de\u011fer
+offset=
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=\u0130\u015fletmenler
+options=Se\u00e7imler
+orientation=Y\u00f6nlendirme
+orientation_system=Y\u00f6nlendirme sistemi
+out_beyond=
+outline=\u00c7er\u00e7eve
+outline_opacity=
+outline_width=S\u0131n\u0131r geni\u015fli\u011fi
+page=Sayfa
+parallel=Paralel
+pattern=Desen
+percentage=Y\u00fczde
+perpedicular=Dikey
+picture_file=Resim dosyas\u0131
+picture_fill=Resim doldurma
+picture_fill_symbol=Resim doldurma simgesi
+picture_line_symbol=Resim \u00e7izgi simgesi
+picture_marker=Resim i\u015faretleyicisi
+picture_marker_symbol=Resim i\u015faretleyici simgesi
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Her objeye bir etiket yerle\u015ftir
+place_one_label_per_feature_part=Her obje par\u00e7as\u0131na bir etiket yerle\u015ftir
+placement=Yerle\u015ftirme
+placement_priorities_selector=
+placement_properties=Yerle\u015ftirme \u00f6zellikleri
+point_settings=Nokta ayarlar\u0131
+points=Noktalar
+polygon=Poligon
+polygon_settings=Poligon ayarlar\u0131
+position=Konum
+prefer_top_right_all_allowed=
+preview=\u00d6ng\u00f6r\u00fcn\u00fc\u015f
+preview_not_available=\u00d6nizleme olanakl\u0131 de\u011fil
+properties=\u00d6zellikler
+proportional_symbols=
+quantity_by_category=Nicelik kategorileri
+quiere_continuar=Devam etmek istiyor musunuz?
+Quitar=Kald\u0131r
+Quitar_todos=T\u00fcm\u00fcn\u00fc kald\u0131r
+random=Rasgele
+recovering_recordset=
+rectangular=Dikd\u00f6rtgensel
+remane_class=S\u0131n\u0131f\u0131 yeniden adland\u0131r
+remove=Kald\u0131r
+remove_duplicate_labels=Tekrarl\u0131 etiketleri kald\u0131r
+resto_valores=Di\u011fer de\u011ferler
+scale=\u00d6l\u00e7ek
+scale_range_window_title=
+select=Se\u00e7
+select_one_row=Bir sat\u0131r se\u00e7
+selection_picture_file=Se\u00e7im resim dosyas\u0131
+separation=Ay\u0131rma
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=Boyut
+SLD_grammar=
+some_arguments_are_incorrect=baz\u0131 de\u011fi\u015fkenler ge\u00e7ersiz
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=SQL sorgusu
+statistics=\u0130statistikler
+string_value=Dizgi de\u011feri
+style=Bi\u00e7em
+style_selector=Bi\u00e7em se\u00e7ici
+symbol=Simge
+symbol_field=Simge alan\u0131
+symbol_shapetype_mismatch=
+syntax_error=S\u00f6zdizimi hatas\u0131
+template=\u015eablon
+text=Metin
+text_field=Metin
+text_fields=Metin alanlar\u0131
+text_string=Metin
+text_symbol=Metin simgesi
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=De\u011fi\u015fken say\u0131s\u0131 do\u011fru de\u011fil
+the_result_is_not_a_boolean_value=
+to=
+URL=
+use_outline=Altl\u0131k kullan
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=kullan\u0131c\u0131 tan\u0131ml\u0131 etiketler
+usupported_layer_type=Desteklenmeyen katman tipi
+value=De\u011fer
+value_fields=
+variation_by=
+verify=Do\u011frula
+visible=G\u00f6r\u00fcn\u00fcr
+visualization=G\u00f6r\u00fcnt\u00fcleme
+warning=Uyar\u0131
+width=Geni\u015flik
+x_offset=
+y_offset=
+yes=Evet
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ru.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ru.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_ru.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [ru]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=
+above=
+accept=
+accessing_file_structure=
+add=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c
+add_class=
+add_expression=
+add_field=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435
+add_operator=
+add_text_area=
+all_features=
+all_supported_background_image_formats=
+allow_label_overlapping=
+always_circular=
+always_horizontal=
+always_straight=
+angle=
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=
+at_best=
+at_end=
+at_fields=
+background=
+background_color=\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430
+background_style=
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=
+bitmap_and_svg_image_files=
+boolean_value=\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435
+browse=\u041e\u0442\u043a\u0440\u044b\u0442\u044c
+buffered=
+cancel=\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c
+cannot_apply_to_a_non_polygon_layer=
+cannot_be_null=
+cannot_exist_two_label_classes_with_the_same_name=
+cannot_install_labeling_method=
+cant_draw_preview=
+change_location=
+character_marker=
+character_marker_symbol=
+choose_marker=
+circular=
+class=
+classes=
+classifying_field_name_not_found=
+clear=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c
+color=\u0426\u0432\u0435\u0442\:
+color_field=
+color_ramp=
+confirmation_dialog=
+constant=
+correct_expression=
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=
+date_value=\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435
+default=\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=
+delete=
+delete_class=
+delete_filter_expression=
+densities=
+depth_factor=
+description=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435
+divided_by_0=
+dont_show_labels_when_zoomed=
+dot_density=
+dot_size=
+dot_value=
+draw_quantities_for_each_category=
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=
+edit_expression=
+Enable_layer_preview=
+enter_new_name=
+error=\u041e\u0448\u0438\u0431\u043a\u0430
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=\u041e\u0448\u0438\u0431\u043a\u0430
+error_trying_to_access_to_the_layer=
+error_validating_filter_query=
+expression=
+expression_creator=
+expressions=
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=
+field_number=
+fields=\u041f\u043e\u043b\u044f
+fields_exp=
+fill_color=
+fill_properties=
+filter=\u0424\u0438\u043b\u044c\u0442\u0440
+filtered_features=
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=
+following_line=
+font=
+foreground_alpha=
+format=\u0424\u043e\u0440\u043c\u0430\u0442
+from=
+fuente=\u0428\u0440\u0438\u0444\u0442
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=
+grid=
+high=
+horizontal=\u0410\u043b\u044c\u0431\u043e\u043c\u043d\u0430\u044f
+ignore_zero_values=
+in_beyond=
+in_layer=
+in_the_middle=
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=
+intervals=
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=
+label-point-priority-help=
+label_class_properties=
+label_expression=
+label_expression_editor=
+label_expression_help=
+label_features_in_the_same_way=
+label_features_in_this_class=
+label_only_when_selected=
+label_priority=
+label_style_could_not_be_painted=
+label_styles=
+labeled_point=
+labeling=
+labeling_field=
+layer_name=\u0418\u043c\u044f \u0441\u043b\u043e\u044f
+line=\u041b\u0438\u043d\u0438\u044f
+line_fill=
+line_fill_symbol=
+line_settings=
+lineal=
+lines=
+location=
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=
+malformed_or_empty_expression=
+marker_fill=
+marker_fill_symbol=
+marker_line=
+marker_line_symbol=
+mas_de_100_simbolos=\u041d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432 \u041a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435 \u043d\u0430\u0434\u043f\u0438\u0441\u0435\u0439 \u0434\u043b\u0438\u043d\u043e\u0439 \u0431\u043e\u043b\u0435\u0435 100 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432
+max_scale=\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431
+medium=
+method=
+min_scale=\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431
+minimum_angle_to_draw=
+modify_filter_expression=
+move_down=
+move_up=
+name=\u0418\u043c\u044f
+names_and_types_count_are_disctint=
+new_filter_expression=
+no=\u041d\u0435\u0442
+no_expression_defined=
+no_style=
+no_symbol_especified=
+none=\u043d\u0438 \u043e\u0434\u0438\u043d
+normalization=
+not_save_empty_legend=
+numeric_value=\u0427\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435
+offset=
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=
+options=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438
+orientation=
+orientation_system=
+out_beyond=
+outline=\u041a\u043e\u043d\u0442\u0443\u0440
+outline_opacity=
+outline_width=
+page=
+parallel=
+pattern=
+percentage=
+perpedicular=
+picture_file=
+picture_fill=
+picture_fill_symbol=
+picture_line_symbol=
+picture_marker=
+picture_marker_symbol=
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=
+place_one_label_per_feature_part=
+placement=
+placement_priorities_selector=
+placement_properties=
+point_settings=
+points=
+polygon=\u041f\u043e\u043b\u0438\u0433\u043e\u043d
+polygon_settings=
+position=
+prefer_top_right_all_allowed=
+preview=
+preview_not_available=
+properties=\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430
+proportional_symbols=
+quantity_by_category=
+quiere_continuar=\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435?
+Quitar=\u0423\u0434\u0430\u043b\u0438\u0442\u044c
+Quitar_todos=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435
+random=
+recovering_recordset=
+rectangular=
+remane_class=
+remove=\u0423\u0434\u0430\u043b\u0438\u0442\u044c
+remove_duplicate_labels=
+resto_valores=\u0414\u0440\u0443\u0433\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f
+scale=\u041c\u0430\u0441\u0448\u0442\u0430\u0431
+scale_range_window_title=
+select=\u0412\u044b\u0431\u0440\u0430\u0442\u044c
+select_one_row=
+selection_picture_file=
+separation=
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=\u0420\u0430\u0437\u043c\u0435\u0440
+SLD_grammar=
+some_arguments_are_incorrect=
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=
+statistics=\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430
+string_value=\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435
+style=\u0421\u0442\u0438\u043b\u044c
+style_selector=
+symbol=
+symbol_field=
+symbol_shapetype_mismatch=
+syntax_error=
+template=
+text=\u0422\u0435\u043a\u0441\u0442
+text_field=
+text_fields=
+text_string=
+text_symbol=
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=
+the_result_is_not_a_boolean_value=
+to=\u0412
+URL=
+use_outline=
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=
+usupported_layer_type=
+value=\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435
+value_fields=
+variation_by=
+verify=
+visible=\u0412\u0438\u0434\u0438\u043c\u044b\u0439
+visualization=
+warning=\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435
+width=\u0428\u0438\u0440\u0438\u043d\u0430
+x_offset=
+y_offset=
+yes=OK
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_de.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_de.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_de.properties	(revision 40911)
@@ -0,0 +1,295 @@
+#Translations for language [de]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=Standard-Symbol wird verwendet
+above=oberhalb
+accept=OK
+accessing_file_structure=Auf das Dateiverzeichnis zugreifen
+add=Hinzuf\u00fcgen
+add_class=Klasse hinzuf\u00fcgen
+add_expression=Ausdruck hinzuf\u00fcgen
+add_field=Feld hinzuf\u00fcgen
+add_operator=Operator hinzuf\u00fcgen
+add_text_area=Textfeld hinzuf\u00fcgen
+all_features=Alle Elemente
+all_supported_background_image_formats=Alle unterst\u00fctzten Formate von Hintergrundbildern
+allow_label_overlapping=\u00dcberlappungen zulassen
+always_circular=immer kreisf\u00f6rmig
+always_horizontal=waagrecht
+always_straight=angepasst
+angle=Winkel
+anticlockwise=gegen den Uhrzeigersinn
+apply_visual_correction_to_glyph_for_precise_size_and_position=Korrektur der grafischen Darstellung eines Schriftzeichens bzgl. Position und Gr\u00f6\u00dfe.
+arguments_added_to_a_costant=Hinzuf\u00fcgen von Werten zu einer Konstante
+at_begin=Anfang
+at_best=optimale Lage
+at_end=Ende
+at_fields=zu den Feldern
+background=Hintergrund
+background_color=Hintergrundfarbe
+background_style=Anzeige Hintergrund
+barchar3d_legend=BarChart3D Legende
+barchar3d_legend_desc=BarChart3D Legende absteigend
+barchart_3D=BarChart3D
+below=unterhalb
+bitmap_and_svg_image_files=bmp- und svg- Dateien
+boolean_value=Boolscher Wert
+browse=Durchsuchen
+buffered=Form des Polygons
+cancel=Abbrechen
+cannot_apply_to_a_non_polygon_layer=Dies kann nur f\u00fcr einen Polygon- Layer durchgef\u00fchrt werden
+cannot_be_null=Darf nicht Null sein
+cannot_exist_two_label_classes_with_the_same_name=Es d\u00fcrfen keine Beschriftungen mit gleichem Namen vorkommen
+cannot_install_labeling_method=Diese Beschriftungsmethode kann nicht verwendet werden
+cant_draw_preview=Vorschau kann nicht erstellt werden
+Capa=Layer
+change_location=\u00c4nderung der Position
+character_marker=Charakter Marker 
+character_marker_symbol=Charakter Marker-Symbol
+choose_marker=Marker w\u00e4hlen
+circular=kreisf\u00f6rmig
+class=Klasse
+classes=Klassen
+classifying_field_name_not_found=Name f\u00fcr die Klassifizierung nicht gefunden
+clear=L\u00f6schen
+color=Farbe\:
+color_field=Farbfeld
+color_ramp=Farbe
+confirmation_dialog=Best\u00e4tigungsdialog
+constant=Konstante
+correct_expression=Richtiger Ausdruck
+could_not_get_shape_type=Geometrie des Shp konnte nicht gefunden werden
+could_not_retreive_layer_field_names=
+could_not_retrieve_field_names=
+could_not_set_labeling_to_labelable_element=
+could_not_setup_legend=Legende konnte nicht geladen werden
+date_value=Datums-Wert
+default=Standard
+define_classes_of_features_and_label_each_differently=Definition von Objektklassen und eigene Beschriftung je Klasse
+Defines_a_dot_density_symbol_based_on_a_field_value=Durch Anzahl und Dichte von Punkten, wird ein Wert der Attributtabelle dargestellt
+delete=L\u00f6schen
+delete_class=Klasse l\u00f6schen
+delete_filter_expression=Ausdruck im Filter l\u00f6schen
+densities=Dichte
+depth_factor=
+description=Beschreibung
+divided_by_0=geteilt durch 0
+dont_show_labels_when_zoomed=Beschriftung im Ma\u00dfstabsbereich nicht darstellen
+dot_density=Punktdichte
+dot_size=Punktgr\u00f6\u00dfe
+dot_value=Punktwert
+draw_quantities_for_each_category=Legenden erzeugen durch Farb- und Symbolfeld. Kann verwendet werden, um die Beziehung zwischen zwei unabh\u00e4ngigen Attributwerten darzustellen. 
+draw_quantities_using_symbol_size_to_show_exact_values=Proportionale Symbolgr\u00f6\u00dfe f\u00fcr normalisierte Feldwerte. Damit werden Unterschiede in den Attributwerten durch eine angepasste Symbolgr\u00f6\u00dfe dargestellt.
+draw_quantities_using_symbol_size_to_show_relative_values=Abgestufte Symbolgr\u00f6\u00dfe, um die Unterschiede in der Quantit\u00e4t von Feldwerten darzustellen.
+duplicate_labels=Mehrfach- Beschriftungen
+edit_expression=Ausdruck editieren
+Enable_layer_preview=Layervorschau an
+enter_new_name=Neuen Namen eingeben
+error=Fehler
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Filter mit ung\u00fcltigem Format
+error_trying_to_access_to_the_layer=Fehler beim Versuch auf den Layer zuzugreifen
+error_validating_filter_query=Fehler beim \u00dcberpr\u00fcfen der SQL-Abfrage.
+expression=Ausdruck
+expression_creator=Filter-Ausdruck erzeugen
+expressions=Ausdr\u00fccke
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=Die Beschriftung entlang der Linie konnte nicht gesetzt werden. Die Standardeinstellung wird verwendet.
+failed_computing_intervals=Fehler bei der Berechnung von Intervallen. 
+features=Objekte
+field_number=Feldnummer
+fields=Felder
+fields_exp=Felder
+fill_color=Farbe der F\u00fcllung
+fill_properties=Eigenschaften
+filter=Filter
+filtered_features=Ausgew\u00e4hlte Objekte
+fit_inside_polygon=angepasst innerhalb eines Polygons
+fit_on_text_area=angepasst an das Textfeld
+fixed_text_size=Textgr\u00f6\u00dfe
+following_line=der Linie folgend
+font=Schrift
+foreground_alpha=
+format=Format
+from=von
+fuente=Schrift
+GeneralLabeling.sample_text=
+generating_intervals=Intervalle werden generiert
+getting_layer_shape_type=auf Layer vom Typ Shape zur\u00fccksetzen
+gradient_color=Farbverlauf
+gradient_fill=Farbverlauf
+gradient_fill_symbol=Symbol durch Farbverlauf
+graduated_symbols=abgestufte Symbole
+grid=Gitter
+high=Hoch
+horizontal=Horizontal
+ignore_zero_values=
+in_beyond=Max.Ma\u00dfstabsbereich
+in_layer=inerhalb Layer
+in_the_middle=Mitte
+in_the_world=originalgetreu
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=Falscher Ausdruck
+intervals=Intervalle
+invalid_filter_expression=
+invalid_url=ung\u00fcltiges Format der WFS Server URL
+it_will_not_be_added=kann nicht hinzugef\u00fcgt werden
+label-point-priority-help=Priorit\u00e4t\: 0 \= normale, 1 \= h\u00f6here, 3 \= geringere
+label_class_properties=Eigenschaften zur Klasse der Beschriftung
+label_expression=Ausdruck der Beschriftung
+label_expression_editor=Editor f\u00fcr Beschriftungsausdruck
+label_expression_help=
+label_features_in_the_same_way=Einheitliche Beschriftung aller Objekte 
+label_features_in_this_class=Objekte dieser Klasse beschriften
+label_only_when_selected=Selektierte Objekte beschriften
+label_priority=Priorit\u00e4t in der Beschriftung
+label_style_could_not_be_painted=
+label_styles=Beschriftungstyp
+labeled_point=
+labeling=Beschriftung
+labeling_field=Feld w\u00e4hlen
+layer_name=Layer-Name
+line=Reihe
+line_fill=Linien-Symbol
+line_fill_symbol=Linien-Symbol
+line_settings=Einstellungen zur Linie
+lineal=Linear
+lines=Linien
+location=Standort
+location_along_the_lines=Platzierung entlang von Linien
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=Es scheint, als w\u00e4re der Wert f\u00fcr einen Punkt zu gering. Dies f\u00fchrt dazu, dass das System langsamer wird und nicht mehr antwortet.
+low=Gering
+malformed_or_empty_expression=Fehlerhafter oder kein Ausdruck wurde definiert
+marker_fill=Marker-Symbol
+marker_fill_symbol=Marker-Symbol
+marker_line=Marker line
+marker_line_symbol=Marker Linien-Symbol
+mas_de_100_simbolos=Eine Karte mit mehr als 100 Symbolen ist unlesbar.
+max_scale=Max. Ma\u00dfstab
+medium=Mittel
+method=Methode
+min_scale=Min. Ma\u00dfstab
+minimum_angle_to_draw=
+modify_filter_expression=Filterausdruck ver\u00e4ndern
+move_down=Nach unten
+move_up=nach oben
+name=Name
+names_and_types_count_are_disctint=Anzahl der Felder und der verschiedenen Feldtypen
+new_filter_expression=Neuer Filterausdruck
+no=Nein
+no_expression_defined=Ausdruck nicht definiert
+no_style=kein Hintergrund
+no_symbol_especified=Es wurde kein Symbol definiert
+none=keine/er
+normalization=Normalisierung
+not_save_empty_legend=Leere Legende wurde nicht gespeichert
+numeric_value=Numerischer Wert
+offset=Versatz
+offset_label=Beschriftung verschieben
+offset_labels_horizontally=Verschiebung waagrecht in Bezug auf einen Punkt
+offset_labels_on_top_of_the_points=Verschiebung der Beschriftung auf einen Punkt
+on_the_line=auf der Linie
+operation_not_allowed_for_SingleLabelingStrategy=F\u00fcr einfache Beschriftung\: Ausf\u00fchren nicht erlaubt\!
+operators=Operatoren
+options=Optionen
+orientation=Ausrichtung
+orientation_system=Ausrichtung
+out_beyond=Min.Ma\u00dfstabsbereich
+outline=Au\u00dfenlinie
+outline_opacity=Transparenz der Au\u00dfenlinie
+outline_width=Strichst\u00e4rke der Au\u00dfenlinie
+page=Seite
+parallel=parallel
+pattern=Muster
+percentage=Prozent
+perpedicular=senkrecht
+picture_file=Bild w\u00e4hlen
+picture_fill=Bild-Symbol
+picture_fill_symbol=Bild-Symbol
+picture_line_symbol=Bild Linien-Symbol 
+picture_marker=Marker durch Bild
+picture_marker_symbol=Bild Marker-Symbol
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=Beschriftung pro Objekt vergeben
+place_one_label_per_feature_part=Beschriftung f\u00fcr jeden Teil des Objektes vergeben
+placement=Platzierung
+placement_priorities_selector=Eigenschaften Platzierung
+placement_properties=Eigenschaften Platzierung
+point_settings=Einstellungen zum Punkt
+points=Punkte
+polygon=Polygon
+polygon_settings=Einstellungen zum Polygon
+position=Position
+prefer_top_right_all_allowed=bevorzugt oben rechts
+preview=Vorschau
+preview_not_available=Vorschau nicht verf\u00fcgbar
+properties=Eigenschaften
+proportional_symbols=proportionale Symbole
+quantity_by_category=multivariat
+quiere_continuar=Wollen Sie fortfahren?
+Quitar=Entfernen
+Quitar_todos=Alle entfernen
+random=zuf\u00e4llig
+recovering_recordset=Datensatz wiederherstellen.
+rectangular=rechteckig
+remane_class=Klasse umbenennen
+remove=Entfernen
+remove_duplicate_labels=Doppelte Beschriftung entfernen
+resto_valores=Default- Werte
+scale=Skalieren
+scale_range_window_title=Ma\u00dfstabsbereich
+select=Ausw\u00e4hlen
+select_one_row=eine Zeile ausw\u00e4hlen
+selection_picture_file=zweites Bild
+separation=Separation
+set_forbidden_precedence=Priorit\u00e4t trotzdem setzen
+set_high_precedence=H\u00f6chste Priorit\u00e4t setzen
+set_low_precedence=Niedrigste Priorit\u00e4t setzen
+set_normal_precedence=H\u00f6chste Priorit\u00e4t setzen
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=Zeigt die Elemente eines Layers abh\u00e4ngig von einem Filter- Ausdruck an
+simple_labeling=
+simple_marker=Simple Marker
+single_labeling=Einfache Beschriftung
+single_labeling_setup=Konfiguration zur einfachen Beschriftung
+size=Gr\u00f6\u00dfe
+SLD_grammar=SLD- Sprache
+some_arguments_are_incorrect=Einige Argumente sind nicht korrekt
+specify_the_range_of_scales_at_which_labels_will_be_shown=Ma\u00dfstabsbereich festlegen, indem die Beschriftung dargestellt werden soll
+SQL_query=SQL Befehl
+statistics=Statistik
+string_value=Wert der Zeichenkette
+style=Stil
+style_selector=Style-Editor
+symbol=Symbol
+symbol_field=Symbol-Feld
+symbol_shapetype_mismatch=
+syntax_error=Fehler in Syntax
+template=Vorlage
+text=Text
+text_field=Textfeld
+text_fields=Textfelder
+text_string=Text
+text_symbol=Text-Symbol
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=Die Nummer von Argumenten ist nicht korrekt
+the_result_is_not_a_boolean_value=Das Ergebnis ist kein Wert vom Typ Boolean
+to=zu
+Tools_Select=Auswahl des Werkzeuges
+URL=
+use_default_symbol=Standard-Symbol
+use_outline=Umriss verwenden
+use_the_same_scale_range_as_the_feature_layer=Ma\u00dfstabsbereich des Layers verwenden
+user_defined_labels=benutzerdefinierte Beschriftungen
+usupported_layer_type=Layertyp wird nicht unterst\u00fctzt
+value=Wert
+value_fields=Wertefelder
+variation_by=Legendentypen
+verify=Pr\u00fcfen
+visible=sichtbar
+visualization=Anzeigemen\u00fc
+warning=Achtung
+width=Breite
+x_offset=Offset von X
+y_offset=Offset von Y
+yes=Ja
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_sw.properties
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_sw.properties	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/i18n/text_sw.properties	(revision 40911)
@@ -0,0 +1,284 @@
+#Translations for language [sw]
+#Mon Sep 21 10:02:12 CEST 2009
+a_default_symbol_will_be_used=
+above=
+accept=Kubali
+accessing_file_structure=
+add=Ongeza
+add_class=
+add_expression=
+add_field=Ongeza safu
+add_operator=
+add_text_area=
+all_features=
+all_supported_background_image_formats=
+allow_label_overlapping=
+always_circular=
+always_horizontal=
+always_straight=
+angle=Pembe
+anticlockwise=
+apply_visual_correction_to_glyph_for_precise_size_and_position=
+arguments_added_to_a_costant=
+at_begin=
+at_best=
+at_end=
+at_fields=
+background=
+background_color=Rangi ya Mahali pa Nyuma ya Picha
+background_style=
+barchar3d_legend=
+barchar3d_legend_desc=
+barchart_3D=
+below=
+bitmap_and_svg_image_files=
+boolean_value=Thamani ya Booleani
+browse=Pitia pitia kwa juu juu
+buffered=
+cancel=Futa
+cannot_apply_to_a_non_polygon_layer=Haiwezekani Kutumika kwa Safu Isiyokuwa ya data za kipoligoni
+cannot_be_null=
+cannot_exist_two_label_classes_with_the_same_name=
+cannot_install_labeling_method=
+cant_draw_preview=
+change_location=
+character_marker=Kiandika Herufi
+character_marker_symbol=Kiandika Herufi
+choose_marker=Chagua Alama ya Utambulisho
+circular=
+class=
+classes=
+classifying_field_name_not_found=
+clear=Futa
+color=Rangi
+color_field=
+color_ramp=
+confirmation_dialog=Mawasiliano ya Kuweka Uhakika
+constant=
+correct_expression=
+could_not_get_shape_type=
+could_not_retreive_layer_field_names=
+could_not_setup_legend=Haiwezi  kuweka hekaya. Tafadhali angalia thamni ya vitu
+date_value=Tarehe Halisi
+default=Ya kawaida
+define_classes_of_features_and_label_each_differently=
+Defines_a_dot_density_symbol_based_on_a_field_value=Inabainisha Msongamano wa Alama za Dot kwa Kutegemea Thamani kwenye Safu iIiyo Chaguliwa
+delete=
+delete_class=
+delete_filter_expression=
+densities=Misongamano
+depth_factor=
+description=Maelezo
+divided_by_0=
+dont_show_labels_when_zoomed=
+dot_density=Msongamano wa doti
+dot_size=Ukubwa wa doti
+dot_value=Thamani y doti
+draw_quantities_for_each_category=
+draw_quantities_using_symbol_size_to_show_exact_values=
+draw_quantities_using_symbol_size_to_show_relative_values=
+duplicate_labels=
+edit_expression=
+Enable_layer_preview=
+enter_new_name=
+error=Kosa
+error\ accessing\ to\ the\ layer=
+error_coding_filter_query=Kosa Katika Mfumo wa Kuuliza Swali
+error_trying_to_access_to_the_layer=
+error_validating_filter_query=
+expression=
+expression_creator=
+expressions=
+failed_acessing_files=
+failed_applying_following_line_will_use_default_confg=
+failed_computing_intervals=
+features=
+field_number=
+fields=Safu.
+fields_exp=
+fill_color=Jaza Rangi
+fill_properties=JazaTabia zake
+filter=Chanbua(Kwakukuchuja)
+filtered_features=
+fit_inside_polygon=
+fit_on_text_area=
+fixed_text_size=
+following_line=
+font=
+foreground_alpha=
+format=Muundo
+from=Kutoka
+fuente=Aina ya Herufi
+GeneralLabeling.sample_text=
+generating_intervals=
+getting_layer_shape_type=
+gradient_color=
+gradient_fill=
+gradient_fill_symbol=
+graduated_symbols=
+grid=Miraba Fito
+high=Juu
+horizontal=Mlalo/ Sambamba na Upeo wa Macho
+ignore_zero_values=
+in_beyond=
+in_layer=
+in_the_middle=
+incompatible_types_to_calculate_the_normalization=
+incorrect_expression=
+intervals=
+invalid_filter_expression=
+invalid_url=
+it_will_not_be_added=
+label-point-priority-help=
+label_class_properties=
+label_expression=
+label_expression_editor=
+label_expression_help=
+label_features_in_the_same_way=
+label_features_in_this_class=
+label_only_when_selected=
+label_priority=
+label_style_could_not_be_painted=
+label_styles=
+labeled_point=
+labeling=
+labeling_field=
+layer_name=Jina la Tabaka
+line=Mstari
+line_fill=
+line_fill_symbol=
+line_settings=
+lineal=
+lines=
+location=Mahali
+location_along_the_lines=
+looks_like_too_low_value_for_this_field_may_cause_system_to_run_slow=
+low=Chini
+malformed_or_empty_expression=
+marker_fill=Wino wa Kujaza
+marker_fill_symbol=
+marker_line=
+marker_line_symbol=
+mas_de_100_simbolos=Zaidi ya Alama 100 kawaida Hazionyeshi Habari Zozote Katika Ramani
+max_scale=Skeli ya Juu
+medium=Ya kati
+method=Njia
+min_scale=Skeli ndogo kuliko zote
+minimum_angle_to_draw=
+modify_filter_expression=
+move_down=
+move_up=
+name=nakili
+names_and_types_count_are_disctint=
+new_filter_expression=
+no=Hapana
+no_expression_defined=
+no_style=
+no_symbol_especified=
+none=Hakuna
+normalization=
+not_save_empty_legend=
+numeric_value=Kiwango kwa Tarakimu
+offset=Sawazisha
+offset_label=
+offset_labels_horizontally=
+offset_labels_on_top_of_the_points=
+on_the_line=
+operators=
+options=Uchaguzi
+orientation=
+orientation_system=
+out_beyond=
+outline=Mstari wa kuonyesha umbo au mpaka
+outline_opacity=
+outline_width=Upana wa Mstari wa kuonyesha umbo au mpaka
+page=Ukurasa
+parallel=
+pattern=
+percentage=
+perpedicular=
+picture_file=
+picture_fill=
+picture_fill_symbol=
+picture_line_symbol=
+picture_marker=
+picture_marker_symbol=
+pie_properties=
+piechart_3D=
+piechart_3D_legend_desc=
+place_one_label_per_feature=
+place_one_label_per_feature_part=
+placement=
+placement_priorities_selector=
+placement_properties=
+point_settings=
+points=
+polygon=Poligoni
+polygon_settings=
+position=
+prefer_top_right_all_allowed=
+preview=Onyesho la Awali
+preview_not_available=
+properties=Tabia
+proportional_symbols=
+quantity_by_category=
+quiere_continuar=Je ungependa kuendelea ?
+Quitar=Ondoa
+Quitar_todos=Ondoa Yote
+random=Bila Taratibu
+recovering_recordset=
+rectangular=
+remane_class=
+remove=Ondoa\:
+remove_duplicate_labels=
+resto_valores=Viwango Vingine
+scale=Skeli
+scale_range_window_title=
+select=Chagua
+select_one_row=
+selection_picture_file=
+separation=Kutenganisha
+set_forbidden_precedence=
+set_high_precedence=
+set_low_precedence=
+set_normal_precedence=
+shows_the_elements_of_the_layer_depending_on_the_value_of_a_filter_expression=
+size=Ukumbwa
+SLD_grammar=
+some_arguments_are_incorrect=
+specify_the_range_of_scales_at_which_labels_will_be_shown=
+SQL_query=
+statistics=Takwimu
+string_value=Kiwango cha Mtungo wa herufi
+style=Mtindo
+style_selector=
+symbol=
+symbol_field=
+symbol_shapetype_mismatch=
+syntax_error=
+template=
+text=Maandishi ya kawaida
+text_field=
+text_fields=
+text_string=
+text_symbol=
+the\ size\ for\ the\ symbol\ is\ equal\ to\ NaN\ =
+the_number_or_arguments_is_incorrect=
+the_result_is_not_a_boolean_value=
+to=Kwenda
+URL=
+use_outline=
+use_the_same_scale_range_as_the_feature_layer=
+user_defined_labels=
+usupported_layer_type=
+value=Thamani 
+value_fields=
+variation_by=
+verify=
+visible=Kuonekana Wazi
+visualization=
+warning=Onyo
+width=Upana
+x_offset=
+y_offset=
+yes=ndiyo
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/config.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/config.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/config.xml	(revision 40911)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+    gvSIG. Desktop Geographic Information System.
+
+    Copyright (C) 2007-2013 gvSIG Association.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA  02110-1301, USA.
+
+    For any additional information, do not hesitate to contact us
+    at info AT gvsig.com, or visit our website www.gvsig.com.
+
+-->
+
+<plugin-config>
+	<depends plugin-name="org.gvsig.app.mainplugin" />
+
+	<resourceBundle name="text"/>
+	<libraries library-dir="lib"/>
+	<extensions>
+		<extension class-name="org.gvsig.labeling.ExtendedLabelingExtension"
+			description="Extended labeling options"
+			active="true"
+			priority="1">
+		</extension>		
+	</extensions>
+</plugin-config>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/set-low-precedence.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/set-low-precedence.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/table-export.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/table-export.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/edit-add-background-image.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/edit-add-background-image.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/single-labeling-tool.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/single-labeling-tool.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/layer-export.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/layer-export.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/single-labeling-tool-config.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/single-labeling-tool-config.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/set-normal-precedence.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/set-normal-precedence.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/edit-add-text.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/edit-add-text.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/edit-shift-component.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/edit-shift-component.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/set-forbidden-precedence.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/set-forbidden-precedence.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/edit-remove-text.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/edit-remove-text.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/set-high-precedence.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/action/set-high-precedence.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/preferences/export-to-preferences.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/images/preferences/export-to-preferences.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/bg-polygon.shp
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/bg-polygon.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/bg-polygon.dbf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/bg-polygon.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/line.shx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/line.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/polygon.shx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/polygon.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/bg-polygon.shx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/bg-polygon.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/line.shp
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/line.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/polygon.shp
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/polygon.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/line.dbf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/line.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/polygon.dbf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/docs/polygon.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/plugin-persistence.def
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/plugin-persistence.def	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/resources-plugin/plugin-persistence.def	(revision 40911)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!--
+Definitions of plugin persistence org.gvsig.exportto.app.extension.  
+ -->
+<definitions>
+  <version>1.0.0</version>
+  <classes>
+    <class name="org.gvsig.exportto.app.extension">
+      <description>Persistence of the Exportto plugin</description>
+      <fields>
+        <field name="enabledProviders" type="Set" classOfItems="java.lang.String" mandatory="false">
+          <description>List of export to provider names enabled by the user</description>
+        </field>
+        <field name="disabledProviders" type="Set" classOfItems="java.lang.String" mandatory="false">
+          <description>List of export to provider names disabled by the user</description>
+        </field>
+      </fields>
+    </class>
+  </classes>
+</definitions>  
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/pom.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/pom.xml	(revision 40911)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.labeling.app</artifactId>
+  <packaging>pom</packaging>
+  <name>${project.artifactId}</name>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop.plugin</artifactId>
+      <version>2.0.21-SNAPSHOT</version>
+  </parent>
+  
+  <modules>
+    <module>org.gvsig.labeling.app.mainplugin</module>
+  </modules>
+</project>
