Merge pull request #168 from kruland2607/master

Various bug fixes and updated translations.
This commit is contained in:
kruland2607 2013-11-23 18:33:03 -08:00
commit 40d056b959
7 changed files with 3368 additions and 3349 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -151,7 +151,9 @@ public abstract class MotorFilterPanel extends JPanel {
@Override
public void contentsChanged(ListDataEvent e) {
MotorFilterPanel.this.filter.setExcludedManufacturers( manufacturerCheckList.getUncheckedItems() );
Collection<Manufacturer> uncheckedManufacturers = manufacturerCheckList.getUncheckedItems();
MotorFilterPanel.this.filter.setExcludedManufacturers( uncheckedManufacturers );
((SwingPreferences) Application.getPreferences()).setExcludedMotorManufacturers(uncheckedManufacturers);
onSelectionChanged();
}
});

View File

@ -201,6 +201,8 @@ class MotorInformationPanel extends JPanel {
}
public void clearData() {
selectedMotor = null;
selectedMotorSet = null;
totalImpulseLabel.setText("");
totalImpulseLabel.setToolTipText(null);
classificationLabel.setText("");
@ -220,6 +222,11 @@ class MotorInformationPanel extends JPanel {
public void updateData( List<ThrustCurveMotor> motors, ThrustCurveMotor selectedMotor ) {
if ( selectedMotor == null ) {
clearData();
return;
}
this.selectedMotorSet = motors;
this.selectedMotor = selectedMotor;

View File

@ -2,14 +2,12 @@ package net.sf.openrocket.gui.dialogs.motor.thrustcurve;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.Paint;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -19,14 +17,12 @@ import java.util.Set;
import java.util.prefs.Preferences;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTabbedPane;
@ -58,12 +54,10 @@ import net.sf.openrocket.motor.ThrustCurveMotor;
import net.sf.openrocket.rocketcomponent.MotorConfiguration;
import net.sf.openrocket.rocketcomponent.MotorMount;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
import net.sf.openrocket.util.BugException;
import net.sf.openrocket.utils.MotorCorrelation;
import org.jfree.chart.ChartColor;
import org.jfree.chart.axis.ValueAxis;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -145,7 +139,6 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
//// GUI
JPanel panel = new JPanel(new MigLayout("fill","[][grow]"));
this.add(panel, "grow");
//// Select thrust curve:
{
@ -266,7 +259,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
JScrollPane scrollpane = new JScrollPane();
scrollpane.setViewportView(table);
panel.add(scrollpane, "grow, width :500:, height :300:, spanx, wrap");
panel.add(scrollpane, "grow, width :500:, spanx, wrap");
}

View File

@ -45,7 +45,7 @@ public class SimulationPlotDialog extends JDialog {
final SimulationPlot myPlot = new SimulationPlot(simulation, config, initialShowPoints);
// Create the dialog
JPanel panel = new JPanel(new MigLayout("fill"));
JPanel panel = new JPanel(new MigLayout("fill","[]","[grow][]"));
this.add(panel);
final ChartPanel chartPanel = new SimulationChart(myPlot.getJFreeChart());