Improve default materials for fins and nose cone
This commit is contained in:
parent
c136436284
commit
78593a6749
@ -217,7 +217,7 @@ public abstract class Material implements Comparable<Material> {
|
||||
/**
|
||||
* Return a material defined by the provided string.
|
||||
*
|
||||
* @param str the material storage string.
|
||||
* @param str the material storage string, formatted as "{type}|{name}|{density}".
|
||||
* @param userDefined whether the created material is user-defined.
|
||||
* @return a new <code>Material</code> object.
|
||||
* @throws IllegalArgumentException if <code>str</code> is invalid or null.
|
||||
|
@ -21,11 +21,13 @@ import java.util.prefs.BackingStoreException;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
import net.sf.openrocket.communication.AssetHandler.UpdatePlatform;
|
||||
import net.sf.openrocket.database.Databases;
|
||||
import net.sf.openrocket.rocketcomponent.BodyComponent;
|
||||
import net.sf.openrocket.rocketcomponent.FinSet;
|
||||
import net.sf.openrocket.rocketcomponent.InternalComponent;
|
||||
import net.sf.openrocket.rocketcomponent.LaunchLug;
|
||||
import net.sf.openrocket.rocketcomponent.MassObject;
|
||||
import net.sf.openrocket.rocketcomponent.NoseCone;
|
||||
import net.sf.openrocket.rocketcomponent.ParallelStage;
|
||||
import net.sf.openrocket.rocketcomponent.PodSet;
|
||||
import net.sf.openrocket.rocketcomponent.RailButton;
|
||||
@ -783,7 +785,10 @@ public class SwingPreferences extends net.sf.openrocket.startup.Preferences impl
|
||||
|
||||
|
||||
//// Material storage
|
||||
|
||||
public void loadDefaultComponentMaterials() {
|
||||
setDefaultComponentMaterial(FinSet.class, Databases.findMaterial(Material.Type.BULK, "Balsa"));
|
||||
setDefaultComponentMaterial(NoseCone.class, Databases.findMaterial(Material.Type.BULK, "Polystyrene"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a user-defined material to the preferences. The preferences are
|
||||
|
@ -214,6 +214,7 @@ public class SwingStartup {
|
||||
|
||||
// Load defaults
|
||||
((SwingPreferences) Application.getPreferences()).loadDefaultUnits();
|
||||
((SwingPreferences) Application.getPreferences()).loadDefaultComponentMaterials();
|
||||
|
||||
Databases.fakeMethod();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user