- CheckStyle.

This commit is contained in:
Chris
2012-02-18 21:29:43 +00:00
parent 997a9f8170
commit c7ea22bb16
4 changed files with 27 additions and 22 deletions

View File

@@ -185,7 +185,7 @@ public class ControlDraft {
public void updateHumanDecks() {
List<Deck> human = new ArrayList<Deck>();
for(DeckSet d : AllZone.getDecks().getDraft()) {
for (DeckSet d : AllZone.getDecks().getDraft()) {
human.add(d.getHumanDeck());
}
view.getLstHumanDecks().setDecks(human);

View File

@@ -401,7 +401,9 @@ public class ControlQuest {
// Retrieve and set all decks
List<Deck> temp = new ArrayList<Deck>();
if (qData != null ) temp.addAll(qData.getMyDecks().values());
if (qData != null) {
temp.addAll(qData.getMyDecks().values());
}
view.getLstDecks().setDecks(temp);
// Look through list for preferred deck from prefs

View File

@@ -174,16 +174,18 @@ public class ControlSealed {
+ ">> does not equal any of the sealedTypes.");
}
if (sd.getCardpool().isEmpty())
if (sd.getCardpool().isEmpty()) {
return;
}
final String sDeckName = JOptionPane.showInputDialog(null,
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.SAVE_SEALED_MSG),
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.SAVE_SEALED_TTL),
JOptionPane.QUESTION_MESSAGE);
if ( StringUtils.isBlank(sDeckName) )
if (StringUtils.isBlank(sDeckName)) {
return;
}
// May check for name uniqueness here
@@ -201,10 +203,8 @@ public class ControlSealed {
sealed.addAiDeck(sd.buildAIDeck(sDeck.toForgeCardList()));
AllZone.getDecks().getSealed().add(sealed);
view.getParentView().getUtilitiesController().showDeckEditor(GameType.Sealed, sealed);
}
/** @return {@link forge.Command} What to do when the deck editor exits. */

View File

@@ -155,12 +155,15 @@ public class ControlUtilities {
public <T> void showDeckEditor(GameType gt0, T d0) {
DeckEditorBase<?, T> editor = null;
if ( gt0 == GameType.Constructed)
if (gt0 == GameType.Constructed) {
editor = (DeckEditorBase<?, T>) new DeckEditorConstructed();
if ( gt0 == GameType.Draft)
}
if (gt0 == GameType.Draft) {
editor = (DeckEditorBase<?, T>) new DeckEditorLimited(AllZone.getDecks().getDraft());
if ( gt0 == GameType.Sealed)
}
if (gt0 == GameType.Sealed) {
editor = (DeckEditorBase<?, T>) new DeckEditorLimited(AllZone.getDecks().getSealed());
}
final Command exit = new Command() {