* fixed visual issues with SeasonSpinnerEditor
This commit is contained in:
parent
4afc701ff7
commit
912bf0464f
|
@ -1,17 +1,22 @@
|
|||
|
||||
package net.sourceforge.filebot.ui.panel.episodelist;
|
||||
|
||||
|
||||
import static net.sourceforge.filebot.ui.panel.episodelist.SeasonSpinnerModel.ALL_SEASONS;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.text.ParseException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JSpinner;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.JSpinner.DefaultEditor;
|
||||
import javax.swing.text.DefaultFormatter;
|
||||
import javax.swing.text.DefaultFormatterFactory;
|
||||
|
||||
|
||||
class SeasonSpinnerEditor extends DefaultEditor {
|
||||
|
||||
public SeasonSpinnerEditor(JSpinner spinner) {
|
||||
|
@ -35,6 +40,7 @@ class SeasonSpinnerEditor extends DefaultEditor {
|
|||
throw new ParseException("Illegal season number", 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String valueToString(Object value) throws ParseException {
|
||||
int season = ((Number) value).intValue();
|
||||
|
@ -50,8 +56,8 @@ class SeasonSpinnerEditor extends DefaultEditor {
|
|||
|
||||
}));
|
||||
|
||||
getTextField().setBorder(BorderFactory.createEmptyBorder(1, 3, 1, 1));
|
||||
getTextField().setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
getTextField().setBackground(Color.white);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue