Skip to content

Commit

Permalink
Merge pull request #1370 from SiboVG/issue-1285
Browse files Browse the repository at this point in the history
[#1285] Improve Motors & Configurations UI scalability
  • Loading branch information
JoePfeiffer committed May 23, 2022
2 parents 62113b8 + 28b5672 commit 156dbd5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public MotorMountConfigurationPanel( Component parent, Rocket rocket ) {

table.addMouseListener(new GUIUtil.BooleanTableClickListener(table));
JScrollPane scroll = new JScrollPane(table);
this.add(scroll, "w 200lp, h 150lp, grow");
this.add(scroll, "w 200lp, h 150lp, grow, pushy");

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void stateChanged(ChangeEvent e) {

updateButtonState();

this.add(tabs, "spanx, grow, wrap rel");
this.add(tabs, "spanx, grow, pushy, wrap rel");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
"<html><b>" + trans.get("lbl.motorMounts") + "</b></html>"));

MotorMountConfigurationPanel mountConfigPanel = new MotorMountConfigurationPanel(this, rocket);
subpanel.add(mountConfigPanel, "grow");
this.add(subpanel, "split, growy");
subpanel.add(mountConfigPanel, "grow, pushy");
this.add(subpanel, "split, growy, pushy");
}

cards = new JPanel(new CardLayout());
this.add(cards);
this.add(cards, "pushy");

JLabel helpText = new JLabel(trans.get("MotorConfigurationPanel.lbl.nomotors"));
cards.add(helpText, HELP_LABEL );
Expand All @@ -90,7 +90,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
BorderFactory.createEtchedBorder(),
"<html><b>" + trans.get("MotorConfigurationPanel.lbl.motorConfiguration") + "</b></html>"));
JScrollPane scroll = new JScrollPane(table);
configurationPanel.add(scroll, "spanx, grow, wrap");
configurationPanel.add(scroll, "spanx, grow, pushy, wrap");

//// Select motor
selectMotorButton = new SelectColorButton(trans.get("MotorConfigurationPanel.btn.selectMotor"));
Expand Down Expand Up @@ -134,7 +134,7 @@ public void actionPerformed(ActionEvent e) {

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
table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel<Recovery
super(flightConfigurationPanel,rocket);

JScrollPane scroll = new JScrollPane(table);
this.add(scroll, "span, grow, wrap");
this.add(scroll, "span, grow, pushy, wrap");

//// Select deployment
selectDeploymentButton = new SelectColorButton(trans.get("edtmotorconfdlg.but.Selectdeployment"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class SeparationConfigurationPanel extends FlightConfigurablePanel<AxialS
super(flightConfigurationPanel,rocket);

JScrollPane scroll = new JScrollPane(table);
this.add(scroll, "span, grow, wrap");
this.add(scroll, "span, grow, pushy, wrap");

//// Select deployment
selectSeparationButton = new SelectColorButton(trans.get("edtmotorconfdlg.but.Selectseparation"));
Expand Down

0 comments on commit 156dbd5

Please sign in to comment.