* cleanup
This commit is contained in:
parent
9aad7deae2
commit
a8b3e13339
|
@ -60,8 +60,8 @@ public final class ResourceManager {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the URL of an image resource in this jar. Image must be located in
|
* Get the URL of an image resource in this jar. Image must be located in <code>resources/</code> and the file type
|
||||||
* <code>resources/</code> and the file type is assumed to be png.
|
* is assumed to be png.
|
||||||
*
|
*
|
||||||
* @param name simple name of the resource (without extension)
|
* @param name simple name of the resource (without extension)
|
||||||
* @return URL of the resource or null if resource does not exist
|
* @return URL of the resource or null if resource does not exist
|
||||||
|
|
|
@ -9,7 +9,6 @@ import java.awt.event.MouseAdapter;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
|
@ -142,11 +141,6 @@ public class FileTree extends JTree {
|
||||||
|
|
||||||
private class OpenAction extends AbstractAction {
|
private class OpenAction extends AbstractAction {
|
||||||
|
|
||||||
public OpenAction(String text, File... files) {
|
|
||||||
this(text, Arrays.asList(files));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public OpenAction(String text, Collection<File> files) {
|
public OpenAction(String text, Collection<File> files) {
|
||||||
super(text);
|
super(text);
|
||||||
putValue("files", files);
|
putValue("files", files);
|
||||||
|
|
|
@ -64,7 +64,7 @@ class AutoFetchEpisodeListMatcher extends SwingWorker<List<Match<File, Episode>>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected SearchResult selectSearchResult(String query, Collection<SearchResult> searchResults) throws Exception {
|
protected SearchResult selectSearchResult(String query, List<SearchResult> searchResults) throws Exception {
|
||||||
// select first by default
|
// select first by default
|
||||||
return searchResults.iterator().next();
|
return searchResults.iterator().next();
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ class AutoFetchEpisodeListMatcher extends SwingWorker<List<Match<File, Episode>>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Episode> call() throws Exception {
|
public Collection<Episode> call() throws Exception {
|
||||||
Collection<SearchResult> results = provider.search(seriesName);
|
List<SearchResult> results = provider.search(seriesName);
|
||||||
|
|
||||||
if (results.isEmpty()) {
|
if (results.isEmpty()) {
|
||||||
throw new RuntimeException(String.format("'%s' has not been found.", seriesName));
|
throw new RuntimeException(String.format("'%s' has not been found.", seriesName));
|
||||||
|
|
|
@ -3,6 +3,7 @@ package net.sourceforge.filebot.ui.panel.rename;
|
||||||
|
|
||||||
|
|
||||||
import static net.sourceforge.tuned.ui.LoadingOverlayPane.LOADING_PROPERTY;
|
import static net.sourceforge.tuned.ui.LoadingOverlayPane.LOADING_PROPERTY;
|
||||||
|
import static net.sourceforge.tuned.ui.TunedUtilities.getWindow;
|
||||||
|
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
@ -10,7 +11,6 @@ import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
@ -297,7 +297,7 @@ public class RenamePanel extends JComponent {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SearchResult selectSearchResult(final String query, final Collection<SearchResult> searchResults) throws Exception {
|
protected SearchResult selectSearchResult(final String query, final List<SearchResult> searchResults) throws Exception {
|
||||||
if (searchResults.size() == 1) {
|
if (searchResults.size() == 1) {
|
||||||
return searchResults.iterator().next();
|
return searchResults.iterator().next();
|
||||||
}
|
}
|
||||||
|
@ -323,8 +323,11 @@ public class RenamePanel extends JComponent {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SearchResult call() throws Exception {
|
public SearchResult call() throws Exception {
|
||||||
|
// display only probable matches if any
|
||||||
|
List<SearchResult> selection = probableMatches.isEmpty() ? searchResults : probableMatches;
|
||||||
|
|
||||||
// multiple results have been found, user must select one
|
// multiple results have been found, user must select one
|
||||||
SelectDialog<SearchResult> selectDialog = new SelectDialog<SearchResult>(SwingUtilities.getWindowAncestor(RenamePanel.this), probableMatches.isEmpty() ? searchResults : probableMatches);
|
SelectDialog<SearchResult> selectDialog = new SelectDialog<SearchResult>(getWindow(RenamePanel.this), selection);
|
||||||
|
|
||||||
selectDialog.getHeaderLabel().setText(String.format("Shows matching \"%s\":", query));
|
selectDialog.getHeaderLabel().setText(String.format("Shows matching \"%s\":", query));
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,7 @@ class ChecksumComputationService {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of active executors that are associated with this
|
* Get the number of active executors that are associated with this {@link ChecksumComputationService}.
|
||||||
* {@link ChecksumComputationService}.
|
|
||||||
*
|
*
|
||||||
* @return number of active executors
|
* @return number of active executors
|
||||||
* @see {@link #newExecutor()}
|
* @see {@link #newExecutor()}
|
||||||
|
|
|
@ -76,8 +76,7 @@ public class SubtitlePackagePanel extends JComponent {
|
||||||
private static class SubtitlePackageConnector implements ObservableElementList.Connector<SubtitlePackage> {
|
private static class SubtitlePackageConnector implements ObservableElementList.Connector<SubtitlePackage> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list which contains the elements being observed via this
|
* The list which contains the elements being observed via this {@link ObservableElementList.Connector}.
|
||||||
* {@link ObservableElementList.Connector}.
|
|
||||||
*/
|
*/
|
||||||
private ObservableElementList<SubtitlePackage> list = null;
|
private ObservableElementList<SubtitlePackage> list = null;
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,10 @@ public class ShadowBorder extends AbstractBorder {
|
||||||
|
|
||||||
|
|
||||||
private static enum CornerGradientStyle {
|
private static enum CornerGradientStyle {
|
||||||
TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT;
|
TOP_LEFT,
|
||||||
|
TOP_RIGHT,
|
||||||
|
BOTTOM_LEFT,
|
||||||
|
BOTTOM_RIGHT;
|
||||||
|
|
||||||
public RadialGradientPaint getGradientPaint(RectangularShape shape, float radius, Color gradientBeginColor, Color gradientEndColor) {
|
public RadialGradientPaint getGradientPaint(RectangularShape shape, float radius, Color gradientBeginColor, Color gradientEndColor) {
|
||||||
Point2D center = null;
|
Point2D center = null;
|
||||||
|
|
|
@ -30,8 +30,8 @@ public class SimpleLabelProvider<T> implements LabelProvider<T> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new LabelProvider which will use the <code>getText</code>, <code>getName</code>
|
* Create a new LabelProvider which will use the <code>getText</code>, <code>getName</code> or <code>toString</code>
|
||||||
* or <code>toString</code> method for text and the <code>getIcon</code> method for the
|
* method for text and the <code>getIcon</code> method for the
|
||||||
* icon.
|
* icon.
|
||||||
*
|
*
|
||||||
* @param type a class that has one of the text methods and the icon method
|
* @param type a class that has one of the text methods and the icon method
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Created on 16.03.2005
|
* Created on 16.03.2005
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sourceforge.tuned.ui.notification;
|
package net.sourceforge.tuned.ui.notification;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Created on 19.03.2005
|
* Created on 19.03.2005
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sourceforge.tuned.ui.notification;
|
package net.sourceforge.tuned.ui.notification;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Created on 19.03.2005
|
* Created on 19.03.2005
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sourceforge.tuned.ui.notification;
|
package net.sourceforge.tuned.ui.notification;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Created on 19.03.2005
|
* Created on 19.03.2005
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sourceforge.tuned.ui.notification;
|
package net.sourceforge.tuned.ui.notification;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Created on 19.03.2005
|
* Created on 19.03.2005
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sourceforge.tuned.ui.notification;
|
package net.sourceforge.tuned.ui.notification;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Created on 20.03.2005
|
* Created on 20.03.2005
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sourceforge.tuned.ui.notification;
|
package net.sourceforge.tuned.ui.notification;
|
||||||
|
|
Loading…
Reference in New Issue