Re-disabled Alpha and Beta in the Custom quest format dialog.

Very minor checkstyle (removed extra whitespace).
This commit is contained in:
RumbleBBU
2013-02-12 08:05:23 +00:00
parent c21689690f
commit 22a707e213

View File

@@ -48,15 +48,17 @@ public class DialogChooseSets {
List<FCheckBox> otherSets = new ArrayList<FCheckBox>(); List<FCheckBox> otherSets = new ArrayList<FCheckBox>();
for (CardEdition ce : editions) { for (CardEdition ce : editions) {
String code = ce.getCode(); if (choosableSet(ce)) {
FCheckBox box = new FCheckBox(String.format("%s (%s)", ce.getName(), code)); String code = ce.getCode();
box.setName(code); FCheckBox box = new FCheckBox(String.format("%s (%s)", ce.getName(), code));
box.setSelected(null == preselectedSets ? false : preselectedSets.contains(code)); box.setName(code);
box.setEnabled(null == unselectableSets ? true : !unselectableSets.contains(code)); box.setSelected(null == preselectedSets ? false : preselectedSets.contains(code));
switch (ce.getType()) { box.setEnabled(null == unselectableSets ? true : !unselectableSets.contains(code));
case CORE: coreSets.add(box); break; switch (ce.getType()) {
case EXPANSION: expansionSets.add(box); break; case CORE: coreSets.add(box); break;
default: otherSets.add(box); break; case EXPANSION: expansionSets.add(box); break;
default: otherSets.add(box); break;
}
} }
} }
@@ -143,6 +145,10 @@ public class DialogChooseSets {
return pnl; return pnl;
} }
private boolean choosableSet(final CardEdition ce) {
return !("LEA".equalsIgnoreCase(ce.getCode()) || "LEB".equalsIgnoreCase(ce.getCode()));
}
private void handleOk() { private void handleOk() {
for (FCheckBox box : choices) { for (FCheckBox box : choices) {
if (box.isSelected()) { if (box.isSelected()) {