move column headings enum into CardTableColumn.
parent
1c85428aef
commit
5b616e98db
|
@ -1,18 +1,19 @@
|
|||
package magic.ui.widget.cards.table;
|
||||
|
||||
import magic.translate.MText;
|
||||
import magic.translate.StringContext;
|
||||
|
||||
enum CardTableColumn {
|
||||
|
||||
Rating("#", 40),
|
||||
CardName(EnumStrings._S1, 180),
|
||||
Cost(EnumStrings._S2, 140),
|
||||
Power(EnumStrings._S3, 30),
|
||||
Toughness(EnumStrings._S4, 30),
|
||||
Type(EnumStrings._S5, 140),
|
||||
Subtype(EnumStrings._S6, 140),
|
||||
Rarity(EnumStrings._S7, 90),
|
||||
Oracle(EnumStrings._S8, 2000);
|
||||
CardName(ColumnHeading._S1, 180),
|
||||
Cost(ColumnHeading._S2, 140),
|
||||
Power(ColumnHeading._S3, 30),
|
||||
Toughness(ColumnHeading._S4, 30),
|
||||
Type(ColumnHeading._S5, 140),
|
||||
Subtype(ColumnHeading._S6, 140),
|
||||
Rarity(ColumnHeading._S7, 90),
|
||||
Oracle(ColumnHeading._S8, 2000);
|
||||
|
||||
private final String caption;
|
||||
private final int minWidth;
|
||||
|
@ -34,3 +35,24 @@ enum CardTableColumn {
|
|||
return values()[i].getMinWidth();
|
||||
}
|
||||
}
|
||||
|
||||
class ColumnHeading {
|
||||
private ColumnHeading() {}
|
||||
|
||||
static final String _S1 = "Name";
|
||||
|
||||
@StringContext(eg = "Short hand for Combined Cost, a column header in card table.")
|
||||
static final String _S2 = "CC";
|
||||
|
||||
@StringContext(eg = "Short hand for Power, a column header in card table.")
|
||||
static final String _S3 = "P";
|
||||
|
||||
@StringContext(eg = "Short hand for Toughness, a column header in card table.")
|
||||
static final String _S4 = "T";
|
||||
|
||||
static final String _S5 = "Type";
|
||||
static final String _S6 = "Subtype";
|
||||
static final String _S7 = "Rarity";
|
||||
static final String _S8 = "Text";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
package magic.ui.widget.cards.table;
|
||||
|
||||
import magic.translate.StringContext;
|
||||
|
||||
/**
|
||||
* Translatable strings used in enums in this package.
|
||||
*/
|
||||
final class EnumStrings {
|
||||
private EnumStrings() {}
|
||||
|
||||
// CardTableColumn
|
||||
static final String _S1 = "Name";
|
||||
@StringContext(eg = "Short hand for Combined Cost, a column header in card table.")
|
||||
static final String _S2 = "CC";
|
||||
@StringContext(eg = "Short hand for Power, a column header in card table.")
|
||||
static final String _S3 = "P";
|
||||
@StringContext(eg = "Short hand for Toughness, a column header in card table.")
|
||||
static final String _S4 = "T";
|
||||
static final String _S5 = "Type";
|
||||
static final String _S6 = "Subtype";
|
||||
static final String _S7 = "Rarity";
|
||||
static final String _S8 = "Text";
|
||||
}
|
Loading…
Reference in New Issue