Port to MigLayout 5.0

This commit is contained in:
Reinhard Pointner 2016-10-16 17:34:31 +08:00
parent 9b13064e62
commit 18ce7c0096
3 changed files with 9 additions and 9 deletions

View File

@ -76,7 +76,7 @@ class BindingDialog extends JDialog {
this.infoObjectFormat = infoObjectFormat;
JComponent root = (JComponent) getContentPane();
root.setLayout(new MigLayout("nogrid, fill, insets dialog"));
root.setLayout(new MigLayout("nogrid, novisualpadding, fill, insets dialog"));
// decorative tabbed pane
JTabbedPane inputContainer = new JTabbedPane();
@ -306,9 +306,9 @@ class BindingDialog extends JDialog {
JDialog dialog = new JDialog(getWindow(evt.getSource()), "MediaInfo", ModalityType.DOCUMENT_MODAL);
JComponent c = (JComponent) dialog.getContentPane();
c.setLayout(new MigLayout("fill", "[align center]", "[fill][pref!]"));
c.setLayout(new MigLayout("fill, novisualpadding", "[align center]", "[fill][pref!]"));
c.add(tabbedPane, "grow, wrap");
c.add(newButton("OK", e -> dialog.setVisible(false)), "wmin 80px, hmin 25px");
c.add(newButton("OK", e -> dialog.setVisible(false)), "w 80px!, h 25px!");
dialog.pack();
dialog.setLocationRelativeTo(BindingDialog.this);

View File

@ -106,7 +106,7 @@ public class FormatDialog extends JDialog {
private ProgressIndicator progressIndicator = new ProgressIndicator();
private JLabel title = new JLabel();
private JPanel help = new JPanel(new MigLayout("insets 0, nogrid, fillx"));
private JPanel help = new JPanel(new MigLayout("insets 0, nogrid, novisualpadding, fillx"));
private static final PreferencesEntry<String> persistentSampleFile = Settings.forPackage(FormatDialog.class).entry("format.sample.file");
@ -180,7 +180,7 @@ public class FormatDialog extends JDialog {
// bold title label in header
title.setFont(title.getFont().deriveFont(BOLD));
JPanel header = new JPanel(new MigLayout("insets dialog, nogrid"));
JPanel header = new JPanel(new MigLayout("insets dialog, nogrid, novisualpadding"));
header.setBackground(Color.white);
header.setBorder(new SeparatorBorder(1, new Color(0xB4B4B4), new Color(0xACACAC), GradientStyle.LEFT_TO_RIGHT, Position.BOTTOM));
@ -256,7 +256,7 @@ public class FormatDialog extends JDialog {
// initialize window properties
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
setMinimumSize(new Dimension(650, 500));
setMinimumSize(new Dimension(650, 520));
// initialize data
setState(initMode, lockOnBinding != null ? lockOnBinding : restoreSample(initMode), lockOnBinding != null);
@ -344,14 +344,14 @@ public class FormatDialog extends JDialog {
}
private JComponent createSyntaxPanel(Mode mode) {
JPanel panel = new JPanel(new MigLayout("fill, nogrid"));
JPanel panel = new JPanel(new MigLayout("fill, nogrid, novisualpadding", "[pref]", "[fill, min]"));
panel.setBorder(createLineBorder(new Color(0xACA899)));
panel.setBackground(new Color(0xFFFFE1));
panel.setOpaque(true);
panel.add(new LinkButton(newAction(ResourceBundle.getBundle(FormatDialog.class.getName()).getString(mode.key() + ".syntax"), evt -> {
openURI(ResourceBundle.getBundle(FormatDialog.class.getName()).getString("help.url"));
})));
})), "h min!");
return panel;
}

View File

@ -41,7 +41,7 @@ class RenameList<E> extends FileBotList<E> {
getRemoveAction().setEnabled(true);
buttonPanel = new JPanel(new MigLayout("insets 1.2mm, nogrid, fill", "align center"));
buttonPanel = new JPanel(new MigLayout("insets 1.2mm, nogrid, novisualpadding, fill", "align center"));
buttonPanel.add(createImageButton(downAction), "gap 10px");
buttonPanel.add(createImageButton(upAction), "gap 0");
buttonPanel.add(createLoadButton(), "gap 10px");