* cleanup

This commit is contained in:
Reinhard Pointner 2009-05-16 16:27:11 +00:00
parent 9aad7deae2
commit a8b3e13339
19 changed files with 29 additions and 37 deletions

View File

@ -60,8 +60,8 @@ public final class ResourceManager {
/**
* Get the URL of an image resource in this jar. Image must be located in
* <code>resources/</code> and the file type is assumed to be png.
* Get the URL of an image resource in this jar. Image must be located in <code>resources/</code> and the file type
* is assumed to be png.
*
* @param name simple name of the resource (without extension)
* @return URL of the resource or null if resource does not exist

View File

@ -1,21 +1,21 @@
/*
* BeDecoder.java
*
*
* Created on May 30, 2003, 2:44 PM
* Copyright (C) 2003, 2004, 2005, 2006 Aelitis, All Rights Reserved.
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* AELITIS, SAS au capital de 46,603.30 euros
* 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France.
*/

View File

@ -9,7 +9,6 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
@ -142,11 +141,6 @@ public class FileTree extends JTree {
private class OpenAction extends AbstractAction {
public OpenAction(String text, File... files) {
this(text, Arrays.asList(files));
}
public OpenAction(String text, Collection<File> files) {
super(text);
putValue("files", files);
@ -263,7 +257,7 @@ public class FileTree extends JTree {
@Override
public boolean isLeaf() {
// if we have no children, tell the UI we are a leaf,
// if we have no children, tell the UI we are a leaf,
// so that it won't display any good-for-nothing expand buttons
return getChildCount() == 0;
}

View File

@ -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
return searchResults.iterator().next();
}
@ -79,7 +79,7 @@ class AutoFetchEpisodeListMatcher extends SwingWorker<List<Match<File, Episode>>
@Override
public Collection<Episode> call() throws Exception {
Collection<SearchResult> results = provider.search(seriesName);
List<SearchResult> results = provider.search(seriesName);
if (results.isEmpty()) {
throw new RuntimeException(String.format("'%s' has not been found.", seriesName));

View File

@ -214,7 +214,7 @@ public class RenameModel extends MatchModel<Object, File> {
cancel(obsolete);
// Don't update view immediately, to avoid irritating flickering,
// Don't update view immediately, to avoid irritating flickering,
// 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.

View File

@ -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.TunedUtilities.getWindow;
import java.awt.Insets;
import java.awt.event.ActionEvent;
@ -10,7 +11,6 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Callable;
@ -297,7 +297,7 @@ public class RenamePanel extends JComponent {
@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) {
return searchResults.iterator().next();
}
@ -323,8 +323,11 @@ public class RenamePanel extends JComponent {
@Override
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
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));

View File

@ -56,8 +56,7 @@ class ChecksumComputationService {
/**
* Get the number of active executors that are associated with this
* {@link ChecksumComputationService}.
* Get the number of active executors that are associated with this {@link ChecksumComputationService}.
*
* @return number of active executors
* @see {@link #newExecutor()}

View File

@ -29,7 +29,7 @@ class HighlightPatternCellRenderer extends DefaultTableCellRenderer {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, false, row, column);
// check for error or warning
boolean isError = (EnumSet.of(State.ERROR, State.WARNING).contains(table.getValueAt(row, 0)));
@ -71,7 +71,7 @@ class HighlightPatternCellRenderer extends DefaultTableCellRenderer {
if (cssFontWeight != null) {
replacement.append("font-weight:").append(cssFontWeight).append(';');
}
}
return replacement.append("'>$0</span>").toString();
}

View File

@ -76,8 +76,7 @@ public class SubtitlePackagePanel extends JComponent {
private static class SubtitlePackageConnector implements ObservableElementList.Connector<SubtitlePackage> {
/**
* The list which contains the elements being observed via this
* {@link ObservableElementList.Connector}.
* The list which contains the elements being observed via this {@link ObservableElementList.Connector}.
*/
private ObservableElementList<SubtitlePackage> list = null;

View File

@ -30,5 +30,5 @@ public class ColorTintImageFilter extends RGBImageFilter {
return new Color(red, green, blue, c.getAlpha()).getRGB();
}
}

View File

@ -44,7 +44,7 @@ public class FancyTreeCellRenderer extends DefaultTreeCellRenderer {
super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, false);
setIconTextGap(5);
if (selected) {
setPaintGradient(true);
setGradientBeginColor(backgroundSelectionColor.brighter());

View File

@ -101,7 +101,10 @@ public class ShadowBorder extends AbstractBorder {
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) {
Point2D center = null;

View File

@ -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>
* or <code>toString</code> method for text and the <code>getIcon</code> method for the
* Create a new LabelProvider which will use the <code>getText</code>, <code>getName</code> or <code>toString</code>
* method for text and the <code>getIcon</code> method for the
* icon.
*
* @param type a class that has one of the text methods and the icon method

View File

@ -1,6 +1,5 @@
/*
* Created on 16.03.2005
*
*/
package net.sourceforge.tuned.ui.notification;

View File

@ -1,6 +1,5 @@
/*
* Created on 19.03.2005
*
*/
package net.sourceforge.tuned.ui.notification;

View File

@ -1,6 +1,5 @@
/*
* Created on 19.03.2005
*
*/
package net.sourceforge.tuned.ui.notification;

View File

@ -1,6 +1,5 @@
/*
* Created on 19.03.2005
*
*/
package net.sourceforge.tuned.ui.notification;

View File

@ -1,6 +1,5 @@
/*
* Created on 19.03.2005
*
*/
package net.sourceforge.tuned.ui.notification;

View File

@ -1,6 +1,5 @@
/*
* Created on 20.03.2005
*
*/
package net.sourceforge.tuned.ui.notification;