forked from External/mage
* Added to all toUpperCase/toLowerCase calls the Locale.ENGLISH to prevent problems with some languages (e.g. Turkish). Removed some unused import statements. (#4634).
This commit is contained in:
parent
03ebdc17d8
commit
b073ce1c42
147 changed files with 1419 additions and 1496 deletions
|
|
@ -24,25 +24,24 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* NewPlayerPanel.java
|
||||
*
|
||||
* Created on 15-Dec-2009, 10:09:46 PM
|
||||
*/
|
||||
|
||||
package mage.client.table;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.deck.generator.DeckGenerator;
|
||||
import mage.client.util.Config;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -51,7 +50,9 @@ public class NewPlayerPanel extends javax.swing.JPanel {
|
|||
|
||||
private final JFileChooser fcSelectDeck;
|
||||
|
||||
/** Creates new form NewPlayerPanel */
|
||||
/**
|
||||
* Creates new form NewPlayerPanel
|
||||
*/
|
||||
public NewPlayerPanel() {
|
||||
initComponents();
|
||||
fcSelectDeck = new JFileChooser();
|
||||
|
|
@ -86,7 +87,8 @@ public class NewPlayerPanel extends javax.swing.JPanel {
|
|||
this.txtPlayerDeck.setText(file.getPath());
|
||||
try {
|
||||
MageFrame.getPreferences().put("lastDeckFolder", file.getCanonicalPath());
|
||||
} catch (IOException ex) { }
|
||||
} catch (IOException ex) {
|
||||
}
|
||||
}
|
||||
fcSelectDeck.setSelectedFile(null);
|
||||
}
|
||||
|
|
@ -111,9 +113,8 @@ public class NewPlayerPanel extends javax.swing.JPanel {
|
|||
this.txtPlayerDeck.setText(deckFile);
|
||||
}
|
||||
|
||||
|
||||
public int getLevel() {
|
||||
return (Integer)spnLevel.getValue();
|
||||
return (Integer) spnLevel.getValue();
|
||||
}
|
||||
|
||||
public void showLevel(boolean show) {
|
||||
|
|
@ -128,10 +129,10 @@ public class NewPlayerPanel extends javax.swing.JPanel {
|
|||
this.btnPlayerDeck.setVisible(show);
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
|
|
@ -211,7 +212,6 @@ public class NewPlayerPanel extends javax.swing.JPanel {
|
|||
generateDeck();
|
||||
}//GEN-LAST:event_btnGenerateActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton btnGenerate;
|
||||
private javax.swing.JButton btnPlayerDeck;
|
||||
|
|
@ -237,10 +237,10 @@ class DeckFilter extends FileFilter {
|
|||
String s = f.getName();
|
||||
int i = s.lastIndexOf('.');
|
||||
|
||||
if (i > 0 && i < s.length() - 1) {
|
||||
ext = s.substring(i+1).toLowerCase();
|
||||
if (i > 0 && i < s.length() - 1) {
|
||||
ext = s.substring(i + 1).toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
return (ext==null)?false:ext.equals("dck");
|
||||
return (ext == null) ? false : ext.equals("dck");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -248,4 +248,4 @@ class DeckFilter extends FileFilter {
|
|||
return "Deck Files";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue