diff --git a/source/net/filebot/Main.java b/source/net/filebot/Main.java index 30b2fd73..b9c59f6f 100644 --- a/source/net/filebot/Main.java +++ b/source/net/filebot/Main.java @@ -6,7 +6,7 @@ import static java.util.regex.Pattern.*; import static javax.swing.JOptionPane.*; import static net.filebot.Settings.*; import static net.filebot.util.FileUtilities.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Desktop; import java.awt.Dialog.ModalityType; diff --git a/source/net/filebot/UserFiles.java b/source/net/filebot/UserFiles.java index 15b502da..c455f58e 100644 --- a/source/net/filebot/UserFiles.java +++ b/source/net/filebot/UserFiles.java @@ -2,7 +2,7 @@ package net.filebot; import static java.util.Arrays.*; import static net.filebot.Settings.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Dialog; import java.awt.FileDialog; diff --git a/source/net/filebot/cli/GroovyPad.java b/source/net/filebot/cli/GroovyPad.java index 45a4f49e..d1a3190a 100644 --- a/source/net/filebot/cli/GroovyPad.java +++ b/source/net/filebot/cli/GroovyPad.java @@ -1,6 +1,6 @@ package net.filebot.cli; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.BorderLayout; import java.awt.Color; diff --git a/source/net/filebot/ui/AbstractSearchPanel.java b/source/net/filebot/ui/AbstractSearchPanel.java index a5ddba59..11a6ca57 100644 --- a/source/net/filebot/ui/AbstractSearchPanel.java +++ b/source/net/filebot/ui/AbstractSearchPanel.java @@ -2,7 +2,7 @@ package net.filebot.ui; import static javax.swing.ScrollPaneConstants.*; import static net.filebot.ui.NotificationLogging.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Dimension; import java.awt.Window; diff --git a/source/net/filebot/ui/FileBotList.java b/source/net/filebot/ui/FileBotList.java index 1cf34456..39a3042b 100644 --- a/source/net/filebot/ui/FileBotList.java +++ b/source/net/filebot/ui/FileBotList.java @@ -17,7 +17,7 @@ import net.filebot.ui.transfer.DefaultTransferHandler; import net.filebot.ui.transfer.TextFileExportHandler; import net.filebot.ui.transfer.TransferablePolicy; import net.filebot.util.ui.DefaultFancyListCellRenderer; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; import ca.odell.glazedlists.BasicEventList; import ca.odell.glazedlists.EventList; import ca.odell.glazedlists.swing.EventListModel; @@ -45,8 +45,8 @@ public class FileBotList extends JComponent { // Shortcut DELETE, disabled by default getRemoveAction().setEnabled(false); - TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), removeHook); - TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, KeyEvent.ALT_DOWN_MASK), removeHook); + SwingUI.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), removeHook); + SwingUI.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, KeyEvent.ALT_DOWN_MASK), removeHook); } public EventList getModel() { diff --git a/source/net/filebot/ui/FileBotTabComponent.java b/source/net/filebot/ui/FileBotTabComponent.java index 1a4fdb11..7ec7e457 100644 --- a/source/net/filebot/ui/FileBotTabComponent.java +++ b/source/net/filebot/ui/FileBotTabComponent.java @@ -13,7 +13,7 @@ import javax.swing.SwingConstants; import net.filebot.ResourceManager; import net.filebot.util.ui.ProgressIndicator; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; import net.miginfocom.swing.MigLayout; @@ -57,7 +57,7 @@ public class FileBotTabComponent extends JComponent { public void setIcon(Icon icon) { iconLabel.setIcon(icon); - progressIndicator.setPreferredSize(icon != null ? TunedUtilities.getDimension(icon) : progressIndicator.getMinimumSize()); + progressIndicator.setPreferredSize(icon != null ? SwingUI.getDimension(icon) : progressIndicator.getMinimumSize()); } @@ -88,7 +88,7 @@ public class FileBotTabComponent extends JComponent { JButton button = new JButton(icon); button.setRolloverIcon(rolloverIcon); - button.setPreferredSize(TunedUtilities.getDimension(rolloverIcon)); + button.setPreferredSize(SwingUI.getDimension(rolloverIcon)); button.setMaximumSize(button.getPreferredSize()); button.setContentAreaFilled(false); diff --git a/source/net/filebot/ui/MainFrame.java b/source/net/filebot/ui/MainFrame.java index 553b9852..ae2adc1c 100644 --- a/source/net/filebot/ui/MainFrame.java +++ b/source/net/filebot/ui/MainFrame.java @@ -52,7 +52,7 @@ import net.filebot.ui.subtitle.SubtitlePanelBuilder; import net.filebot.util.PreferencesMap.PreferencesEntry; import net.filebot.util.ui.DefaultFancyListCellRenderer; import net.filebot.util.ui.ShadowBorder; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; import net.miginfocom.swing.MigLayout; import net.sf.ehcache.CacheManager; @@ -111,7 +111,7 @@ public class MainFrame extends JFrame { setSize(980, 630); // KEYBOARD SHORTCUTS - TunedUtilities.installAction(this.getRootPane(), getKeyStroke(VK_DELETE, CTRL_MASK | SHIFT_MASK), new AbstractAction("Clear Cache") { + SwingUI.installAction(this.getRootPane(), getKeyStroke(VK_DELETE, CTRL_MASK | SHIFT_MASK), new AbstractAction("Clear Cache") { @Override public void actionPerformed(ActionEvent e) { @@ -120,7 +120,7 @@ public class MainFrame extends JFrame { } }); - TunedUtilities.installAction(this.getRootPane(), getKeyStroke(VK_F5, 0), new AbstractAction("Run") { + SwingUI.installAction(this.getRootPane(), getKeyStroke(VK_F5, 0), new AbstractAction("Run") { @Override public void actionPerformed(ActionEvent evt) { @@ -223,7 +223,7 @@ public class MainFrame extends JFrame { @Override public void dragEnter(final DropTargetDragEvent dtde) { - dragEnterTimer = TunedUtilities.invokeLater(SELECTDELAY_ON_DRAG_OVER, new Runnable() { + dragEnterTimer = SwingUI.invokeLater(SELECTDELAY_ON_DRAG_OVER, new Runnable() { @Override public void run() { diff --git a/source/net/filebot/ui/SelectButtonTextField.java b/source/net/filebot/ui/SelectButtonTextField.java index c0ee7400..42ab7105 100644 --- a/source/net/filebot/ui/SelectButtonTextField.java +++ b/source/net/filebot/ui/SelectButtonTextField.java @@ -29,7 +29,7 @@ import javax.swing.text.JTextComponent; import net.filebot.ResourceManager; import net.filebot.util.ui.SelectButton; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; import net.miginfocom.swing.MigLayout; public class SelectButtonTextField extends JComponent { @@ -52,8 +52,8 @@ public class SelectButtonTextField extends JComponent { editor.setUI(new TextFieldComboBoxUI()); editor.setMaximumRowCount(10); - TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.CTRL_MASK), new SpinClientAction(-1)); - TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.CTRL_MASK), new SpinClientAction(1)); + SwingUI.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.CTRL_MASK), new SpinClientAction(-1)); + SwingUI.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.CTRL_MASK), new SpinClientAction(1)); } public String getText() { @@ -112,7 +112,7 @@ public class SelectButtonTextField extends JComponent { if (isSelected) { matcher.appendReplacement(htmlText, "$0"); } else { - matcher.appendReplacement(htmlText, "$0"); + matcher.appendReplacement(htmlText, "$0"); } } diff --git a/source/net/filebot/ui/SelectDialog.java b/source/net/filebot/ui/SelectDialog.java index c3944211..69d18502 100644 --- a/source/net/filebot/ui/SelectDialog.java +++ b/source/net/filebot/ui/SelectDialog.java @@ -2,7 +2,7 @@ package net.filebot.ui; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Component; import java.awt.Dimension; @@ -26,7 +26,7 @@ import javax.swing.SwingUtilities; import net.filebot.ResourceManager; import net.filebot.util.ui.DefaultFancyListCellRenderer; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; import net.miginfocom.swing.MigLayout; @@ -78,7 +78,7 @@ public class SelectDialog extends JDialog { setSize(new Dimension(210, 210)); // Shortcut Enter - TunedUtilities.installAction(list, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), selectAction); + SwingUI.installAction(list, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), selectAction); } diff --git a/source/net/filebot/ui/analyze/ExtractTool.java b/source/net/filebot/ui/analyze/ExtractTool.java index 8cae8e51..57f446cd 100644 --- a/source/net/filebot/ui/analyze/ExtractTool.java +++ b/source/net/filebot/ui/analyze/ExtractTool.java @@ -4,7 +4,7 @@ import static net.filebot.UserFiles.*; import static net.filebot.ui.NotificationLogging.*; import static net.filebot.util.ExceptionUtilities.*; import static net.filebot.util.FileUtilities.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.awt.event.ActionEvent; diff --git a/source/net/filebot/ui/episodelist/EpisodeListPanel.java b/source/net/filebot/ui/episodelist/EpisodeListPanel.java index 06ff86bb..9155b4f6 100644 --- a/source/net/filebot/ui/episodelist/EpisodeListPanel.java +++ b/source/net/filebot/ui/episodelist/EpisodeListPanel.java @@ -46,7 +46,7 @@ import net.filebot.util.StringUtilities; import net.filebot.util.ui.LabelProvider; import net.filebot.util.ui.SelectButton; import net.filebot.util.ui.SimpleLabelProvider; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; import net.filebot.web.Episode; import net.filebot.web.EpisodeListProvider; import net.filebot.web.SearchResult; @@ -76,8 +76,8 @@ public class EpisodeListPanel extends AbstractSearchPanel { // caused by a rapid succession of change events. // The worker may only need a couple of milliseconds to complete, // so the view will be notified of the change soon enough. - TunedUtilities.invokeLater(50, new Runnable() { + SwingUI.invokeLater(50, new Runnable() { @Override public void run() { diff --git a/source/net/filebot/ui/rename/RenamePanel.java b/source/net/filebot/ui/rename/RenamePanel.java index 4b504ddd..cba2f6f3 100644 --- a/source/net/filebot/ui/rename/RenamePanel.java +++ b/source/net/filebot/ui/rename/RenamePanel.java @@ -7,7 +7,7 @@ import static javax.swing.SwingUtilities.*; import static net.filebot.ui.NotificationLogging.*; import static net.filebot.util.ExceptionUtilities.*; import static net.filebot.util.ui.LoadingOverlayPane.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Component; import java.awt.Cursor; diff --git a/source/net/filebot/ui/rename/TextColorizer.java b/source/net/filebot/ui/rename/TextColorizer.java index 86fe76e5..bdccd253 100644 --- a/source/net/filebot/ui/rename/TextColorizer.java +++ b/source/net/filebot/ui/rename/TextColorizer.java @@ -1,7 +1,7 @@ package net.filebot.ui.rename; import static net.filebot.util.FileUtilities.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.io.File; diff --git a/source/net/filebot/ui/rename/ValidateDialog.java b/source/net/filebot/ui/rename/ValidateDialog.java index 479de1f5..2bad951b 100644 --- a/source/net/filebot/ui/rename/ValidateDialog.java +++ b/source/net/filebot/ui/rename/ValidateDialog.java @@ -5,7 +5,7 @@ package net.filebot.ui.rename; import static java.util.Collections.*; import static net.filebot.Settings.*; import static net.filebot.util.FileUtilities.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.awt.Component; diff --git a/source/net/filebot/ui/sfv/ChecksumCellRenderer.java b/source/net/filebot/ui/sfv/ChecksumCellRenderer.java index cfbd9a05..9e051317 100644 --- a/source/net/filebot/ui/sfv/ChecksumCellRenderer.java +++ b/source/net/filebot/ui/sfv/ChecksumCellRenderer.java @@ -3,7 +3,7 @@ package net.filebot.ui.sfv; import static java.awt.Font.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.awt.Component; diff --git a/source/net/filebot/ui/sfv/ChecksumTable.java b/source/net/filebot/ui/sfv/ChecksumTable.java index 2926a133..b160fc54 100644 --- a/source/net/filebot/ui/sfv/ChecksumTable.java +++ b/source/net/filebot/ui/sfv/ChecksumTable.java @@ -12,7 +12,7 @@ import javax.swing.ListSelectionModel; import javax.swing.table.JTableHeader; import javax.swing.table.TableColumn; -import net.filebot.util.ui.TunedUtilities.DragDropRowTableUI; +import net.filebot.util.ui.SwingUI.DragDropRowTableUI; class ChecksumTable extends JTable { diff --git a/source/net/filebot/ui/sfv/SfvPanel.java b/source/net/filebot/ui/sfv/SfvPanel.java index 6be3796c..e08f2e47 100644 --- a/source/net/filebot/ui/sfv/SfvPanel.java +++ b/source/net/filebot/ui/sfv/SfvPanel.java @@ -34,7 +34,7 @@ import net.filebot.ui.transfer.DefaultTransferHandler; import net.filebot.ui.transfer.LoadAction; import net.filebot.ui.transfer.SaveAction; import net.filebot.util.FileUtilities; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; import net.miginfocom.swing.MigLayout; public class SfvPanel extends JComponent { @@ -87,7 +87,7 @@ public class SfvPanel extends JComponent { putClientProperty("transferablePolicy", transferablePolicy); // Shortcut DELETE - TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), removeAction); + SwingUI.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), removeAction); } protected void restartComputation(HashType hash) { diff --git a/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java b/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java index c123831a..76ce3669 100644 --- a/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java +++ b/source/net/filebot/ui/subtitle/SubtitleAutoMatchDialog.java @@ -4,7 +4,7 @@ import static javax.swing.BorderFactory.*; import static javax.swing.JOptionPane.*; import static net.filebot.subtitle.SubtitleUtilities.*; import static net.filebot.util.FileUtilities.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.awt.Component; diff --git a/source/net/filebot/ui/subtitle/SubtitleDownloadComponent.java b/source/net/filebot/ui/subtitle/SubtitleDownloadComponent.java index 2ce502d6..e698f97d 100644 --- a/source/net/filebot/ui/subtitle/SubtitleDownloadComponent.java +++ b/source/net/filebot/ui/subtitle/SubtitleDownloadComponent.java @@ -5,7 +5,7 @@ import static net.filebot.UserFiles.*; import static net.filebot.subtitle.SubtitleUtilities.*; import static net.filebot.ui.NotificationLogging.*; import static net.filebot.util.FileUtilities.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; @@ -47,7 +47,7 @@ import net.filebot.ui.subtitle.SubtitlePackage.Download.Phase; import net.filebot.ui.transfer.DefaultTransferHandler; import net.filebot.util.ExceptionUtilities; import net.filebot.util.ui.ListView; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; import net.filebot.vfs.MemoryFile; import net.miginfocom.swing.MigLayout; import ca.odell.glazedlists.BasicEventList; @@ -131,7 +131,7 @@ class SubtitleDownloadComponent extends JComponent { add(scrollPane, "newline, hmin max(80px, 30%)"); // install fetch action - TunedUtilities.installAction(packageList, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), new AbstractAction("Fetch") { + SwingUI.installAction(packageList, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), new AbstractAction("Fetch") { @Override public void actionPerformed(ActionEvent e) { @@ -140,7 +140,7 @@ class SubtitleDownloadComponent extends JComponent { }); // install open action - TunedUtilities.installAction(fileList, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), new AbstractAction("Open") { + SwingUI.installAction(fileList, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), new AbstractAction("Open") { @Override public void actionPerformed(ActionEvent e) { diff --git a/source/net/filebot/ui/subtitle/SubtitleDropTarget.java b/source/net/filebot/ui/subtitle/SubtitleDropTarget.java index e0d9c804..af9ea41d 100644 --- a/source/net/filebot/ui/subtitle/SubtitleDropTarget.java +++ b/source/net/filebot/ui/subtitle/SubtitleDropTarget.java @@ -6,7 +6,7 @@ import static net.filebot.media.MediaDetection.*; import static net.filebot.ui.NotificationLogging.*; import static net.filebot.ui.transfer.FileTransferable.*; import static net.filebot.util.FileUtilities.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.awt.Cursor; diff --git a/source/net/filebot/ui/subtitle/SubtitlePanel.java b/source/net/filebot/ui/subtitle/SubtitlePanel.java index 72903d88..9af98e80 100644 --- a/source/net/filebot/ui/subtitle/SubtitlePanel.java +++ b/source/net/filebot/ui/subtitle/SubtitlePanel.java @@ -3,7 +3,7 @@ package net.filebot.ui.subtitle; import static net.filebot.Settings.*; import static net.filebot.ui.LanguageComboBoxModel.*; import static net.filebot.ui.NotificationLogging.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.awt.Cursor; diff --git a/source/net/filebot/ui/subtitle/SubtitleUploadDialog.java b/source/net/filebot/ui/subtitle/SubtitleUploadDialog.java index 9fa9e31e..9ad1e94c 100644 --- a/source/net/filebot/ui/subtitle/SubtitleUploadDialog.java +++ b/source/net/filebot/ui/subtitle/SubtitleUploadDialog.java @@ -3,7 +3,7 @@ package net.filebot.ui.subtitle; import static net.filebot.MediaTypes.*; import static net.filebot.UserFiles.*; import static net.filebot.media.MediaDetection.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.awt.Component; diff --git a/source/net/filebot/ui/subtitle/SubtitleViewer.java b/source/net/filebot/ui/subtitle/SubtitleViewer.java index 7f2c5695..6e3b58e9 100644 --- a/source/net/filebot/ui/subtitle/SubtitleViewer.java +++ b/source/net/filebot/ui/subtitle/SubtitleViewer.java @@ -5,7 +5,7 @@ package net.filebot.ui.subtitle; import static java.awt.Font.*; import static java.util.Collections.*; import static java.util.regex.Pattern.*; -import static net.filebot.util.ui.TunedUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.awt.Color; import java.awt.Component; diff --git a/source/net/filebot/util/ui/ListView.java b/source/net/filebot/util/ui/ListView.java index 1b495075..3f6579af 100644 --- a/source/net/filebot/util/ui/ListView.java +++ b/source/net/filebot/util/ui/ListView.java @@ -77,7 +77,7 @@ public class ListView extends JList { protected void paintBlockSelection(Graphics2D g2d, Rectangle selection) { - g2d.setPaint(TunedUtilities.derive(getSelectionBackground(), 0.3f)); + g2d.setPaint(SwingUI.derive(getSelectionBackground(), 0.3f)); g2d.fill(selection); g2d.setPaint(getSelectionBackground()); @@ -108,7 +108,7 @@ public class ListView extends JList { if (isSelected && icon != null) { // apply selection color tint - icon = new ImageIcon(createImage(new FilteredImageSource(TunedUtilities.getImage(icon).getSource(), new ColorTintImageFilter(list.getSelectionBackground(), 0.5f)))); + icon = new ImageIcon(createImage(new FilteredImageSource(SwingUI.getImage(icon).getSource(), new ColorTintImageFilter(list.getSelectionBackground(), 0.5f)))); } setText(convertValueToText(value)); diff --git a/source/net/filebot/util/ui/LoadingOverlayPane.java b/source/net/filebot/util/ui/LoadingOverlayPane.java index 0a486845..4ee992ae 100644 --- a/source/net/filebot/util/ui/LoadingOverlayPane.java +++ b/source/net/filebot/util/ui/LoadingOverlayPane.java @@ -57,7 +57,7 @@ public class LoadingOverlayPane extends JComponent { overlayEnabled = b; if (overlayEnabled) { - TunedUtilities.invokeLater(millisToOverlay, new Runnable() { + SwingUI.invokeLater(millisToOverlay, new Runnable() { @Override public void run() { diff --git a/source/net/filebot/util/ui/TunedUtilities.java b/source/net/filebot/util/ui/SwingUI.java similarity index 99% rename from source/net/filebot/util/ui/TunedUtilities.java rename to source/net/filebot/util/ui/SwingUI.java index 8c36822b..37951e52 100644 --- a/source/net/filebot/util/ui/TunedUtilities.java +++ b/source/net/filebot/util/ui/SwingUI.java @@ -38,7 +38,7 @@ import javax.swing.plaf.basic.BasicTableUI; import javax.swing.text.JTextComponent; import javax.swing.undo.UndoManager; -public final class TunedUtilities { +public final class SwingUI { public static void checkEventDispatchThread() { if (!SwingUtilities.isEventDispatchThread()) { @@ -282,7 +282,7 @@ public final class TunedUtilities { /** * Dummy constructor to prevent instantiation. */ - private TunedUtilities() { + private SwingUI() { throw new UnsupportedOperationException(); } diff --git a/source/net/filebot/util/ui/notification/NotificationManager.java b/source/net/filebot/util/ui/notification/NotificationManager.java index 9d3b057a..5afd1c87 100644 --- a/source/net/filebot/util/ui/notification/NotificationManager.java +++ b/source/net/filebot/util/ui/notification/NotificationManager.java @@ -8,7 +8,7 @@ package net.filebot.util.ui.notification; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; public class NotificationManager { @@ -27,7 +27,7 @@ public class NotificationManager { public void show(NotificationWindow notification) { - TunedUtilities.checkEventDispatchThread(); + SwingUI.checkEventDispatchThread(); notification.addWindowListener(new RemoveListener()); layout.add(notification); diff --git a/source/net/filebot/util/ui/notification/NotificationWindow.java b/source/net/filebot/util/ui/notification/NotificationWindow.java index 04a1d6af..61143870 100644 --- a/source/net/filebot/util/ui/notification/NotificationWindow.java +++ b/source/net/filebot/util/ui/notification/NotificationWindow.java @@ -16,7 +16,7 @@ import java.awt.event.WindowEvent; import javax.swing.JWindow; import javax.swing.Timer; -import net.filebot.util.ui.TunedUtilities; +import net.filebot.util.ui.SwingUI; public class NotificationWindow extends JWindow { @@ -50,7 +50,7 @@ public class NotificationWindow extends JWindow { public final void close() { - TunedUtilities.checkEventDispatchThread(); + SwingUI.checkEventDispatchThread(); // window events are not fired automatically, required for layout updates processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING)); @@ -71,7 +71,7 @@ public class NotificationWindow extends JWindow { @Override public void componentShown(ComponentEvent e) { if (timeout >= 0) { - timer = TunedUtilities.invokeLater(timeout, new Runnable() { + timer = SwingUI.invokeLater(timeout, new Runnable() { @Override public void run() {