Wired in remove deployment configuration.
This commit is contained in:
parent
3a8d2d5560
commit
1f445b2268
@ -82,7 +82,7 @@ public class RecoveryConfigurationPanel extends JPanel {
|
|||||||
resetDeploymentButton.addActionListener(new ActionListener() {
|
resetDeploymentButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
//resetDeployment;
|
resetDeployment();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(resetDeploymentButton,"sizegroup button, wrap");
|
this.add(resetDeploymentButton,"sizegroup button, wrap");
|
||||||
@ -94,6 +94,10 @@ public class RecoveryConfigurationPanel extends JPanel {
|
|||||||
d.setVisible(true);
|
d.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void resetDeployment() {
|
||||||
|
selectedComponent.setDeploymentConfiguration(rocket.getDefaultConfiguration().getMotorConfigurationID(), null);
|
||||||
|
}
|
||||||
|
|
||||||
private void updateButtonState() {
|
private void updateButtonState() {
|
||||||
boolean buttonsEnabled = selectedComponent != null;
|
boolean buttonsEnabled = selectedComponent != null;
|
||||||
selectDeploymentButton.setEnabled(buttonsEnabled);
|
selectDeploymentButton.setEnabled(buttonsEnabled);
|
||||||
|
@ -124,7 +124,12 @@ public abstract class RecoveryDevice extends MassObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setDeploymentConfiguration( String configID, DeploymentConfiguration config ) {
|
public void setDeploymentConfiguration( String configID, DeploymentConfiguration config ) {
|
||||||
|
if ( config == null ) {
|
||||||
|
deploymentConfigurations.remove(configID);
|
||||||
|
} else {
|
||||||
deploymentConfigurations.put(configID, config);
|
deploymentConfigurations.put(configID, config);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeployEvent getDefaultDeployEvent() {
|
public DeployEvent getDefaultDeployEvent() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user