diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index 1abfdc483..ad6131a77 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -988,7 +988,7 @@ ComponentInfo.PodSet = A pod is a fictional component that acts as an ComponentInfo.NoseCone = A nose cone is the front end of the rocket airframe. Nose cones vary widely in shape.
The back end can be cut down to form an internal shoulder that slides inside of a body tube to hold the nose cone in place. ComponentInfo.BodyTube = A body tube is primarily used for the structure of the exterior body of the model rocket. ComponentInfo.Transition = A transition is the part of the airframe that connects two body tubes having different outside diameters.
Both ends of a transition are cut down to form an internal shoulder that slides inside of each body tube to hold the transition in place at both ends. -ComponentInfo.TrapezoidalFinSet = Fins help stabilize the rocket. The most common fin shape is trapezoidal, four sides with parallel root and tip chords (the edge that glues to the body tube and the outer edge). +ComponentInfo.TrapezoidFinSet = Fins help stabilize the rocket. The most common fin shape is trapezoidal, four sides with parallel root and tip chords (the edge that glues to the body tube and the outer edge). ComponentInfo.EllipticalFinSet = Fins help stabilize the rocket. The most efficient fin shape is elliptical. This shape induces the least amount of drag of any fin shape. It is commonly used for competition flying events. ComponentInfo.FreeformFinSet = Fins help stabilize the rocket. The most versatile fin component is the freeform fin. This fin component allows the creation of virtually any solid fin shape, with the ability to manually enter data points or import a shape from an image file. ComponentInfo.TubeFinSet = Tube fins are used to keep the model rocket going straight after launch. Tube fins vary in length and diameter, and may have either straight or curved ends.
Currently, OpenRocket only supports straight-perpendicular cut ends. diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java index c2c75f58e..4ebc60b96 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java @@ -73,7 +73,10 @@ public class RocketComponentConfig extends JPanel { protected final JTextField componentNameField; protected JTextArea commentTextArea; private final TextFieldListener textFieldListener; - + + private DescriptionArea componentInfo; + private IconToggleButton infoBtn; + private JPanel buttonPanel; protected JButton closeButton; private AppearancePanel appearancePanel = null; @@ -177,6 +180,12 @@ public class RocketComponentConfig extends JPanel { * Add a section to the component configuration dialog that displays information about the component. */ private void addComponentInfo(JPanel buttonPanel) { + // Don't add the info panel if this is a multi-comp edit + List listeners = component.getConfigListeners(); + if (listeners != null && listeners.size() > 0) { + return; + } + final String helpText; final String key = "ComponentInfo." + component.getClass().getSimpleName(); if (!trans.checkIfKeyExists(key)) { @@ -185,13 +194,13 @@ public class RocketComponentConfig extends JPanel { helpText = "" + trans.get(key) + ""; // Component info - DescriptionArea description = new DescriptionArea(helpText, 5); - description.setTextFont(null); - description.setVisible(false); - this.add(description, "gapleft 10, gapright 10, growx, spanx, wrap"); + componentInfo = new DescriptionArea(helpText, 5); + componentInfo.setTextFont(null); + componentInfo.setVisible(false); + this.add(componentInfo, "gapleft 10, gapright 10, growx, spanx, wrap"); // Component info toggle button - IconToggleButton infoBtn = new IconToggleButton(); + infoBtn = new IconToggleButton(); infoBtn.setToolTipText(trans.get("RocketCompCfg.btn.ComponentInfo.ttip")); infoBtn.setIconScale(1.2f); infoBtn.setSelectedIcon(Icons.HELP_ABOUT); @@ -202,7 +211,7 @@ public class RocketComponentConfig extends JPanel { public void itemStateChanged(ItemEvent e) { // Note: we will display the help text if the infoButton is not selected, and hide it if it is selected. // This way, the info button is displayed as "enabled" to draw attention to it. - description.setVisible(e.getStateChange() != ItemEvent.SELECTED); + componentInfo.setVisible(e.getStateChange() != ItemEvent.SELECTED); // Repaint to fit to the new size if (parent != null) { @@ -217,6 +226,9 @@ public class RocketComponentConfig extends JPanel { } protected void addButtons(JButton... buttons) { + if (componentInfo != null) { + this.remove(componentInfo); + } if (buttonPanel != null) { this.remove(buttonPanel); } @@ -298,6 +310,11 @@ public class RocketComponentConfig extends JPanel { // Multi-comp edit label if (listeners != null && listeners.size() > 0) { + if (infoBtn != null) { + componentInfo.setVisible(false); + infoBtn.setVisible(false); + } + multiCompEditLabel.setText(trans.get("ComponentCfgDlg.MultiComponentEdit")); StringBuilder components = new StringBuilder(trans.get("ComponentCfgDlg.MultiComponentEdit.ttip")); @@ -311,6 +328,11 @@ public class RocketComponentConfig extends JPanel { } multiCompEditLabel.setToolTipText(components.toString()); } else { + if (infoBtn != null) { + componentInfo.setVisible(false); + infoBtn.setSelected(true); + infoBtn.setVisible(true); + } multiCompEditLabel.setText(""); } }