create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / gui / dialogs / motor / MotorSelector.java
1 package net.sf.openrocket.gui.dialogs.motor;
2
3 import javax.swing.JComponent;
4
5 import net.sf.openrocket.motor.Motor;
6
7 public interface MotorSelector {
8         
9         /**
10          * Return the currently selected motor.
11          * 
12          * @return              the currently selected motor, or <code>null</code> if no motor is selected.
13          */
14         public Motor getSelectedMotor();
15         
16         /**
17          * Return the currently selected ejection charge delay.
18          * 
19          * @return              the currently selected ejection charge delay.
20          */
21         public double getSelectedDelay();
22         
23         /**
24          * Return the component that should have the default focus in this motor selector panel.
25          * 
26          * @return              the component that should have default focus, or <code>null</code> for none.
27          */
28         public JComponent getDefaultFocus();
29         
30         /**
31          * Notify that the provided motor has been selected.  This can be used to store preference
32          * data for later usage.
33          * 
34          * @param m             the motor that was selected.
35          */
36         public void selectedMotor(Motor m);
37         
38 }