01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: ParticlePropertyInvalidNameException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.gui.model.exceptions;
09:
10: import com.uwyn.rife.gui.model.ParticleModel;
11: import com.uwyn.rife.gui.model.ParticlePropertyModel;
12:
13: public class ParticlePropertyInvalidNameException extends
14: ParticlePropertyException {
15: private static final long serialVersionUID = 303451097268377859L;
16:
17: ParticleModel mParticle;
18: ParticlePropertyModel mProperty;
19:
20: public ParticlePropertyInvalidNameException(ParticleModel particle,
21: ParticlePropertyModel property) {
22: super (
23: "The particle property with name '"
24: + property.getName()
25: + "' and type '"
26: + property.getClass().getName()
27: + "', is not valid for the particle to which it was added.");
28:
29: mParticle = particle;
30: mProperty = property;
31: }
32:
33: public ParticleModel getParticle() {
34: return mParticle;
35: }
36:
37: public ParticlePropertyModel getParticleProperty() {
38: return mProperty;
39: }
40: }
|