mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Don't retain selection when clicking to change column sort
Support showing color deck options in proper order with no column header
This commit is contained in:
@@ -76,6 +76,16 @@ public abstract class DeckBase implements Serializable, Comparable<DeckBase>, In
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Comparable<?> getCompareValue() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the comment.
|
||||
*
|
||||
@@ -133,5 +143,4 @@ public abstract class DeckBase implements Serializable, Comparable<DeckBase>, In
|
||||
public final String getBestFileName() {
|
||||
return this.getName().replaceAll("[^-_$#@.,{[()]} a-zA-Z0-9]", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,4 +31,11 @@ public interface InventoryItem extends IHasName
|
||||
* @return the type
|
||||
*/
|
||||
String getItemType();
|
||||
|
||||
/**
|
||||
* Return object used to compare this item with other items
|
||||
*
|
||||
* @return the compare object
|
||||
*/
|
||||
Comparable<?> getCompareValue();
|
||||
}
|
||||
|
||||
@@ -172,6 +172,11 @@ public final class PaperCard implements Comparable<IPaperCard>, InventoryItemFro
|
||||
// return String.format("%s|%s", name, cardSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Comparable<?> getCompareValue() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -47,6 +47,10 @@ public class PaperToken implements InventoryItemFromSet, IPaperCard {
|
||||
|
||||
@Override public String getName() { return name; }
|
||||
|
||||
@Override public String toString() { return name; }
|
||||
|
||||
@Override public Comparable<?> getCompareValue() { return name; }
|
||||
|
||||
@Override public String getEdition() { return edition.getCode(); }
|
||||
|
||||
@Override public int getArtIndex() { return 0; } // This might change however
|
||||
|
||||
@@ -63,6 +63,16 @@ public class PreconDeck implements InventoryItemFromSet {
|
||||
return "Prebuilt Deck";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.deck.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Comparable<?> getCompareValue() {
|
||||
return this.deck.getCompareValue();
|
||||
}
|
||||
|
||||
public PreconDeck(final Deck d, String set, String description) {
|
||||
deck = d;
|
||||
this.set = set;
|
||||
|
||||
@@ -99,6 +99,16 @@ public abstract class SealedProduct implements InventoryItemFromSet {
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Comparable<?> getCompareValue() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
protected List<PaperCard> generate() {
|
||||
return BoosterGenerator.getBoosterPack(contents);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user