- 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

@@ -401,7 +401,9 @@ public class ControlQuest {
// Retrieve and set all decks // Retrieve and set all decks
List<Deck> temp = new ArrayList<Deck>(); 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); view.getLstDecks().setDecks(temp);
// Look through list for preferred deck from prefs // Look through list for preferred deck from prefs

View File

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