Revision 11548

View differences:

trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ProjectExtension.java
659 659
	 */
660 660
	public void setProject(Project p){
661 661
		getProjectFrame().setProject(p);
662
		p.setSignature(p.getXMLEntity().hash());
663 662
		this.p=p;
664 663
	}
665 664

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toc/gui/TOC.java
93 93
import com.iver.cit.gvsig.fmap.layers.layerOperations.Classifiable;
94 94
import com.iver.cit.gvsig.fmap.layers.layerOperations.IHasImageLegend;
95 95
import com.iver.cit.gvsig.fmap.layers.layerOperations.LayerCollection;
96
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegendInfo;
96
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegend;
97 97
import com.iver.cit.gvsig.fmap.rendering.Legend;
98 98
import com.iver.cit.gvsig.fmap.rendering.LegendChangedEvent;
99 99
import com.iver.cit.gvsig.fmap.rendering.SingleSymbolLegend;
......
314 314
                    Legend legendInfo = aux.getLegend();
315 315

  
316 316
                    try {
317
                        if (legendInfo instanceof ClassifiedLegendInfo) {
318
                            ClassifiedLegendInfo cl = (ClassifiedLegendInfo) legendInfo;
317
                        if (legendInfo instanceof ClassifiedLegend) {
318
                            ClassifiedLegend cl = (ClassifiedLegend) legendInfo;
319 319
                            String[] descriptions = cl.getDescriptions();
320 320
                            ISymbol[] symbols = cl.getSymbols();
321 321

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/gui/LegendManager.java
77 77
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData;
78 78
import com.iver.cit.gvsig.fmap.layers.layerOperations.Classifiable;
79 79
import com.iver.cit.gvsig.fmap.layers.layerOperations.ClassifiableVectorial;
80
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegend;
80
import com.iver.cit.gvsig.fmap.rendering.ClassifiedVectorialLegend;
81 81
import com.iver.cit.gvsig.fmap.rendering.Legend;
82 82
import com.iver.cit.gvsig.fmap.rendering.SingleSymbolLegend;
83 83
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend;
......
573 573
			if (laux instanceof ClassifiableVectorial) {
574 574
				ClassifiableVectorial aux2 = (ClassifiableVectorial) laux;
575 575
				try {
576
					if (legend instanceof ClassifiedLegend) {
576
					if (legend instanceof ClassifiedVectorialLegend) {
577 577
						// Es una leyenda que necesita un recordset con un
578 578
						// nombre de campo. Comprobamos que ese recordset
579 579
						// tiene ese nombre de campo y es del tipo esperado
580
						ClassifiedLegend cl = (ClassifiedLegend) legend;
580
						ClassifiedVectorialLegend cl = (ClassifiedVectorialLegend) legend;
581 581

  
582 582
						if (aux2 instanceof AlphanumericData) {
583 583
							DataSource rs;
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/FFrameScaleBar.java
295 295
    public void setUnits(int s) {
296 296
        m_units = s;
297 297
        m_typeUnit = Attributes.CHANGE[s];
298
        m_nameUnit = PluginServices.getText(this,Attributes.NAMES[s]);
298
        m_nameUnit = PluginServices.getText(this,MapContext.NAMES[s]);
299 299
    }
300 300

  
301 301
    /**
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/gui/dialogs/FFrameScaleBarDialog.java
63 63
import com.iver.andami.PluginServices;
64 64
import com.iver.andami.ui.mdiManager.WindowInfo;
65 65
import com.iver.cit.gvsig.AddLayer;
66
import com.iver.cit.gvsig.fmap.MapContext;
66 67
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
67 68
import com.iver.cit.gvsig.gui.utils.FontChooser;
68
import com.iver.cit.gvsig.project.documents.layout.Attributes;
69 69
import com.iver.cit.gvsig.project.documents.layout.FLayoutUtilities;
70 70
import com.iver.cit.gvsig.project.documents.layout.fframes.FFrameScaleBar;
71 71
import com.iver.cit.gvsig.project.documents.layout.fframes.FFrameView;
......
413 413
	private javax.swing.JComboBox getCbUnidades() {
414 414
		if (cbUnidades == null) {
415 415
			//String[] s={"Kil?metros","metros","cent?metros","mil?metros","millas","yardas","pies","pulgadas"};
416
			cbUnidades = new javax.swing.JComboBox(Attributes.NAMES);
416
			cbUnidades = new javax.swing.JComboBox(MapContext.NAMES);
417 417
			cbUnidades.setSelectedIndex(fframescalebar.getUnits());
418 418
			cbUnidades.setPreferredSize(new java.awt.Dimension(150, 20));
419 419
			cbUnidades.addActionListener(new java.awt.event.ActionListener() {
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/FFrameLegend.java
63 63
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData;
64 64
import com.iver.cit.gvsig.fmap.layers.layerOperations.Classifiable;
65 65
import com.iver.cit.gvsig.fmap.layers.layerOperations.IHasImageLegend;
66
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegendInfo;
66
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegend;
67 67
import com.iver.cit.gvsig.project.documents.exceptions.SaveException;
68 68
import com.iver.cit.gvsig.project.documents.layout.FLayoutUtilities;
69 69
import com.iver.cit.gvsig.project.documents.layout.LayoutContext;
......
244 244
                } else if (layer instanceof AlphanumericData && !(layer instanceof IHasImageLegend) ) {
245 245
                    AlphanumericData cO = (AlphanumericData) layer;
246 246

  
247
                    if (((Classifiable) cO).getLegend() instanceof ClassifiedLegendInfo && !(cO instanceof FLyrAnnotation)) {
248
                        ClassifiedLegendInfo cli = (ClassifiedLegendInfo) ((Classifiable) cO).getLegend();
247
                    if (((Classifiable) cO).getLegend() instanceof ClassifiedLegend && !(cO instanceof FLyrAnnotation)) {
248
                        ClassifiedLegend cli = (ClassifiedLegend) ((Classifiable) cO).getLegend();
249 249
                        double dX = 0;
250 250
                        double dY = n[0] * h;
251 251

  
......
547 547
                    AlphanumericData cO = (AlphanumericData) layer;
548 548
                    n++;
549 549

  
550
                    if (((Classifiable) cO).getLegend() instanceof ClassifiedLegendInfo && !(cO instanceof FLyrAnnotation)) {
551
                        ClassifiedLegendInfo cli = (ClassifiedLegendInfo) ((Classifiable) cO).getLegend();
550
                    if (((Classifiable) cO).getLegend() instanceof ClassifiedLegend && !(cO instanceof FLyrAnnotation)) {
551
                        ClassifiedLegend cli = (ClassifiedLegend) ((Classifiable) cO).getLegend();
552 552

  
553 553
                        for (int j = 0; j < cli.getValues().length; j++) {
554 554
                            String s = cli.getDescriptions()[j];
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/gui/dialogs/FConfigLayoutDialog.java
52 52
import com.iver.andami.PluginServices;
53 53
import com.iver.andami.ui.mdiManager.IWindow;
54 54
import com.iver.andami.ui.mdiManager.WindowInfo;
55
import com.iver.cit.gvsig.fmap.MapContext;
55 56
import com.iver.cit.gvsig.project.documents.layout.Attributes;
56 57
import com.iver.cit.gvsig.project.documents.layout.Size;
57 58
import com.iver.cit.gvsig.project.documents.layout.gui.Layout;
......
231 232
	 */
232 233
	private javax.swing.JComboBox getCbUnidades() {
233 234
		if (cbUnidades == null) {
234
			cbUnidades = new javax.swing.JComboBox(Attributes.NAMES);
235
			cbUnidades = new javax.swing.JComboBox(MapContext.NAMES);
235 236
			cbUnidades.setSize(175, 20);
236 237
			cbUnidades.setLocation(175, 40);
237 238
			cbUnidades.setSelectedIndex(m_layout.getLayoutContext().getAtributes().getSelTypeUnit());
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/Attributes.java
63 63
import javax.print.attribute.standard.Sides;
64 64

  
65 65
import com.iver.andami.PluginServices;
66
import com.iver.cit.gvsig.fmap.MapContext;
66 67
import com.iver.utiles.XMLEntity;
67 68

  
68 69

  
......
77 78
	public static final double[] CHANGE = {
78 79
			100000, 100, 1, 0.1, 160934.4, 91.44, 30.48, 2.54, 8.983152841195214E-6
79 80
		};
80
	/* Do not alter the order and the values of this array, if you need append values.*/
81
	public static final String[] NAMES= {"Kilometros","Metros","Centimetros","Milimetros","Millas","Yardas","Pies","Pulgadas","Grados"};
82 81
	public static final String DEGREES="Coordenadas";
83 82
	/* Do not alter the order and the values of this array, if you need append values.*/
84 83
	public static final double[] UNIT = {
......
154 153
	 *
155 154
	 */
156 155
	public Attributes() {
157
		m_NameUnit = NAMES[2];
156
		m_NameUnit = MapContext.NAMES[2];
158 157
		m_type = MediaSizeName.ISO_A4;
159 158
		m_isLandSel = true;
160 159
		setSizeinUnits(m_isLandSel);
......
738 737
	public void setUnit(int sel) {
739 738
		m_selTypeUnit = sel;
740 739
		m_TypeUnit = CHANGE[sel];
741
		m_NameUnit = NAMES[sel];
740
		m_NameUnit = MapContext.NAMES[sel];
742 741
		m_numX = m_numY = new Double(UNIT[sel]);
743 742
	}
744 743

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/ProjectTable.java
67 67
import com.iver.cit.gvsig.fmap.layers.XMLException;
68 68
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData;
69 69
import com.iver.cit.gvsig.fmap.layers.layerOperations.SingleLayer;
70
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegend;
70
import com.iver.cit.gvsig.fmap.rendering.ClassifiedVectorialLegend;
71 71
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend;
72 72
import com.iver.cit.gvsig.project.Project;
73 73
import com.iver.cit.gvsig.project.documents.ProjectDocument;
......
267 267
				// leyenda basada en un campo de los de la uni?n.
268 268
				// Si lo es, no dejamos pegarle el cambiazo al recordset
269 269
				FLyrVect lyr = ((FLyrVect) associatedTable);
270
				if (lyr.getLegend() instanceof ClassifiedLegend) {
271
					ClassifiedLegend legend = (ClassifiedLegend) lyr
270
				if (lyr.getLegend() instanceof ClassifiedVectorialLegend) {
271
					ClassifiedVectorialLegend legend = (ClassifiedVectorialLegend) lyr
272 272
							.getLegend();
273 273
					VectorialLegend aux = (VectorialLegend) legend;
274 274
					String fieldName = legend.getFieldName();
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/JUnitsComboBox.java
87 87
		super();
88 88
		String[] units = new String[MapContext.NAMES.length];
89 89
		for (int i = 0; i < MapContext.NAMES.length; i++) {
90
			units[i] = PluginServices.getText(this, MapContext.NAMES[i]);
90
			units[i] = MapContext.NAMES[i];
91 91
		}
92 92

  
93 93
		for (int i = 0; i < units.length; i++) {
......
95 95
		}
96 96
		if (includePixel) {
97 97
			super.addItem(PluginServices.getText(this, "pixels"));
98
			setSelectedIndex(units.length-1);
98
			setSelectedItem(PluginServices.getText(this, "pixels"));
99 99
		} else {
100 100
			setSelectedIndex(1);
101 101
		}
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/SimpleMarker.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.5  2007-04-27 12:10:17  jaume
46
* Revision 1.6  2007-05-09 16:08:14  jaume
47 47
* *** empty log message ***
48 48
*
49
* Revision 1.5  2007/04/27 12:10:17  jaume
50
* *** empty log message ***
51
*
49 52
* Revision 1.4  2007/04/05 16:08:34  jaume
50 53
* Styled labeling stuff
51 54
*
......
103 106
	private IncrementalNumberField txtSize;
104 107
	private IncrementalNumberField txtXOffset;
105 108
	private IncrementalNumberField txtYOffset;
109
	private Mask mask;
106 110

  
107 111
	public SimpleMarker(SymbolEditor owner) {
108 112
		super(owner);
......
148 152

  
149 153
		jccColor.addActionListener(this);
150 154
		txtSize.addActionListener(this);
155

  
151 156
		tabs.add(myTab);
157

  
158
		mask = new Mask(this);
159
		tabs.add(mask);
152 160
	}
153 161

  
154 162
	public ISymbol getLayer() {
......
159 167
		sms.setOffset(new Point2D.Double(
160 168
				txtXOffset.getDouble(),
161 169
				txtYOffset.getDouble()));
170
		sms.setMask(mask.getMask());
162 171
		return sms;
163 172
	}
164 173

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/Mask.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41
package com.iver.cit.gvsig.gui.styling;
42

  
43
import java.awt.FlowLayout;
44
import java.awt.GridLayout;
45
import java.awt.event.ActionListener;
46

  
47
import javax.swing.BorderFactory;
48
import javax.swing.ButtonGroup;
49
import javax.swing.JLabel;
50
import javax.swing.JPanel;
51
import javax.swing.JRadioButton;
52

  
53
import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
54
import org.gvsig.gui.beans.swing.JButton;
55

  
56
import com.iver.andami.PluginServices;
57
import com.iver.cit.gvsig.fmap.core.FShape;
58
import com.iver.cit.gvsig.fmap.core.SymbologyFactory;
59
import com.iver.cit.gvsig.fmap.core.styles.IMask;
60
import com.iver.cit.gvsig.fmap.core.symbols.IFillSymbol;
61
import com.iver.cit.gvsig.gui.IncrementalNumberField;
62

  
63
/**
64
 * @author jaume dominguez faus - jaume.dominguez@iver.es
65
 */
66
public class Mask extends JPanel {
67
	private JButton btnHaloSymbol;
68
	private JRadioButton rdBtnHalo;
69
	private JRadioButton rdBtnNone;
70
	private IncrementalNumberField txtHaloSize;
71
	private IFillSymbol fill;
72
	private AbstractTypeSymbolEditorPanel owner;
73
	private ActionListener action = new ActionListener() {
74
		public void actionPerformed(java.awt.event.ActionEvent e) {
75
			owner.fireSymbolChangedEvent();
76
		};
77
	};
78

  
79
	public Mask(AbstractTypeSymbolEditorPanel owner) {
80
		super();
81
		setName(PluginServices.getText(this, "mask"));
82

  
83
		this.owner = owner;
84

  
85
		GridBagLayoutPanel aux = new GridBagLayoutPanel();
86
		aux.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this, "style")));
87
		JPanel stylePanel = new JPanel(new GridLayout(2, 1));
88
		stylePanel.add(getRdNone());
89
		stylePanel.add(getRdHalo());
90
		aux.addComponent(stylePanel);
91
		ButtonGroup group = new ButtonGroup();
92
		group.add(getRdNone());
93
		group.add(getRdHalo());
94

  
95
		JPanel aux2 = new JPanel(new FlowLayout(FlowLayout.LEADING, 5, 5));
96
		aux2.add(new JLabel(PluginServices.getText(this, "size")+":"));
97
		aux2.add(getTxtHaloSize());
98
		aux2.add(getBtnHaloSymbol());
99

  
100
		getRdNone().addActionListener(action);
101
		getRdHalo().addActionListener(action);
102
		getTxtHaloSize().addActionListener(action);
103

  
104
		add(aux);
105
		add(aux2);
106
	}
107

  
108
	private IncrementalNumberField getTxtHaloSize() {
109
		if (txtHaloSize == null) {
110
			txtHaloSize = new IncrementalNumberField(String.valueOf(0), 5, 0, Double.MAX_VALUE, 1);
111
		}
112

  
113
		return txtHaloSize;
114
	}
115

  
116
	private JButton getBtnHaloSymbol() {
117
		if (btnHaloSymbol == null) {
118
			btnHaloSymbol = new JButton(PluginServices.getText(this, "symbol"));
119
			btnHaloSymbol.addActionListener(new ActionListener() {
120
				public void actionPerformed(java.awt.event.ActionEvent e) {
121
					SymbolSelector symSel = new SymbolSelector(fill, FShape.POLYGON);
122
					PluginServices.getMDIManager().addCentredWindow(symSel);
123
					fill = (IFillSymbol) symSel.getSelectedObject();
124
				};
125
			});
126
		}
127

  
128
		return btnHaloSymbol;
129
	}
130

  
131
	private JRadioButton getRdHalo() {
132
		if (rdBtnHalo == null) {
133
			rdBtnHalo = new JRadioButton(PluginServices.getText(this, "halo"));
134
		}
135

  
136
		return rdBtnHalo;
137
	}
138

  
139
	private JRadioButton getRdNone() {
140
		if (rdBtnNone == null) {
141
			rdBtnNone = new JRadioButton(PluginServices.getText(this, "none"));
142
			rdBtnNone.setSelected(true);
143
		}
144

  
145
		return rdBtnNone;
146
	}
147

  
148
	public void setModel(IMask mask) {
149
		if (mask != null) {
150
			getTxtHaloSize().setDouble(mask.getSize());
151
			fill = mask.getFillSymbol();
152
		}
153
		getRdHalo().setSelected(mask != null);
154
	}
155

  
156
	public IMask getMask() {
157
		if (!getRdHalo().isSelected()) return null;
158

  
159
		IMask mask = new IMask.BasicMask();
160
		if (fill == null) {
161
			fill = SymbologyFactory.createDefaultFillSymbol();
162
		}
163
		mask.setFillSymbol(fill);
164
		mask.setSize(getTxtHaloSize().getDouble());
165
		return mask;
166
	}
167

  
168
}
0 169

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/CharacterMarker.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.8  2007-04-26 11:40:09  jaume
46
* Revision 1.9  2007-05-09 16:08:14  jaume
47
* *** empty log message ***
48
*
49
* Revision 1.8  2007/04/26 11:40:09  jaume
47 50
* added new components (IncrementalNumberField)
48 51
*
49 52
* Revision 1.7  2007/04/20 07:54:38  jaume
......
102 105
import java.awt.Color;
103 106
import java.awt.Component;
104 107
import java.awt.Dimension;
105
import java.awt.FlowLayout;
106 108
import java.awt.Font;
107 109
import java.awt.GraphicsEnvironment;
108
import java.awt.GridLayout;
109 110
import java.awt.event.ActionEvent;
110 111
import java.awt.event.ActionListener;
111 112
import java.awt.geom.Point2D;
112
import java.math.BigInteger;
113 113
import java.util.ArrayList;
114 114

  
115 115
import javax.swing.BorderFactory;
116 116
import javax.swing.BoxLayout;
117
import javax.swing.ButtonGroup;
118 117
import javax.swing.JComponent;
119 118
import javax.swing.JLabel;
120 119
import javax.swing.JList;
121 120
import javax.swing.JPanel;
122
import javax.swing.JRadioButton;
123 121
import javax.swing.JScrollPane;
124
import javax.swing.JTextField;
125 122
import javax.swing.ListCellRenderer;
126 123
import javax.swing.ListModel;
127 124
import javax.swing.event.ListDataListener;
......
129 126
import javax.swing.event.ListSelectionListener;
130 127

  
131 128
import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
132
import org.gvsig.gui.beans.swing.JButton;
133 129
import org.gvsig.gui.beans.swing.JFontSizeComboBox;
134 130

  
135 131
import com.iver.andami.PluginServices;
......
137 133
import com.iver.cit.gvsig.fmap.core.symbols.CharacterMarkerSymbol;
138 134
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol;
139 135
import com.iver.cit.gvsig.gui.IncrementalNumberField;
140
import com.iver.cit.gvsig.gui.ValidatingTextField;
141 136
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
142 137
import com.iver.utiles.swing.JComboBox;
143 138

  
......
154 149
	private JList jListSymbols;
155 150
	private JScrollPane jScrollPane;
156 151
	private JComboBox cmbFonts;
157
	private JButton btnHaloSymbol;
158
	private JRadioButton rdBtnHalo;
159
	private JRadioButton rdBtnNone;
160
	private IncrementalNumberField txtHaloSize;
152
	private Mask mask;
161 153
	private JFontSizeComboBox cmbFontSize;
162 154
	private IncrementalNumberField numberAngle;
163 155
	private ColorChooserPanel jcc;
......
207 199

  
208 200
		{
209 201
			// Mask tab
210
			myTab = new JPanel();
211
			myTab.setName(PluginServices.getText(this, "mask"));
202
			mask = new Mask(this);
212 203

  
213
			GridBagLayoutPanel aux = new GridBagLayoutPanel();
214
			aux.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this, "style")));
215
			JPanel stylePanel = new JPanel(new GridLayout(2, 1));
216
			stylePanel.add(getRdNone());
217
			stylePanel.add(getRdHalo());
218
			aux.addComponent(stylePanel);
219
			ButtonGroup group = new ButtonGroup();
220
			group.add(getRdNone());
221
			group.add(getRdHalo());
222

  
223
			JPanel aux2 = new JPanel(new FlowLayout(FlowLayout.LEADING, 5, 5));
224
			aux2.add(new JLabel(PluginServices.getText(this, "size")+":"));
225
			aux2.add(getTxtHaloSize());
226
			aux2.add(getBtnHaloSymbol());
227

  
228
			myTab.add(aux);
229
			myTab.add(aux2);
230
			tabs.add(myTab);
204
			tabs.add(mask);
231 205
		}
232 206

  
233 207
	}
......
276 250
		return numberAngle;
277 251
	}
278 252

  
279
	private IncrementalNumberField getTxtHaloSize() {
280
		if (txtHaloSize == null) {
281
			txtHaloSize = new IncrementalNumberField(String.valueOf(0), 5);
282
		}
283 253

  
284
		return txtHaloSize;
285
	}
286 254

  
287
	private JButton getBtnHaloSymbol() {
288
		if (btnHaloSymbol == null) {
289
			btnHaloSymbol = new JButton(PluginServices.getText(this, "symbol"));
290
		}
291

  
292
		return btnHaloSymbol;
293
	}
294

  
295
	private JRadioButton getRdHalo() {
296
		if (rdBtnHalo == null) {
297
			rdBtnHalo = new JRadioButton(PluginServices.getText(this, "halo"));
298
		}
299

  
300
		return rdBtnHalo;
301
	}
302

  
303
	private JRadioButton getRdNone() {
304
		if (rdBtnNone == null) {
305
			rdBtnNone = new JRadioButton(PluginServices.getText(this, "none"));
306
			rdBtnNone.setSelected(true);
307
		}
308

  
309
		return rdBtnNone;
310
	}
311

  
312 255
	private JComboBox getCmbFonts() {
313 256
		if (cmbFonts == null) {
314 257
			// Font info is obtained from the current graphics environment.
......
428 371
		layer.setRotation(getNumberAngle().getDouble()*DEGREE_TO_RADIANS);
429 372

  
430 373
		layer.setScaleX(getUnitScaleFactor());
374
		layer.setMask(mask.getMask());
431 375
		return layer;
432 376
	}
433 377

  
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/SimpleFill.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.6  2007-04-05 16:08:34  jaume
46
* Revision 1.7  2007-05-09 16:08:14  jaume
47
* *** empty log message ***
48
*
49
* Revision 1.6  2007/04/05 16:08:34  jaume
47 50
* Styled labeling stuff
48 51
*
49 52
* Revision 1.5  2007/04/04 16:01:14  jaume
......
102 105
import javax.swing.event.ChangeListener;
103 106

  
104 107
import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
105
import org.gvsig.gui.beans.swing.JBlank;
106 108

  
107 109
import com.iver.andami.PluginServices;
108 110
import com.iver.andami.messages.NotificationManager;
......
110 112
import com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol;
111 113
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol;
112 114
import com.iver.cit.gvsig.fmap.core.symbols.SimpleFillSymbol;
115
import com.iver.cit.gvsig.gui.IncrementalNumberField;
113 116
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
114 117
import com.iver.cit.gvsig.project.documents.view.legend.gui.JSymbolPreviewButton;
115
import com.lowagie.tools.plugins.treeview.OutlinelistTreeNode;
116

  
117
import de.ios.framework.swing.JDecimalField;
118 118
/**
119 119
*
120 120
* @author jaume dominguez faus - jaume.dominguez@iver.es
......
124 124
	private static final String NAME = PluginServices.
125 125
		getText(SimpleFill.class, "simple_fill");
126 126
	private ColorChooserPanel jccFillColor;
127
	private JDecimalField txtOutlineWidth;
127
	private IncrementalNumberField txtOutlineWidth;
128 128
	private ArrayList tabs = new ArrayList();
129 129
	private JSymbolPreviewButton btnOutline;
130 130
	private JSlider sldFillTransparency;
......
155 155
		sldFillTransparency.setValue(100);
156 156
		aux.addComponent(PluginServices.getText(this, "fill_color"), jccFillColor);
157 157
		aux.addComponent(PluginServices.getText(this, "fill_opacity"), sldFillTransparency);
158
		aux.addComponent(new JBlank(30, 30));
159 158

  
159
		JPanel aux2 = new JPanel();
160 160
		btnOutline = new JSymbolPreviewButton(FShape.LINE);
161 161
		btnOutline.setPreferredSize(new Dimension(100, 35));
162
		aux2.add(btnOutline);
162 163
		sldOutlineTransparency = new JSlider();
163 164
		sldOutlineTransparency.setValue(100);
164 165
		aux.addComponent(PluginServices.getText(this, "outline")+":",
165
				btnOutline	);
166
		aux.addComponent(PluginServices.getText(this, "transparency_opacity"), sldOutlineTransparency);
167
		txtOutlineWidth = new JDecimalField(25);
168
		// TODO restore previous outline width
169
		aux.addComponent(PluginServices.getText(this, "outline_width")+":",
170
			txtOutlineWidth );
171
		aux.setPreferredSize(new Dimension(300, 300));
166
				aux2);
167
		aux.addComponent(PluginServices.getText(this, "outline_opacity"), sldOutlineTransparency);
168
		txtOutlineWidth = new IncrementalNumberField("", 25, 0, Double.MAX_VALUE, 1);
169
		aux.addComponent(PluginServices.getText(this, "outline_width"), txtOutlineWidth);
172 170
		myTab.add(aux);
173 171

  
174 172
		jccFillColor.addActionListener(this);
......
184 182
		ILineSymbol outline =(ILineSymbol) btnOutline.getSymbol();
185 183

  
186 184
		if (outline!=null) {
185
			outline.setLineWidth(txtOutlineWidth.getDouble());
187 186
			outline.setAlpha(outlineAlpha);
188 187
			sfs.setOutline(outline);
189 188
		}
......
216 215
				} else {
217 216
					sldOutlineTransparency.setValue(100);
218 217
				}
218

  
219
				txtOutlineWidth.setDouble(sym.getOutline().getLineWidth());
220

  
219 221
			}
220 222
		} catch (IndexOutOfBoundsException ioEx) {
221 223
			NotificationManager.addWarning("Symbol layer index out of bounds", ioEx);
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/SymbolEditor.java
43 43
 *
44 44
 * $Id$
45 45
 * $Log$
46
 * Revision 1.6  2007-05-08 15:44:07  jaume
46
 * Revision 1.7  2007-05-09 16:08:14  jaume
47 47
 * *** empty log message ***
48 48
 *
49
 * Revision 1.6  2007/05/08 15:44:07  jaume
50
 * *** empty log message ***
51
 *
49 52
 * Revision 1.5  2007/04/20 07:54:38  jaume
50 53
 * *** empty log message ***
51 54
 *
......
111 114
package com.iver.cit.gvsig.gui.styling;
112 115

  
113 116
import java.awt.BorderLayout;
117
import java.awt.Component;
114 118
import java.awt.Dimension;
115 119
import java.awt.FlowLayout;
116 120
import java.awt.event.ActionEvent;
......
167 171
	private AbstractTypeSymbolEditorPanel[] tabs;
168 172
	private SymbolLayerManager layerManager;
169 173
	private boolean replacing = false;
174
	private JComboBox cmbUnitsReferenceSystem;
170 175

  
171 176
	public SymbolEditor(ISymbol symbol, int shapeType) {
172 177
		if (!(symbol instanceof IMultiLayerSymbol)) {
......
386 391
			aux = new JPanel(new FlowLayout(FlowLayout.LEADING));
387 392
			aux.add(new JLabel(PluginServices.getText(this, "units")));
388 393
			aux.add(getCmbUnits());
394
			aux.add(getCmbUnitsReferenceSystem());
389 395
			pnlTypeAndUnits.add(aux, BorderLayout.EAST);
390 396

  
391 397
		}
392 398
		return pnlTypeAndUnits;
393 399
	}
394 400

  
401
	private JComboBox getCmbUnitsReferenceSystem() {
402
		if (cmbUnitsReferenceSystem == null) {
403
			cmbUnitsReferenceSystem = new JComboBox(new String[] {
404
					PluginServices.getText(this, "in_the_map"),
405
					PluginServices.getText(this, "in_the_paper")
406
			});
407

  
408
		}
409

  
410
		return cmbUnitsReferenceSystem;
411
	}
412

  
395 413
	private JUnitsComboBox getCmbUnits() {
396 414
		if (cmbUnits == null) {
397 415
			cmbUnits = new JUnitsComboBox();
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/IncrementalNumberField.java
72 72
public class IncrementalNumberField extends JPanel {
73 73
	private boolean acceptsDoubles;
74 74
	private ValidatingTextField vtf;
75
	private double step;
76
	private double max;
77
	private double min;
75 78

  
79

  
76 80
	private ActionListener accum = new ActionListener() {
77 81
		public void actionPerformed(ActionEvent e) {
78 82
			String command = e.getActionCommand();
79 83
			if ("UP".equals(command)) {
80 84
				if (acceptsDoubles) {
81
					setDouble(getDouble()+1);
85
					double v = getDouble() + step;
86
					if (v>max)
87
						v = max;
88
					setDouble(v);
82 89
				} else {
83
					setInteger(getInteger()+1);
90
					int v = getInteger() + (int) Math.round(step);
91
					if (v>max)
92
						v = (int) max;
93
					setInteger(v);
84 94
				}
85 95
			} else if ("DOWN".equals(command)) {
86 96
				if (acceptsDoubles) {
87
					setDouble(getDouble()-1);
97
					double v = getDouble() - step;
98
					if (v<min)
99
						v = min;
100
					setDouble(v);
88 101
				} else {
89
					setInteger(getInteger()-1);
102
					int v = getInteger() - (int) Math.round(step);
103
					if (v<min)
104
						v = (int) min;
105
					setInteger(v);
90 106
				}
91 107
			}
92 108
		}
......
171 187
	}
172 188

  
173 189
	public IncrementalNumberField(String text, int columns) {
174
		this(text, columns, ValidatingTextField.DOUBLE_VALIDATOR, ValidatingTextField.NUMBER_CLEANER);
190
		this(text, columns, ValidatingTextField.DOUBLE_VALIDATOR, ValidatingTextField.NUMBER_CLEANER, -Double.MAX_VALUE, Double.MAX_VALUE, 1);
175 191
	}
176 192

  
177
	public IncrementalNumberField(String text, int columns, Validator validator, Cleaner cleaner) {
193
	public IncrementalNumberField(String text, int columns, double minValue, double maxValue, double step) {
194
		this(text, columns, ValidatingTextField.DOUBLE_VALIDATOR, ValidatingTextField.NUMBER_CLEANER, minValue, maxValue, step);
195
	}
196

  
197
	public IncrementalNumberField(String text, int columns, Validator validator, Cleaner cleaner, double minValue, double maxValue, double step) {
178 198
		super();
179 199
		if (text == null) text = "";
200

  
201
		this.min = minValue;
202
		this.max = maxValue;
203
		this.step = step;
180 204
		acceptsDoubles = validator.getClass().equals(ValidatingTextField.DOUBLE_VALIDATOR.getClass());
181 205

  
182 206
		JPanel lateralButtons = new JPanel();
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/preferencespage/ViewPage.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.25  2007-03-06 16:35:02  caballero
46
* Revision 1.26  2007-05-09 16:08:14  jaume
47
* *** empty log message ***
48
*
49
* Revision 1.25  2007/03/06 16:35:02  caballero
47 50
* Exceptions
48 51
*
49 52
* Revision 1.24  2007/02/20 15:52:32  caballero
......
188 191
import com.iver.cit.gvsig.fmap.crs.CRSFactory;
189 192
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
190 193
import com.iver.cit.gvsig.project.Project;
191
import com.iver.cit.gvsig.project.documents.layout.Attributes;
192 194
import com.iver.cit.gvsig.project.documents.view.gui.View;
193 195
import com.iver.cit.gvsig.project.documents.view.info.gui.CSSelectionDialog;
194 196
import com.iver.utiles.StringUtilities;
......
263 265
			}
264 266
		}
265 267

  
266
		String[] unitNames = Attributes.NAMES;
268
		String[] unitNames = MapContext.NAMES;
267 269
		for (int i = 0; i < unitNames.length; i++) {
268 270
			if (unitNames[i].equals(PluginServices.getText(this, "Metros"))) {
269 271
				FACTORY_DEFAULT_DISTANCE_UNITS = i;
......
537 539

  
538 540
	private String[] getUnitsNames() {
539 541
		if (unitsNames == null) {
540
			unitsNames = new String[Attributes.NAMES.length];
541
			for (int i=0;i<Attributes.NAMES.length;i++) {
542
				unitsNames[i]=PluginServices.getText(this, Attributes.NAMES[i]);
542
			unitsNames = new String[MapContext.NAMES.length];
543
			for (int i=0;i<MapContext.NAMES.length;i++) {
544
				unitsNames[i]=PluginServices.getText(this, MapContext.NAMES[i]);
543 545
			}
544 546
		}
545 547
		return unitsNames;
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/ImageSizePanel.java
95 95
		final GridBagLayoutPanel aux = new GridBagLayoutPanel();
96 96
		setLayout(new BorderLayout());
97 97
		aux.addComponent(PluginServices.getText(this, "width")+":",
98
				widthTxt = new IncrementalNumberField(null, 5, ValidatingTextField.DOUBLE_VALIDATOR, ValidatingTextField.NUMBER_CLEANER));
98
				widthTxt  = new IncrementalNumberField(null, 5, 0, Double.MAX_VALUE, 1));
99 99
		aux.addComponent(PluginServices.getText(this, "height")+":",
100
				heightTxt = new IncrementalNumberField(null, 5, ValidatingTextField.DOUBLE_VALIDATOR, ValidatingTextField.NUMBER_CLEANER));
100
				heightTxt = new IncrementalNumberField(null, 5, 0, Double.MAX_VALUE, 1));
101 101
		aux.addComponent(
102 102
				PluginServices.getText(this, "units")+":",
103 103
				cmbUnits = new JUnitsComboBox());
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/AbstractMarkerSymbol.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.7  2007-05-08 08:47:40  jaume
46
* Revision 1.8  2007-05-09 16:07:26  jaume
47 47
* *** empty log message ***
48 48
*
49
* Revision 1.7  2007/05/08 08:47:40  jaume
50
* *** empty log message ***
51
*
49 52
* Revision 1.6  2007/03/26 14:24:13  jaume
50 53
* implemented Print
51 54
*
......
195 198
		return mask;
196 199
	}
197 200

  
201
	public final void setMask(IMask mask) {
202
		this.mask = mask;
203
	}
204

  
198 205
	public void setUnit(int unitIndex) {
199 206
		this.unit = unitIndex;
200 207
	}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/IMarkerSymbol.java
43 43
 *
44 44
 * $Id$
45 45
 * $Log$
46
 * Revision 1.3  2007-05-08 08:47:40  jaume
46
 * Revision 1.4  2007-05-09 16:07:26  jaume
47 47
 * *** empty log message ***
48 48
 *
49
 * Revision 1.3  2007/05/08 08:47:40  jaume
50
 * *** empty log message ***
51
 *
49 52
 * Revision 1.2  2007/03/09 11:20:57  jaume
50 53
 * Advanced symbology (start committing)
51 54
 *
......
95 98
	public abstract void setColor(Color color);
96 99

  
97 100
	public abstract IMask getMask();
101
	public abstract void setMask(IMask mask);
98 102

  
99 103
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/SimpleMarkerSymbol.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.8  2007-05-08 08:47:40  jaume
46
* Revision 1.9  2007-05-09 16:07:26  jaume
47 47
* *** empty log message ***
48 48
*
49
* Revision 1.8  2007/05/08 08:47:40  jaume
50
* *** empty log message ***
51
*
49 52
* Revision 1.7  2007/03/27 07:11:32  jaume
50 53
* *** empty log message ***
51 54
*
......
98 101
import java.awt.Rectangle;
99 102
import java.awt.RenderingHints;
100 103
import java.awt.Shape;
104
import java.awt.font.FontRenderContext;
105
import java.awt.font.GlyphVector;
101 106
import java.awt.geom.AffineTransform;
102 107
import java.awt.geom.Point2D;
103 108

  
104
import org.apache.batik.ext.awt.geom.PathLength;
105

  
106 109
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
107 110
import com.iver.cit.gvsig.fmap.core.FPoint2D;
108 111
import com.iver.cit.gvsig.fmap.core.FShape;
109 112
import com.iver.cit.gvsig.fmap.core.SymbologyFactory;
110
import com.iver.cit.gvsig.fmap.core.v02.FConverter;
113
import com.iver.cit.gvsig.fmap.core.styles.IMask;
111 114
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
112 115
import com.iver.utiles.StringUtilities;
113 116
import com.iver.utiles.XMLEntity;
114
import com.vividsolutions.jts.geom.Geometry;
115 117

  
116 118
/**
117 119
 * @author   jaume dominguez faus - jaume.dominguez@iver.es
......
155 157
		int halfSize = (int) getSize()/2;
156 158
		minx = ((int) (p.getX() - getOffset().getX()) - halfSize);
157 159
		miny = ((int) (p.getY() - getOffset().getY()) - halfSize);
160

  
161
		IMask mask = getMask();
162
		if (mask != null) {
163
			IFillSymbol maskShape = mask.getFillSymbol();
164
			maskShape.draw(g, null, mask.getHaloShape(shp));
165
		}
166

  
158 167
		g.setColor(getColor());
159 168
		g.fillOval(minx, miny, (int) getSize(), (int) getSize());
160 169
	}
......
198 207
		minx = (int) ((r.getWidth() - rectSize) / 2);
199 208
		miny = (int) ((r.getHeight()- rectSize) / 2);
200 209
		g.setColor(getColor());
210
		IMask mask = getMask();
211
		if (mask != null) {
212
			IFillSymbol maskShape = mask.getFillSymbol();
213
//			maskShape.draw(g, null, mask.getHaloShape(r));
214
		}
201 215
		g.fillOval(minx, miny, rectSize, rectSize);
202 216
		g.setRenderingHints(old);
203 217
	}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/CharacterMarkerSymbol.java
43 43
 *
44 44
 * $Id$
45 45
 * $Log$
46
 * Revision 1.16  2007-05-09 11:05:28  jaume
46
 * Revision 1.17  2007-05-09 16:07:26  jaume
47 47
 * *** empty log message ***
48 48
 *
49
 * Revision 1.16  2007/05/09 11:05:28  jaume
50
 * *** empty log message ***
51
 *
49 52
 * Revision 1.15  2007/05/08 08:47:40  jaume
50 53
 * *** empty log message ***
51 54
 *
......
239 242
	}
240 243

  
241 244
	public void draw(Graphics2D g, AffineTransform affineTransform, FShape shp) {
242
		double unitFactor = getScaleX();
243
//		if (unitFactor > 0) {
244
//			// disctance units
245
//			System.err.println("affine scale = "+affineTransform.getScaleX()+", unitFactor="+unitFactor+", FONT_HEIGHT_SCALE"+FConstant.FONT_HEIGHT_SCALE_FACTOR+"::"+affineTransform.getScaleX()*unitFactor*FConstant.FONT_HEIGHT_SCALE_FACTOR);
246
//			g.setFont(getFont().deriveFont((float)
247
//					(affineTransform.getScaleX()*unitFactor*FConstant.FONT_HEIGHT_SCALE_FACTOR)));
248
//		} else {
249
			g.setFont(getFont());
250
//		}
251

  
245
		g.setFont(getFont());
252 246
		g.setColor(getColor());
253 247
		double theta = getRotation();
254 248
		int xOffset = (int) getOffset().getX(); // * multiplicador d'unitats;
......
256 250
		Point2D p = new Point2D.Double(((FPoint2D) shp).getX(), ((FPoint2D) shp)
257 251
				.getY());
258 252

  
253
		double size = getSize();
259 254

  
260 255

  
261
//		Point2D p = null;
262
//		switch (shp.getShapeType()) {
263
//		case FShape.POINT:
264
//			p = new Point2D.Double(((FPoint2D) shp).getX(), ((FPoint2D) shp)
265
//					.getY());
266
//			break;
267
//		case FShape.LINE:
268
//			final PathLength pathLen = new PathLength(shp);
269
//			final float midDistance = pathLen.lengthOfPath() / 2;
270
//			p = pathLen.pointAtLength(midDistance);
271
//			break;
272
//		case FShape.POLYGON:
273
//			Geometry geom = FConverter.java2d_to_jts(shp);
274
//			com.vividsolutions.jts.geom.Point centroid = geom.getCentroid();
275
//			p = new Point2D.Double(centroid.getX(), centroid.getY());
276
//		}
277
//
278
		g.translate((int) (p.getX() + xOffset), (int) (p.getY() + yOffset));
256
		g.translate((int) (p.getX() + xOffset), (int) (p.getY()  + yOffset));
279 257
		if (theta != 0)	g.rotate(theta);
280 258

  
281 259
		char[] text = new char[] { (char) unicode };
282
		g.drawChars(text, 0, text.length, 0, 0);
283 260

  
284
//		IMask mask = getMask();
285
//		if (mask != null) {
286
//			FontRenderContext frc = g.getFontRenderContext();
287
//
288
//			GlyphVector gv = font.createGlyphVector(frc, text);
289
//
290
//			/*p.transform(affineTransform);*/
291
//			Shape markerShape = gv.getOutline((float) p.getX(), (float) p.getY());
292
//			IFillSymbol mask = mask.getFillSymbol();
293
//			mask.draw(g, null, mask.getHaloShape(markerShape));
294
//		}
261
		IMask mask = getMask();
262
		if (mask != null) {
263
			FontRenderContext frc = g.getFontRenderContext();
295 264

  
265
			GlyphVector gv = font.createGlyphVector(frc, text );
266

  
267
			Shape markerShape = gv.getOutline(0, 0);
268
			mask.
269
			 	getFillSymbol().
270
			 		draw(g, null, mask.getHaloShape(markerShape));
271

  
272
		}
273
		g.setColor(Color.BLUE);
274
		g.drawChars(text, 0, text.length, - (int) (size*0.4), (int) (size*0.4));
275

  
276

  
296 277
		if (theta!=0) g.rotate(-theta);
297 278
		g.translate(-(int) (p.getX() + xOffset), - (int) (p.getY() + yOffset));
298 279

  
......
353 334
		g.setFont(getFont());
354 335
		g.setColor(getColor());
355 336

  
356
		int xIni = (int) (r.width*0.5);
357
		int yIni = (int) (r.height*0.5);
337
		int xIni = (int) ((r.width-getSize())*0.6);
338
		int yIni = (int) ((r.height+getSize())*0.4 /*+ getSize()*0.5*/);
358 339

  
359 340
		g.translate(xIni, yIni);
360 341
		g.rotate(getRotation());
......
363 344
		RenderingHints old = g.getRenderingHints();
364 345
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
365 346
		char[] text = new char[] { (char) unicode };
347

  
348
		IMask mask = getMask();
349
		if (mask != null) {
350
			FontRenderContext frc = g.getFontRenderContext();
351

  
352
			GlyphVector gv = font.createGlyphVector(frc, text);
353

  
354
			/*p.transform(affineTransform);*/
355
			Shape markerShape = gv.getOutline(0,0);
356
			IFillSymbol maskShape = mask.getFillSymbol();
357
			maskShape.draw(g, null, mask.getHaloShape(markerShape));
358
		}
366 359
		g.drawChars(text, 0, text.length, (int) getOffset().getX(), (int) getOffset().getY());
367 360
		g.setRenderingHints(old);
368 361

  
369
//		IMask mask = getMask();
370
//		if (mask != null) {
371
//			FontRenderContext frc = g.getFontRenderContext();
372
//
373
//			GlyphVector gv = font.createGlyphVector(frc, text);
374
//
375
//			/*p.transform(affineTransform);*/
376
//			Shape markerShape = gv.getOutline((float) xIni, (float) yIni);
377
//			IFillSymbol mask = mask.getFillSymbol();
378
//			mask.draw(g, null, mask.getHaloShape(markerShape));
379
//		}
380

  
381 362
		g.rotate(-getRotation());
382 363
		g.translate(-xIni, -yIni);
383 364

  
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/styles/ILineStyle.java
43 43
 *
44 44
 * $Id$
45 45
 * $Log$
46
 * Revision 1.3  2007-05-08 08:47:39  jaume
46
 * Revision 1.4  2007-05-09 16:07:26  jaume
47 47
 * *** empty log message ***
48 48
 *
49
 * Revision 1.3  2007/05/08 08:47:39  jaume
50
 * *** empty log message ***
51
 *
49 52
 * Revision 1.2  2007/03/09 11:20:56  jaume
50 53
 * Advanced symbology (start committing)
51 54
 *
......
64 67
package com.iver.cit.gvsig.fmap.core.styles;
65 68

  
66 69
import java.awt.Stroke;
67
import java.awt.geom.AffineTransform;
68 70

  
69
import com.iver.cit.gvsig.fmap.core.CartographicSupport;
70 71
import com.iver.cit.gvsig.fmap.core.symbols.ArrowMarkerSymbol;
71 72

  
72 73

  
73 74
/**
74 75
 * @author   jaume dominguez faus - jaume.dominguez@iver.es
75 76
 */
76
public interface ILineStyle extends IStyle, CartographicSupport {
77
public interface ILineStyle extends IStyle {
77 78

  
78 79
	public abstract float getLineWidth();
79 80

  
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/styles/SimpleLineStyle.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.4  2007-05-08 08:47:39  jaume
46
* Revision 1.5  2007-05-09 16:07:26  jaume
47 47
* *** empty log message ***
48 48
*
49
* Revision 1.4  2007/05/08 08:47:39  jaume
50
* *** empty log message ***
51
*
49 52
* Revision 1.3  2007/04/04 15:41:05  jaume
50 53
* *** empty log message ***
51 54
*
......
75 78
import java.awt.Stroke;
76 79
import java.awt.geom.AffineTransform;
77 80

  
81
import com.iver.cit.gvsig.fmap.core.CartographicSupport;
78 82
import com.iver.cit.gvsig.fmap.core.symbols.ArrowMarkerSymbol;
79 83
import com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol;
80 84
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol;
......
83 87
/**
84 88
 * @author  jaume dominguez faus - jaume.dominguez@iver.es
85 89
 */
86
public class SimpleLineStyle extends AbstractStyle implements ILineStyle {
90
public class SimpleLineStyle extends AbstractStyle implements ILineStyle, CartographicSupport {
87 91
	private final static Color PREVIEW_COLOR_1= new Color(150, 255, 200); //light blue
88 92
	private final static Color PREVIEW_COLOR_2 = new Color(255, 200, 100); //orange
89 93
	private final static int COLOR1_STROKE = 1;
......
94 98
	private int lineJoin;
95 99
	private float miterlimit;
96 100
	private float lineWidth;
97
	private int measureUnit;
101
	private int measureUnit;// for the offset distance
98 102
	private double offset;
99 103

  
100 104
	public SimpleLineStyle() {
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/styles/IMask.java
45 45
import java.awt.Rectangle;
46 46
import java.awt.Shape;
47 47

  
48
import javax.media.jai.operator.MinFilterDescriptor;
49
import javax.media.jai.operator.MinFilterShape;
50

  
48 51
import com.iver.cit.gvsig.fmap.core.FPolygon2D;
49 52
import com.iver.cit.gvsig.fmap.core.FShape;
50 53
import com.iver.cit.gvsig.fmap.core.GeneralPathX;

Also available in: Unified diff