create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / rocketcomponent / InternalComponent.java
1 package net.sf.openrocket.rocketcomponent;
2
3
4 /**
5  * A component internal to the rocket.  Internal components have no effect on the
6  * the aerodynamics of a rocket, only its mass properties (though the location of the
7  * components is not enforced to be within external components).  Internal components 
8  * are always attached relative to the parent component, which can be internal or
9  * external, or absolutely.
10  * 
11  * @author Sampo Niskanen <sampo.niskanen@iki.fi>
12  */
13 public abstract class InternalComponent extends RocketComponent {
14
15         public InternalComponent() {
16                 super(RocketComponent.Position.BOTTOM);
17         }
18         
19         
20         @Override
21         public final void setRelativePosition(RocketComponent.Position position) {
22                 super.setRelativePosition(position);
23                 fireComponentChangeEvent(ComponentChangeEvent.MASS_CHANGE);
24         }
25
26         
27         @Override
28         public final void setPositionValue(double value) {
29                 super.setPositionValue(value);
30                 fireComponentChangeEvent(ComponentChangeEvent.MASS_CHANGE);
31         }
32         
33
34         /**
35          * Non-aerodynamic components.
36          * @return <code>false</code>
37          */
38         @Override
39         public final boolean isAerodynamic() {
40                 return false;
41         }
42
43         /**
44          * Is massive.
45          * @return <code>true</code>
46          */
47         @Override
48         public final boolean isMassive() {
49                 return true;
50         }
51 }