Change labels and add explicit Edit buttons to all places where the
flight configuration list is presented.
This commit is contained in:
parent
cda4281475
commit
87e968690b
@ -50,7 +50,8 @@ RocketPanel.FigTypeAct.Figure3D = 3D Figure
|
|||||||
RocketPanel.FigTypeAct.Realistic3D = 3D Realistic
|
RocketPanel.FigTypeAct.Realistic3D = 3D Realistic
|
||||||
|
|
||||||
|
|
||||||
RocketPanel.lbl.Motorcfg = Motor configuration:
|
RocketPanel.lbl.Flightcfg = Flight configuration:
|
||||||
|
RocketPanel.but.FlightcfgEdit = Edit
|
||||||
RocketPanel.lbl.infoMessage = <html>Click to select Shift+click to select other Double-click to edit Click+drag to move
|
RocketPanel.lbl.infoMessage = <html>Click to select Shift+click to select other Double-click to edit Click+drag to move
|
||||||
|
|
||||||
|
|
||||||
@ -179,7 +180,7 @@ edtmotorconfdlg.but.Newconfiguration = New
|
|||||||
edtmotorconfdlg.but.Copyconfiguration = Copy
|
edtmotorconfdlg.but.Copyconfiguration = Copy
|
||||||
edtmotorconfdlg.but.Selectignition = Select ignition
|
edtmotorconfdlg.but.Selectignition = Select ignition
|
||||||
edtmotorconfdlg.lbl.Motormounts = <html><b>Motor mounts:</b>
|
edtmotorconfdlg.lbl.Motormounts = <html><b>Motor mounts:</b>
|
||||||
edtmotorconfdlg.title.Editmotorconf = Edit motor configurations
|
edtmotorconfdlg.title.Editmotorconf = Edit Flight configurations
|
||||||
edtmotorconfdlg.selectcomp = <html>Select which components function as motor mounts:
|
edtmotorconfdlg.selectcomp = <html>Select which components function as motor mounts:
|
||||||
edtmotorconfdlg.lbl.Motorconfig = <html><b>Motor configurations:</b>
|
edtmotorconfdlg.lbl.Motorconfig = <html><b>Motor configurations:</b>
|
||||||
edtmotorconfdlg.lbl.Configname = Configuration name:
|
edtmotorconfdlg.lbl.Configname = Configuration name:
|
||||||
@ -306,9 +307,10 @@ simedtdlg.tab.Simopt = Simulation options
|
|||||||
simedtdlg.tab.Plotdata = Plot data
|
simedtdlg.tab.Plotdata = Plot data
|
||||||
simedtdlg.tab.CustomExpressions = Custom expressions
|
simedtdlg.tab.CustomExpressions = Custom expressions
|
||||||
simedtdlg.tab.Exportdata = Export data
|
simedtdlg.tab.Exportdata = Export data
|
||||||
simedtdlg.lbl.Motorcfg = Motor configuration:
|
simedtdlg.lbl.Flightcfg = Flight configuration:
|
||||||
simedtdlg.lbl.ttip.Motorcfg = Select the motor configuration to use.
|
simedtdlg.but.FlightcfgEdit = Edit
|
||||||
simedtdlg.combo.ttip.motorconf = Select the motor configuration to use.
|
simedtdlg.lbl.ttip.Flightcfg = Select the flight configuration to use.
|
||||||
|
simedtdlg.combo.ttip.Flightcfg = Select the flight configuration to use.
|
||||||
simedtdlg.lbl.Wind = Wind
|
simedtdlg.lbl.Wind = Wind
|
||||||
simedtdlg.lbl.Averwindspeed = Average windspeed:
|
simedtdlg.lbl.Averwindspeed = Average windspeed:
|
||||||
simedtdlg.lbl.ttip.Averwindspeed = The average windspeed relative to the ground.
|
simedtdlg.lbl.ttip.Averwindspeed = The average windspeed relative to the ground.
|
||||||
@ -894,8 +896,8 @@ MassComponentCfg.but.Reset = Reset
|
|||||||
|
|
||||||
! MotorConfig
|
! MotorConfig
|
||||||
MotorCfg.checkbox.compmotormount = This component is a motor mount
|
MotorCfg.checkbox.compmotormount = This component is a motor mount
|
||||||
MotorCfg.lbl.Motorcfg = Motor configuration:
|
MotorCfg.lbl.Flightcfg = Flight configuration:
|
||||||
MotorCfg.but.New = New
|
MotorCfg.but.FlightcfgEdit = Edit
|
||||||
MotorCfg.lbl.Currentmotor = Current motor:
|
MotorCfg.lbl.Currentmotor = Current motor:
|
||||||
MotorCfg.lbl.Motoroverhang = Motor overhang:
|
MotorCfg.lbl.Motoroverhang = Motor overhang:
|
||||||
MotorCfg.lbl.Ignitionat = Ignition at:
|
MotorCfg.lbl.Ignitionat = Ignition at:
|
||||||
|
@ -10,6 +10,7 @@ import java.awt.event.ActionListener;
|
|||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JCheckBox;
|
import javax.swing.JCheckBox;
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
|
import javax.swing.JDialog;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JSpinner;
|
import javax.swing.JSpinner;
|
||||||
@ -26,13 +27,13 @@ import net.sf.openrocket.gui.adaptors.FlightConfigurationModel;
|
|||||||
import net.sf.openrocket.gui.components.BasicSlider;
|
import net.sf.openrocket.gui.components.BasicSlider;
|
||||||
import net.sf.openrocket.gui.components.StyledLabel;
|
import net.sf.openrocket.gui.components.StyledLabel;
|
||||||
import net.sf.openrocket.gui.components.UnitSelector;
|
import net.sf.openrocket.gui.components.UnitSelector;
|
||||||
|
import net.sf.openrocket.gui.dialogs.flightconfiguration.FlightConfigurationDialog;
|
||||||
import net.sf.openrocket.gui.dialogs.motor.MotorChooserDialog;
|
import net.sf.openrocket.gui.dialogs.motor.MotorChooserDialog;
|
||||||
import net.sf.openrocket.l10n.Translator;
|
import net.sf.openrocket.l10n.Translator;
|
||||||
import net.sf.openrocket.motor.Motor;
|
import net.sf.openrocket.motor.Motor;
|
||||||
import net.sf.openrocket.motor.ThrustCurveMotor;
|
import net.sf.openrocket.motor.ThrustCurveMotor;
|
||||||
import net.sf.openrocket.rocketcomponent.Configuration;
|
import net.sf.openrocket.rocketcomponent.Configuration;
|
||||||
import net.sf.openrocket.rocketcomponent.MotorConfiguration;
|
import net.sf.openrocket.rocketcomponent.MotorConfiguration;
|
||||||
import net.sf.openrocket.rocketcomponent.MotorConfiguration.IgnitionEvent;
|
|
||||||
import net.sf.openrocket.rocketcomponent.MotorMount;
|
import net.sf.openrocket.rocketcomponent.MotorMount;
|
||||||
import net.sf.openrocket.rocketcomponent.Rocket;
|
import net.sf.openrocket.rocketcomponent.Rocket;
|
||||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||||
@ -70,7 +71,7 @@ public class MotorConfig extends JPanel {
|
|||||||
|
|
||||||
// Motor configuration selector
|
// Motor configuration selector
|
||||||
//// Motor configuration:
|
//// Motor configuration:
|
||||||
panel.add(new JLabel(trans.get("MotorCfg.lbl.Motorcfg")), "shrink");
|
panel.add(new JLabel(trans.get("MotorCfg.lbl.Flightcfg")), "shrink");
|
||||||
|
|
||||||
JComboBox combo = new JComboBox(new FlightConfigurationModel(configuration));
|
JComboBox combo = new JComboBox(new FlightConfigurationModel(configuration));
|
||||||
panel.add(combo, "growx");
|
panel.add(combo, "growx");
|
||||||
@ -82,13 +83,13 @@ public class MotorConfig extends JPanel {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//// New button
|
//// Edit button
|
||||||
JButton button = new JButton(trans.get("MotorCfg.but.New"));
|
JButton button = new JButton(trans.get("MotorCfg.but.FlightcfgEdit"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
String id = rocket.newFlightConfigurationID();
|
JDialog configDialog = new FlightConfigurationDialog(rocket,SwingUtilities.windowForComponent(MotorConfig.this));
|
||||||
configuration.setFlightConfigurationID(id);
|
configDialog.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(button, "wrap unrel");
|
panel.add(button, "wrap unrel");
|
||||||
|
@ -24,6 +24,7 @@ import javax.swing.JSpinner;
|
|||||||
import javax.swing.JTabbedPane;
|
import javax.swing.JTabbedPane;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
import javax.swing.ListCellRenderer;
|
import javax.swing.ListCellRenderer;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
import javax.swing.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
@ -41,9 +42,11 @@ import net.sf.openrocket.gui.components.BasicSlider;
|
|||||||
import net.sf.openrocket.gui.components.DescriptionArea;
|
import net.sf.openrocket.gui.components.DescriptionArea;
|
||||||
import net.sf.openrocket.gui.components.SimulationExportPanel;
|
import net.sf.openrocket.gui.components.SimulationExportPanel;
|
||||||
import net.sf.openrocket.gui.components.UnitSelector;
|
import net.sf.openrocket.gui.components.UnitSelector;
|
||||||
|
import net.sf.openrocket.gui.dialogs.flightconfiguration.FlightConfigurationDialog;
|
||||||
import net.sf.openrocket.gui.plot.Axis;
|
import net.sf.openrocket.gui.plot.Axis;
|
||||||
import net.sf.openrocket.gui.plot.PlotConfiguration;
|
import net.sf.openrocket.gui.plot.PlotConfiguration;
|
||||||
import net.sf.openrocket.gui.plot.SimulationPlotPanel;
|
import net.sf.openrocket.gui.plot.SimulationPlotPanel;
|
||||||
|
import net.sf.openrocket.gui.scalefigure.RocketPanel;
|
||||||
import net.sf.openrocket.gui.util.GUIUtil;
|
import net.sf.openrocket.gui.util.GUIUtil;
|
||||||
import net.sf.openrocket.gui.util.Icons;
|
import net.sf.openrocket.gui.util.Icons;
|
||||||
import net.sf.openrocket.l10n.Translator;
|
import net.sf.openrocket.l10n.Translator;
|
||||||
@ -208,24 +211,34 @@ public class SimulationEditDialog extends JDialog {
|
|||||||
DoubleModel m;
|
DoubleModel m;
|
||||||
JSpinner spin;
|
JSpinner spin;
|
||||||
|
|
||||||
//// Motor selector
|
//// Flight selector
|
||||||
//// Motor configuration:
|
//// Flight configuration:
|
||||||
JLabel label = new JLabel(trans.get("simedtdlg.lbl.Motorcfg"));
|
JLabel label = new JLabel(trans.get("simedtdlg.lbl.Flightcfg"));
|
||||||
//// Select the motor configuration to use.
|
//// Select the motor configuration to use.
|
||||||
label.setToolTipText(trans.get("simedtdlg.lbl.ttip.Motorcfg"));
|
label.setToolTipText(trans.get("simedtdlg.lbl.ttip.Flightcfg"));
|
||||||
panel.add(label, "shrinkx, spanx, split 2");
|
panel.add(label, "shrinkx, spanx, split 2");
|
||||||
|
|
||||||
JComboBox combo = new JComboBox(new FlightConfigurationModel(configuration));
|
JComboBox combo = new JComboBox(new FlightConfigurationModel(configuration));
|
||||||
//// Select the motor configuration to use.
|
//// Select the motor configuration to use.
|
||||||
combo.setToolTipText(trans.get("simedtdlg.combo.ttip.motorconf"));
|
combo.setToolTipText(trans.get("simedtdlg.combo.ttip.Flightcfg"));
|
||||||
combo.addActionListener(new ActionListener() {
|
combo.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
conditions.setMotorConfigurationID(configuration.getFlightConfigurationID());
|
conditions.setMotorConfigurationID(configuration.getFlightConfigurationID());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(combo, "growx, wrap para");
|
panel.add(combo, "");
|
||||||
|
|
||||||
|
//// Edit button
|
||||||
|
JButton button = new JButton(trans.get("simedtdlg.but.FlightcfgEdit"));
|
||||||
|
button.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
JDialog configDialog = new FlightConfigurationDialog(document.getRocket(),SwingUtilities.windowForComponent(SimulationEditDialog.this));
|
||||||
|
configDialog.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
panel.add(button, "wrap");
|
||||||
|
|
||||||
//// Wind settings: Average wind speed, turbulence intensity, std. deviation
|
//// Wind settings: Average wind speed, turbulence intensity, std. deviation
|
||||||
sub = new JPanel(new MigLayout("fill, gap rel unrel",
|
sub = new JPanel(new MigLayout("fill, gap rel unrel",
|
||||||
|
@ -6,6 +6,7 @@ import java.awt.Dimension;
|
|||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.InputEvent;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -21,7 +22,9 @@ import javax.swing.AbstractAction;
|
|||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import javax.swing.ComboBoxModel;
|
import javax.swing.ComboBoxModel;
|
||||||
import javax.swing.DefaultComboBoxModel;
|
import javax.swing.DefaultComboBoxModel;
|
||||||
|
import javax.swing.JButton;
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
|
import javax.swing.JDialog;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JSlider;
|
import javax.swing.JSlider;
|
||||||
@ -45,6 +48,8 @@ import net.sf.openrocket.gui.components.BasicSlider;
|
|||||||
import net.sf.openrocket.gui.components.StageSelector;
|
import net.sf.openrocket.gui.components.StageSelector;
|
||||||
import net.sf.openrocket.gui.components.UnitSelector;
|
import net.sf.openrocket.gui.components.UnitSelector;
|
||||||
import net.sf.openrocket.gui.configdialog.ComponentConfigDialog;
|
import net.sf.openrocket.gui.configdialog.ComponentConfigDialog;
|
||||||
|
import net.sf.openrocket.gui.configdialog.MotorConfig;
|
||||||
|
import net.sf.openrocket.gui.dialogs.flightconfiguration.FlightConfigurationDialog;
|
||||||
import net.sf.openrocket.gui.figure3d.RocketFigure3d;
|
import net.sf.openrocket.gui.figure3d.RocketFigure3d;
|
||||||
import net.sf.openrocket.gui.figureelements.CGCaret;
|
import net.sf.openrocket.gui.figureelements.CGCaret;
|
||||||
import net.sf.openrocket.gui.figureelements.CPCaret;
|
import net.sf.openrocket.gui.figureelements.CPCaret;
|
||||||
@ -304,13 +309,23 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Motor configuration selector
|
// Flight configuration selector
|
||||||
//// Motor configuration:
|
//// Flight configuration:
|
||||||
JLabel label = new JLabel(trans.get("RocketPanel.lbl.Motorcfg"));
|
JLabel label = new JLabel(trans.get("RocketPanel.lbl.Flightcfg"));
|
||||||
label.setHorizontalAlignment(JLabel.RIGHT);
|
label.setHorizontalAlignment(JLabel.RIGHT);
|
||||||
add(label, "growx, right");
|
add(label, "growx, right");
|
||||||
add(new JComboBox(new FlightConfigurationModel(configuration)), "wrap");
|
add(new JComboBox(new FlightConfigurationModel(configuration)), "");
|
||||||
|
|
||||||
|
//// Edit button
|
||||||
|
JButton button = new JButton(trans.get("RocketPanel.but.FlightcfgEdit"));
|
||||||
|
button.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
JDialog configDialog = new FlightConfigurationDialog(document.getRocket(),SwingUtilities.windowForComponent(RocketPanel.this));
|
||||||
|
configDialog.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
add(button, "wrap");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user