Changed API to make isSectionImportable public rather than protected

This is to allow DeckImport to get all the supported DeckSections in current editor, without relying on using the content of the cbxSection dropdown UI component.

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This commit is contained in:
leriomaggio
2021-10-02 08:27:27 +01:00
parent f065d460c3
commit 88ec398e8c
7 changed files with 7 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ public abstract class CDeckEditor<TModel extends DeckBase> extends ACEditorBase<
return result;
}
protected Boolean isSectionImportable(DeckSection section) {
public Boolean isSectionImportable(DeckSection section) {
return section == DeckSection.Main;
}

View File

@@ -195,7 +195,7 @@ public final class CEditorCommander extends CDeckEditor<Deck> {
}
@Override
protected Boolean isSectionImportable(DeckSection section) {
public Boolean isSectionImportable(DeckSection section) {
return allSections.contains(section);
}

View File

@@ -403,7 +403,7 @@ public final class CEditorConstructed extends CDeckEditor<Deck> {
}
@Override
protected Boolean isSectionImportable(DeckSection section) {
public Boolean isSectionImportable(DeckSection section) {
return allSections.contains(section);
}

View File

@@ -183,7 +183,7 @@ public final class CEditorLimited extends CDeckEditor<DeckGroup> {
}
@Override
protected Boolean isSectionImportable(DeckSection section) {
public Boolean isSectionImportable(DeckSection section) {
return section != DeckSection.Sideboard && allSections.contains(section);
}

View File

@@ -372,7 +372,7 @@ public final class CEditorQuest extends CDeckEditor<Deck> {
}
@Override
protected Boolean isSectionImportable(DeckSection section) {
public Boolean isSectionImportable(DeckSection section) {
return allSections.contains(section);
}

View File

@@ -212,7 +212,7 @@ public final class CEditorQuestLimited extends CDeckEditor<DeckGroup> {
}
@Override
protected Boolean isSectionImportable(DeckSection section) {
public Boolean isSectionImportable(DeckSection section) {
return section != DeckSection.Sideboard && allSections.contains(section);
}

View File

@@ -159,7 +159,7 @@ public final class CEditorVariant extends CDeckEditor<Deck> {
}
@Override
protected Boolean isSectionImportable(DeckSection section) {
public Boolean isSectionImportable(DeckSection section) {
return true;
}