package net.sf.openrocket.file.openrocket;
+import java.awt.Color;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
import net.sf.openrocket.aerodynamics.Warning;
import net.sf.openrocket.aerodynamics.WarningSet;
import net.sf.openrocket.database.Databases;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.LineStyle;
import net.sf.openrocket.util.Reflection;
+
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
-import java.awt.Color;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
/**
* Class that loads a rocket definition from an OpenRocket rocket file.
setters.put("BodyTube:radius", new DoubleSetter(
Reflection.findMethodStatic(BodyTube.class, "setOuterRadius", double.class),
"auto",
- Reflection.findMethodStatic(BodyTube.class, "setRadiusAutomatic", boolean.class)));
+ Reflection.findMethodStatic(BodyTube.class, "setOuterRadiusAutomatic", boolean.class)));
// Transition
setters.put("Transition:shape", new EnumSetter<Transition.Shape>(
Setter s = DocumentConfig.setters.get(setterKey);
if (s != null) {
// Setter found
- System.out.println("Calling with key " + setterKey);
s.set(component, content, attributes, warnings);
break;
}
setMethod = set;
}
+ @Override
public void set(RocketComponent c, String s, HashMap<String, String> attributes,
WarningSet warnings) {
setMethod.invoke(c, s);
setMethod = set;
}
+ @Override
public void set(RocketComponent c, String s, HashMap<String, String> attributes,
WarningSet warnings) {
try {
setMethod = set;
}
+ @Override
public void set(RocketComponent c, String s, HashMap<String, String> attributes,
WarningSet warnings) {
}
+ @Override
public void set(RocketComponent c, String s, HashMap<String, String> attributes,
WarningSet warnings) {
this.enabledMethod = enabledMethod;
}
+ @Override
public void set(RocketComponent c, String s, HashMap<String, String> attributes,
WarningSet warnings) {
setMethod = set;
}
+ @Override
public void set(RocketComponent c, String s, HashMap<String, String> attributes,
WarningSet warnings) {
this.type = type;
}
+ @Override
public void set(RocketComponent c, String name, HashMap<String, String> attributes,
WarningSet warnings) {
class PositionSetter implements Setter {
+ @Override
public void set(RocketComponent c, String value, HashMap<String, String> attributes,
WarningSet warnings) {
class ClusterConfigurationSetter implements Setter {
+ @Override
public void set(RocketComponent component, String value, HashMap<String, String> attributes,
WarningSet warnings) {