diff --git a/core/src/net/sf/openrocket/document/OpenRocketDocument.java b/core/src/net/sf/openrocket/document/OpenRocketDocument.java index 6d2c672d7..03d5ddba5 100644 --- a/core/src/net/sf/openrocket/document/OpenRocketDocument.java +++ b/core/src/net/sf/openrocket/document/OpenRocketDocument.java @@ -22,7 +22,7 @@ import net.sf.openrocket.logging.Markers; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.simulation.FlightDataType; @@ -252,7 +252,7 @@ public class OpenRocketDocument implements ComponentChangeListener { public void addSimulation(Simulation simulation) { simulations.add(simulation); - FlightConfigurationID simId = simulation.getId(); + FlightConfigurationId simId = simulation.getId(); if( !rocket.containsFlightConfigurationID( simId )){ rocket.createFlightConfiguration(simId); } @@ -275,7 +275,7 @@ public class OpenRocketDocument implements ComponentChangeListener { return simulation; } - public void removeFlightConfigurationAndSimulations(FlightConfigurationID configId) { + public void removeFlightConfigurationAndSimulations(FlightConfigurationId configId) { if (configId == null) { return; } diff --git a/core/src/net/sf/openrocket/document/Simulation.java b/core/src/net/sf/openrocket/document/Simulation.java index 7437c67ba..2864f6f8a 100644 --- a/core/src/net/sf/openrocket/document/Simulation.java +++ b/core/src/net/sf/openrocket/document/Simulation.java @@ -15,7 +15,7 @@ import net.sf.openrocket.formatting.RocketDescriptor; import net.sf.openrocket.masscalc.MassCalculator; import net.sf.openrocket.motor.MotorConfiguration; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.simulation.BasicEventSimulationEngine; import net.sf.openrocket.simulation.DefaultSimulationOptionFactory; @@ -116,7 +116,7 @@ public class Simulation implements ChangeSource, Cloneable { DefaultSimulationOptionFactory f = Application.getInjector().getInstance(DefaultSimulationOptionFactory.class); options.copyConditionsFrom(f.getDefault()); - FlightConfigurationID fcid = rocket.getDefaultConfiguration().getFlightConfigurationID(); + FlightConfigurationId fcid = rocket.getDefaultConfiguration().getFlightConfigurationID(); options.setFlightConfigurationId(fcid); options.addChangeListener(new ConditionListener()); } @@ -174,7 +174,7 @@ public class Simulation implements ChangeSource, Cloneable { return rocket; } - public FlightConfigurationID getId(){ + public FlightConfigurationId getId(){ return this.options.getFlightConfigurationId(); } diff --git a/core/src/net/sf/openrocket/file/openrocket/OpenRocketSaver.java b/core/src/net/sf/openrocket/file/openrocket/OpenRocketSaver.java index 4385058c8..a7eb8ec08 100644 --- a/core/src/net/sf/openrocket/file/openrocket/OpenRocketSaver.java +++ b/core/src/net/sf/openrocket/file/openrocket/OpenRocketSaver.java @@ -23,7 +23,7 @@ import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent; import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.FlightConfigurableComponent; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.ParallelStage; import net.sf.openrocket.rocketcomponent.PodSet; diff --git a/core/src/net/sf/openrocket/file/openrocket/importt/DeploymentConfigurationHandler.java b/core/src/net/sf/openrocket/file/openrocket/importt/DeploymentConfigurationHandler.java index 56bbba371..77b157369 100644 --- a/core/src/net/sf/openrocket/file/openrocket/importt/DeploymentConfigurationHandler.java +++ b/core/src/net/sf/openrocket/file/openrocket/importt/DeploymentConfigurationHandler.java @@ -12,7 +12,7 @@ import net.sf.openrocket.file.simplesax.ElementHandler; import net.sf.openrocket.file.simplesax.PlainTextHandler; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.RecoveryDevice; class DeploymentConfigurationHandler extends AbstractElementHandler { @@ -73,7 +73,7 @@ class DeploymentConfigurationHandler extends AbstractElementHandler { @Override public void endHandler(String element, HashMap attributes, String content, WarningSet warnings) throws SAXException { - FlightConfigurationID configId = new FlightConfigurationID(attributes.get("configid")); + FlightConfigurationId configId = new FlightConfigurationId(attributes.get("configid")); DeploymentConfiguration def = recoveryDevice.getDeploymentConfigurations().getDefault(); recoveryDevice.getDeploymentConfigurations().set(configId, getConfiguration(def)); } diff --git a/core/src/net/sf/openrocket/file/openrocket/importt/MotorConfigurationHandler.java b/core/src/net/sf/openrocket/file/openrocket/importt/MotorConfigurationHandler.java index 34ef25d11..9b7c5fa40 100644 --- a/core/src/net/sf/openrocket/file/openrocket/importt/MotorConfigurationHandler.java +++ b/core/src/net/sf/openrocket/file/openrocket/importt/MotorConfigurationHandler.java @@ -11,7 +11,7 @@ import net.sf.openrocket.file.simplesax.AbstractElementHandler; import net.sf.openrocket.file.simplesax.ElementHandler; import net.sf.openrocket.file.simplesax.PlainTextHandler; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.FlightConfigurableParameterSet; import net.sf.openrocket.rocketcomponent.Rocket; @@ -50,7 +50,7 @@ class MotorConfigurationHandler extends AbstractElementHandler { public void endHandler(String element, HashMap attributes, String content, WarningSet warnings) throws SAXException { - FlightConfigurationID fcid = new FlightConfigurationID(attributes.remove("configid")); + FlightConfigurationId fcid = new FlightConfigurationId(attributes.remove("configid")); if (!fcid.isValid()) { warnings.add(Warning.FILE_INVALID_PARAMETER); return; diff --git a/core/src/net/sf/openrocket/file/openrocket/importt/MotorMountHandler.java b/core/src/net/sf/openrocket/file/openrocket/importt/MotorMountHandler.java index f5819373e..581c74d4e 100644 --- a/core/src/net/sf/openrocket/file/openrocket/importt/MotorMountHandler.java +++ b/core/src/net/sf/openrocket/file/openrocket/importt/MotorMountHandler.java @@ -13,7 +13,7 @@ import net.sf.openrocket.file.simplesax.PlainTextHandler; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.MotorConfiguration; import net.sf.openrocket.motor.MotorInstanceId; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.IgnitionEvent; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.Rocket; @@ -66,7 +66,7 @@ class MotorMountHandler extends AbstractElementHandler { if (element.equals("motor")) { // yes, this is confirmed to be the FLIGHT config id == motor instance id. - FlightConfigurationID fcid = new FlightConfigurationID(attributes.get("configid")); + FlightConfigurationId fcid = new FlightConfigurationId(attributes.get("configid")); if (!fcid.isValid()) { warnings.add(Warning.fromString("Illegal motor specification, ignoring.")); return; @@ -89,7 +89,7 @@ class MotorMountHandler extends AbstractElementHandler { } if (element.equals("ignitionconfiguration")) { - FlightConfigurationID fcid = new FlightConfigurationID(attributes.get("configid")); + FlightConfigurationId fcid = new FlightConfigurationId(attributes.get("configid")); if ( ! fcid.isValid()){ warnings.add(Warning.fromString("Illegal motor specification, ignoring.")); return; diff --git a/core/src/net/sf/openrocket/file/openrocket/importt/SimulationConditionsHandler.java b/core/src/net/sf/openrocket/file/openrocket/importt/SimulationConditionsHandler.java index ca9cd5d1a..b85d2aca0 100644 --- a/core/src/net/sf/openrocket/file/openrocket/importt/SimulationConditionsHandler.java +++ b/core/src/net/sf/openrocket/file/openrocket/importt/SimulationConditionsHandler.java @@ -7,7 +7,7 @@ import net.sf.openrocket.file.DocumentLoadingContext; import net.sf.openrocket.file.simplesax.AbstractElementHandler; import net.sf.openrocket.file.simplesax.ElementHandler; import net.sf.openrocket.file.simplesax.PlainTextHandler; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.simulation.SimulationOptions; import net.sf.openrocket.util.GeodeticComputationStrategy; @@ -51,7 +51,7 @@ class SimulationConditionsHandler extends AbstractElementHandler { if (element.equals("configid")) { // the ID constructor is designed to always return a valid value - FlightConfigurationID idToSet= new FlightConfigurationID(content); + FlightConfigurationId idToSet= new FlightConfigurationId(content); conditions.setFlightConfigurationId(idToSet); } else if (element.equals("launchrodlength")) { if (Double.isNaN(d)) { diff --git a/core/src/net/sf/openrocket/file/openrocket/importt/StageSeparationConfigurationHandler.java b/core/src/net/sf/openrocket/file/openrocket/importt/StageSeparationConfigurationHandler.java index 5953fa5f4..f17753b39 100644 --- a/core/src/net/sf/openrocket/file/openrocket/importt/StageSeparationConfigurationHandler.java +++ b/core/src/net/sf/openrocket/file/openrocket/importt/StageSeparationConfigurationHandler.java @@ -11,7 +11,7 @@ import net.sf.openrocket.file.simplesax.AbstractElementHandler; import net.sf.openrocket.file.simplesax.ElementHandler; import net.sf.openrocket.file.simplesax.PlainTextHandler; import net.sf.openrocket.rocketcomponent.AxialStage; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.StageSeparationConfiguration; import net.sf.openrocket.rocketcomponent.StageSeparationConfiguration.SeparationEvent; @@ -67,7 +67,7 @@ class StageSeparationConfigurationHandler extends AbstractElementHandler { @Override public void endHandler(String element, HashMap attributes, String content, WarningSet warnings) throws SAXException { - FlightConfigurationID fcid = new FlightConfigurationID(attributes.get("configid")); + FlightConfigurationId fcid = new FlightConfigurationId(attributes.get("configid")); StageSeparationConfiguration sepConfig = stage.getSeparationConfigurations().get(fcid); // copy and update to the file-read values diff --git a/core/src/net/sf/openrocket/file/openrocket/savers/AxialStageSaver.java b/core/src/net/sf/openrocket/file/openrocket/savers/AxialStageSaver.java index 92bec2dce..f5aa06a87 100644 --- a/core/src/net/sf/openrocket/file/openrocket/savers/AxialStageSaver.java +++ b/core/src/net/sf/openrocket/file/openrocket/savers/AxialStageSaver.java @@ -7,7 +7,7 @@ import java.util.Locale; import net.sf.openrocket.rocketcomponent.AxialStage; import net.sf.openrocket.rocketcomponent.ParallelStage; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.StageSeparationConfiguration; @@ -52,7 +52,7 @@ public class AxialStageSaver extends ComponentAssemblySaver { // is null and means "default". for (FlightConfiguration curConfig : rocket.getConfigSet()){ - FlightConfigurationID fcid = curConfig.getFlightConfigurationID(); + FlightConfigurationId fcid = curConfig.getFlightConfigurationID(); if (fcid == null) { continue; } diff --git a/core/src/net/sf/openrocket/file/openrocket/savers/RecoveryDeviceSaver.java b/core/src/net/sf/openrocket/file/openrocket/savers/RecoveryDeviceSaver.java index 6acbb9a0f..2168444d7 100644 --- a/core/src/net/sf/openrocket/file/openrocket/savers/RecoveryDeviceSaver.java +++ b/core/src/net/sf/openrocket/file/openrocket/savers/RecoveryDeviceSaver.java @@ -6,7 +6,7 @@ import java.util.Locale; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.FlightConfigurableParameterSet; import net.sf.openrocket.rocketcomponent.RecoveryDevice; import net.sf.openrocket.rocketcomponent.Rocket; @@ -38,7 +38,7 @@ public class RecoveryDeviceSaver extends MassObjectSaver { // DEBUG FlightConfigurableParameterSet configList = rocket.getConfigSet(); - for (FlightConfigurationID fcid : configList.getSortedConfigurationIDs()) { + for (FlightConfigurationId fcid : configList.getSortedConfigurationIDs()) { //System.err.println("checking FlightConfiguration:"+fcid.getShortKey()+ " save?"); if (dev.getDeploymentConfigurations().isDefault(fcid)) { diff --git a/core/src/net/sf/openrocket/file/openrocket/savers/RocketComponentSaver.java b/core/src/net/sf/openrocket/file/openrocket/savers/RocketComponentSaver.java index 5c38fe41f..4cd578179 100644 --- a/core/src/net/sf/openrocket/file/openrocket/savers/RocketComponentSaver.java +++ b/core/src/net/sf/openrocket/file/openrocket/savers/RocketComponentSaver.java @@ -16,7 +16,7 @@ import net.sf.openrocket.motor.ThrustCurveMotor; import net.sf.openrocket.preset.ComponentPreset; import net.sf.openrocket.rocketcomponent.Clusterable; import net.sf.openrocket.rocketcomponent.ComponentAssembly; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Instanceable; import net.sf.openrocket.rocketcomponent.LineInstanceable; import net.sf.openrocket.rocketcomponent.MotorMount; @@ -190,7 +190,7 @@ public class RocketComponentSaver { elements.add(" " + defaultInstance.getIgnitionDelay() + ""); elements.add(" " + mount.getMotorOverhang() + ""); - for( FlightConfigurationID fcid : rkt.getSortedConfigurationIDs()){ + for( FlightConfigurationId fcid : rkt.getSortedConfigurationIDs()){ MotorConfiguration motorInstance = mount.getMotorInstance(fcid); // Nothing is stored if no motor loaded diff --git a/core/src/net/sf/openrocket/file/openrocket/savers/RocketSaver.java b/core/src/net/sf/openrocket/file/openrocket/savers/RocketSaver.java index b565a9083..f3ef89f11 100644 --- a/core/src/net/sf/openrocket/file/openrocket/savers/RocketSaver.java +++ b/core/src/net/sf/openrocket/file/openrocket/savers/RocketSaver.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Locale; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.FlightConfigurableParameterSet; import net.sf.openrocket.rocketcomponent.ReferenceType; import net.sf.openrocket.rocketcomponent.Rocket; @@ -44,7 +44,7 @@ public class RocketSaver extends RocketComponentSaver { // Motor configurations FlightConfigurableParameterSet allConfigs = rocket.getConfigSet(); - for (FlightConfigurationID fcid : allConfigs.getSortedConfigurationIDs()) { + for (FlightConfigurationId fcid : allConfigs.getSortedConfigurationIDs()) { FlightConfiguration flightConfig = allConfigs.get(fcid); if (fcid == null) continue; diff --git a/core/src/net/sf/openrocket/formatting/MotorDescriptionSubstitutor.java b/core/src/net/sf/openrocket/formatting/MotorDescriptionSubstitutor.java index d986dbd09..09ee5559c 100644 --- a/core/src/net/sf/openrocket/formatting/MotorDescriptionSubstitutor.java +++ b/core/src/net/sf/openrocket/formatting/MotorDescriptionSubstitutor.java @@ -13,7 +13,7 @@ import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.MotorConfiguration; import net.sf.openrocket.plugin.Plugin; import net.sf.openrocket.rocketcomponent.AxialStage; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; @@ -33,7 +33,7 @@ public class MotorDescriptionSubstitutor implements RocketSubstitutor { } @Override - public String substitute(String str, Rocket rocket, FlightConfigurationID configId) { + public String substitute(String str, Rocket rocket, FlightConfigurationId configId) { String description = getMotorConfigurationDescription(rocket, configId); return str.replace(SUBSTITUTION, description); } @@ -47,7 +47,7 @@ public class MotorDescriptionSubstitutor implements RocketSubstitutor { - public String getMotorConfigurationDescription(Rocket rocket, FlightConfigurationID fcid) { + public String getMotorConfigurationDescription(Rocket rocket, FlightConfigurationId fcid) { String name; int motorCount = 0; diff --git a/core/src/net/sf/openrocket/formatting/RocketDescriptor.java b/core/src/net/sf/openrocket/formatting/RocketDescriptor.java index e4b442868..73941e111 100644 --- a/core/src/net/sf/openrocket/formatting/RocketDescriptor.java +++ b/core/src/net/sf/openrocket/formatting/RocketDescriptor.java @@ -1,6 +1,6 @@ package net.sf.openrocket.formatting; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; /** @@ -14,13 +14,13 @@ public interface RocketDescriptor { * of the rocket. This uses the default flight configuration name * as the basis. */ - public String format(Rocket rocket, FlightConfigurationID configId); + public String format(Rocket rocket, FlightConfigurationId configId); /** * Return a string describing a particular flight configuration * of the rocket. This uses a custom-provided name as the basis. */ - public String format(String name, Rocket rocket, FlightConfigurationID configId); + public String format(String name, Rocket rocket, FlightConfigurationId configId); } diff --git a/core/src/net/sf/openrocket/formatting/RocketDescriptorImpl.java b/core/src/net/sf/openrocket/formatting/RocketDescriptorImpl.java index 250b1d1bc..a33ba1fbf 100644 --- a/core/src/net/sf/openrocket/formatting/RocketDescriptorImpl.java +++ b/core/src/net/sf/openrocket/formatting/RocketDescriptorImpl.java @@ -4,7 +4,7 @@ import java.util.Set; import com.google.inject.Inject; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; public class RocketDescriptorImpl implements RocketDescriptor { @@ -13,13 +13,13 @@ public class RocketDescriptorImpl implements RocketDescriptor { private Set substitutors; @Override - public String format(final Rocket rocket, final FlightConfigurationID configId) { + public String format(final Rocket rocket, final FlightConfigurationId configId) { String name = rocket.getFlightConfiguration(configId).getName(); return format(name, rocket, configId); } @Override - public String format(String name, final Rocket rocket, final FlightConfigurationID configId) { + public String format(String name, final Rocket rocket, final FlightConfigurationId configId) { for (RocketSubstitutor s : substitutors) { while (s.containsSubstitution(name)) { name = s.substitute(name, rocket, configId); diff --git a/core/src/net/sf/openrocket/formatting/RocketSubstitutor.java b/core/src/net/sf/openrocket/formatting/RocketSubstitutor.java index 129942388..ca8776c2b 100644 --- a/core/src/net/sf/openrocket/formatting/RocketSubstitutor.java +++ b/core/src/net/sf/openrocket/formatting/RocketSubstitutor.java @@ -3,7 +3,7 @@ package net.sf.openrocket.formatting; import java.util.Map; import net.sf.openrocket.plugin.Plugin; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; /** @@ -14,7 +14,7 @@ public interface RocketSubstitutor { public boolean containsSubstitution(String str); - public String substitute(String str, Rocket rocket, FlightConfigurationID configId); + public String substitute(String str, Rocket rocket, FlightConfigurationId configId); public Map getDescriptions(); diff --git a/core/src/net/sf/openrocket/motor/MotorConfigurationSet.java b/core/src/net/sf/openrocket/motor/MotorConfigurationSet.java index 8d912bd2c..00d1ecf30 100644 --- a/core/src/net/sf/openrocket/motor/MotorConfigurationSet.java +++ b/core/src/net/sf/openrocket/motor/MotorConfigurationSet.java @@ -1,7 +1,7 @@ package net.sf.openrocket.motor; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.FlightConfigurableParameterSet; import net.sf.openrocket.rocketcomponent.RocketComponent; @@ -40,7 +40,7 @@ public class MotorConfigurationSet extends FlightConfigurableParameterSet> (["+emptyInstance.toString()+"]= @ "+ emptyInstance.getIgnitionEvent().name +" +"+emptyInstance.getIgnitionDelay()+"sec )\n"); - for( FlightConfigurationID loopFCID : this.map.keySet()){ + for( FlightConfigurationId loopFCID : this.map.keySet()){ String shortKey = loopFCID.toShortKey(); MotorConfiguration curInstance = this.map.get(loopFCID); diff --git a/core/src/net/sf/openrocket/rocketcomponent/AxialStage.java b/core/src/net/sf/openrocket/rocketcomponent/AxialStage.java index f1cb29db7..1cc7353cb 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/AxialStage.java +++ b/core/src/net/sf/openrocket/rocketcomponent/AxialStage.java @@ -73,7 +73,7 @@ public class AxialStage extends ComponentAssembly implements FlightConfigurableC } @Override - public void cloneFlightConfiguration(FlightConfigurationID oldConfigId, FlightConfigurationID newConfigId) { + public void cloneFlightConfiguration(FlightConfigurationId oldConfigId, FlightConfigurationId newConfigId) { separations.cloneFlightConfiguration(oldConfigId, newConfigId); } diff --git a/core/src/net/sf/openrocket/rocketcomponent/BodyTube.java b/core/src/net/sf/openrocket/rocketcomponent/BodyTube.java index 0553f6fba..a09059be0 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/BodyTube.java +++ b/core/src/net/sf/openrocket/rocketcomponent/BodyTube.java @@ -369,12 +369,12 @@ public class BodyTube extends SymmetricComponent implements MotorMount, Coaxial } @Override - public MotorConfiguration getMotorInstance( final FlightConfigurationID fcid){ + public MotorConfiguration getMotorInstance( final FlightConfigurationId fcid){ return this.motors.get(fcid); } @Override - public void setMotorInstance(final FlightConfigurationID fcid, final MotorConfiguration newMotorInstance){ + public void setMotorInstance(final FlightConfigurationId fcid, final MotorConfiguration newMotorInstance){ if((null == newMotorInstance)){ this.motors.set( fcid, null); }else{ @@ -400,7 +400,7 @@ public class BodyTube extends SymmetricComponent implements MotorMount, Coaxial } @Override - public void cloneFlightConfiguration(FlightConfigurationID oldConfigId, FlightConfigurationID newConfigId) { + public void cloneFlightConfiguration(FlightConfigurationId oldConfigId, FlightConfigurationId newConfigId) { motors.cloneFlightConfiguration(oldConfigId, newConfigId); } @@ -450,7 +450,7 @@ public class BodyTube extends SymmetricComponent implements MotorMount, Coaxial @Override - public Coordinate getMotorPosition(FlightConfigurationID id) { + public Coordinate getMotorPosition(FlightConfigurationId id) { Motor motor = this.motors.get(id).getMotor(); if (motor == null) { throw new IllegalArgumentException("No motor with id " + id + " defined."); diff --git a/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurable.java b/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurable.java index e670432a1..2eb55c0e0 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurable.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurable.java @@ -41,7 +41,7 @@ public interface FlightConfigurable extends FlightConfig * @param id the flight configuration ID * @return the parameter to use (never null) */ - public E get(FlightConfigurationID id); + public E get(FlightConfigurationId id); /** * Return the parameter value for the provided flight configuration ID. @@ -51,7 +51,7 @@ public interface FlightConfigurable extends FlightConfig * @param value the parameter to find * @return the flight configuration ID */ - public FlightConfigurationID get(E value); + public FlightConfigurationId get(E value); /** * Set the parameter value for the provided flight configuration ID. @@ -60,13 +60,13 @@ public interface FlightConfigurable extends FlightConfig * @param id the flight configuration ID * @param value the parameter value (null not allowed) */ - public void set(FlightConfigurationID id, E value); + public void set(FlightConfigurationId id, E value); /** * * @return a sorted list of all the contained FlightConfigurationIDs */ - public List getSortedConfigurationIDs(); + public List getSortedConfigurationIDs(); /** * Return whether a specific flight configuration ID is using the @@ -75,14 +75,14 @@ public interface FlightConfigurable extends FlightConfig * @param id the flight configuration ID * @return whether the default is being used */ - public boolean isDefault(FlightConfigurationID id); + public boolean isDefault(FlightConfigurationId id); /** * Reset a specific flight configuration ID to use the default parameter value. * * @param id the flight configuration ID */ - public void reset(FlightConfigurationID id); + public void reset(FlightConfigurationId id); /** * Return the number of specific flight configurations other than the default. diff --git a/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurableComponent.java b/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurableComponent.java index 4686b618b..2af77356a 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurableComponent.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurableComponent.java @@ -14,6 +14,6 @@ public interface FlightConfigurableComponent { * @param oldConfigId the old configuration ID * @param newConfigId the new configuration ID */ - public void cloneFlightConfiguration(FlightConfigurationID oldConfigId, FlightConfigurationID newConfigId); + public void cloneFlightConfiguration(FlightConfigurationId oldConfigId, FlightConfigurationId newConfigId); } diff --git a/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurableParameterSet.java b/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurableParameterSet.java index 4b0217c58..39bf42308 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurableParameterSet.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurableParameterSet.java @@ -20,7 +20,7 @@ import net.sf.openrocket.util.Utils; public class FlightConfigurableParameterSet> implements FlightConfigurable { //private static final Logger log = LoggerFactory.getLogger(ParameterSet.class); - protected final HashMap map = new HashMap(); + protected final HashMap map = new HashMap(); protected E defaultValue; protected final RocketComponent component; @@ -56,13 +56,13 @@ public class FlightConfigurableParameterSet curEntry : this.map.entrySet()){ - FlightConfigurationID curKey = curEntry.getKey(); + for( Entry curEntry : this.map.entrySet()){ + FlightConfigurationId curKey = curEntry.getKey(); E curValue = curEntry.getValue(); if( testValue.equals(curValue)){ @@ -119,13 +119,13 @@ public class FlightConfigurableParameterSet ids = this.getSortedConfigurationIDs(); - FlightConfigurationID selectedId = ids.get(index); + List ids = this.getSortedConfigurationIDs(); + FlightConfigurationId selectedId = ids.get(index); return this.map.get(selectedId); } @Override - public E get(FlightConfigurationID id) { + public E get(FlightConfigurationId id) { if( id.hasError() ){ throw new NullPointerException("Attempted to retrieve a parameter with an error key!"); } @@ -139,8 +139,8 @@ public class FlightConfigurableParameterSet getSortedConfigurationIDs(){ - ArrayList toReturn = new ArrayList(); + public List getSortedConfigurationIDs(){ + ArrayList toReturn = new ArrayList(); toReturn.addAll( this.map.keySet() ); // Java 1.8: @@ -152,12 +152,12 @@ public class FlightConfigurableParameterSet getIDs(){ + public List getIDs(){ return this.getSortedConfigurationIDs(); } @Override - public void set(FlightConfigurationID fcid, E nextValue) { + public void set(FlightConfigurationId fcid, E nextValue) { if ( nextValue == null) { // null value means to delete this fcid E previousValue = this.map.remove(fcid); @@ -176,12 +176,12 @@ public class FlightConfigurableParameterSet> ParameterSet<%s> (%d configurations)\n", this.defaultValue.getClass().getSimpleName(), this.size() )); buf.append(String.format(" >> [%s]= %s\n", "DEFAULT", this.getDefault().toString() )); - for( FlightConfigurationID loopFCID : this.getSortedConfigurationIDs()){ + for( FlightConfigurationId loopFCID : this.getSortedConfigurationIDs()){ String shortKey = loopFCID.toShortKey(); E inst = this.map.get(loopFCID); diff --git a/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java b/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java index 79d40b4d8..3f003a7cd 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java @@ -37,7 +37,7 @@ public class FlightConfiguration implements FlightConfigurableParameterString Key in previous implementations. */ -public final class FlightConfigurationID implements Comparable { +public final class FlightConfigurationId implements Comparable { final public UUID key; private final static long DEFAULT_MOST_SIG_BITS = 0xF4F2F1F0; @@ -15,14 +15,14 @@ public final class FlightConfigurationID implements Comparable getSortedConfigurationIDs(){ + public List getSortedConfigurationIDs(){ return configSet.getSortedConfigurationIDs(); } @@ -569,7 +569,7 @@ public class Rocket extends RocketComponent { * * @param id the flight configuration ID to remove */ - public void removeFlightConfigurationID(FlightConfigurationID fcid) { + public void removeFlightConfigurationID(FlightConfigurationId fcid) { checkState(); if( fcid.hasError() ){ return; @@ -587,7 +587,7 @@ public class Rocket extends RocketComponent { * @param id the configuration ID. * @return whether a motor configuration with that ID exists. */ - public boolean containsFlightConfigurationID(FlightConfigurationID id) { + public boolean containsFlightConfigurationID(FlightConfigurationId id) { checkState(); if( id.hasError() ){ return false; @@ -602,7 +602,7 @@ public class Rocket extends RocketComponent { * @param id the FlightConfigurationID containing the motor (may be invalid). * @return whether any motors are defined for it. */ - public boolean hasMotors(FlightConfigurationID fcid) { + public boolean hasMotors(FlightConfigurationId fcid) { checkState(); if( fcid.hasError() ){ return false; @@ -631,7 +631,7 @@ public class Rocket extends RocketComponent { * @param id the flight configuration id * @return a FlightConfiguration instance */ - public FlightConfiguration getFlightConfiguration(final FlightConfigurationID fcid) { + public FlightConfiguration getFlightConfiguration(final FlightConfigurationId fcid) { checkState(); return this.createFlightConfiguration(fcid); } @@ -648,7 +648,7 @@ public class Rocket extends RocketComponent { } - public void setDefaultConfiguration(final FlightConfigurationID fcid) { + public void setDefaultConfiguration(final FlightConfigurationId fcid) { checkState(); if( fcid.hasError() ){ @@ -667,7 +667,7 @@ public class Rocket extends RocketComponent { * @param id the flight configuration id * @param name the name for the flight configuration */ - public void setFlightConfiguration(final FlightConfigurationID fcid, FlightConfiguration newConfig) { + public void setFlightConfiguration(final FlightConfigurationId fcid, FlightConfiguration newConfig) { checkState(); if( fcid.hasError() ){ log.error("attempt to set a 'fcid = config' with a error fcid. Ignored.", new IllegalArgumentException("error id:"+fcid)); diff --git a/core/src/net/sf/openrocket/rocketvisitors/CopyFlightConfigurationVisitor.java b/core/src/net/sf/openrocket/rocketvisitors/CopyFlightConfigurationVisitor.java index 8817b82b7..a28e88693 100644 --- a/core/src/net/sf/openrocket/rocketvisitors/CopyFlightConfigurationVisitor.java +++ b/core/src/net/sf/openrocket/rocketvisitors/CopyFlightConfigurationVisitor.java @@ -1,15 +1,15 @@ package net.sf.openrocket.rocketvisitors; import net.sf.openrocket.rocketcomponent.FlightConfigurableComponent; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.RocketComponent; public class CopyFlightConfigurationVisitor extends DepthFirstRecusiveVisitor { - private final FlightConfigurationID oldConfigId; - private final FlightConfigurationID newConfigId; + private final FlightConfigurationId oldConfigId; + private final FlightConfigurationId newConfigId; - public CopyFlightConfigurationVisitor(FlightConfigurationID oldConfigId, FlightConfigurationID newConfigId) { + public CopyFlightConfigurationVisitor(FlightConfigurationId oldConfigId, FlightConfigurationId newConfigId) { super(); this.oldConfigId = oldConfigId; this.newConfigId = newConfigId; diff --git a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java index c3434ad02..282aef189 100644 --- a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java +++ b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java @@ -15,7 +15,7 @@ import net.sf.openrocket.motor.MotorInstanceId; import net.sf.openrocket.rocketcomponent.AxialStage; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.IgnitionEvent; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.RecoveryDevice; @@ -55,7 +55,7 @@ public class BasicEventSimulationEngine implements SimulationEngine { private SimulationStatus currentStatus; - private FlightConfigurationID fcid; + private FlightConfigurationId fcid; // this is just a list of simulation branches to Deque toSimulate = new ArrayDeque(); diff --git a/core/src/net/sf/openrocket/simulation/SimulationConditions.java b/core/src/net/sf/openrocket/simulation/SimulationConditions.java index 4f6d75fdb..01b455ded 100644 --- a/core/src/net/sf/openrocket/simulation/SimulationConditions.java +++ b/core/src/net/sf/openrocket/simulation/SimulationConditions.java @@ -9,7 +9,7 @@ import net.sf.openrocket.masscalc.MassCalculator; import net.sf.openrocket.models.atmosphere.AtmosphericModel; import net.sf.openrocket.models.gravity.GravityModel; import net.sf.openrocket.models.wind.WindModel; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.simulation.listeners.SimulationListener; import net.sf.openrocket.util.BugException; @@ -28,7 +28,7 @@ import net.sf.openrocket.util.WorldCoordinate; public class SimulationConditions implements Monitorable, Cloneable { private Rocket rocket; - private FlightConfigurationID configId= null; + private FlightConfigurationId configId= null; private Simulation simulation; // The parent simulation @@ -115,15 +115,15 @@ public class SimulationConditions implements Monitorable, Cloneable { } - public FlightConfigurationID getMotorConfigurationID() { + public FlightConfigurationId getMotorConfigurationID() { return configId; } - public FlightConfigurationID getFlightConfigurationID() { + public FlightConfigurationId getFlightConfigurationID() { return configId; } - public void setFlightConfigurationID(FlightConfigurationID _fcid) { + public void setFlightConfigurationID(FlightConfigurationId _fcid) { this.configId = _fcid; this.modID++; } diff --git a/core/src/net/sf/openrocket/simulation/SimulationOptions.java b/core/src/net/sf/openrocket/simulation/SimulationOptions.java index 9fc55cf41..3fa004f92 100644 --- a/core/src/net/sf/openrocket/simulation/SimulationOptions.java +++ b/core/src/net/sf/openrocket/simulation/SimulationOptions.java @@ -17,7 +17,7 @@ import net.sf.openrocket.models.atmosphere.ExtendedISAModel; import net.sf.openrocket.models.gravity.GravityModel; import net.sf.openrocket.models.gravity.WGSGravityModel; import net.sf.openrocket.models.wind.PinkNoiseWindModel; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.startup.Application; import net.sf.openrocket.startup.Preferences; @@ -51,7 +51,7 @@ public class SimulationOptions implements ChangeSource, Cloneable { protected final Preferences preferences = Application.getPreferences(); private final Rocket rocket; - private FlightConfigurationID configId = new FlightConfigurationID(); + private FlightConfigurationId configId = new FlightConfigurationId(); /* * NOTE: When adding/modifying parameters, they must also be added to the @@ -100,11 +100,11 @@ public class SimulationOptions implements ChangeSource, Cloneable { return rocket; } - public FlightConfigurationID getFlightConfigurationId() { + public FlightConfigurationId getFlightConfigurationId() { return getId(); } - public FlightConfigurationID getId() { + public FlightConfigurationId getId() { return this.configId; } @@ -113,7 +113,7 @@ public class SimulationOptions implements ChangeSource, Cloneable { * * @param id the configuration to set. */ - public void setFlightConfigurationId(FlightConfigurationID fcid) { + public void setFlightConfigurationId(FlightConfigurationId fcid) { if ( null == fcid ){ throw new NullPointerException("Attempted to set a null Config id in simulation options. Not allowed!"); }else if ( fcid.hasError() ){ @@ -449,9 +449,9 @@ public class SimulationOptions implements ChangeSource, Cloneable { MotorDescriptionSubstitutor formatter = Application.getInjector().getInstance(MotorDescriptionSubstitutor.class); String motorDesc = formatter.getMotorConfigurationDescription(src.rocket, src.configId); - FlightConfigurationID matchID = null; + FlightConfigurationId matchID = null; - for (FlightConfigurationID fcid : this.rocket.getSortedConfigurationIDs()){ + for (FlightConfigurationId fcid : this.rocket.getSortedConfigurationIDs()){ String motorDesc2 = formatter.getMotorConfigurationDescription(this.rocket, fcid); if (motorDesc.equals(motorDesc2)) { matchID = fcid; diff --git a/core/src/net/sf/openrocket/util/TestRockets.java b/core/src/net/sf/openrocket/util/TestRockets.java index 5653a8eb1..22c291aa2 100644 --- a/core/src/net/sf/openrocket/util/TestRockets.java +++ b/core/src/net/sf/openrocket/util/TestRockets.java @@ -31,7 +31,7 @@ import net.sf.openrocket.rocketcomponent.ExternalComponent; import net.sf.openrocket.rocketcomponent.ExternalComponent.Finish; import net.sf.openrocket.rocketcomponent.FinSet.CrossSection; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.FreeformFinSet; import net.sf.openrocket.rocketcomponent.IllegalFinPointException; import net.sf.openrocket.rocketcomponent.InnerTube; @@ -465,7 +465,7 @@ public class TestRockets { finset.setMaterial(material); FlightConfiguration config = rocket.getDefaultConfiguration(); - FlightConfigurationID fcid = config.getFlightConfigurationID(); + FlightConfigurationId fcid = config.getFlightConfigurationID(); ThrustCurveMotor motor = getTestMotor(); MotorConfiguration instance = new MotorConfiguration(motor); @@ -810,7 +810,7 @@ public class TestRockets { MotorConfiguration motorInstance = TestRockets.generateMotorInstance_M1350_75mm(); motorInstance.setID( new MotorInstanceId( coreBody.getName(), 1) ); coreBody.setMotorMount( true); - FlightConfigurationID motorConfigId = config.getFlightConfigurationID(); + FlightConfigurationId motorConfigId = config.getFlightConfigurationID(); coreBody.setMotorInstance( motorConfigId, motorInstance); } @@ -868,7 +868,7 @@ public class TestRockets { boosterMotorTubes.setClusterScale(1.0); boosterBody.addChild( boosterMotorTubes); - FlightConfigurationID motorConfigId = config.getFlightConfigurationID(); + FlightConfigurationId motorConfigId = config.getFlightConfigurationID(); MotorConfiguration motorInstance = TestRockets.generateMotorInstance_G77_29mm(); motorInstance.setID( new MotorInstanceId( boosterMotorTubes.getName(), 1) ); boosterMotorTubes.setMotorInstance( motorConfigId, motorInstance); @@ -964,7 +964,7 @@ public class TestRockets { Rocket rocket = new Rocket(); rocket.setName("v104_withMotorConfig"); FlightConfiguration config = rocket.getDefaultConfiguration(); - FlightConfigurationID fcid = config.getFlightConfigurationID(); + FlightConfigurationId fcid = config.getFlightConfigurationID(); config.setName("F12X"); // make stage @@ -999,7 +999,7 @@ public class TestRockets { Rocket rocket = new Rocket(); rocket.setName("v104_withSimulationData"); FlightConfiguration config = rocket.getDefaultConfiguration(); - FlightConfigurationID fcid = config.getFlightConfigurationID(); + FlightConfigurationId fcid = config.getFlightConfigurationID(); config.setName("F12X"); // make stage @@ -1158,7 +1158,7 @@ public class TestRockets { public static OpenRocketDocument makeTestRocket_v106_withMotorMountIgnitionConfig() { Rocket rocket = new Rocket(); rocket.setName("v106_withwithMotorMountIgnitionConfig"); - FlightConfigurationID fcid = new FlightConfigurationID(); + FlightConfigurationId fcid = new FlightConfigurationId(); // make stage AxialStage stage = new AxialStage(); @@ -1190,7 +1190,7 @@ public class TestRockets { public static OpenRocketDocument makeTestRocket_v106_withRecoveryDeviceDeploymentConfig() { Rocket rocket = new Rocket(); rocket.setName("v106_withRecoveryDeviceDeploymentConfig"); - FlightConfigurationID testFCID = new FlightConfigurationID("testParachute"); + FlightConfigurationId testFCID = new FlightConfigurationId("testParachute"); // make stage AxialStage stage = new AxialStage(); @@ -1217,7 +1217,7 @@ public class TestRockets { public static OpenRocketDocument makeTestRocket_v106_withStageSeparationConfig() { Rocket rocket = new Rocket(); rocket.setName("v106_withStageSeparationConfig"); - FlightConfigurationID fcid = new FlightConfigurationID("3SecondDelay"); + FlightConfigurationId fcid = new FlightConfigurationId("3SecondDelay"); // make 1st stage AxialStage stage1 = new AxialStage(); stage1.setName("Stage1"); diff --git a/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java b/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java index 449972566..0157bf759 100644 --- a/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java +++ b/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java @@ -14,7 +14,7 @@ import net.sf.openrocket.ServicesForTesting; import net.sf.openrocket.motor.MotorConfiguration; import net.sf.openrocket.plugin.PluginModule; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.InnerTube; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.startup.Application; @@ -64,7 +64,7 @@ public class BarrowmanCalculatorTest { public void testCPSimpleWithMotor() { Rocket rkt = TestRockets.makeEstesAlphaIII(); FlightConfiguration config = rkt.getDefaultConfiguration(); - FlightConfigurationID fcid = config.getFlightConfigurationID(); + FlightConfigurationId fcid = config.getFlightConfigurationID(); AerodynamicCalculator calc = new BarrowmanCalculator(); FlightConditions conditions = new FlightConditions(config); WarningSet warnings = new WarningSet(); diff --git a/core/test/net/sf/openrocket/masscalc/MassCalculatorTest.java b/core/test/net/sf/openrocket/masscalc/MassCalculatorTest.java index d0b6a7bbd..40ff2fb6e 100644 --- a/core/test/net/sf/openrocket/masscalc/MassCalculatorTest.java +++ b/core/test/net/sf/openrocket/masscalc/MassCalculatorTest.java @@ -10,7 +10,7 @@ import net.sf.openrocket.masscalc.MassCalculator.MassCalcType; import net.sf.openrocket.motor.MotorConfiguration; import net.sf.openrocket.rocketcomponent.ParallelStage; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.InnerTube; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; diff --git a/core/test/net/sf/openrocket/rocketcomponent/ConfigurationTest.java b/core/test/net/sf/openrocket/rocketcomponent/ConfigurationTest.java index beee676af..009bc08d1 100644 --- a/core/test/net/sf/openrocket/rocketcomponent/ConfigurationTest.java +++ b/core/test/net/sf/openrocket/rocketcomponent/ConfigurationTest.java @@ -543,7 +543,7 @@ public class ConfigurationTest extends BaseTestCase { public static Rocket makeTwoStageMotorRocket() { Rocket rocket = makeTwoStageTestRocket(); - FlightConfigurationID fcid = rocket.getDefaultConfiguration().getId(); + FlightConfigurationId fcid = rocket.getDefaultConfiguration().getId(); { // public ThrustCurveMotor(Manufacturer manufacturer, String designation, String description, diff --git a/swing/src/net/sf/openrocket/gui/adaptors/ParameterSetModel.java b/swing/src/net/sf/openrocket/gui/adaptors/ParameterSetModel.java index 942e022f2..e581e6fbf 100644 --- a/swing/src/net/sf/openrocket/gui/adaptors/ParameterSetModel.java +++ b/swing/src/net/sf/openrocket/gui/adaptors/ParameterSetModel.java @@ -12,7 +12,7 @@ import javax.swing.event.ListDataListener; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.FlightConfigurableParameter; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.FlightConfigurableParameterSet; import net.sf.openrocket.util.StateChangeListener; @@ -29,7 +29,7 @@ public class ParameterSetModel> impleme private Object selected; private final FlightConfigurableParameterSet sourceSet; - List idList= new Vector(); + List idList= new Vector(); public ParameterSetModel(FlightConfigurableParameterSet set ) { this.sourceSet = set; @@ -41,7 +41,7 @@ public class ParameterSetModel> impleme if((index < 0)||( index >= this.idList.size())){ return sourceSet.getDefault(); } - FlightConfigurationID fcid = this.idList.get(index); + FlightConfigurationId fcid = this.idList.get(index); return this.sourceSet.get( fcid); } diff --git a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/DeploymentSelectionDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/DeploymentSelectionDialog.java index 86ab36e03..562f3df8d 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/DeploymentSelectionDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/DeploymentSelectionDialog.java @@ -26,7 +26,7 @@ import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.RecoveryDevice; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.startup.Application; @@ -48,7 +48,7 @@ public class DeploymentSelectionDialog extends JDialog { public DeploymentSelectionDialog(Window parent, final Rocket rocket, final RecoveryDevice component) { super(parent, trans.get("edtmotorconfdlg.title.Selectdeploymentconf"), Dialog.ModalityType.APPLICATION_MODAL); - final FlightConfigurationID id = rocket.getDefaultConfiguration().getFlightConfigurationID(); + final FlightConfigurationId id = rocket.getDefaultConfiguration().getFlightConfigurationID(); newConfiguration = component.getDeploymentConfigurations().get(id).clone(); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/IgnitionSelectionDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/IgnitionSelectionDialog.java index 1566dfa5e..ee651fd1b 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/IgnitionSelectionDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/IgnitionSelectionDialog.java @@ -23,7 +23,7 @@ import net.sf.openrocket.gui.adaptors.EnumModel; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.MotorConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.IgnitionEvent; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.Rocket; @@ -44,7 +44,7 @@ public class IgnitionSelectionDialog extends JDialog { private IgnitionEvent startIgnitionEvent; private double startIgnitionDelay; - public IgnitionSelectionDialog(Window parent, final FlightConfigurationID curFCID, MotorMount _mount) { + public IgnitionSelectionDialog(Window parent, final FlightConfigurationId curFCID, MotorMount _mount) { super(parent, trans.get("edtmotorconfdlg.title.Selectignitionconf"), Dialog.ModalityType.APPLICATION_MODAL); curMount = _mount; curMotorInstance = curMount.getMotorInstance(curFCID); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RenameConfigDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RenameConfigDialog.java index 43ae3b9ec..3945a6c40 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RenameConfigDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RenameConfigDialog.java @@ -14,7 +14,7 @@ import javax.swing.JTextField; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.l10n.Translator; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.startup.Application; @@ -22,7 +22,7 @@ public class RenameConfigDialog extends JDialog { private static final long serialVersionUID = -5423008694485357248L; private static final Translator trans = Application.getTranslator(); - public RenameConfigDialog(final Window parent, final Rocket rocket, final FlightConfigurationID fcid) { + public RenameConfigDialog(final Window parent, final Rocket rocket, final FlightConfigurationId fcid) { super(parent, trans.get("RenameConfigDialog.title"), Dialog.ModalityType.APPLICATION_MODAL); JPanel panel = new JPanel(new MigLayout("fill")); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/SeparationSelectionDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/SeparationSelectionDialog.java index d416eb22e..27b79ca97 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/SeparationSelectionDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/SeparationSelectionDialog.java @@ -22,7 +22,7 @@ import net.sf.openrocket.gui.adaptors.EnumModel; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.AxialStage; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.FlightConfigurableParameterSet; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.StageSeparationConfiguration; @@ -42,7 +42,7 @@ public class SeparationSelectionDialog extends JDialog { public SeparationSelectionDialog(Window parent, final Rocket rocket, final AxialStage stage) { super(parent, trans.get("edtmotorconfdlg.title.Selectseparationconf"), Dialog.ModalityType.APPLICATION_MODAL); - final FlightConfigurationID id = rocket.getDefaultConfiguration().getFlightConfigurationID(); + final FlightConfigurationId id = rocket.getDefaultConfiguration().getFlightConfigurationID(); newConfiguration = stage.getSeparationConfigurations().get(id); if( stage.getSeparationConfigurations().isDefault( newConfiguration )){ diff --git a/swing/src/net/sf/openrocket/gui/dialogs/motor/MotorChooserDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/motor/MotorChooserDialog.java index 30400543c..ee108fac5 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/motor/MotorChooserDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/motor/MotorChooserDialog.java @@ -17,7 +17,7 @@ import net.sf.openrocket.gui.dialogs.motor.thrustcurve.ThrustCurveMotorSelection import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.Motor; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.startup.Application; @@ -30,7 +30,7 @@ public class MotorChooserDialog extends JDialog implements CloseableDialog { private boolean okClicked = false; private static final Translator trans = Application.getTranslator(); - public MotorChooserDialog(MotorMount mount, FlightConfigurationID currentConfigID, Window owner) { + public MotorChooserDialog(MotorMount mount, FlightConfigurationId currentConfigID, Window owner) { this(owner); setMotorMountAndConfig( currentConfigID, mount); } @@ -84,7 +84,7 @@ public class MotorChooserDialog extends JDialog implements CloseableDialog { selectionPanel.setCloseableDialog(this); } - public void setMotorMountAndConfig( FlightConfigurationID _fcid, MotorMount _mount ) { + public void setMotorMountAndConfig( FlightConfigurationId _fcid, MotorMount _mount ) { selectionPanel.setMotorMountAndConfig( _fcid, _mount ); } diff --git a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java index 331d9d407..7651fedee 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java @@ -56,7 +56,7 @@ import net.sf.openrocket.motor.Manufacturer; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.MotorConfiguration; import net.sf.openrocket.motor.ThrustCurveMotor; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.BugException; @@ -98,7 +98,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec private ThrustCurveMotorSet selectedMotorSet; private double selectedDelay; - public ThrustCurveMotorSelectionPanel( final FlightConfigurationID fcid, MotorMount mount ) { + public ThrustCurveMotorSelectionPanel( final FlightConfigurationId fcid, MotorMount mount ) { this(); setMotorMountAndConfig( fcid, mount ); @@ -311,7 +311,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec } - public void setMotorMountAndConfig( final FlightConfigurationID _fcid, MotorMount mountToEdit ) { + public void setMotorMountAndConfig( final FlightConfigurationId _fcid, MotorMount mountToEdit ) { if ( null == _fcid ){ throw new NullPointerException(" attempted to set mount with a null FCID. bug. "); }else if ( null == mountToEdit ){ diff --git a/swing/src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java index 779dfc6e3..08d477847 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java @@ -89,7 +89,7 @@ import net.sf.openrocket.optimization.rocketoptimization.goals.MinimizationGoal; import net.sf.openrocket.optimization.rocketoptimization.goals.ValueSeekGoal; import net.sf.openrocket.optimization.services.OptimizationServiceHelper; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.startup.Application; @@ -954,14 +954,14 @@ public class GeneralOptimizationDialog extends JDialog { for (Simulation s : documentCopy.getSimulations()) { //FlightConfigurationID id = s.getConfiguration().getFlightConfigurationID(); - FlightConfigurationID id = new FlightConfigurationID( "stub id value - General Optimizer"); + FlightConfigurationId id = new FlightConfigurationId( "stub id value - General Optimizer"); String name = createSimulationName(s.getName(), descriptor.format(rocket, id)); simulations.add(new Named(s, name)); } for (FlightConfiguration config : rocket.getConfigSet()) { - FlightConfigurationID fcid = config.getFlightConfigurationID(); + FlightConfigurationId fcid = config.getFlightConfigurationID(); if ( fcid == null) { throw new NullPointerException(" flightconfiguration has a null id... bug."); } @@ -1164,7 +1164,7 @@ public class GeneralOptimizationDialog extends JDialog { } // Update the active configuration - FlightConfigurationID fcid = getSelectedSimulation().getOptions().getId(); + FlightConfigurationId fcid = getSelectedSimulation().getOptions().getId(); getSelectedSimulation().getRocket().setDefaultConfiguration(fcid); updating = false; diff --git a/swing/src/net/sf/openrocket/gui/figure3d/RocketRenderer.java b/swing/src/net/sf/openrocket/gui/figure3d/RocketRenderer.java index 4abf748cd..fc86ef1fe 100644 --- a/swing/src/net/sf/openrocket/gui/figure3d/RocketRenderer.java +++ b/swing/src/net/sf/openrocket/gui/figure3d/RocketRenderer.java @@ -20,7 +20,7 @@ import net.sf.openrocket.gui.figure3d.geometry.Geometry.Surface; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.MotorConfiguration; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.util.Coordinate; @@ -166,7 +166,7 @@ public abstract class RocketRenderer { } private void renderMotors(GL2 gl, FlightConfiguration configuration) { - FlightConfigurationID motorID = configuration.getFlightConfigurationID(); + FlightConfigurationId motorID = configuration.getFlightConfigurationID(); // for( RocketComponent comp : configuration.getActiveComponents()){ // if( comp instanceof MotorMount){ diff --git a/swing/src/net/sf/openrocket/gui/figure3d/photo/PhotoPanel.java b/swing/src/net/sf/openrocket/gui/figure3d/photo/PhotoPanel.java index 92d80cf70..039ce8004 100644 --- a/swing/src/net/sf/openrocket/gui/figure3d/photo/PhotoPanel.java +++ b/swing/src/net/sf/openrocket/gui/figure3d/photo/PhotoPanel.java @@ -46,7 +46,7 @@ import net.sf.openrocket.gui.figure3d.photo.exhaust.FlameRenderer; import net.sf.openrocket.gui.main.Splash; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.startup.Application; @@ -419,7 +419,7 @@ public class PhotoPanel extends JPanel implements GLEventListener { //final int currentStageNumber = configuration.getActiveStages()[configuration.getActiveStages().length-1]; //final AxialStage currentStage = (AxialStage)configuration.getRocket().getChild( bottomStageNumber); - final FlightConfigurationID motorID = configuration.getFlightConfigurationID(); + final FlightConfigurationId motorID = configuration.getFlightConfigurationID(); final Iterator iter = configuration.getActiveComponents().iterator(); diff --git a/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java b/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java index 34c622cbc..82f948725 100644 --- a/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java @@ -49,7 +49,7 @@ import net.sf.openrocket.gui.simulation.SimulationWarningDialog; import net.sf.openrocket.gui.util.Icons; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.Rocket; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; import net.sf.openrocket.rocketcomponent.FlightConfiguration; @@ -341,7 +341,7 @@ public class SimulationPanel extends JPanel { } Rocket rkt = document.getRocket(); - FlightConfigurationID fcid = document.getSimulation(row).getId(); + FlightConfigurationId fcid = document.getSimulation(row).getId(); return descriptor.format( rkt, fcid); } diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java index f3db731c7..241060932 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java @@ -22,7 +22,7 @@ import net.sf.openrocket.formatting.RocketDescriptor; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.FlightConfigurableComponent; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.Pair; @@ -64,8 +64,8 @@ public abstract class FlightConfigurablePanel 1) ? 1 : 0; } - java.util.List ids = rocket.getSortedConfigurationIDs(); + java.util.List ids = rocket.getSortedConfigurationIDs(); for( int rowNum = 0; rowNum < table.getRowCount(); rowNum++ ) { - FlightConfigurationID rowFCID = ids.get(rowNum ); + FlightConfigurationId rowFCID = ids.get(rowNum ); if ( rowFCID.equals(selectedFCID) ) { table.changeSelection(rowNum, col, true, false); break; @@ -146,7 +146,7 @@ public abstract class FlightConfigurablePanel= table.getRowCount() || col >= table.getColumnCount() ) { @@ -154,13 +154,13 @@ public abstract class FlightConfigurablePanel selectedComponent = (Pair) tableValue; - FlightConfigurationID fcid = selectedComponent.getU(); + Pair selectedComponent = (Pair) tableValue; + FlightConfigurationId fcid = selectedComponent.getU(); return fcid; - } else if ( tableValue instanceof FlightConfigurationID ){ - return (FlightConfigurationID) tableValue; + } else if ( tableValue instanceof FlightConfigurationId ){ + return (FlightConfigurationId) tableValue; } - return FlightConfigurationID.ERROR_CONFIGURATION_FCID; + return FlightConfigurationId.ERROR_CONFIGURATION_FCID; } protected abstract class FlightConfigurableCellRenderer extends DefaultTableCellRenderer { @@ -174,17 +174,17 @@ public abstract class FlightConfigurablePanel v = (Pair) value; + Pair v = (Pair) value; if(v!=null){ - FlightConfigurationID fcid = v.getU(); + FlightConfigurationId fcid = v.getU(); T component = v.getV(); label = format(component, fcid, label ); } @@ -224,7 +224,7 @@ public abstract class FlightConfigurablePanel protected final Rocket rocket; protected final Class clazz; private final List components = new ArrayList(); - private List ids = new Vector(); + private List ids = new Vector(); public FlightConfigurableTableModel(Class clazz, Rocket rocket) { super(); @@ -75,7 +75,7 @@ public class FlightConfigurableTableModel @Override public Object getValueAt(int row, int column) { - FlightConfigurationID fcid = getConfigurationID(row); + FlightConfigurationId fcid = getConfigurationID(row); switch (column) { case 0: { @@ -84,7 +84,7 @@ public class FlightConfigurableTableModel default: { int index = column - 1; T d = components.get(index); - return new Pair(fcid, d); + return new Pair(fcid, d); } } } @@ -104,7 +104,7 @@ public class FlightConfigurableTableModel } } - private FlightConfigurationID getConfigurationID(int rowNum) { + private FlightConfigurationId getConfigurationID(int rowNum) { if( rocket.getConfigurationCount() != (ids.size() ) ){ this.ids = rocket.getSortedConfigurationIDs(); } diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java index 25c3f9e8a..535e65268 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java @@ -17,7 +17,7 @@ import net.sf.openrocket.gui.main.BasicFrame; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.FlightConfigurableComponent; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.RecoveryDevice; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; @@ -123,7 +123,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe } private void addConfiguration() { - FlightConfigurationID newFCID = new FlightConfigurationID(); + FlightConfigurationId newFCID = new FlightConfigurationId(); FlightConfiguration newConfig = new FlightConfiguration( rocket, newFCID ); rocket.setFlightConfiguration(newFCID, newConfig); @@ -137,8 +137,8 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe private void copyConfiguration() { FlightConfiguration oldConfig = rocket.getDefaultConfiguration(); FlightConfiguration newConfig = oldConfig.clone(); - FlightConfigurationID oldId = oldConfig.getFlightConfigurationID(); - FlightConfigurationID newId = newConfig.getFlightConfigurationID(); + FlightConfigurationId oldId = oldConfig.getFlightConfigurationID(); + FlightConfigurationId newId = newConfig.getFlightConfigurationID(); for (RocketComponent c : rocket) { if (c instanceof FlightConfigurableComponent) { @@ -155,12 +155,12 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe } private void renameConfiguration() { - FlightConfigurationID currentId = this.motorConfigurationPanel.getSelectedConfigurationId(); + FlightConfigurationId currentId = this.motorConfigurationPanel.getSelectedConfigurationId(); new RenameConfigDialog(SwingUtilities.getWindowAncestor(this), rocket, currentId).setVisible(true); } private void removeConfiguration() { - FlightConfigurationID currentId = this.motorConfigurationPanel.getSelectedConfigurationId(); + FlightConfigurationId currentId = this.motorConfigurationPanel.getSelectedConfigurationId(); if (currentId == null) return; document.removeFlightConfigurationAndSimulations(currentId); @@ -185,7 +185,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe } private void updateButtonState() { - FlightConfigurationID currentId = rocket.getDefaultConfiguration().getFlightConfigurationID(); + FlightConfigurationId currentId = rocket.getDefaultConfiguration().getFlightConfigurationID(); // Enable the remove/rename/copy buttons only when a configuration is selected. removeConfButton.setEnabled(currentId.isValid()); renameConfButton.setEnabled(currentId.isValid()); diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java index bd16b07ce..7e1d781f1 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java @@ -27,7 +27,7 @@ import net.sf.openrocket.gui.dialogs.flightconfiguration.MotorMountConfiguration import net.sf.openrocket.gui.dialogs.motor.MotorChooserDialog; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.MotorConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.IgnitionEvent; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.Rocket; @@ -199,7 +199,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel private void selectMotor() { MotorMount curMount = getSelectedComponent(); - FlightConfigurationID fcid= getSelectedConfigurationId(); + FlightConfigurationId fcid= getSelectedConfigurationId(); if ( (null == fcid )||( null == curMount )){ return; } @@ -226,7 +226,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel private void removeMotor() { MotorMount curMount = getSelectedComponent(); - FlightConfigurationID fcid= getSelectedConfigurationId(); + FlightConfigurationId fcid= getSelectedConfigurationId(); if ( (null == fcid )||( null == curMount )){ return; } @@ -238,7 +238,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel private void selectIgnition() { MotorMount curMount = getSelectedComponent(); - FlightConfigurationID fcid= getSelectedConfigurationId(); + FlightConfigurationId fcid= getSelectedConfigurationId(); if ( (null == fcid )||( null == curMount )){ return; } @@ -256,7 +256,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel private void resetIgnition() { MotorMount curMount = getSelectedComponent(); - FlightConfigurationID fcid= getSelectedConfigurationId(); + FlightConfigurationId fcid= getSelectedConfigurationId(); if ( (null == fcid )||( null == curMount )){ return; } @@ -272,7 +272,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel private static final long serialVersionUID = -7462331042920067984L; @Override - protected JLabel format( MotorMount mount, FlightConfigurationID configId, JLabel l ) { + protected JLabel format( MotorMount mount, FlightConfigurationId configId, JLabel l ) { JLabel label = new JLabel(); label.setLayout(new BoxLayout(label, BoxLayout.X_AXIS)); @@ -307,7 +307,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel return str; } - private JLabel getIgnitionEventString(FlightConfigurationID id, MotorMount mount) { + private JLabel getIgnitionEventString(FlightConfigurationId id, MotorMount mount) { MotorConfiguration defInstance = mount.getDefaultMotorInstance(); MotorConfiguration curInstance = mount.getMotorInstance(id); diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java index 08cd6a814..fce90dfec 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java @@ -18,7 +18,7 @@ import net.sf.openrocket.gui.dialogs.flightconfiguration.DeploymentSelectionDial import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.RecoveryDevice; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.startup.Application; @@ -102,7 +102,7 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel.FlightConfigurableCellRenderer { @Override - protected JLabel format(RecoveryDevice recovery, FlightConfigurationID configId, JLabel label) { + protected JLabel format(RecoveryDevice recovery, FlightConfigurationId configId, JLabel label) { DeploymentConfiguration deployConfig = recovery.getDeploymentConfigurations().get(configId); String spec = getDeploymentSpecification(deployConfig); label.setText(spec); diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/SeparationConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/SeparationConfigurationPanel.java index 3b7dc84b6..fe85ad995 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/SeparationConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/SeparationConfigurationPanel.java @@ -17,7 +17,7 @@ import net.sf.openrocket.formatting.RocketDescriptor; import net.sf.openrocket.gui.dialogs.flightconfiguration.SeparationSelectionDialog; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.AxialStage; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.StageSeparationConfiguration; import net.sf.openrocket.startup.Application; @@ -111,7 +111,7 @@ public class SeparationConfigurationPanel extends FlightConfigurablePanel simulations) { + private FlightData findSimulation(final FlightConfigurationId motorId, List simulations) { // Perform flight simulation FlightData flight = null; try { diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java b/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java index fcead5a61..2a83397c5 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java @@ -58,7 +58,7 @@ import net.sf.openrocket.masscalc.MassCalculator.MassCalcType; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.SymmetricComponent; @@ -141,7 +141,7 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change // The functional ID of the rocket that was simulated private int flightDataFunctionalID = -1; - private FlightConfigurationID flightDataMotorID = null; + private FlightConfigurationId flightDataMotorID = null; private SimulationWorker backgroundSimulationWorker = null; @@ -316,7 +316,7 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change Object source = ae.getSource(); if( source instanceof JComboBox ){ @SuppressWarnings("unchecked") - JComboBox box = (JComboBox) source; + JComboBox box = (JComboBox) source; FlightConfiguration newConfig = (FlightConfiguration)box.getSelectedItem(); document.getRocket().getConfigSet().setDefault( newConfig); updateExtras(); diff --git a/swing/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java b/swing/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java index a6107d627..9784da199 100644 --- a/swing/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java +++ b/swing/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java @@ -25,7 +25,7 @@ import net.sf.openrocket.gui.adaptors.ParameterSetModel; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.FlightConfigurationID; +import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.simulation.SimulationOptions; import net.sf.openrocket.simulation.extension.SimulationExtension; import net.sf.openrocket.startup.Application; @@ -160,7 +160,7 @@ public class SimulationEditDialog extends JDialog { @Override public void actionPerformed(ActionEvent e) { FlightConfiguration config = (FlightConfiguration) configCombo.getSelectedItem(); - FlightConfigurationID id = config.getFlightConfigurationID(); + FlightConfigurationId id = config.getFlightConfigurationID(); conditions.setFlightConfigurationId( id ); } });