git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@618
180e2498-e6e9-4542-8430-
84ac67f01cd8
@XmlElement(name = "Length")
private double length;
@XmlElement(name = "Length")
private double length;
+
+ @XmlElement(name = "Thickness")
+ private Double thickness;
setAftShoulderDiameter(thePreset.get(ComponentPreset.AFT_SHOULDER_DIAMETER));
setAftShoulderLength(thePreset.get(ComponentPreset.AFT_SHOULDER_LENGTH));
setLength(thePreset.get(ComponentPreset.LENGTH));
setAftShoulderDiameter(thePreset.get(ComponentPreset.AFT_SHOULDER_DIAMETER));
setAftShoulderLength(thePreset.get(ComponentPreset.AFT_SHOULDER_LENGTH));
setLength(thePreset.get(ComponentPreset.LENGTH));
+ if ( thePreset.has(ComponentPreset.THICKNESS)) {
+ setThickness(thePreset.get(ComponentPreset.THICKNESS));
+ }
}
public ShapeDTO getShape() {
}
public ShapeDTO getShape() {
- public ComponentPreset asComponentPreset(List<MaterialDTO> materials) throws InvalidComponentPresetException {
+ public Double getThickness() {
+ return thickness;
+ }
+
+ public void setThickness(Double thickness) {
+ this.thickness = thickness;
+ }
+
+ public ComponentPreset asComponentPreset(List<MaterialDTO> materials) throws InvalidComponentPresetException {
TypedPropertyMap props = new TypedPropertyMap();
addProps(props, materials);
props.put(ComponentPreset.SHAPE, shape.getORShape());
TypedPropertyMap props = new TypedPropertyMap();
addProps(props, materials);
props.put(ComponentPreset.SHAPE, shape.getORShape());
props.put(ComponentPreset.AFT_SHOULDER_LENGTH, this.getAftShoulderLength());
props.put(ComponentPreset.LENGTH, this.getLength());
props.put(ComponentPreset.TYPE, ComponentPreset.Type.TRANSITION);
props.put(ComponentPreset.AFT_SHOULDER_LENGTH, this.getAftShoulderLength());
props.put(ComponentPreset.LENGTH, this.getLength());
props.put(ComponentPreset.TYPE, ComponentPreset.Type.TRANSITION);
+ if ( thickness != null ) {
+ props.put(ComponentPreset.THICKNESS, thickness);
+ }
return ComponentPresetFactory.create(props);
}
return ComponentPresetFactory.create(props);
}