[#1285] Improve Motors & Configurations UI scalability

This commit is contained in:
SiboVG 2022-05-23 00:52:18 +02:00
parent 586b85e536
commit 28b56726f4
5 changed files with 9 additions and 9 deletions

View File

@ -35,7 +35,7 @@ public class MotorMountConfigurationPanel extends JPanel {
table.addMouseListener(new GUIUtil.BooleanTableClickListener(table)); table.addMouseListener(new GUIUtil.BooleanTableClickListener(table));
JScrollPane scroll = new JScrollPane(table); JScrollPane scroll = new JScrollPane(table);
this.add(scroll, "w 200lp, h 150lp, grow"); this.add(scroll, "w 200lp, h 150lp, grow, pushy");
} }
} }

View File

@ -139,7 +139,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
updateButtonState(); updateButtonState();
this.add(tabs, "spanx, grow, wrap rel"); this.add(tabs, "spanx, grow, pushy, wrap rel");
} }
/** /**

View File

@ -75,12 +75,12 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
"<html><b>" + trans.get("lbl.motorMounts") + "</b></html>")); "<html><b>" + trans.get("lbl.motorMounts") + "</b></html>"));
MotorMountConfigurationPanel mountConfigPanel = new MotorMountConfigurationPanel(this, rocket); MotorMountConfigurationPanel mountConfigPanel = new MotorMountConfigurationPanel(this, rocket);
subpanel.add(mountConfigPanel, "grow"); subpanel.add(mountConfigPanel, "grow, pushy");
this.add(subpanel, "split, growy"); this.add(subpanel, "split, growy, pushy");
} }
cards = new JPanel(new CardLayout()); cards = new JPanel(new CardLayout());
this.add(cards); this.add(cards, "pushy");
JLabel helpText = new JLabel(trans.get("MotorConfigurationPanel.lbl.nomotors")); JLabel helpText = new JLabel(trans.get("MotorConfigurationPanel.lbl.nomotors"));
cards.add(helpText, HELP_LABEL ); cards.add(helpText, HELP_LABEL );
@ -90,7 +90,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
BorderFactory.createEtchedBorder(), BorderFactory.createEtchedBorder(),
"<html><b>" + trans.get("MotorConfigurationPanel.lbl.motorConfiguration") + "</b></html>")); "<html><b>" + trans.get("MotorConfigurationPanel.lbl.motorConfiguration") + "</b></html>"));
JScrollPane scroll = new JScrollPane(table); JScrollPane scroll = new JScrollPane(table);
configurationPanel.add(scroll, "spanx, grow, wrap"); configurationPanel.add(scroll, "spanx, grow, pushy, wrap");
//// Select motor //// Select motor
selectMotorButton = new SelectColorButton(trans.get("MotorConfigurationPanel.btn.selectMotor")); selectMotorButton = new SelectColorButton(trans.get("MotorConfigurationPanel.btn.selectMotor"));
@ -134,7 +134,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
cards.add(configurationPanel, TABLE_LABEL ); cards.add(configurationPanel, TABLE_LABEL );
this.add(cards, "gapleft para, grow, wrap"); this.add(cards, "gapleft para, grow, pushy, wrap");
// Set 'Enter' key action to open the motor selection dialog // Set 'Enter' key action to open the motor selection dialog
table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(

View File

@ -41,7 +41,7 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel<Recovery
super(flightConfigurationPanel,rocket); super(flightConfigurationPanel,rocket);
JScrollPane scroll = new JScrollPane(table); JScrollPane scroll = new JScrollPane(table);
this.add(scroll, "span, grow, wrap"); this.add(scroll, "span, grow, pushy, wrap");
//// Select deployment //// Select deployment
selectDeploymentButton = new SelectColorButton(trans.get("edtmotorconfdlg.but.Selectdeployment")); selectDeploymentButton = new SelectColorButton(trans.get("edtmotorconfdlg.but.Selectdeployment"));

View File

@ -45,7 +45,7 @@ public class SeparationConfigurationPanel extends FlightConfigurablePanel<AxialS
super(flightConfigurationPanel,rocket); super(flightConfigurationPanel,rocket);
JScrollPane scroll = new JScrollPane(table); JScrollPane scroll = new JScrollPane(table);
this.add(scroll, "span, grow, wrap"); this.add(scroll, "span, grow, pushy, wrap");
//// Select deployment //// Select deployment
selectSeparationButton = new SelectColorButton(trans.get("edtmotorconfdlg.but.Selectseparation")); selectSeparationButton = new SelectColorButton(trans.get("edtmotorconfdlg.but.Selectseparation"));