Remove unused methods from SimulationListener
This commit is contained in:
parent
e6b5248a0c
commit
807450b407
@ -8,7 +8,6 @@ import net.sf.openrocket.motor.MotorInstance;
|
||||
import net.sf.openrocket.rocketcomponent.MotorMount;
|
||||
import net.sf.openrocket.rocketcomponent.RecoveryDevice;
|
||||
import net.sf.openrocket.simulation.AccelerationData;
|
||||
import net.sf.openrocket.simulation.FlightDataType;
|
||||
import net.sf.openrocket.simulation.FlightEvent;
|
||||
import net.sf.openrocket.simulation.MassData;
|
||||
import net.sf.openrocket.simulation.SimulationStatus;
|
||||
@ -28,16 +27,6 @@ public class AbstractSimulationListener implements SimulationListener, Simulatio
|
||||
|
||||
//// SimulationListener ////
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getMenuPosition() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startSimulation(SimulationStatus status) throws SimulationException {
|
||||
// No-op
|
||||
@ -68,14 +57,6 @@ public class AbstractSimulationListener implements SimulationListener, Simulatio
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array of any flight data types this listener creates.
|
||||
*/
|
||||
@Override
|
||||
public FlightDataType[] getFlightDataTypes() {
|
||||
return new FlightDataType[] {};
|
||||
}
|
||||
|
||||
|
||||
//// SimulationEventListener ////
|
||||
|
||||
|
@ -4,7 +4,6 @@ import net.sf.openrocket.aerodynamics.AerodynamicForces;
|
||||
import net.sf.openrocket.aerodynamics.FlightConditions;
|
||||
import net.sf.openrocket.models.atmosphere.AtmosphericConditions;
|
||||
import net.sf.openrocket.simulation.AccelerationData;
|
||||
import net.sf.openrocket.simulation.FlightDataType;
|
||||
import net.sf.openrocket.simulation.MassData;
|
||||
import net.sf.openrocket.simulation.SimulationStatus;
|
||||
import net.sf.openrocket.simulation.exception.SimulationException;
|
||||
@ -65,6 +64,4 @@ public interface SimulationComputationListener extends SimulationListener {
|
||||
|
||||
public double postSimpleThrustCalculation(SimulationStatus status, double thrust) throws SimulationException;
|
||||
|
||||
@Override
|
||||
public FlightDataType[] getFlightDataTypes();
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import net.sf.openrocket.motor.MotorId;
|
||||
import net.sf.openrocket.motor.MotorInstance;
|
||||
import net.sf.openrocket.rocketcomponent.MotorMount;
|
||||
import net.sf.openrocket.rocketcomponent.RecoveryDevice;
|
||||
import net.sf.openrocket.simulation.FlightDataType;
|
||||
import net.sf.openrocket.simulation.FlightEvent;
|
||||
import net.sf.openrocket.simulation.SimulationStatus;
|
||||
import net.sf.openrocket.simulation.exception.SimulationException;
|
||||
@ -59,8 +58,4 @@ public interface SimulationEventListener {
|
||||
throws SimulationException;
|
||||
|
||||
|
||||
|
||||
public FlightDataType[] getFlightDataTypes();
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package net.sf.openrocket.simulation.listeners;
|
||||
|
||||
import net.sf.openrocket.simulation.FlightDataType;
|
||||
import net.sf.openrocket.simulation.SimulationStatus;
|
||||
import net.sf.openrocket.simulation.exception.SimulationException;
|
||||
|
||||
@ -12,25 +11,6 @@ import net.sf.openrocket.simulation.exception.SimulationException;
|
||||
*/
|
||||
public interface SimulationListener extends Cloneable {
|
||||
|
||||
/**
|
||||
* Get the name of this simulation listener. Ideally this should be localized, as
|
||||
* it can be displayed in the UI.
|
||||
*
|
||||
* @return the name of this simulation listener.
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
|
||||
/**
|
||||
* Get the menu position of this simulation listener. This should be an array
|
||||
* of localized submenu names in descending order, or an empty array for positioning
|
||||
* in the base menu.
|
||||
*
|
||||
* @return the menu position of this simulation listener.
|
||||
*/
|
||||
public String[] getMenuPosition();
|
||||
|
||||
|
||||
/**
|
||||
* Called when starting a simulation.
|
||||
*
|
||||
@ -82,10 +62,5 @@ public interface SimulationListener extends Cloneable {
|
||||
public boolean isSystemListener();
|
||||
|
||||
|
||||
/**
|
||||
* Return a list of any flight data types this listener creates.
|
||||
*/
|
||||
public FlightDataType[] getFlightDataTypes();
|
||||
|
||||
public SimulationListener clone() throws CloneNotSupportedException;
|
||||
}
|
||||
|
@ -22,19 +22,6 @@ public class DampingMoment extends AbstractSimulationListener {
|
||||
private static final FlightDataType type = FlightDataType.getType("Damping moment coefficient", "Cdm", UnitGroup.UNITS_COEFFICIENT);
|
||||
private static final FlightDataType[] typeList = { type };
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "Damping moment listener";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of any flight data types this listener creates.
|
||||
*/
|
||||
@Override
|
||||
public FlightDataType[] getFlightDataTypes(){
|
||||
return typeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlightConditions postFlightConditions(SimulationStatus status, FlightConditions flightConditions) throws SimulationException {
|
||||
|
||||
@ -103,7 +90,8 @@ public class DampingMoment extends AbstractSimulationListener {
|
||||
|
||||
RocketComponent comp = entry.getKey();
|
||||
|
||||
if (!comp.isAerodynamic()) continue;
|
||||
if (!comp.isAerodynamic())
|
||||
continue;
|
||||
|
||||
//System.out.println(comp.toString());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user