diff --git a/source/net/filebot/ui/AbstractSearchPanel.java b/source/net/filebot/ui/AbstractSearchPanel.java index c2acadd4..b4567abf 100644 --- a/source/net/filebot/ui/AbstractSearchPanel.java +++ b/source/net/filebot/ui/AbstractSearchPanel.java @@ -1,5 +1,6 @@ package net.filebot.ui; +import static javax.swing.BorderFactory.*; import static javax.swing.ScrollPaneConstants.*; import static net.filebot.Logging.*; import static net.filebot.util.ui.SwingUI.*; @@ -17,7 +18,6 @@ import java.util.TreeSet; import java.util.logging.Level; import javax.swing.AbstractAction; -import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JComponent; @@ -57,11 +57,11 @@ public abstract class AbstractSearchPanel extends JComponent { historyPanel.setColumnHeader(2, "Duration"); JScrollPane historyScrollPane = new JScrollPane(historyPanel, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER); - historyScrollPane.setBorder(BorderFactory.createEmptyBorder()); + historyScrollPane.setBorder(createEmptyBorder()); tabbedPane.addTab("History", ResourceManager.getIcon("action.find"), historyScrollPane); - tabbedPaneGroup.setBorder(BorderFactory.createTitledBorder("Search Results")); + tabbedPaneGroup.setBorder(createTitledBorder("Search Results")); tabbedPaneGroup.add(tabbedPane, "grow, wrap"); setLayout(new MigLayout("nogrid, novisualpadding, fill, insets 10px 10px 15px 10px", "align 45%", "[pref!]10px[fill]")); diff --git a/source/net/filebot/ui/SelectButtonTextField.java b/source/net/filebot/ui/SelectButtonTextField.java index 97e3a06b..1e670886 100644 --- a/source/net/filebot/ui/SelectButtonTextField.java +++ b/source/net/filebot/ui/SelectButtonTextField.java @@ -14,7 +14,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.swing.AbstractAction; -import javax.swing.BorderFactory; import javax.swing.DefaultListCellRenderer; import javax.swing.JButton; import javax.swing.JComboBox; @@ -45,7 +44,7 @@ public class SelectButtonTextField extends JComponent { public SelectButtonTextField() { selectButton.addActionListener(textFieldFocusOnClick); - editor.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 1, ((LineBorder) selectButton.getBorder()).getLineColor())); + editor.setBorder(createMatteBorder(1, 0, 1, 1, ((LineBorder) selectButton.getBorder()).getLineColor())); setLayout(new MigLayout("fill, nogrid, novisualpadding")); add(selectButton, "h pref!, w pref!, sizegroupy editor"); @@ -162,7 +161,7 @@ public class SelectButtonTextField extends JComponent { editor.setEnabled(comboBox.isEnabled()); editor.setFocusable(comboBox.isFocusable()); editor.setFont(comboBox.getFont()); - editor.setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 3)); + editor.setBorder(createEmptyBorder(0, 3, 0, 3)); editor.addFocusListener(createFocusListener()); diff --git a/source/net/filebot/ui/filter/AttributeTool.java b/source/net/filebot/ui/filter/AttributeTool.java index 8da3c24d..40c5ff31 100644 --- a/source/net/filebot/ui/filter/AttributeTool.java +++ b/source/net/filebot/ui/filter/AttributeTool.java @@ -1,5 +1,6 @@ package net.filebot.ui.filter; +import static javax.swing.BorderFactory.*; import static net.filebot.MediaTypes.*; import static net.filebot.media.XattrMetaInfo.*; import static net.filebot.util.FileUtilities.*; @@ -10,7 +11,6 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.CancellationException; -import javax.swing.BorderFactory; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.ListSelectionModel; @@ -42,7 +42,7 @@ class AttributeTool extends Tool { table.setRowHeight(25); JScrollPane scrollPane = new JScrollPane(table); - scrollPane.setBorder(BorderFactory.createEmptyBorder()); + scrollPane.setBorder(createEmptyBorder()); setLayout(new MigLayout("insets 0, fill")); add(new LoadingOverlayPane(scrollPane, this), "grow"); diff --git a/source/net/filebot/ui/filter/FileTreePanel.java b/source/net/filebot/ui/filter/FileTreePanel.java index f5b93234..1e412510 100644 --- a/source/net/filebot/ui/filter/FileTreePanel.java +++ b/source/net/filebot/ui/filter/FileTreePanel.java @@ -1,10 +1,10 @@ package net.filebot.ui.filter; +import static javax.swing.BorderFactory.*; import static net.filebot.ui.transfer.BackgroundFileTransferablePolicy.*; import static net.filebot.util.ui.SwingUI.*; import javax.swing.Action; -import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JScrollPane; @@ -25,7 +25,7 @@ class FileTreePanel extends JComponent { public FileTreePanel() { fileTree.setTransferHandler(new DefaultTransferHandler(transferablePolicy, null)); - setBorder(BorderFactory.createTitledBorder("File Tree")); + setBorder(createTitledBorder("File Tree")); setLayout(new MigLayout("insets 0, nogrid, fill", "align center", "[fill][pref!]")); add(new LoadingOverlayPane(new JScrollPane(fileTree), this), "grow, wrap 1.2mm"); diff --git a/source/net/filebot/ui/filter/MediaInfoTool.java b/source/net/filebot/ui/filter/MediaInfoTool.java index 328b7c7d..53b64846 100644 --- a/source/net/filebot/ui/filter/MediaInfoTool.java +++ b/source/net/filebot/ui/filter/MediaInfoTool.java @@ -1,6 +1,7 @@ package net.filebot.ui.filter; import static java.util.Collections.*; +import static javax.swing.BorderFactory.*; import static net.filebot.Logging.*; import static net.filebot.MediaTypes.*; import static net.filebot.util.FileUtilities.*; @@ -15,7 +16,6 @@ import java.util.concurrent.CancellationException; import java.util.regex.Pattern; import java.util.stream.IntStream; -import javax.swing.BorderFactory; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.ListSelectionModel; @@ -47,7 +47,7 @@ class MediaInfoTool extends Tool { table.setRowHeight(25); JScrollPane scrollPane = new JScrollPane(table); - scrollPane.setBorder(BorderFactory.createEmptyBorder()); + scrollPane.setBorder(createEmptyBorder()); setLayout(new MigLayout("insets 0, fill")); add(new LoadingOverlayPane(scrollPane, this), "grow"); diff --git a/source/net/filebot/ui/filter/TypeTool.java b/source/net/filebot/ui/filter/TypeTool.java index b32fd8ef..a06d3493 100644 --- a/source/net/filebot/ui/filter/TypeTool.java +++ b/source/net/filebot/ui/filter/TypeTool.java @@ -1,6 +1,7 @@ package net.filebot.ui.filter; import static java.util.Collections.*; +import static javax.swing.BorderFactory.*; import static net.filebot.util.FileUtilities.*; import java.io.File; @@ -10,11 +11,10 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.concurrent.CancellationException; import java.util.SortedMap; import java.util.TreeMap; +import java.util.concurrent.CancellationException; -import javax.swing.BorderFactory; import javax.swing.JScrollPane; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeModel; @@ -36,7 +36,7 @@ class TypeTool extends Tool { setLayout(new MigLayout("insets 0, fill")); JScrollPane treeScrollPane = new JScrollPane(tree); - treeScrollPane.setBorder(BorderFactory.createEmptyBorder()); + treeScrollPane.setBorder(createEmptyBorder()); add(new LoadingOverlayPane(treeScrollPane, this), "grow"); diff --git a/source/net/filebot/util/ui/SelectButton.java b/source/net/filebot/util/ui/SelectButton.java index a2901b85..0d717e7b 100644 --- a/source/net/filebot/util/ui/SelectButton.java +++ b/source/net/filebot/util/ui/SelectButton.java @@ -1,5 +1,7 @@ package net.filebot.util.ui; +import static javax.swing.BorderFactory.*; + import java.awt.Color; import java.awt.Component; import java.awt.Dimension; @@ -18,7 +20,6 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import javax.swing.BorderFactory; import javax.swing.DefaultSingleSelectionModel; import javax.swing.Icon; import javax.swing.JButton; @@ -55,7 +56,7 @@ public class SelectButton extends JButton { setHorizontalAlignment(SwingConstants.CENTER); setVerticalAlignment(SwingConstants.CENTER); - setBorder(BorderFactory.createLineBorder(new Color(0xA4A4A4), 1)); + setBorder(createLineBorder(new Color(0xA4A4A4), 1)); setPreferredSize(new Dimension(32, 22)); addActionListener(new OpenPopupOnClick()); diff --git a/source/net/filebot/util/ui/notification/MessageNotification.java b/source/net/filebot/util/ui/notification/MessageNotification.java index 048605a8..e4a35766 100644 --- a/source/net/filebot/util/ui/notification/MessageNotification.java +++ b/source/net/filebot/util/ui/notification/MessageNotification.java @@ -4,6 +4,7 @@ package net.filebot.util.ui.notification; +import static javax.swing.BorderFactory.*; import static net.filebot.util.ui.SwingUI.*; import java.awt.BorderLayout; @@ -32,8 +33,8 @@ public class MessageNotification extends NotificationWindow { } private int margin = 10; - private Border marginBorder = BorderFactory.createEmptyBorder(margin, margin, margin, margin); - private Border border = BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(new Color(245, 155, 15), Color.WHITE), marginBorder); + private Border marginBorder = createEmptyBorder(margin, margin, margin, margin); + private Border border = createCompoundBorder(createEtchedBorder(new Color(245, 155, 15), Color.WHITE), marginBorder); private JLabel headLabel; private JTextPane textArea;