Revision 23176 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/SimpleLine.java

View differences:

SimpleLine.java
145 145
import com.iver.andami.PluginServices;
146 146
import com.iver.andami.messages.NotificationManager;
147 147
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
148
import com.iver.utiles.XMLException;
148 149

  
149 150
/**
150 151
 * SimpleLine allows the user to store and modify the main properties that
......
208 209
		aux.addComponent(PluginServices.getText(this, "offset")+":",
209 210
				txtOffset );
210 211

  
211
		
212
		
212

  
213

  
213 214
		aux.setPreferredSize(new Dimension(300, 300));
214 215
		myTab.add(aux);
215
		
216

  
216 217
		// initialize defaults
217 218
		jccColor.setColor(Color.BLACK);
218 219
		txtWidth.setDouble(1.0);
......
231 232

  
232 233
		});
233 234
		tabs.add(arrowDecorator);
234
		
235

  
235 236
		lineProperties = new LineProperties((float) txtWidth.getDouble());
236 237
		lineProperties.addListener(new BeanListener(){
237
			
238

  
238 239
			public void beanValueChanged(Object value) {
239 240
				fireSymbolChangedEvent();
240 241
			}
......
248 249
		layer.setLineColor(jccColor.getColor());
249 250
		layer.setIsShapeVisible(true);
250 251
		// clone the selected style in the combo box
251
		
252

  
252 253
		SimpleLineStyle simplLine= new SimpleLineStyle();
253
		
254

  
254 255
		simplLine.setStroke(lineProperties.getLinePropertiesStyle());
255 256
		simplLine.setOffset(-txtOffset.getDouble());
256 257

  
......
261 262
		simplLine.setArrowDecorator(arrowDecorator.getArrowDecoratorStyle());
262 263
		layer.setLineStyle(simplLine);
263 264
		layer.setLineWidth((float) txtWidth.getDouble());
264
		
265

  
265 266
		return layer;
266 267
	}
267 268

  
......
288 289
				txtWidth.setDouble(sym.getLineStyle().getLineWidth());
289 290
				txtOffset.setDouble(sym.getLineStyle().getOffset() == 0 ? 0 : -sym.getLineStyle().getOffset() );
290 291
				arrowDecorator.setArrowDecoratorStyle( sym.getLineStyle().getArrowDecorator());
291
				/* 
292
				 * this line discards any temp changes in the linestyle 
293
				 * widths made by any previous rendering and sets all the 
292
				/*
293
				 * this line discards any temp changes in the linestyle
294
				 * widths made by any previous rendering and sets all the
294 295
				 * values to those to be persisted.
295 296
				 */
296 297
				ILineStyle tempLineStyle = (ILineStyle) SymbologyFactory.createStyleFromXML(sym.getLineStyle().getXMLEntity(), sym.getDescription());
......
302 303
			NotificationManager.addWarning("Illegal casting from " +
303 304
					layer.getClassName() + " to " + getSymbolClass().
304 305
					getName() + ".", ccEx);
306
		} catch (XMLException e) {
307
			NotificationManager.addWarning("Symbol layer", e);
305 308
		}
306 309
	}
307 310

  

Also available in: Unified diff