Remove the unnecessary class FlightConfigurationSet.
This commit is contained in:
parent
470799da72
commit
4c00a20653
@ -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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -67,7 +67,7 @@ public class Rocket extends RocketComponent {
|
|||||||
|
|
||||||
|
|
||||||
// Flight configuration list
|
// Flight configuration list
|
||||||
private FlightConfigurationSet configSet;
|
private FlightConfigurableParameterSet<FlightConfiguration> configSet;
|
||||||
|
|
||||||
// Does the rocket have a perfect finish (a notable amount of laminar flow)
|
// Does the rocket have a perfect finish (a notable amount of laminar flow)
|
||||||
private boolean perfectFinish = false;
|
private boolean perfectFinish = false;
|
||||||
@ -85,7 +85,7 @@ public class Rocket extends RocketComponent {
|
|||||||
functionalModID = modID;
|
functionalModID = modID;
|
||||||
|
|
||||||
FlightConfiguration defaultConfiguration = new FlightConfiguration( this, null);
|
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() {
|
public String getDesigner() {
|
||||||
@ -301,7 +301,7 @@ public class Rocket extends RocketComponent {
|
|||||||
@Override
|
@Override
|
||||||
public Rocket copyWithOriginalID() {
|
public Rocket copyWithOriginalID() {
|
||||||
Rocket copy = (Rocket) super.copyWithOriginalID();
|
Rocket copy = (Rocket) super.copyWithOriginalID();
|
||||||
copy.configSet = new FlightConfigurationSet(
|
copy.configSet = new FlightConfigurableParameterSet<FlightConfiguration>(
|
||||||
this.configSet, copy, ComponentChangeEvent.CONFIG_CHANGE);
|
this.configSet, copy, ComponentChangeEvent.CONFIG_CHANGE);
|
||||||
copy.resetListeners();
|
copy.resetListeners();
|
||||||
|
|
||||||
@ -339,7 +339,7 @@ public class Rocket extends RocketComponent {
|
|||||||
this.refType = r.refType;
|
this.refType = r.refType;
|
||||||
this.customReferenceLength = r.customReferenceLength;
|
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.perfectFinish = r.perfectFinish;
|
||||||
|
|
||||||
this.checkComponentStructure();
|
this.checkComponentStructure();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user