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
|
|
@ -1217,7 +1217,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
String searchStr = "";
|
||||
if (searchByTextField.getText().length() >= 3) {
|
||||
useText = true;
|
||||
searchStr = searchByTextField.getText().toLowerCase();
|
||||
searchStr = searchByTextField.getText().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
for (CardType cardType : selectByTypeButtons.keySet()) {
|
||||
|
|
@ -1267,20 +1267,20 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
boolean s = card.isSelected();
|
||||
// Name
|
||||
if (!s) {
|
||||
s |= card.getName().toLowerCase().contains(searchStr);
|
||||
s |= card.getName().toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
}
|
||||
// Sub & Super Types
|
||||
if (!s) {
|
||||
for (SuperType str : card.getSuperTypes()) {
|
||||
s |= str.toString().toLowerCase().contains(searchStr);
|
||||
s |= str.toString().toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
}
|
||||
for (SubType str : card.getSubTypes()) {
|
||||
s |= str.toString().toLowerCase().contains(searchStr);
|
||||
s |= str.toString().toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
}
|
||||
}
|
||||
// Rarity
|
||||
if (!s) {
|
||||
s |= card.getRarity().toString().toLowerCase().contains(searchStr);
|
||||
s |= card.getRarity().toString().toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
}
|
||||
// Type line
|
||||
if (!s) {
|
||||
|
|
@ -1288,7 +1288,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
for (CardType type : card.getCardTypes()) {
|
||||
t += ' ' + type.toString();
|
||||
}
|
||||
s |= t.toLowerCase().contains(searchStr);
|
||||
s |= t.toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
}
|
||||
// Casting cost
|
||||
if (!s) {
|
||||
|
|
@ -1296,12 +1296,12 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
for (String m : card.getManaCost()) {
|
||||
mc += m;
|
||||
}
|
||||
s |= mc.toLowerCase().contains(searchStr);
|
||||
s |= mc.toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
}
|
||||
// Rules
|
||||
if (!s) {
|
||||
for (String str : card.getRules()) {
|
||||
s |= str.toLowerCase().contains(searchStr);
|
||||
s |= str.toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
}
|
||||
}
|
||||
card.setSelected(s);
|
||||
|
|
@ -1348,21 +1348,21 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
}
|
||||
// Sub & Super Types
|
||||
for (SuperType type : card.getSuperTypes()) {
|
||||
t += ' ' + type.toString().toLowerCase();
|
||||
t += ' ' + type.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
for (SubType str : card.getSubTypes()) {
|
||||
t += " " + str.toString().toLowerCase();
|
||||
t += " " + str.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
for (String qty : qtys.keySet()) {
|
||||
int value = qtys.get(qty);
|
||||
if (t.toLowerCase().contains(qty)) {
|
||||
if (t.toLowerCase(Locale.ENGLISH).contains(qty)) {
|
||||
qtys.put(qty, ++value);
|
||||
}
|
||||
|
||||
// Rules
|
||||
for (String str : card.getRules()) {
|
||||
if (str.toLowerCase().contains(qty)) {
|
||||
if (str.toLowerCase(Locale.ENGLISH).contains(qty)) {
|
||||
qtys.put(qty, ++value);
|
||||
}
|
||||
}
|
||||
|
|
@ -1380,10 +1380,10 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
}
|
||||
mc = mc.replaceAll("\\{([WUBRG]).([WUBRG])\\}", "{$1}{$2}");
|
||||
mc = mc.replaceAll("\\{", "#");
|
||||
mc = mc.toLowerCase();
|
||||
mc = mc.toLowerCase(Locale.ENGLISH);
|
||||
for (String pip : pips.keySet()) {
|
||||
int value = pips.get(pip);
|
||||
while (mc.toLowerCase().contains(pip)) {
|
||||
while (mc.toLowerCase(Locale.ENGLISH).contains(pip)) {
|
||||
pips.put(pip, ++value);
|
||||
mc = mc.replaceFirst(pip, "");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import java.awt.Font;
|
|||
import java.awt.event.KeyEvent;
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
|
@ -196,15 +197,15 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
|
||||
Pattern profanityPattern = Pattern.compile(".*(1ab1a|1d1ot|13p3r|13sb1ans|13sbo|13s13|13sb1an|13sbo|13sy|1nbr3d|1nc3st|1njun|1ub3|\\Wbj|\\Wcum|\\Wdum|\\Wfag|\\Wfap|\\W[sf]uk|\\Wj1s|\\Wp3do|\\Wp33|\\Wpoo\\W|\\Wt1t|aho13|an1ngu|ana1|anus|ar3o1a|ar3o13|ary1an|axyx|axyxhat|axyxho13|axyxmast3r|axyxmunch|axyxw1p3|b1atch|b1gt1t|b1mbo|b1ow|b1tch|ba1s|bab3|bang|barf|bastard|bawdy|b3an3r|b3ard3dc1am|b3ast1a1ty|b3atch|b3at3r|b3av3r|b3otch|b3yotch|bo1nk|bod1y|bon3d|bon3r|bon3|bob|bot13|boty|bow31|br3ast|bug3r|bukak3|bung|busty|buxyx|c1t|caca|cahon3|cam31to3|carp3tmunch3r|cawk|c3rv1x|ch1nc|ch1nk|chod3|co1ta1|cockb1ock|cockho1st3r|cocknock3r|cocksmok3r|cocksuck3r|cock|condom|corksuck3r|crabs|cums1ut|cumshot|cumsta1n|cnt|cun1ngus|cuntfac3|cunthunt3r|cunt|d1ck|d1k3|d1do|d1mw1t|d1ng13|d1psh1p|dago|dam1t|damn1t|damn3d|damn|dawg13sty13|dog13sty13|dogysty13|dong|dop3y|douch3|drunk|dumb|dumas|dum|dumbas|dumy|dyk3|3jacu1at3|3n1arg3m3nt|3r3ct1on|3r3ct|3rot1c|3xtacy|3xtasy|f.ck|f1osy|f1st3d|f1st1ng|f1sty|fa1gt|fa1g|fack|fag1t|fag3d|fagot|fag|[sf]cuk|f31at1o|f31at3|f31ch1ng|f31ch3r|f31ch|f31tch3r|f31tch|foad|fobar|fond13|for3sk1n|fu.k|fudg3pack3r|[sf]uk|g1ans|g1go1o|ganja|ghay|gh3y|go1d3nshow3r|gonad|gok|gr1ngo|h1t13r|handjob|hardon|hokah|hok3r|homo|honky|hor|hotch|hot3r|horny|hump1ng|hump3d|hump|hym3n|j1sm|j1s3d|j1sm|j1s|jackas|jackho13|jackof|j3rk3d|j3rkof|j3rk|junk13|junky|k1an|k1k3|k1nky|knob3nd|kyk3|mams|masa|mast3rba|masturba|max1|m3ns3s|m3nstruat|m[sf]uck1ng|mofo|moron|moth3rf|mthrf|muf|n1ger|n1ga|n1mrod|n1ny|n1p13|nak3d|napa1m|napy|nas1|n3gro|noky|nympho|op1at3|op1um|ora1y|ora1|org13s|organ|orgasm|orgy|ovary|ovum|p1owb1t3r|p1mp|p1nko|p1s3d|p1sof|p1s|pak1|pant13|panty|past13|pasty|p3ck3r|p3doph1|p3p3|p3n1a1|p3n13|p3n1s|p3n3trat1on|p3n3trat3|p3rv3rs1on|p3yot3|pha1c|phuck|po1ack|po1ock|pontang|pop|pr1ck|pr1g|pron|pub1|pub3|punkas|punky|pus1|pusy|puto|qu1cky|qu1ck13|qu1m|qu3af|qu3ro|qu3rs|qu3r|r1mjob|r1tard|racy|rap1st|rap3d|rap3r|rap3|raunch|r31ch|r3cta1|r3ctum|r3ctus|r3tard|r3tar|rtard|rumpram3r|rump|s1av3|s13as|s1ut|sack|sad1s|scag|sch1ong|sch1so|scr3w|scrog|scrot|scrud|scum|s3aman|s3am3n|s3duc3|s3m3n|s3xua1|sh1t|skag|skank|sm3gma|smut|sn1p3r|snatch|sodom|sp1ck|sp1c|sp1k|sp3rm|spunk|st3amy|stfu|ston3d|str1p|strok3|stup1d|suck|sumofab1atch|t1nk13|t1t[sf]uck|tampon|tard|t3abag1ng|t3at|t3st1|t3st3|t3urd|thrust|tramp|trans|trashy|twat|ug1y|unw3d|ur1n3a|ut3rus|vag1na|vu1gar|vu1va|w1g3r|wang|wank3r|wank|w31n3r|w31rdo|w3dg13|w3n13|w3tback|w3w3|wh1t3y|wh1s|whor3).*");
|
||||
Pattern profanity2Pattern = Pattern.compile(".*(1ab1a|1d1ot|13p3r|13sb1ans|13sbo|13s13|13sb1an|13sbo|13sy|1nbr3d|1nc3st|1njun|1ub3|\\Wbj|\\Wcum|\\Wdum|\\Wfag|\\Wfap|\\W[sf]uk|\\Wj1s|\\Wp3do|\\Wp3|\\Wpo\\W|\\Wt1t|aho13|an1ngu|ana1|anus|ar3o1a|ar3o13|ary1an|axyx|axyxhat|axyxho13|axyxmast3r|axyxmunch|axyxw1p3|b1atch|b1gt1t|b1mbo|b1ow|b1tch|ba1s|bab3|bang|barf|bastard|bawdy|b3an3r|b3ard3dc1am|b3ast1a1ty|b3atch|b3at3r|b3av3r|b3otch|b3yotch|bo1nk|bod1y|bon3d|bon3r|bon3|bob|bot13|boty|bow31|br3ast|bug3r|bukak3|bung|busty|buxyx|c1t|caca|cahon3|cam31to3|carp3tmunch3r|cawk|c3rv1x|ch1nc|ch1nk|chod3|co1ta1|cockb1ock|cockho1st3r|cocknock3r|cocksmok3r|cocksuck3r|cock|condom|corksuck3r|crabs|cums1ut|cumshot|cumsta1n|cnt|cun1ngus|cuntfac3|cunthunt3r|cunt|d1ck|d1k3|d1do|d1mw1t|d1ng13|d1psh1p|dago|dam1t|damn1t|damn3d|damn|dawg13sty13|dog13sty13|dogysty13|dong|dop3y|douch3|drunk|dumb|dum|dumas|dumbas|dumy|dyk3|3jacu1at3|3n1arg3m3nt|3r3ct1on|3r3ct|3rot1c|3xtacy|3xtasy|f.ck|f1osy|f1st3d|f1st1ng|f1sty|fa1gt|fa1g|fack|fag1t|fag3d|fagot|fag|[sf]cuk|f31at1o|f31at3|f31ch1ng|f31ch3r|f31ch|f31tch3r|f31tch|foad|fobar|fond13|for3sk1n|fu.k|fudg3pack3r|[sf]uk|g1ans|g1go1o|ganja|ghay|gh3y|go1d3nshow3r|gonad|gr1ngo|h1t13r|handjob|hardon|hokah|hok3r|homo|honky|hor|hotch|hot3r|horny|hump1ng|hump3d|hump|hym3n|j1sm|j1s3d|j1sm|j1s|jackas|jackho13|jackof|j3rk3d|j3rkof|j3rk|junk13|junky|k1an|k1k3|k1nky|knob3nd|kyk3|mams|masa|mast3rba|masturba|max1|m3ns3s|m3nstruat|m[sf]uck1ng|mofo|moron|moth3rf|mthrf|muf|n1ga|n1ger|n1mrod|n1ny|n1p13|nak3d|napa1m|napy|nas1|n3gro|noky|nympho|op1at3|op1um|ora1y|ora1|org13s|organ|orgasm|orgy|ovary|ovum|p1owb1t3r|p1mp|p1nko|p1s3d|p1sof|p1s|pak1|pant13|panty|past13|pasty|p3ck3r|p3doph1|p3p3|p3n1a1|p3n13|p3n1s|p3n3trat1on|p3n3trat3|p3rv3rs1on|p3yot3|pha1c|phuck|po1ack|po1ock|pontang|pop|porno|porn|pr1ck|pr1g|pron|pub1|pub3|punkas|punky|pus1|pusy|puto|qu1cky|qu1ck13|qu1m|qu3af|qu3ro|qu3rs|qu3r|r1mjob|r1tard|racy|rap1st|rap3d|rap3r|rap3|raunch|r31ch|r3cta1|r3ctum|r3ctus|r3tard|r3tar|rtard|rumpram3r|rump|s1av3|s13as|s1ut|sack|sad1s|scag|sch1ong|sch1so|scr3w|scrog|scrot|scrud|scum|s3aman|s3am3n|s3duc3|s3m3n|s3xua1|sh1t|skag|skank|sm3gma|smut|sn1p3r|snatch|sodom|sp1ck|sp1c|sp1k|sp3rm|spunk|st3amy|stfu|ston3d|str1p|strok3|stup1d|suck|sumofab1atch|t1nk13|t1t[sf]uck|tampon|tard|t3abag1ng|t3at|t3st1|t3st3|t3urd|thrust|tramp|trans|trashy|twat|ug1y|unw3d|ur1n3a|ut3rus|vag1na|vu1gar|vu1va|w1g3r|wang|wank3r|wank|w31n3r|w31rdo|w3dg13|w3n13|w3tback|w3w3|wh1t3y|wh1s|whor3).*");
|
||||
|
||||
|
||||
private boolean containsSwearing(String message, String level) {
|
||||
|
||||
|
||||
if (level.equals("0")) {
|
||||
return false;
|
||||
}
|
||||
message = '.' + message + '.';
|
||||
|
||||
message = message.toLowerCase();
|
||||
message = message.toLowerCase(Locale.ENGLISH);
|
||||
message = message.replaceAll("[a@]([s5][s5]+)", "axyx");
|
||||
message = message.replaceAll("b.([t\\+][t\\+]+)", "buxyx");
|
||||
message = message.replaceAll("(.)(\\1{1,})", "$1");
|
||||
|
|
@ -280,11 +281,11 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
}
|
||||
if (messageType == MessageType.WHISPER_FROM) {
|
||||
if (username.equalsIgnoreCase(SessionHandler.getUserName())) {
|
||||
if (message.toLowerCase().startsWith("profanity 0")) {
|
||||
if (message.toLowerCase(Locale.ENGLISH).startsWith("profanity 0")) {
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAME_USE_PROFANITY_FILTER, "0");
|
||||
} else if (message.toLowerCase().startsWith("profanity 1")) {
|
||||
} else if (message.toLowerCase(Locale.ENGLISH).startsWith("profanity 1")) {
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAME_USE_PROFANITY_FILTER, "1");
|
||||
} else if (message.toLowerCase().startsWith("profanity 2")) {
|
||||
} else if (message.toLowerCase(Locale.ENGLISH).startsWith("profanity 2")) {
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAME_USE_PROFANITY_FILTER, "2");
|
||||
}
|
||||
}
|
||||
|
|
@ -435,7 +436,7 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
this.txtMessage.repaint();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void enableHyperlinks() {
|
||||
txtConversation.enableHyperlinks();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
|
|||
return choice;
|
||||
}
|
||||
choice = Jsoup.parse(choice).text(); // decode HTML entities and strip tags
|
||||
return choice.substring(0, 1).toUpperCase() + choice.substring(1);
|
||||
return choice.substring(0, 1).toUpperCase(Locale.ENGLISH) + choice.substring(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ package mage.client.deck.generator;
|
|||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -86,7 +87,7 @@ public final class DeckGenerator {
|
|||
|
||||
String selectedColors = genDialog.getSelectedColors();
|
||||
List<ColoredManaSymbol> allowedColors = new ArrayList<>();
|
||||
selectedColors = selectedColors != null ? selectedColors.toUpperCase() : getRandomColors("X");
|
||||
selectedColors = selectedColors != null ? selectedColors.toUpperCase(Locale.ENGLISH) : getRandomColors("X");
|
||||
String format = genDialog.getSelectedFormat();
|
||||
|
||||
List<String> setsToUse = ConstructedFormats.getSetsByFormat(format);
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.client.deck.generator;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @author Simown
|
||||
|
|
@ -74,23 +74,24 @@ public class RatioAdjustingSliderPanel extends JPanel {
|
|||
|
||||
}
|
||||
|
||||
private static class AdjustingSliderGroup
|
||||
{
|
||||
private static class AdjustingSliderGroup {
|
||||
|
||||
private final ArrayList<JStorageSlider> storageSliders;
|
||||
private int sliderIndex = 0;
|
||||
|
||||
AdjustingSliderGroup(JStorageSlider... sliders)
|
||||
{
|
||||
AdjustingSliderGroup(JStorageSlider... sliders) {
|
||||
storageSliders = new ArrayList<>();
|
||||
for(JStorageSlider slider: sliders) {
|
||||
for (JStorageSlider slider : sliders) {
|
||||
storageSliders.add(slider);
|
||||
slider.addChangeListener(e -> fireSliderChangedEvent((JStorageSlider) e.getSource()));
|
||||
}
|
||||
}
|
||||
|
||||
public void fireSliderChangedEvent(JStorageSlider source) {
|
||||
// We don't want to do anything if the value isn't changing
|
||||
if(!source.getValueIsAdjusting())
|
||||
if (!source.getValueIsAdjusting()) {
|
||||
return;
|
||||
}
|
||||
// Update the slider depending on how much it's changed relative to its previous position
|
||||
int change = (source.getValue() - source.getPreviousValue());
|
||||
updateSliderPosition(change, source);
|
||||
|
|
@ -98,11 +99,11 @@ public class RatioAdjustingSliderPanel extends JPanel {
|
|||
|
||||
private void updateSliderPosition(int change, JStorageSlider source) {
|
||||
int remaining = change;
|
||||
while (remaining != 0) {
|
||||
while (remaining != 0) {
|
||||
// Get the currently indexed slider
|
||||
JStorageSlider slider = storageSliders.get(sliderIndex);
|
||||
// If it's not the slider that fired the event
|
||||
if (slider != source) {
|
||||
if (slider != source) {
|
||||
// Check we don't go over the upper and lower bounds
|
||||
if (remaining < 0 || (remaining > 0 && slider.getValue() > 0)) {
|
||||
// Adjust the currently selected slider by +/- 1
|
||||
|
|
@ -114,7 +115,7 @@ public class RatioAdjustingSliderPanel extends JPanel {
|
|||
// Select the next slider in the list of sliders
|
||||
sliderIndex = (sliderIndex + 1) % storageSliders.size();
|
||||
}
|
||||
for (JStorageSlider slider : storageSliders) {
|
||||
for (JStorageSlider slider : storageSliders) {
|
||||
slider.setPreviousValue(slider.getValue());
|
||||
}
|
||||
}
|
||||
|
|
@ -156,7 +157,7 @@ public class RatioAdjustingSliderPanel extends JPanel {
|
|||
textLabels.add(titleLabel);
|
||||
sliderPanel.add(titleLabel, BorderLayout.WEST);
|
||||
// Slider
|
||||
slider.setToolTipText("Percentage of " + label.trim().toLowerCase() + " in the generated deck.");
|
||||
slider.setToolTipText("Percentage of " + label.trim().toLowerCase(Locale.ENGLISH) + " in the generated deck.");
|
||||
sliderPanel.add(slider, BorderLayout.CENTER);
|
||||
// Percentage
|
||||
JLabel percentageLabel = createChangingPercentageLabel(slider);
|
||||
|
|
@ -166,7 +167,7 @@ public class RatioAdjustingSliderPanel extends JPanel {
|
|||
return sliderPanel;
|
||||
}
|
||||
|
||||
private static JLabel createChangingPercentageLabel(final JSlider slider) {
|
||||
private static JLabel createChangingPercentageLabel(final JSlider slider) {
|
||||
|
||||
final JLabel label = new JLabel(" " + String.valueOf(slider.getValue()) + '%');
|
||||
|
||||
|
|
@ -174,7 +175,7 @@ public class RatioAdjustingSliderPanel extends JPanel {
|
|||
String value = String.valueOf(slider.getValue());
|
||||
StringBuilder labelBuilder = new StringBuilder();
|
||||
// Pad with spaces so all percentage labels are of equal size
|
||||
for(int i = 0; i < (5-value.length()); i++) {
|
||||
for (int i = 0; i < (5 - value.length()); i++) {
|
||||
labelBuilder.append(" ");
|
||||
}
|
||||
labelBuilder.append(value);
|
||||
|
|
@ -186,16 +187,16 @@ public class RatioAdjustingSliderPanel extends JPanel {
|
|||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
for(JStorageSlider slider: sg.getSliders()) {
|
||||
for (JStorageSlider slider : sg.getSliders()) {
|
||||
slider.setEnabled(enabled);
|
||||
}
|
||||
for(JLabel label: textLabels) {
|
||||
for (JLabel label : textLabels) {
|
||||
label.setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
public void resetValues() {
|
||||
for(JStorageSlider slider: sg.getSliders()) {
|
||||
for (JStorageSlider slider : sg.getSliders()) {
|
||||
slider.resetDefault();
|
||||
}
|
||||
}
|
||||
|
|
@ -227,7 +228,4 @@ public class RatioAdjustingSliderPanel extends JPanel {
|
|||
landSlider.previousValue = percentage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1125,7 +1125,7 @@ class DeckFilter extends FileFilter {
|
|||
int i = s.lastIndexOf('.');
|
||||
|
||||
if (i > 0 && i < s.length() - 1) {
|
||||
ext = s.substring(i + 1).toLowerCase();
|
||||
ext = s.substring(i + 1).toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
return (ext == null) ? false : ext.equals("dck");
|
||||
}
|
||||
|
|
@ -1149,10 +1149,10 @@ class ImportFilter extends FileFilter {
|
|||
int i = s.lastIndexOf('.');
|
||||
|
||||
if (i > 0 && i < s.length() - 1) {
|
||||
ext = s.substring(i + 1).toLowerCase();
|
||||
ext = s.substring(i + 1).toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
if (ext != null) {
|
||||
if (ext.toLowerCase().equals("dec") || ext.toLowerCase().equals("mwdeck") || ext.toLowerCase().equals("txt") || ext.toLowerCase().equals("dek")) {
|
||||
if (ext.toLowerCase(Locale.ENGLISH).equals("dec") || ext.toLowerCase(Locale.ENGLISH).equals("mwdeck") || ext.toLowerCase(Locale.ENGLISH).equals("txt") || ext.toLowerCase(Locale.ENGLISH).equals("dek")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import java.lang.reflect.InvocationTargetException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
|
|
@ -500,10 +501,10 @@ public class MageBook extends JComponent {
|
|||
className = className.replaceAll("[^a-zA-Z0-9]", "");
|
||||
className = "mage.game.permanent.token." + className + "Token";
|
||||
if (token.getTokenClassName() != null && token.getTokenClassName().length() > 0) {
|
||||
if (token.getTokenClassName().toLowerCase().matches(".*token.*")) {
|
||||
if (token.getTokenClassName().toLowerCase(Locale.ENGLISH).matches(".*token.*")) {
|
||||
className = token.getTokenClassName();
|
||||
className = "mage.game.permanent.token." + className;
|
||||
} else if (token.getTokenClassName().toLowerCase().matches(".*emblem.*")) {
|
||||
} else if (token.getTokenClassName().toLowerCase(Locale.ENGLISH).matches(".*emblem.*")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -541,7 +542,7 @@ public class MageBook extends JComponent {
|
|||
try {
|
||||
String className = emblem.getName();
|
||||
if (emblem.getTokenClassName() != null && emblem.getTokenClassName().length() > 0) {
|
||||
if (emblem.getTokenClassName().toLowerCase().matches(".*emblem.*")) {
|
||||
if (emblem.getTokenClassName().toLowerCase(Locale.ENGLISH).matches(".*emblem.*")) {
|
||||
className = emblem.getTokenClassName();
|
||||
className = "mage.game.command.emblems." + className;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ import mage.view.CardsView;
|
|||
import org.apache.log4j.Logger;
|
||||
import org.jdesktop.swingx.JXPanel;
|
||||
import org.mage.card.arcane.ManaSymbols;
|
||||
import org.mage.card.arcane.UI;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import java.awt.Dimension;
|
|||
import java.awt.Point;
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import javax.swing.ImageIcon;
|
||||
|
|
|
|||
|
|
@ -51,11 +51,9 @@ import java.net.URL;
|
|||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -723,14 +721,14 @@ public class ConnectDialog extends MageDialog {
|
|||
|
||||
}//GEN-LAST:event_btnFind2findPublicServerActionPerformed
|
||||
|
||||
private void connectXmageus(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_connecXmageusW
|
||||
private void connectXmageus(java.awt.event.ActionEvent evt) {
|
||||
String serverAddress = "xmage.us";
|
||||
this.txtServer.setText(serverAddress);
|
||||
this.txtPort.setText("17171");
|
||||
// Update userName and password according to the chosen server.
|
||||
this.txtUserName.setText(MagePreferences.getUserName(serverAddress));
|
||||
this.txtPassword.setText(MagePreferences.getPassword(serverAddress));
|
||||
}//GEN-LAST:event_connectXmageus
|
||||
}
|
||||
|
||||
private void btnFlagSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFlagSearchActionPerformed
|
||||
doFastFlagSearch();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
|
|
|
|||
|
|
@ -24,15 +24,14 @@
|
|||
* 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.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.client.dialog;
|
||||
|
||||
import java.util.Locale;
|
||||
import javax.swing.*;
|
||||
import mage.client.SessionHandler;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Feedback dialog.
|
||||
*
|
||||
|
|
@ -47,17 +46,19 @@ public class FeedbackDialog extends javax.swing.JDialog {
|
|||
"Thank you or \"Devs, you are so cool!\"",
|
||||
"Question or \"I'm so curious about\""};
|
||||
|
||||
/** Creates new form PreferencesDialog */
|
||||
/**
|
||||
* Creates new form PreferencesDialog
|
||||
*/
|
||||
public FeedbackDialog(java.awt.Frame parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
initComponents();
|
||||
cbFeedbackType.setModel(new DefaultComboBoxModel(feedbackTypes));
|
||||
}
|
||||
|
||||
/** 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
|
||||
|
|
@ -259,16 +260,16 @@ public class FeedbackDialog extends javax.swing.JDialog {
|
|||
if (type == null || type.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
if (type.toLowerCase().startsWith("bug")) {
|
||||
if (type.toLowerCase(Locale.ENGLISH).startsWith("bug")) {
|
||||
return "bug";
|
||||
}
|
||||
if (type.toLowerCase().startsWith("feature")) {
|
||||
if (type.toLowerCase(Locale.ENGLISH).startsWith("feature")) {
|
||||
return "feature";
|
||||
}
|
||||
if (type.toLowerCase().startsWith("thank")) {
|
||||
if (type.toLowerCase(Locale.ENGLISH).startsWith("thank")) {
|
||||
return "thank";
|
||||
}
|
||||
if (type.toLowerCase().startsWith("question")) {
|
||||
if (type.toLowerCase(Locale.ENGLISH).startsWith("question")) {
|
||||
return "question";
|
||||
}
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
|
|
@ -1264,7 +1265,7 @@ class DeckFilter extends FileFilter {
|
|||
int i = s.lastIndexOf('.');
|
||||
|
||||
if (i > 0 && i < s.length() - 1) {
|
||||
ext = s.substring(i + 1).toLowerCase();
|
||||
ext = s.substring(i + 1).toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
return (ext == null) ? false : ext.equals("dck");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,11 +210,11 @@ public class PickChoiceDialog extends MageDialog {
|
|||
// load data to datamodel after filter or on startup
|
||||
String filter = choice.getSearchText();
|
||||
if (filter == null){ filter = ""; }
|
||||
filter = filter.toLowerCase();
|
||||
filter = filter.toLowerCase(Locale.ENGLISH);
|
||||
|
||||
this.dataModel.clear();
|
||||
for(KeyValueItem item: this.allItems){
|
||||
if(!choice.isSearchEnabled() || item.Value.toLowerCase().contains(filter)){
|
||||
if(!choice.isSearchEnabled() || item.Value.toLowerCase(Locale.ENGLISH).contains(filter)){
|
||||
this.dataModel.addElement(item);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@
|
|||
package mage.client.dialog;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import javax.swing.*;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ import java.io.File;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.prefs.BackingStoreException;
|
||||
import java.util.prefs.Preferences;
|
||||
|
|
@ -3492,7 +3493,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
}
|
||||
|
||||
private static void loadProxySettings(Preferences prefs) {
|
||||
dialog.cbProxyType.setSelectedItem(Connection.ProxyType.valueOf(MageFrame.getPreferences().get(KEY_PROXY_TYPE, "NONE").toUpperCase()));
|
||||
dialog.cbProxyType.setSelectedItem(Connection.ProxyType.valueOf(MageFrame.getPreferences().get(KEY_PROXY_TYPE, "NONE").toUpperCase(Locale.ENGLISH)));
|
||||
|
||||
load(prefs, dialog.txtProxyServer, KEY_PROXY_ADDRESS, Config.serverName);
|
||||
load(prefs, dialog.txtProxyPort, KEY_PROXY_PORT, Integer.toString(Config.port));
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ import mage.client.util.gui.ArrowBuilder;
|
|||
import mage.client.util.gui.MageDialogState;
|
||||
import mage.constants.*;
|
||||
import mage.game.events.PlayerQueryEvent;
|
||||
import mage.game.turn.Phase;
|
||||
import mage.view.*;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.mage.card.arcane.CardPanel;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import javax.swing.SwingUtilities;
|
|||
import javax.swing.ToolTipManager;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.border.LineBorder;
|
||||
|
||||
import mage.client.SessionHandler;
|
||||
import mage.client.components.MageTextArea;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
package mage.client.util;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Locale;
|
||||
import mage.view.CardView;
|
||||
|
||||
/**
|
||||
|
|
@ -99,7 +100,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
|||
boolean whenYouCast = false;
|
||||
|
||||
for (String str : card.getRules()) {
|
||||
String s = str.toLowerCase();
|
||||
String s = str.toLowerCase(Locale.ENGLISH);
|
||||
annihilator |= s.contains("annihilator");
|
||||
anyNumberOfTarget |= s.contains("any number");
|
||||
buyback |= s.contains("buyback");
|
||||
|
|
@ -332,16 +333,16 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
|||
}
|
||||
|
||||
if (card.getCardTypes().contains("Plainswalker")) {
|
||||
if (card.getName().toLowerCase().equals("jace, the mind sculptor")) {
|
||||
if (card.getName().toLowerCase(Locale.ENGLISH).equals("jace, the mind sculptor")) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 6);
|
||||
}
|
||||
if (card.getName().toLowerCase().equals("ugin, the spirit dragon")) {
|
||||
if (card.getName().toLowerCase(Locale.ENGLISH).equals("ugin, the spirit dragon")) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 5);
|
||||
}
|
||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||
}
|
||||
|
||||
String cn = card.getName().toLowerCase();
|
||||
String cn = card.getName().toLowerCase(Locale.ENGLISH);
|
||||
if (cn.equals("ancient tomb")
|
||||
|| cn.equals("anafenza, the foremost")
|
||||
|| cn.equals("arcum dagsson")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.client.util;
|
||||
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.client.SessionHandler;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
package mage.client.util;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.preference.MagePreferences;
|
||||
import mage.view.ChatMessage;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
|
||||
public final class IgnoreList {
|
||||
|
||||
private static final String USAGE = "<br/><font color=yellow>\\ignore - shows current ignore list on this server."
|
||||
|
|
@ -15,8 +14,8 @@ public final class IgnoreList {
|
|||
+ "<br/>\\unignore [username] - remove a username from your ignore list on this server.</font>";
|
||||
|
||||
public static final int MAX_IGNORE_LIST_SIZE = 50;
|
||||
public static Set<ChatMessage.MessageType> IGNORED_MESSAGE_TYPES =
|
||||
ImmutableSet.of(ChatMessage.MessageType.TALK,
|
||||
public static Set<ChatMessage.MessageType> IGNORED_MESSAGE_TYPES
|
||||
= ImmutableSet.of(ChatMessage.MessageType.TALK,
|
||||
ChatMessage.MessageType.WHISPER_FROM);
|
||||
|
||||
public static String usage() {
|
||||
|
|
@ -45,22 +44,13 @@ public final class IgnoreList {
|
|||
}
|
||||
|
||||
if (userIsIgnored(serverAddress, user)) {
|
||||
return new StringBuilder()
|
||||
.append(user)
|
||||
.append(" is already on your ignore list on ")
|
||||
.append(serverAddress)
|
||||
.toString();
|
||||
return user + " is already on your ignore list on " + serverAddress;
|
||||
}
|
||||
|
||||
MagePreferences.addIgnoredUser(serverAddress, user);
|
||||
updateTablesTable();
|
||||
|
||||
return new StringBuilder()
|
||||
.append("Added ")
|
||||
.append(user)
|
||||
.append(" to your ignore list on ")
|
||||
.append(serverAddress)
|
||||
.toString();
|
||||
return "Added " + user + " to your ignore list on " + serverAddress;
|
||||
}
|
||||
|
||||
private static void updateTablesTable() {
|
||||
|
|
@ -76,19 +66,9 @@ public final class IgnoreList {
|
|||
}
|
||||
if (MagePreferences.removeIgnoredUser(serverAddress, user)) {
|
||||
updateTablesTable();
|
||||
return new StringBuilder()
|
||||
.append("Removed ")
|
||||
.append(user)
|
||||
.append(" from your ignore list on ")
|
||||
.append(serverAddress)
|
||||
.toString();
|
||||
return "Removed " + user + " from your ignore list on " + serverAddress;
|
||||
} else {
|
||||
return new StringBuilder()
|
||||
.append("No such user \"")
|
||||
.append(user)
|
||||
.append("\" on your ignore list on ")
|
||||
.append(serverAddress)
|
||||
.toString();
|
||||
return "No such user \"" + user + "\" on your ignore list on " + serverAddress;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mage.client.util.audio;
|
|||
|
||||
import java.awt.List;
|
||||
import java.io.File;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.sound.sampled.*;
|
||||
import mage.client.constants.Constants;
|
||||
|
|
@ -38,7 +39,7 @@ public class MusicPlayer {
|
|||
}
|
||||
String filename;
|
||||
for (File f : fileread) {
|
||||
filename = f.getName().toLowerCase();
|
||||
filename = f.getName().toLowerCase(Locale.ENGLISH);
|
||||
if (filename.endsWith(".mp3") || filename.endsWith(".wav")) {
|
||||
filelist.add(filename);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import java.awt.FlowLayout;
|
|||
import java.awt.Image;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JComboBox;
|
||||
|
|
@ -77,7 +78,7 @@ public class ColorsChooser extends JComboBox implements ListCellRenderer {
|
|||
|
||||
private void drawOn(JPanel panel, String value) {
|
||||
List<Image> images = new ArrayList<>();
|
||||
value = value.toUpperCase();
|
||||
value = value.toUpperCase(Locale.ENGLISH);
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
char symbol = value.charAt(i);
|
||||
Image image = ManaSymbols.getSizedManaSymbol(String.valueOf(symbol));
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mage.client.util.gui;
|
|||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
import javax.swing.*;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.util.GUISizeHelper;
|
||||
|
|
@ -65,7 +66,7 @@ public final class GuiDisplayUtil {
|
|||
out.append(c);
|
||||
}
|
||||
}
|
||||
return out.toString().toLowerCase();
|
||||
return out.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
public static void keepComponentInsideScreen(int centerX, int centerY, Component component) {
|
||||
|
|
@ -256,7 +257,7 @@ public final class GuiDisplayUtil {
|
|||
rarity = card.getRarity().getCode();
|
||||
}
|
||||
if (card.getExpansionSetCode() != null) {
|
||||
buffer.append(ManaSymbols.replaceSetCodeWithHTML(card.getExpansionSetCode().toUpperCase(), rarity, GUISizeHelper.symbolTooltipSize));
|
||||
buffer.append(ManaSymbols.replaceSetCodeWithHTML(card.getExpansionSetCode().toUpperCase(Locale.ENGLISH), rarity, GUISizeHelper.symbolTooltipSize));
|
||||
}
|
||||
buffer.append("</td></tr></table>");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue