Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
DeckEditorPanel - Fixed some existing exceptions.
- Loading branch information
|
|
@@ -1,5 +1,15 @@ |
|
|
package mage.client.cards; |
|
|
|
|
|
import java.awt.*; |
|
|
import java.awt.event.KeyAdapter; |
|
|
import java.awt.event.KeyEvent; |
|
|
import java.awt.event.MouseAdapter; |
|
|
import java.awt.event.MouseEvent; |
|
|
import java.util.*; |
|
|
import java.util.regex.Matcher; |
|
|
import java.util.regex.Pattern; |
|
|
import java.util.stream.Collectors; |
|
|
import javax.swing.*; |
|
|
import mage.cards.Card; |
|
|
import mage.cards.MageCard; |
|
|
import mage.cards.decks.DeckCardInfo; |
|
|
@@ -20,17 +30,6 @@ |
|
|
import org.apache.log4j.Logger; |
|
|
import org.mage.card.arcane.CardRenderer; |
|
|
|
|
|
import javax.swing.*; |
|
|
import java.awt.*; |
|
|
import java.awt.event.KeyAdapter; |
|
|
import java.awt.event.KeyEvent; |
|
|
import java.awt.event.MouseAdapter; |
|
|
import java.awt.event.MouseEvent; |
|
|
import java.util.*; |
|
|
import java.util.regex.Matcher; |
|
|
import java.util.regex.Pattern; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
/** |
|
|
* Created by StravantUser on 2016-09-20. |
|
|
*/ |
|
|
@@ -1408,13 +1407,13 @@ public void analyseDeck() { |
|
|
while (regexMatcher.find()) { |
|
|
String val = regexMatcher.group(1); |
|
|
int colorless_val = Integer.parseInt(val); |
|
|
|
|
|
|
|
|
int total_c_pip = 0; |
|
|
if (pips.get("#c}") != null) { |
|
|
if (pips.get("#c}") != null) { |
|
|
total_c_pip = pips.get("#c}"); |
|
|
} |
|
|
pips.put("#c}", colorless_val + total_c_pip); |
|
|
|
|
|
|
|
|
int cmc_pip_value = 0; |
|
|
if (pips_at_cmcs.get(cmc + "##c}") != null) { |
|
|
cmc_pip_value = pips_at_cmcs.get(cmc + "##c}"); |
|
|
@@ -2032,6 +2031,9 @@ private void trimGrid() { |
|
|
} |
|
|
|
|
|
private int getCardWidth() { |
|
|
if (GUISizeHelper.editorCardDimension == null) { |
|
|
return 200; |
|
|
} |
|
|
return (int) (GUISizeHelper.editorCardDimension.width * cardSizeMod); |
|
|
} |
|
|
|
|
|
|
|
|
@@ -1,6 +1,4 @@ |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* CardSelector.java |
|
|
* |
|
|
* Created on Feb 18, 2010, 2:49:03 PM |
|
|
|
|
|
@@ -1,6 +1,4 @@ |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* DeckEditorPane.java |
|
|
* |
|
|
* Created on Dec 17, 2009, 9:21:42 AM |
|
|
@@ -98,14 +96,13 @@ private void initComponents(Component container) { |
|
|
this.setLayout(layout); |
|
|
layout.setHorizontalGroup( |
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
.addComponent(container, javax.swing.GroupLayout.DEFAULT_SIZE, 885, Short.MAX_VALUE) |
|
|
.addComponent(container, javax.swing.GroupLayout.DEFAULT_SIZE, 885, Short.MAX_VALUE) |
|
|
); |
|
|
layout.setVerticalGroup( |
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
.addComponent(container, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE) |
|
|
.addComponent(container, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE) |
|
|
); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
public DeckEditorPanel getPanel() { |
|
|
|
|
|
@@ -192,6 +192,15 @@ |
|
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddLandActionPerformed"/> |
|
|
</Events> |
|
|
</Component> |
|
|
<Component class="javax.swing.JButton" name="btnGenDeck"> |
|
|
<Properties> |
|
|
<Property name="text" type="java.lang.String" value="Generate"/> |
|
|
<Property name="name" type="java.lang.String" value="btnGenDeck" noResource="true"/> |
|
|
</Properties> |
|
|
<Events> |
|
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnGenDeckActionPerformed"/> |
|
|
</Events> |
|
|
</Component> |
|
|
<Component class="javax.swing.JButton" name="btnSubmit"> |
|
|
<Properties> |
|
|
<Property name="text" type="java.lang.String" value="Submit"/> |
|
|
@@ -210,7 +219,7 @@ |
|
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSubmitTimerActionPerformed"/> |
|
|
</Events> |
|
|
</Component> |
|
|
<Component class="JComponent" name="cardInfoPane"> |
|
|
<Component class="org.mage.plugins.card.info.CardInfoPaneImpl" name="cardInfoPane"> |
|
|
</Component> |
|
|
<Component class="javax.swing.JTextField" name="txtTimeRemaining"> |
|
|
</Component> |
|
|
|
Oops, something went wrong.