Remove the unnecessary class FlightConfigurationSet.

This commit is contained in:
Kevin Ruland 2015-12-15 23:36:39 -06:00
parent 470799da72
commit 4c00a20653
2 changed files with 4 additions and 36 deletions

View File

@ -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 <E> the parameter type
*/
public class FlightConfigurationSet extends FlightConfigurableParameterSet<FlightConfiguration> {
/**
* 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 );
}
}

View File

@ -67,7 +67,7 @@ public class Rocket extends RocketComponent {
// Flight configuration list
private FlightConfigurationSet configSet;
private FlightConfigurableParameterSet<FlightConfiguration> 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<FlightConfiguration>(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<FlightConfiguration>(
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<FlightConfiguration>( r.configSet, this, ComponentChangeEvent.CONFIG_CHANGE);
this.perfectFinish = r.perfectFinish;
this.checkComponentStructure();