diff --git a/swing/src/net/sf/openrocket/gui/configdialog/AppearancePanel.java b/swing/src/net/sf/openrocket/gui/configdialog/AppearancePanel.java index 8bc0960c0..cd6f28fc0 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/AppearancePanel.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/AppearancePanel.java @@ -199,8 +199,7 @@ public class AppearancePanel extends JPanel { } - public AppearancePanel(final OpenRocketDocument document, - final RocketComponent c) { + public AppearancePanel(final OpenRocketDocument document, final RocketComponent c, final JDialog parent) { super(new MigLayout("fill", "[150][grow][150][grow]")); defaultAppearance = DefaultAppearance.getDefaultAppearance(c); @@ -408,8 +407,6 @@ public class AppearancePanel extends JPanel { handler.setSeparateInsideOutside(customInside.isSelected()); edgesText.setEnabled(customInside.isSelected()); edgesComboBox.setEnabled(customInside.isSelected()); - if (e == null) return; // When e == null, you just want an update of the UI components, not a component change - c.fireComponentChangeEvent(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); if (customInside.isSelected()) { remove(outsidePanel); outsideInsidePane.insertTab(trans.get(tr_outside), null, outsidePanel, @@ -421,7 +418,14 @@ public class AppearancePanel extends JPanel { remove(outsideInsidePane); add(outsidePanel, "span 4, growx, wrap"); } - updateUI(); + if (parent != null) { + parent.pack(); + } else { + updateUI(); + } + + if (e == null) return; // When e == null, you just want an update of the UI components, not a component change + c.fireComponentChangeEvent(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); } }); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/AxialStageConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/AxialStageConfig.java index 477b7406f..ae1d65b5e 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/AxialStageConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/AxialStageConfig.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -24,8 +25,8 @@ public class AxialStageConfig extends ComponentAssemblyConfig { private static final long serialVersionUID = -944969957186522471L; private static final Translator trans = Application.getTranslator(); - public AxialStageConfig(OpenRocketDocument document, RocketComponent component) { - super(document, component); + public AxialStageConfig(OpenRocketDocument document, RocketComponent component, JDialog parent) { + super(document, component, parent); // Stage separation config (for non-first stage) if (component.getStageNumber() > 0) { diff --git a/swing/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java index 163c1002f..9ab43f596 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java @@ -2,6 +2,7 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JCheckBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -29,8 +30,8 @@ public class BodyTubeConfig extends RocketComponentConfig { private final JCheckBox checkAutoOuterRadius; private static final Translator trans = Application.getTranslator(); - public BodyTubeConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public BodyTubeConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", "")); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/BulkheadConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/BulkheadConfig.java index 2af7d1d37..17d5163bf 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/BulkheadConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/BulkheadConfig.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.configdialog; +import javax.swing.JDialog; import javax.swing.JPanel; import net.sf.openrocket.document.OpenRocketDocument; @@ -14,8 +15,8 @@ import net.sf.openrocket.startup.Application; public class BulkheadConfig extends RingComponentConfig { private static final Translator trans = Application.getTranslator(); - public BulkheadConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public BulkheadConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); JPanel tab; diff --git a/swing/src/net/sf/openrocket/gui/configdialog/CenteringRingConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/CenteringRingConfig.java index c274edaf6..048116ec1 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/CenteringRingConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/CenteringRingConfig.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.configdialog; +import javax.swing.JDialog; import javax.swing.JPanel; import net.sf.openrocket.document.OpenRocketDocument; @@ -14,8 +15,8 @@ import net.sf.openrocket.startup.Application; public class CenteringRingConfig extends RingComponentConfig { private static final Translator trans = Application.getTranslator(); - public CenteringRingConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public CenteringRingConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); JPanel tab; diff --git a/swing/src/net/sf/openrocket/gui/configdialog/ComponentAssemblyConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/ComponentAssemblyConfig.java index 3c78fcfd4..4697b2717 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/ComponentAssemblyConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/ComponentAssemblyConfig.java @@ -2,6 +2,7 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.ComboBoxModel; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -36,8 +37,8 @@ public class ComponentAssemblyConfig extends RocketComponentConfig { private static final Translator trans = Application.getTranslator(); private final RocketComponent component; - public ComponentAssemblyConfig(OpenRocketDocument document, RocketComponent component) { - super(document, component); + public ComponentAssemblyConfig(OpenRocketDocument document, RocketComponent component, JDialog parent) { + super(document, component, parent); this.component = component; // only stages which are actually off-centerline will get the dialog here: diff --git a/swing/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java b/swing/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java index 7defaca26..3566cf3e9 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java @@ -143,14 +143,14 @@ public class ComponentConfigDialog extends JDialog implements ComponentChangeLis List listeners = component.getConfigListeners(); boolean isSameClass = component.checkAllClassesEqual(listeners); if (!isSameClass) { - return new RocketComponentConfig(document, component); + return new RocketComponentConfig(document, component, this); } Constructor constructor = findDialogContentsConstructor(component); if (constructor != null) { try { - return constructor.newInstance(document, component); + return constructor.newInstance(document, component, this); } catch (InstantiationException | IllegalAccessException e) { throw new BugException("BUG in constructor reflection", e); } catch (InvocationTargetException e) { @@ -208,7 +208,7 @@ public class ComponentConfigDialog extends JDialog implements ComponentChangeLis try { configclass = Class.forName(configclassname); c = (Constructor) - configclass.getConstructor(OpenRocketDocument.class, RocketComponent.class); + configclass.getConstructor(OpenRocketDocument.class, RocketComponent.class, JDialog.class); return c; } catch (Exception ignore) { } diff --git a/swing/src/net/sf/openrocket/gui/configdialog/EllipticalFinSetConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/EllipticalFinSetConfig.java index 01e9d321b..db07228b2 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/EllipticalFinSetConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/EllipticalFinSetConfig.java @@ -5,6 +5,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.EventObject; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSeparator; @@ -31,8 +32,8 @@ import net.sf.openrocket.unit.UnitGroup; public class EllipticalFinSetConfig extends FinSetConfig { private static final Translator trans = Application.getTranslator(); - public EllipticalFinSetConfig(OpenRocketDocument d, final RocketComponent component) { - super(d, component); + public EllipticalFinSetConfig(OpenRocketDocument d, final RocketComponent component, JDialog parent) { + super(d, component, parent); DoubleModel m; JSpinner spin; diff --git a/swing/src/net/sf/openrocket/gui/configdialog/FinSetConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/FinSetConfig.java index e5470185e..ad1837219 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/FinSetConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/FinSetConfig.java @@ -11,6 +11,7 @@ import java.util.List; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -52,8 +53,8 @@ public abstract class FinSetConfig extends RocketComponentConfig { private JButton split = null; - public FinSetConfig(OpenRocketDocument d, RocketComponent component) { - super(d, component); + public FinSetConfig(OpenRocketDocument d, RocketComponent component, JDialog parent) { + super(d, component, parent); //// Fin tabs and Through-the-wall fin tabs tabbedPane.insertTab(trans.get("FinSetConfig.tab.Fintabs"), null, finTabPanel(), diff --git a/swing/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java index 1001258f1..ba6b077da 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java @@ -21,6 +21,7 @@ import java.util.List; import javax.swing.JButton; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JFileChooser; import javax.swing.JLabel; import javax.swing.JOptionPane; @@ -82,8 +83,8 @@ public class FreeformFinSetConfig extends FinSetConfig { private FinPointFigure figure = null; private ScaleSelector selector; - public FreeformFinSetConfig(OpenRocketDocument d, RocketComponent component) { - super(d, component); + public FreeformFinSetConfig(OpenRocketDocument d, RocketComponent component, JDialog parent) { + super(d, component, parent); //// General and General properties tabbedPane.insertTab(trans.get("FreeformFinSetCfg.tab.General"), null, generalPane(), trans.get("FreeformFinSetCfg.tab.ttip.General"), 0); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java index 6d071c4e5..e5595286f 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java @@ -21,6 +21,7 @@ import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JComponent; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -59,8 +60,8 @@ public class InnerTubeConfig extends RocketComponentConfig { private static final Translator trans = Application.getTranslator(); - public InnerTubeConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public InnerTubeConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); //// General and General properties JPanel rightPanel = new JPanel(new MigLayout()); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/LaunchLugConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/LaunchLugConfig.java index 7402580ea..eedab2730 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/LaunchLugConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/LaunchLugConfig.java @@ -2,6 +2,7 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -28,8 +29,8 @@ public class LaunchLugConfig extends RocketComponentConfig { private static final Translator trans = Application.getTranslator(); - public LaunchLugConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public LaunchLugConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); JPanel primary = new JPanel(new MigLayout("fill")); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java index 5bd41ba4b..5e7d185ec 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java @@ -6,6 +6,7 @@ import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -31,8 +32,8 @@ import net.sf.openrocket.gui.widgets.SelectColorButton; public class MassComponentConfig extends RocketComponentConfig { private static final Translator trans = Application.getTranslator(); - public MassComponentConfig(OpenRocketDocument d, RocketComponent component) { - super(d, component); + public MassComponentConfig(OpenRocketDocument d, RocketComponent component, JDialog parent) { + super(d, component, parent); //// Left side JPanel panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", "")); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/NoseConeConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/NoseConeConfig.java index d7c2975cb..5f5881abc 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/NoseConeConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/NoseConeConfig.java @@ -6,6 +6,7 @@ import java.awt.event.ActionListener; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; @@ -44,8 +45,8 @@ public class NoseConeConfig extends RocketComponentConfig { // Prepended to the description from NoseCone.DESCRIPTIONS private static final String PREDESC = ""; - public NoseConeConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public NoseConeConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); final JPanel panel = new JPanel(new MigLayout("", "[][65lp::][30lp::]")); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java index 6abdc1fa0..f63abcc16 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java @@ -8,6 +8,7 @@ import javax.swing.ComboBoxModel; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -40,8 +41,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { private static final long serialVersionUID = 6108892447949958115L; private static final Translator trans = Application.getTranslator(); - public ParachuteConfig(OpenRocketDocument d, final RocketComponent component) { - super(d, component); + public ParachuteConfig(OpenRocketDocument d, final RocketComponent component, JDialog parent) { + super(d, component, parent); Parachute parachute = (Parachute) component; // Left Side diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RailButtonConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RailButtonConfig.java index e21eb8422..3edfa1e89 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RailButtonConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RailButtonConfig.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -26,8 +27,8 @@ public class RailButtonConfig extends RocketComponentConfig { private static final Translator trans = Application.getTranslator(); - public RailButtonConfig( OpenRocketDocument document, RocketComponent component) { - super(document, component); + public RailButtonConfig( OpenRocketDocument document, RocketComponent component, JDialog parent) { + super(document, component, parent); // For DEBUG purposes // if( component instanceof AxialStage ){ diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RecoveryDeviceConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RecoveryDeviceConfig.java index 931102cfb..e6d969a4f 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RecoveryDeviceConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RecoveryDeviceConfig.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import javax.swing.JComponent; +import javax.swing.JDialog; import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent; @@ -17,8 +18,8 @@ public abstract class RecoveryDeviceConfig extends RocketComponentConfig { protected final List altitudeComponents = new ArrayList(); - public RecoveryDeviceConfig(OpenRocketDocument d, RocketComponent component) { - super(d, component); + public RecoveryDeviceConfig(OpenRocketDocument d, RocketComponent component, JDialog parent) { + super(d, component, parent); } diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RingComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RingComponentConfig.java index 0c838a237..f10ea3caa 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RingComponentConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RingComponentConfig.java @@ -3,6 +3,7 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -27,8 +28,8 @@ import net.sf.openrocket.unit.UnitGroup; public class RingComponentConfig extends RocketComponentConfig { private static final Translator trans = Application.getTranslator(); - public RingComponentConfig(OpenRocketDocument d, RocketComponent component) { - super(d, component); + public RingComponentConfig(OpenRocketDocument d, RocketComponent component, JDialog parent) { + super(d, component, parent); } diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java index 283cdc52b..976e2945a 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java @@ -14,6 +14,7 @@ import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; @@ -74,7 +75,7 @@ public class RocketComponentConfig extends JPanel { private boolean allSameType; // Checks whether all listener components are of the same type as private boolean allMassive; // Checks whether all listener components, and this component, are massive - public RocketComponentConfig(OpenRocketDocument document, RocketComponent component) { + public RocketComponentConfig(OpenRocketDocument document, RocketComponent component, JDialog parent) { setLayout(new MigLayout("fill, gap 4!, ins panel", "[]:5[]", "[growprio 5]5![fill, grow, growprio 500]5![growprio 5]")); this.document = document; @@ -126,7 +127,7 @@ public class RocketComponentConfig extends JPanel { trans.get("RocketCompCfg.tab.MassandCGoverride")); if (allMassive) { //// Appearance options - appearancePanel = new AppearancePanel(document, component); + appearancePanel = new AppearancePanel(document, component, parent); tabbedPane.addTab(trans.get("RocketCompCfg.tab.Appearance"), null, appearancePanel, "Appearance Tool Tip"); } diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RocketConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RocketConfig.java index c692f4983..a740bcec8 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RocketConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RocketConfig.java @@ -6,6 +6,7 @@ import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.JTextArea; @@ -28,8 +29,8 @@ public class RocketConfig extends RocketComponentConfig { private final Rocket rocket; - public RocketConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public RocketConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); rocket = (Rocket) c; diff --git a/swing/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java index c970d3f4a..624738a95 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java @@ -27,8 +27,8 @@ import java.awt.event.ActionListener; public class ShockCordConfig extends RocketComponentConfig { private static final Translator trans = Application.getTranslator(); - public ShockCordConfig(OpenRocketDocument d, RocketComponent component) { - super(d, component); + public ShockCordConfig(OpenRocketDocument d, RocketComponent component, JDialog parent) { + super(d, component, parent); JLabel label; DoubleModel m; diff --git a/swing/src/net/sf/openrocket/gui/configdialog/SleeveConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/SleeveConfig.java index 32192765f..46d0d3e30 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/SleeveConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/SleeveConfig.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.configdialog; +import javax.swing.JDialog; import javax.swing.JPanel; import net.sf.openrocket.document.OpenRocketDocument; @@ -13,8 +14,8 @@ import net.sf.openrocket.startup.Application; public class SleeveConfig extends RingComponentConfig { private static final Translator trans = Application.getTranslator(); - public SleeveConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public SleeveConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); JPanel tab; //// Outer diameter: diff --git a/swing/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java index 2248c5aa4..c4f6e2d65 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java @@ -7,6 +7,7 @@ import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -36,8 +37,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { private static final long serialVersionUID = -4445736703470494588L; private static final Translator trans = Application.getTranslator(); - public StreamerConfig(OpenRocketDocument d, final RocketComponent component) { - super(d, component); + public StreamerConfig(OpenRocketDocument d, final RocketComponent component, JDialog parent) { + super(d, component, parent); Streamer streamer = (Streamer) component; // Left side diff --git a/swing/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java index 3013b7c97..5689953f5 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.configdialog; +import javax.swing.JDialog; import javax.swing.JPanel; import net.sf.openrocket.document.OpenRocketDocument; @@ -13,8 +14,8 @@ import net.sf.openrocket.startup.Application; public class ThicknessRingComponentConfig extends RingComponentConfig { private static final Translator trans = Application.getTranslator(); - public ThicknessRingComponentConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public ThicknessRingComponentConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); JPanel tab; diff --git a/swing/src/net/sf/openrocket/gui/configdialog/TransitionConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/TransitionConfig.java index 35a44bcdf..05975823b 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/TransitionConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/TransitionConfig.java @@ -6,6 +6,7 @@ import java.awt.event.ActionListener; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -46,8 +47,8 @@ public class TransitionConfig extends RocketComponentConfig { private static final String PREDESC = ""; - public TransitionConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public TransitionConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); final JPanel panel = new JPanel(new MigLayout("gap rel unrel, fillx", "[][65lp::][30lp::]", "")); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/TrapezoidFinSetConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/TrapezoidFinSetConfig.java index 1356b6547..208cd2aac 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/TrapezoidFinSetConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/TrapezoidFinSetConfig.java @@ -5,6 +5,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.EventObject; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSeparator; @@ -33,8 +34,8 @@ public class TrapezoidFinSetConfig extends FinSetConfig { private static final long serialVersionUID = -4870745241749769842L; private static final Translator trans = Application.getTranslator(); - public TrapezoidFinSetConfig(OpenRocketDocument d, final RocketComponent component) { - super(d, component); + public TrapezoidFinSetConfig(OpenRocketDocument d, final RocketComponent component, JDialog parent) { + super(d, component, parent); JPanel mainPanel = new JPanel(new MigLayout()); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/TubeFinSetConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/TubeFinSetConfig.java index 66a29be0c..a005d11e2 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/TubeFinSetConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/TubeFinSetConfig.java @@ -6,6 +6,7 @@ import java.awt.event.ActionListener; import java.util.EventObject; import javax.swing.JCheckBox; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; @@ -29,8 +30,8 @@ public class TubeFinSetConfig extends RocketComponentConfig { private static final long serialVersionUID = 508482875624928676L; private static final Translator trans = Application.getTranslator(); - public TubeFinSetConfig(OpenRocketDocument d, RocketComponent c) { - super(d, c); + public TubeFinSetConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { + super(d, c, parent); JPanel primary = new JPanel(new MigLayout("fill"));