Support hiding Favorite column from Editor Preferences pane

This commit is contained in:
drdev
2013-12-22 09:39:00 +00:00
parent e159c25f6d
commit b79876c959
2 changed files with 14 additions and 5 deletions

View File

@@ -59,6 +59,7 @@ public enum CEditorPreferences implements ICDoc {
prefsDict.put(prefsInstance.getChbCatalogRanking(), ColumnName.CAT_RANKING); prefsDict.put(prefsInstance.getChbCatalogRanking(), ColumnName.CAT_RANKING);
prefsDict.put(prefsInstance.getChbCatalogPower(), ColumnName.CAT_POWER); prefsDict.put(prefsInstance.getChbCatalogPower(), ColumnName.CAT_POWER);
prefsDict.put(prefsInstance.getChbCatalogToughness(), ColumnName.CAT_TOUGHNESS); prefsDict.put(prefsInstance.getChbCatalogToughness(), ColumnName.CAT_TOUGHNESS);
prefsDict.put(prefsInstance.getChbCatalogFavorite(), ColumnName.CAT_FAVORITE);
prefsDict.put(prefsInstance.getChbCatalogOwned(), ColumnName.CAT_OWNED); prefsDict.put(prefsInstance.getChbCatalogOwned(), ColumnName.CAT_OWNED);
// Deck // Deck

View File

@@ -51,6 +51,7 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
private JCheckBox chbCatalogRanking = new FCheckBox("Ranking"); private JCheckBox chbCatalogRanking = new FCheckBox("Ranking");
private JCheckBox chbCatalogPower = new FCheckBox("Power"); private JCheckBox chbCatalogPower = new FCheckBox("Power");
private JCheckBox chbCatalogToughness = new FCheckBox("Toughness"); private JCheckBox chbCatalogToughness = new FCheckBox("Toughness");
private JCheckBox chbCatalogFavorite = new FCheckBox("Favorite");
private JCheckBox chbCatalogOwned = new FCheckBox("Owned (Spell shop)"); private JCheckBox chbCatalogOwned = new FCheckBox("Owned (Spell shop)");
private JCheckBox chbDeckColor = new FCheckBox("Color"); private JCheckBox chbDeckColor = new FCheckBox("Color");
@@ -66,7 +67,7 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
private JCheckBox chbCardDisplayUnique = new FCheckBox("Show unique cards only (only affects Constructed)"); private JCheckBox chbCardDisplayUnique = new FCheckBox("Show unique cards only (only affects Constructed)");
private JPanel pnl = new JPanel(new MigLayout("insets 0, gap 0, wrap 2, ax center")); private JPanel pnl = new JPanel(new MigLayout("insets 0, gap 0, wrap 2, ax left"));
private JScrollPane scroller = new JScrollPane(pnl); private JScrollPane scroller = new JScrollPane(pnl);
//========== Constructor //========== Constructor
@@ -86,6 +87,7 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
FSkin.get(chbCatalogRanking).setFont(font); FSkin.get(chbCatalogRanking).setFont(font);
FSkin.get(chbCatalogPower).setFont(font); FSkin.get(chbCatalogPower).setFont(font);
FSkin.get(chbCatalogToughness).setFont(font); FSkin.get(chbCatalogToughness).setFont(font);
FSkin.get(chbCatalogFavorite).setFont(font);
FSkin.get(chbCatalogOwned).setFont(font); FSkin.get(chbCatalogOwned).setFont(font);
FSkin.get(chbDeckColor).setFont(font); FSkin.get(chbDeckColor).setFont(font);
@@ -103,10 +105,10 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
FSkin.get(chbCardDisplayUnique).setFont(font); FSkin.get(chbCardDisplayUnique).setFont(font);
chbCardDisplayUnique.setSelected(false); chbCardDisplayUnique.setSelected(false);
pnl.add(lblStats, "h 25px!, gap 5px 5px 5px 5px, ax center, span 2 1"); pnl.add(lblStats, "h 25px!, gap 5px 5px 5px 5px, ax left, span 2 1");
pnl.add(chbElasticColumns, "h 25px!, gap 5px 5px 5px 5px, ax center, span 2 1"); pnl.add(chbElasticColumns, "h 25px!, gap 5px 5px 5px 5px, ax left, span 2 1");
final String constraints = "w 75px, h 25px!, gap 5px 5px 5px 5px, ax center"; final String constraints = "w 75px, h 25px!, gap 5px 5px 5px 5px, ax left";
pnl.add(lblCatalog, constraints + ", span 2 1"); pnl.add(lblCatalog, constraints + ", span 2 1");
pnl.add(chbCatalogColor, constraints); pnl.add(chbCatalogColor, constraints);
pnl.add(chbCatalogRarity, constraints); pnl.add(chbCatalogRarity, constraints);
@@ -116,6 +118,7 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
pnl.add(chbCatalogToughness, constraints); pnl.add(chbCatalogToughness, constraints);
pnl.add(chbCatalogAI, constraints); pnl.add(chbCatalogAI, constraints);
pnl.add(chbCatalogRanking, constraints); pnl.add(chbCatalogRanking, constraints);
pnl.add(chbCatalogFavorite, constraints);
pnl.add(chbCatalogOwned, constraints + ", wrap"); pnl.add(chbCatalogOwned, constraints + ", wrap");
pnl.add(lblDeck, constraints + ", span 2 1"); pnl.add(lblDeck, constraints + ", span 2 1");
@@ -125,7 +128,7 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
pnl.add(chbDeckSet, constraints); pnl.add(chbDeckSet, constraints);
pnl.add(chbDeckPower, constraints); pnl.add(chbDeckPower, constraints);
pnl.add(chbDeckToughness, constraints); pnl.add(chbDeckToughness, constraints);
pnl.add(chbDeckAI, constraints + ", wrap"); pnl.add(chbDeckAI, constraints);
pnl.add(chbDeckRanking, constraints + ", wrap"); pnl.add(chbDeckRanking, constraints + ", wrap");
pnl.add(lblDisplay, constraints + ", span 2 1"); pnl.add(lblDisplay, constraints + ", span 2 1");
@@ -230,6 +233,11 @@ public enum VEditorPreferences implements IVDoc<CEditorPreferences> {
return chbCatalogToughness; return chbCatalogToughness;
} }
/** @return {@link javax.swing.JCheckBox} */
public JCheckBox getChbCatalogFavorite() {
return chbCatalogFavorite;
}
/** @return {@link javax.swing.JCheckBox} */ /** @return {@link javax.swing.JCheckBox} */
public JCheckBox getChbCatalogOwned() { public JCheckBox getChbCatalogOwned() {
return chbCatalogOwned; return chbCatalogOwned;