All final strings became static - it will give a little perfomance boost, due to not instantiating same string every time

This commit is contained in:
vraskulin 2017-02-27 16:33:32 +03:00
parent 26ce8e0bcc
commit af3986df46
46 changed files with 56 additions and 56 deletions

View file

@ -26,7 +26,7 @@ public class MageRoundPane extends JPanel {
private int Y_OFFSET = 30;
private final Color defaultBackgroundColor = new Color(141, 130, 112, 200);
private Color backgroundColor = defaultBackgroundColor;
private final int alpha = 0;
private static final int alpha = 0;
private static final Map<ShadowKey, BufferedImage> SHADOW_IMAGE_CACHE;
private static final Map<Key, BufferedImage> IMAGE_CACHE;

View file

@ -16,7 +16,7 @@ public class BackgroundPainter extends AbstractPainter {
private final Color bgColor = Color.black;
final float bgalpha = 0.6f;
static final float bgalpha = 0.6f;
public BackgroundPainter() {
super();

View file

@ -22,7 +22,7 @@ public class DialogContainer extends JPanel {
private Color backgroundColor = new Color(0, 255, 255, 60);
private int alpha = 50;
private final boolean isGradient = false;
private static final boolean isGradient = false;
private final TexturePaint tp = null;
private final Image gradient = null;
private BufferedImage b;

View file

@ -62,7 +62,7 @@ public class DeckArea extends javax.swing.JPanel {
private BigCard lastBigCard = null;
private int dividerLocationNormal = 0;
private int dividerLocationLimited = 0;
private final boolean isLimitedBuildingOrientation = false;
private static final boolean isLimitedBuildingOrientation = false;
public DeckCardLayout getCardLayout() {
return deckList.getCardLayout();

View file

@ -86,8 +86,8 @@ public class NewTournamentDialog extends MageDialog {
private JTextArea txtRandomPacks;
private final List<TournamentPlayerPanel> players = new ArrayList<>();
private final List<JComboBox> packs = new ArrayList<>();
private final int CONSTRUCTION_TIME_MIN = 6;
private final int CONSTRUCTION_TIME_MAX = 30;
private static final int CONSTRUCTION_TIME_MIN = 6;
private static final int CONSTRUCTION_TIME_MAX = 30;
private boolean isRandom = false;
private boolean isRichMan = false;
private String cubeFromDeckFilename = "";