* rename TunedUtilities to SwingUI

This commit is contained in:
Reinhard Pointner 2014-07-29 06:45:15 +00:00
parent b658dd7581
commit fbeff54b9f
38 changed files with 66 additions and 66 deletions

View File

@ -6,7 +6,7 @@ import static java.util.regex.Pattern.*;
import static javax.swing.JOptionPane.*; import static javax.swing.JOptionPane.*;
import static net.filebot.Settings.*; import static net.filebot.Settings.*;
import static net.filebot.util.FileUtilities.*; 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.Desktop;
import java.awt.Dialog.ModalityType; import java.awt.Dialog.ModalityType;

View File

@ -2,7 +2,7 @@ package net.filebot;
import static java.util.Arrays.*; import static java.util.Arrays.*;
import static net.filebot.Settings.*; 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.Dialog;
import java.awt.FileDialog; import java.awt.FileDialog;

View File

@ -1,6 +1,6 @@
package net.filebot.cli; 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.BorderLayout;
import java.awt.Color; import java.awt.Color;

View File

@ -2,7 +2,7 @@ package net.filebot.ui;
import static javax.swing.ScrollPaneConstants.*; import static javax.swing.ScrollPaneConstants.*;
import static net.filebot.ui.NotificationLogging.*; 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.Dimension;
import java.awt.Window; import java.awt.Window;

View File

@ -17,7 +17,7 @@ import net.filebot.ui.transfer.DefaultTransferHandler;
import net.filebot.ui.transfer.TextFileExportHandler; import net.filebot.ui.transfer.TextFileExportHandler;
import net.filebot.ui.transfer.TransferablePolicy; import net.filebot.ui.transfer.TransferablePolicy;
import net.filebot.util.ui.DefaultFancyListCellRenderer; 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.BasicEventList;
import ca.odell.glazedlists.EventList; import ca.odell.glazedlists.EventList;
import ca.odell.glazedlists.swing.EventListModel; import ca.odell.glazedlists.swing.EventListModel;
@ -45,8 +45,8 @@ public class FileBotList<E> extends JComponent {
// Shortcut DELETE, disabled by default // Shortcut DELETE, disabled by default
getRemoveAction().setEnabled(false); getRemoveAction().setEnabled(false);
TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), removeHook); SwingUI.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, KeyEvent.ALT_DOWN_MASK), removeHook);
} }
public EventList<E> getModel() { public EventList<E> getModel() {

View File

@ -13,7 +13,7 @@ import javax.swing.SwingConstants;
import net.filebot.ResourceManager; import net.filebot.ResourceManager;
import net.filebot.util.ui.ProgressIndicator; import net.filebot.util.ui.ProgressIndicator;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
@ -57,7 +57,7 @@ public class FileBotTabComponent extends JComponent {
public void setIcon(Icon icon) { public void setIcon(Icon icon) {
iconLabel.setIcon(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); JButton button = new JButton(icon);
button.setRolloverIcon(rolloverIcon); button.setRolloverIcon(rolloverIcon);
button.setPreferredSize(TunedUtilities.getDimension(rolloverIcon)); button.setPreferredSize(SwingUI.getDimension(rolloverIcon));
button.setMaximumSize(button.getPreferredSize()); button.setMaximumSize(button.getPreferredSize());
button.setContentAreaFilled(false); button.setContentAreaFilled(false);

View File

@ -52,7 +52,7 @@ import net.filebot.ui.subtitle.SubtitlePanelBuilder;
import net.filebot.util.PreferencesMap.PreferencesEntry; import net.filebot.util.PreferencesMap.PreferencesEntry;
import net.filebot.util.ui.DefaultFancyListCellRenderer; import net.filebot.util.ui.DefaultFancyListCellRenderer;
import net.filebot.util.ui.ShadowBorder; 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.miginfocom.swing.MigLayout;
import net.sf.ehcache.CacheManager; import net.sf.ehcache.CacheManager;
@ -111,7 +111,7 @@ public class MainFrame extends JFrame {
setSize(980, 630); setSize(980, 630);
// KEYBOARD SHORTCUTS // 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 @Override
public void actionPerformed(ActionEvent e) { 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 @Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -223,7 +223,7 @@ public class MainFrame extends JFrame {
@Override @Override
public void dragEnter(final DropTargetDragEvent dtde) { 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 @Override
public void run() { public void run() {

View File

@ -29,7 +29,7 @@ import javax.swing.text.JTextComponent;
import net.filebot.ResourceManager; import net.filebot.ResourceManager;
import net.filebot.util.ui.SelectButton; import net.filebot.util.ui.SelectButton;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
public class SelectButtonTextField<T> extends JComponent { public class SelectButtonTextField<T> extends JComponent {
@ -52,8 +52,8 @@ public class SelectButtonTextField<T> extends JComponent {
editor.setUI(new TextFieldComboBoxUI()); editor.setUI(new TextFieldComboBoxUI());
editor.setMaximumRowCount(10); editor.setMaximumRowCount(10);
TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.CTRL_MASK), new SpinClientAction(-1)); SwingUI.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_DOWN, KeyEvent.CTRL_MASK), new SpinClientAction(1));
} }
public String getText() { public String getText() {
@ -112,7 +112,7 @@ public class SelectButtonTextField<T> extends JComponent {
if (isSelected) { if (isSelected) {
matcher.appendReplacement(htmlText, "<span style='font-weight: bold;'>$0</span>"); matcher.appendReplacement(htmlText, "<span style='font-weight: bold;'>$0</span>");
} else { } else {
matcher.appendReplacement(htmlText, "<span style='color: " + TunedUtilities.toHex(list.getSelectionBackground()) + "; font-weight: bold;'>$0</span>"); matcher.appendReplacement(htmlText, "<span style='color: " + SwingUI.toHex(list.getSelectionBackground()) + "; font-weight: bold;'>$0</span>");
} }
} }

View File

@ -2,7 +2,7 @@
package net.filebot.ui; 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.Component;
import java.awt.Dimension; import java.awt.Dimension;
@ -26,7 +26,7 @@ import javax.swing.SwingUtilities;
import net.filebot.ResourceManager; import net.filebot.ResourceManager;
import net.filebot.util.ui.DefaultFancyListCellRenderer; import net.filebot.util.ui.DefaultFancyListCellRenderer;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
@ -78,7 +78,7 @@ public class SelectDialog<T> extends JDialog {
setSize(new Dimension(210, 210)); setSize(new Dimension(210, 210));
// Shortcut Enter // Shortcut Enter
TunedUtilities.installAction(list, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), selectAction); SwingUI.installAction(list, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), selectAction);
} }

View File

@ -4,7 +4,7 @@ import static net.filebot.UserFiles.*;
import static net.filebot.ui.NotificationLogging.*; import static net.filebot.ui.NotificationLogging.*;
import static net.filebot.util.ExceptionUtilities.*; import static net.filebot.util.ExceptionUtilities.*;
import static net.filebot.util.FileUtilities.*; 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.Color;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;

View File

@ -46,7 +46,7 @@ import net.filebot.util.StringUtilities;
import net.filebot.util.ui.LabelProvider; import net.filebot.util.ui.LabelProvider;
import net.filebot.util.ui.SelectButton; import net.filebot.util.ui.SelectButton;
import net.filebot.util.ui.SimpleLabelProvider; 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.Episode;
import net.filebot.web.EpisodeListProvider; import net.filebot.web.EpisodeListProvider;
import net.filebot.web.SearchResult; import net.filebot.web.SearchResult;
@ -76,8 +76,8 @@ public class EpisodeListPanel extends AbstractSearchPanel<EpisodeListProvider, E
searchTextField.getSelectButton().addPropertyChangeListener(SelectButton.SELECTED_VALUE, selectButtonListener); searchTextField.getSelectButton().addPropertyChangeListener(SelectButton.SELECTED_VALUE, selectButtonListener);
TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.SHIFT_MASK), new SpinSeasonAction(1)); SwingUI.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.SHIFT_MASK), new SpinSeasonAction(1));
TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.SHIFT_MASK), new SpinSeasonAction(-1)); SwingUI.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.SHIFT_MASK), new SpinSeasonAction(-1));
} }
@Override @Override

View File

@ -35,7 +35,7 @@ import net.filebot.ui.FileBotListExportHandler;
import net.filebot.ui.transfer.LoadAction; import net.filebot.ui.transfer.LoadAction;
import net.filebot.ui.transfer.SaveAction; import net.filebot.ui.transfer.SaveAction;
import net.filebot.util.ExceptionUtilities; import net.filebot.util.ExceptionUtilities;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
public class ListPanel extends JComponent { public class ListPanel extends JComponent {
@ -81,7 +81,7 @@ public class ListPanel extends JComponent {
list.add(buttonPanel, BorderLayout.SOUTH); list.add(buttonPanel, BorderLayout.SOUTH);
TunedUtilities.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), createAction); SwingUI.installAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), createAction);
} }
private AbstractAction createAction = new AbstractAction("Create") { private AbstractAction createAction = new AbstractAction("Create") {

View File

@ -3,7 +3,7 @@ package net.filebot.ui.rename;
import static net.filebot.MediaTypes.*; import static net.filebot.MediaTypes.*;
import static net.filebot.UserFiles.*; import static net.filebot.UserFiles.*;
import static net.filebot.ui.NotificationLogging.*; 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.Color;
import java.awt.Component; import java.awt.Component;

View File

@ -6,7 +6,7 @@ import static net.filebot.Settings.*;
import static net.filebot.media.MediaDetection.*; import static net.filebot.media.MediaDetection.*;
import static net.filebot.util.FileUtilities.*; import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.StringUtilities.*; import static net.filebot.util.StringUtilities.*;
import static net.filebot.util.ui.TunedUtilities.*; import static net.filebot.util.ui.SwingUI.*;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;

View File

@ -4,7 +4,7 @@ import static java.awt.Font.*;
import static javax.swing.BorderFactory.*; import static javax.swing.BorderFactory.*;
import static net.filebot.ui.NotificationLogging.*; import static net.filebot.ui.NotificationLogging.*;
import static net.filebot.util.ExceptionUtilities.*; import static net.filebot.util.ExceptionUtilities.*;
import static net.filebot.util.ui.TunedUtilities.*; import static net.filebot.util.ui.SwingUI.*;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
@ -71,7 +71,7 @@ import net.filebot.util.ui.GradientStyle;
import net.filebot.util.ui.LazyDocumentListener; import net.filebot.util.ui.LazyDocumentListener;
import net.filebot.util.ui.LinkButton; import net.filebot.util.ui.LinkButton;
import net.filebot.util.ui.ProgressIndicator; import net.filebot.util.ui.ProgressIndicator;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
import net.filebot.util.ui.notification.SeparatorBorder; import net.filebot.util.ui.notification.SeparatorBorder;
import net.filebot.util.ui.notification.SeparatorBorder.Position; import net.filebot.util.ui.notification.SeparatorBorder.Position;
import net.filebot.web.AudioTrackFormat; import net.filebot.web.AudioTrackFormat;
@ -477,7 +477,7 @@ public class FormatDialog extends JDialog {
final ExpressionFormat format = new ExpressionFormat(editor.getText().trim()); final ExpressionFormat format = new ExpressionFormat(editor.getText().trim());
// activate delayed to avoid flickering when formatting takes only a couple of milliseconds // activate delayed to avoid flickering when formatting takes only a couple of milliseconds
final Timer progressIndicatorTimer = TunedUtilities.invokeLater(400, new Runnable() { final Timer progressIndicatorTimer = SwingUI.invokeLater(400, new Runnable() {
@Override @Override
public void run() { public void run() {

View File

@ -20,7 +20,7 @@ import javax.swing.text.Highlighter;
import javax.swing.text.JTextComponent; import javax.swing.text.JTextComponent;
import net.filebot.util.ui.AbstractFancyListCellRenderer; import net.filebot.util.ui.AbstractFancyListCellRenderer;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
class HighlightListCellRenderer extends AbstractFancyListCellRenderer { class HighlightListCellRenderer extends AbstractFancyListCellRenderer {
@ -42,7 +42,7 @@ class HighlightListCellRenderer extends AbstractFancyListCellRenderer {
textComponent.setBorder(new EmptyBorder(padding, padding, padding, padding)); textComponent.setBorder(new EmptyBorder(padding, padding, padding, padding));
// make text component transparent, should work for all LAFs (setOpaque(false) may not, e.g. Nimbus) // make text component transparent, should work for all LAFs (setOpaque(false) may not, e.g. Nimbus)
textComponent.setBackground(TunedUtilities.TRANSLUCENT); textComponent.setBackground(SwingUI.TRANSLUCENT);
this.add(textComponent, BorderLayout.WEST); this.add(textComponent, BorderLayout.WEST);

View File

@ -1,6 +1,6 @@
package net.filebot.ui.rename; package net.filebot.ui.rename;
import static net.filebot.util.ui.TunedUtilities.*; import static net.filebot.util.ui.SwingUI.*;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.Window; import java.awt.Window;

View File

@ -8,7 +8,7 @@ import static net.filebot.media.MediaDetection.*;
import static net.filebot.similarity.CommonSequenceMatcher.*; import static net.filebot.similarity.CommonSequenceMatcher.*;
import static net.filebot.similarity.Normalization.*; import static net.filebot.similarity.Normalization.*;
import static net.filebot.util.FileUtilities.*; import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.ui.TunedUtilities.*; import static net.filebot.util.ui.SwingUI.*;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;

View File

@ -6,7 +6,7 @@ import static net.filebot.Settings.*;
import static net.filebot.ui.NotificationLogging.*; import static net.filebot.ui.NotificationLogging.*;
import static net.filebot.util.ExceptionUtilities.*; import static net.filebot.util.ExceptionUtilities.*;
import static net.filebot.util.FileUtilities.*; import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.ui.TunedUtilities.*; import static net.filebot.util.ui.SwingUI.*;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.Dimension; import java.awt.Dimension;

View File

@ -2,7 +2,7 @@ package net.filebot.ui.rename;
import static net.filebot.similarity.EpisodeMetrics.*; import static net.filebot.similarity.EpisodeMetrics.*;
import static net.filebot.util.FileUtilities.*; import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.ui.TunedUtilities.*; import static net.filebot.util.ui.SwingUI.*;
import java.awt.AlphaComposite; import java.awt.AlphaComposite;
import java.awt.Color; import java.awt.Color;

View File

@ -24,7 +24,7 @@ import javax.swing.SwingWorker.StateValue;
import net.filebot.similarity.Match; import net.filebot.similarity.Match;
import net.filebot.util.FileUtilities; import net.filebot.util.FileUtilities;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
import ca.odell.glazedlists.EventList; import ca.odell.glazedlists.EventList;
import ca.odell.glazedlists.TransformedList; import ca.odell.glazedlists.TransformedList;
import ca.odell.glazedlists.event.ListEvent; import ca.odell.glazedlists.event.ListEvent;
@ -223,7 +223,7 @@ public class RenameModel extends MatchModel<Object, File> {
// caused by a rapid succession of change events. // caused by a rapid succession of change events.
// The worker may only need a couple of milliseconds to complete, // The worker may only need a couple of milliseconds to complete,
// so the view will be notified of the change soon enough. // so the view will be notified of the change soon enough.
TunedUtilities.invokeLater(50, new Runnable() { SwingUI.invokeLater(50, new Runnable() {
@Override @Override
public void run() { public void run() {

View File

@ -7,7 +7,7 @@ import static javax.swing.SwingUtilities.*;
import static net.filebot.ui.NotificationLogging.*; import static net.filebot.ui.NotificationLogging.*;
import static net.filebot.util.ExceptionUtilities.*; import static net.filebot.util.ExceptionUtilities.*;
import static net.filebot.util.ui.LoadingOverlayPane.*; 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.Component;
import java.awt.Cursor; import java.awt.Cursor;

View File

@ -1,7 +1,7 @@
package net.filebot.ui.rename; package net.filebot.ui.rename;
import static net.filebot.util.FileUtilities.*; 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.Color;
import java.io.File; import java.io.File;

View File

@ -5,7 +5,7 @@ package net.filebot.ui.rename;
import static java.util.Collections.*; import static java.util.Collections.*;
import static net.filebot.Settings.*; import static net.filebot.Settings.*;
import static net.filebot.util.FileUtilities.*; 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.Color;
import java.awt.Component; import java.awt.Component;

View File

@ -3,7 +3,7 @@ package net.filebot.ui.sfv;
import static java.awt.Font.*; 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.Color;
import java.awt.Component; import java.awt.Component;

View File

@ -12,7 +12,7 @@ import javax.swing.ListSelectionModel;
import javax.swing.table.JTableHeader; import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumn; import javax.swing.table.TableColumn;
import net.filebot.util.ui.TunedUtilities.DragDropRowTableUI; import net.filebot.util.ui.SwingUI.DragDropRowTableUI;
class ChecksumTable extends JTable { class ChecksumTable extends JTable {

View File

@ -34,7 +34,7 @@ import net.filebot.ui.transfer.DefaultTransferHandler;
import net.filebot.ui.transfer.LoadAction; import net.filebot.ui.transfer.LoadAction;
import net.filebot.ui.transfer.SaveAction; import net.filebot.ui.transfer.SaveAction;
import net.filebot.util.FileUtilities; import net.filebot.util.FileUtilities;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
public class SfvPanel extends JComponent { public class SfvPanel extends JComponent {
@ -87,7 +87,7 @@ public class SfvPanel extends JComponent {
putClientProperty("transferablePolicy", transferablePolicy); putClientProperty("transferablePolicy", transferablePolicy);
// Shortcut DELETE // 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) { protected void restartComputation(HashType hash) {

View File

@ -4,7 +4,7 @@ import static javax.swing.BorderFactory.*;
import static javax.swing.JOptionPane.*; import static javax.swing.JOptionPane.*;
import static net.filebot.subtitle.SubtitleUtilities.*; import static net.filebot.subtitle.SubtitleUtilities.*;
import static net.filebot.util.FileUtilities.*; 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.Color;
import java.awt.Component; import java.awt.Component;

View File

@ -5,7 +5,7 @@ import static net.filebot.UserFiles.*;
import static net.filebot.subtitle.SubtitleUtilities.*; import static net.filebot.subtitle.SubtitleUtilities.*;
import static net.filebot.ui.NotificationLogging.*; import static net.filebot.ui.NotificationLogging.*;
import static net.filebot.util.FileUtilities.*; 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.ActionEvent;
import java.awt.event.KeyEvent; 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.ui.transfer.DefaultTransferHandler;
import net.filebot.util.ExceptionUtilities; import net.filebot.util.ExceptionUtilities;
import net.filebot.util.ui.ListView; 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.filebot.vfs.MemoryFile;
import net.miginfocom.swing.MigLayout; import net.miginfocom.swing.MigLayout;
import ca.odell.glazedlists.BasicEventList; import ca.odell.glazedlists.BasicEventList;
@ -131,7 +131,7 @@ class SubtitleDownloadComponent extends JComponent {
add(scrollPane, "newline, hmin max(80px, 30%)"); add(scrollPane, "newline, hmin max(80px, 30%)");
// install fetch action // 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 @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -140,7 +140,7 @@ class SubtitleDownloadComponent extends JComponent {
}); });
// install open action // 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 @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {

View File

@ -6,7 +6,7 @@ import static net.filebot.media.MediaDetection.*;
import static net.filebot.ui.NotificationLogging.*; import static net.filebot.ui.NotificationLogging.*;
import static net.filebot.ui.transfer.FileTransferable.*; import static net.filebot.ui.transfer.FileTransferable.*;
import static net.filebot.util.FileUtilities.*; 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.Color;
import java.awt.Cursor; import java.awt.Cursor;

View File

@ -3,7 +3,7 @@ package net.filebot.ui.subtitle;
import static net.filebot.Settings.*; import static net.filebot.Settings.*;
import static net.filebot.ui.LanguageComboBoxModel.*; import static net.filebot.ui.LanguageComboBoxModel.*;
import static net.filebot.ui.NotificationLogging.*; 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.Color;
import java.awt.Cursor; import java.awt.Cursor;

View File

@ -3,7 +3,7 @@ package net.filebot.ui.subtitle;
import static net.filebot.MediaTypes.*; import static net.filebot.MediaTypes.*;
import static net.filebot.UserFiles.*; import static net.filebot.UserFiles.*;
import static net.filebot.media.MediaDetection.*; 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.Color;
import java.awt.Component; import java.awt.Component;

View File

@ -5,7 +5,7 @@ package net.filebot.ui.subtitle;
import static java.awt.Font.*; import static java.awt.Font.*;
import static java.util.Collections.*; import static java.util.Collections.*;
import static java.util.regex.Pattern.*; 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.Color;
import java.awt.Component; import java.awt.Component;

View File

@ -77,7 +77,7 @@ public class ListView extends JList {
protected void paintBlockSelection(Graphics2D g2d, Rectangle selection) { 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.fill(selection);
g2d.setPaint(getSelectionBackground()); g2d.setPaint(getSelectionBackground());
@ -108,7 +108,7 @@ public class ListView extends JList {
if (isSelected && icon != null) { if (isSelected && icon != null) {
// apply selection color tint // 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)); setText(convertValueToText(value));

View File

@ -57,7 +57,7 @@ public class LoadingOverlayPane extends JComponent {
overlayEnabled = b; overlayEnabled = b;
if (overlayEnabled) { if (overlayEnabled) {
TunedUtilities.invokeLater(millisToOverlay, new Runnable() { SwingUI.invokeLater(millisToOverlay, new Runnable() {
@Override @Override
public void run() { public void run() {

View File

@ -38,7 +38,7 @@ import javax.swing.plaf.basic.BasicTableUI;
import javax.swing.text.JTextComponent; import javax.swing.text.JTextComponent;
import javax.swing.undo.UndoManager; import javax.swing.undo.UndoManager;
public final class TunedUtilities { public final class SwingUI {
public static void checkEventDispatchThread() { public static void checkEventDispatchThread() {
if (!SwingUtilities.isEventDispatchThread()) { if (!SwingUtilities.isEventDispatchThread()) {
@ -282,7 +282,7 @@ public final class TunedUtilities {
/** /**
* Dummy constructor to prevent instantiation. * Dummy constructor to prevent instantiation.
*/ */
private TunedUtilities() { private SwingUI() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }

View File

@ -8,7 +8,7 @@ package net.filebot.util.ui.notification;
import java.awt.event.WindowAdapter; import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
public class NotificationManager { public class NotificationManager {
@ -27,7 +27,7 @@ public class NotificationManager {
public void show(NotificationWindow notification) { public void show(NotificationWindow notification) {
TunedUtilities.checkEventDispatchThread(); SwingUI.checkEventDispatchThread();
notification.addWindowListener(new RemoveListener()); notification.addWindowListener(new RemoveListener());
layout.add(notification); layout.add(notification);

View File

@ -16,7 +16,7 @@ import java.awt.event.WindowEvent;
import javax.swing.JWindow; import javax.swing.JWindow;
import javax.swing.Timer; import javax.swing.Timer;
import net.filebot.util.ui.TunedUtilities; import net.filebot.util.ui.SwingUI;
public class NotificationWindow extends JWindow { public class NotificationWindow extends JWindow {
@ -50,7 +50,7 @@ public class NotificationWindow extends JWindow {
public final void close() { public final void close() {
TunedUtilities.checkEventDispatchThread(); SwingUI.checkEventDispatchThread();
// window events are not fired automatically, required for layout updates // window events are not fired automatically, required for layout updates
processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING)); processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
@ -71,7 +71,7 @@ public class NotificationWindow extends JWindow {
@Override @Override
public void componentShown(ComponentEvent e) { public void componentShown(ComponentEvent e) {
if (timeout >= 0) { if (timeout >= 0) {
timer = TunedUtilities.invokeLater(timeout, new Runnable() { timer = SwingUI.invokeLater(timeout, new Runnable() {
@Override @Override
public void run() { public void run() {