[Fixes #424] Respaced FinSetConfig Window:
Resolved some sources of phantom whitespace; Spacing on component configuration windows is now generally tighter.
This commit is contained in:
parent
c1d8bfda06
commit
9aa71c94cf
@ -1,6 +1,5 @@
|
|||||||
package net.sf.openrocket.gui.configdialog;
|
package net.sf.openrocket.gui.configdialog;
|
||||||
|
|
||||||
|
|
||||||
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.ActionListener;
|
||||||
@ -199,9 +198,9 @@ public class FreeformFinSetConfig extends FinSetConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// edit fin points directly here
|
||||||
private JPanel shapePane() {
|
private JPanel shapePane() {
|
||||||
JPanel panel = new JPanel(new MigLayout("fill"));
|
JPanel panel = new JPanel(null);
|
||||||
|
|
||||||
|
|
||||||
// Create the figure
|
// Create the figure
|
||||||
@ -247,30 +246,33 @@ public class FreeformFinSetConfig extends FinSetConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
JButton importButton = new JButton(trans.get("CustomFinImport.button.label"));
|
||||||
panel.add(tablePane, "growy, width 100lp:100lp:, height 100lp:250lp:");
|
importButton.addActionListener(new ActionListener() {
|
||||||
panel.add(figurePane, "gap unrel, spanx, spany 3, growx, growy 1000, height 100lp:250lp:, wrap");
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
panel.add(new StyledLabel(trans.get("lbl.doubleClick1"), -2), "alignx 50%, wrap");
|
importImage();
|
||||||
panel.add(new StyledLabel(trans.get("FreeformFinSetConfig.lbl.doubleClick2"), -2), "alignx 50%, wrap");
|
}
|
||||||
|
});
|
||||||
panel.add(scaleButton, "spany 2, alignx 50%, aligny 50%");
|
ScaleSelector selector = new ScaleSelector(figurePane);
|
||||||
panel.add(exportCsvButton, "spany 2, alignx 50%, aligny 50%");
|
|
||||||
ScaleSelector selector = new ScaleSelector(figurePane);
|
panel.setLayout(new MigLayout("fill, gap 5!","", "[nogrid, fill, sizegroup display, growprio 200]5![sizegroup text, growprio 5]5![sizegroup buttons, align top, growprio 5]0!"));
|
||||||
panel.add( selector, "spany 2, aligny 50%");
|
|
||||||
|
// first row: main display
|
||||||
JButton importButton = new JButton(trans.get("CustomFinImport.button.label"));
|
panel.add(tablePane, "width 100lp:100lp:, growy");
|
||||||
importButton.addActionListener(new ActionListener() {
|
panel.add(figurePane, "width 200lp:400lp:, gap unrel, grow, height 100lp:250lp:, wrap");
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
// row of text directly below figure
|
||||||
importImage();
|
panel.add(new StyledLabel(trans.get("lbl.doubleClick1")+" "+trans.get("FreeformFinSetConfig.lbl.doubleClick2"), -2), "spanx 3");
|
||||||
}
|
panel.add(new StyledLabel(trans.get("FreeformFinSetConfig.lbl.clickDrag"), -2), "spanx 3");
|
||||||
});
|
panel.add(new StyledLabel(trans.get("FreeformFinSetConfig.lbl.ctrlClick"), -2), "spanx 3, wrap");
|
||||||
panel.add(importButton, "spany 2, bottom");
|
|
||||||
|
// row of controls at the bottom of the tab:
|
||||||
|
panel.add(selector, "aligny bottom, gap unrel");
|
||||||
|
panel.add(scaleButton, "");
|
||||||
|
panel.add(importButton, "");
|
||||||
|
panel.add(exportCsvButton, "");
|
||||||
|
|
||||||
// panel.add(new CustomFinBmpImporter(finset), "spany 2, bottom");
|
// panel.add(new CustomFinBmpImporter(finset), "spany 2, bottom");
|
||||||
panel.add(new StyledLabel(trans.get("FreeformFinSetConfig.lbl.clickDrag"), -2), "right, wrap");
|
|
||||||
panel.add(new StyledLabel(trans.get("FreeformFinSetConfig.lbl.ctrlClick"), -2), "right");
|
|
||||||
|
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ public class RocketComponentConfig extends JPanel {
|
|||||||
|
|
||||||
|
|
||||||
public RocketComponentConfig(OpenRocketDocument document, RocketComponent component) {
|
public RocketComponentConfig(OpenRocketDocument document, RocketComponent component) {
|
||||||
setLayout(new MigLayout("fill", "[min,align right]:10[fill, grow]"));
|
setLayout(new MigLayout("fill, gap 5!", "[]:5[]", "[growprio 10]10![fill, grow, growprio 500]10![growprio 10]"));
|
||||||
this.document = document;
|
this.document = document;
|
||||||
this.component = component;
|
this.component = component;
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ public class RocketComponentConfig extends JPanel {
|
|||||||
JLabel label = new JLabel(trans.get("RocketCompCfg.lbl.Componentname"));
|
JLabel label = new JLabel(trans.get("RocketCompCfg.lbl.Componentname"));
|
||||||
//// The component name.
|
//// The component name.
|
||||||
label.setToolTipText(trans.get("RocketCompCfg.ttip.Thecomponentname"));
|
label.setToolTipText(trans.get("RocketCompCfg.ttip.Thecomponentname"));
|
||||||
this.add(label, "spanx, split");
|
this.add(label, "spanx, height 50!, split");
|
||||||
|
|
||||||
componentNameField = new JTextField(15);
|
componentNameField = new JTextField(15);
|
||||||
textFieldListener = new TextFieldListener();
|
textFieldListener = new TextFieldListener();
|
||||||
@ -106,7 +106,7 @@ public class RocketComponentConfig extends JPanel {
|
|||||||
|
|
||||||
|
|
||||||
tabbedPane = new JTabbedPane();
|
tabbedPane = new JTabbedPane();
|
||||||
this.add(tabbedPane, "newline, span, growx, growy 1, wrap");
|
this.add(tabbedPane, "newline, span, growx, growy 100, wrap");
|
||||||
|
|
||||||
//// Override and Mass and CG override options
|
//// Override and Mass and CG override options
|
||||||
tabbedPane.addTab(trans.get("RocketCompCfg.tab.Override"), null, overrideTab(),
|
tabbedPane.addTab(trans.get("RocketCompCfg.tab.Override"), null, overrideTab(),
|
||||||
@ -132,7 +132,7 @@ public class RocketComponentConfig extends JPanel {
|
|||||||
this.remove(buttonPanel);
|
this.remove(buttonPanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonPanel = new JPanel(new MigLayout("fill, ins 0"));
|
buttonPanel = new JPanel(new MigLayout("fillx, ins 0"));
|
||||||
|
|
||||||
//// Mass:
|
//// Mass:
|
||||||
infoLabel = new StyledLabel(" ", -1);
|
infoLabel = new StyledLabel(" ", -1);
|
||||||
@ -154,7 +154,7 @@ public class RocketComponentConfig extends JPanel {
|
|||||||
|
|
||||||
updateFields();
|
updateFields();
|
||||||
|
|
||||||
this.add(buttonPanel, "spanx, growx");
|
this.add(buttonPanel, "dock south, spanx, growx, height 50!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user