From 4c00a206531968aab2e048ea4f9ef7e27e12dd52 Mon Sep 17 00:00:00 2001 From: Kevin Ruland Date: Tue, 15 Dec 2015 23:36:39 -0600 Subject: [PATCH] Remove the unnecessary class FlightConfigurationSet. --- .../FlightConfigurationSet.java | 32 ------------------- .../sf/openrocket/rocketcomponent/Rocket.java | 8 ++--- 2 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 core/src/net/sf/openrocket/rocketcomponent/FlightConfigurationSet.java diff --git a/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurationSet.java b/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurationSet.java deleted file mode 100644 index 469e02cf5..000000000 --- a/core/src/net/sf/openrocket/rocketcomponent/FlightConfigurationSet.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.sf.openrocket.rocketcomponent; - -/** - * An implementation of FlightConfiguration that fires off events - * to the rocket components when the parameter value is changed. - * - * @param the parameter type - */ -public class FlightConfigurationSet extends FlightConfigurableParameterSet { - - /** - * Construct a FlightConfiguration that has no overrides. - * - * @param component the rocket component on which events are fired when the parameter values are changed - * @param eventType the event type that will be fired on changes - */ - public FlightConfigurationSet( RocketComponent component, int eventType, FlightConfiguration _defaultValue) { - super( component, eventType, _defaultValue); - } - - - /** - * Construct a copy of an existing FlightConfigurationSet - * - * @param component the rocket component on which events are fired when the parameter values are changed - * @param eventType the event type that will be fired on changes - */ - public FlightConfigurationSet(FlightConfigurationSet configSet, RocketComponent component, int eventType) { - super( configSet, component, eventType ); - } - -} diff --git a/core/src/net/sf/openrocket/rocketcomponent/Rocket.java b/core/src/net/sf/openrocket/rocketcomponent/Rocket.java index d9b47b2aa..11d4ac555 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/Rocket.java +++ b/core/src/net/sf/openrocket/rocketcomponent/Rocket.java @@ -67,7 +67,7 @@ public class Rocket extends RocketComponent { // Flight configuration list - private FlightConfigurationSet configSet; + private FlightConfigurableParameterSet configSet; // Does the rocket have a perfect finish (a notable amount of laminar flow) private boolean perfectFinish = false; @@ -85,7 +85,7 @@ public class Rocket extends RocketComponent { functionalModID = modID; FlightConfiguration defaultConfiguration = new FlightConfiguration( this, null); - this.configSet = new FlightConfigurationSet(this, ComponentChangeEvent.CONFIG_CHANGE, defaultConfiguration); + this.configSet = new FlightConfigurableParameterSet(this, ComponentChangeEvent.CONFIG_CHANGE, defaultConfiguration); } public String getDesigner() { @@ -301,7 +301,7 @@ public class Rocket extends RocketComponent { @Override public Rocket copyWithOriginalID() { Rocket copy = (Rocket) super.copyWithOriginalID(); - copy.configSet = new FlightConfigurationSet( + copy.configSet = new FlightConfigurableParameterSet( this.configSet, copy, ComponentChangeEvent.CONFIG_CHANGE); copy.resetListeners(); @@ -339,7 +339,7 @@ public class Rocket extends RocketComponent { this.refType = r.refType; this.customReferenceLength = r.customReferenceLength; - this.configSet = new FlightConfigurationSet( r.configSet, this, ComponentChangeEvent.CONFIG_CHANGE); + this.configSet = new FlightConfigurableParameterSet( r.configSet, this, ComponentChangeEvent.CONFIG_CHANGE); this.perfectFinish = r.perfectFinish; this.checkComponentStructure();