forked from External/mage
Card panels sort handling added set init value from prefs.
This commit is contained in:
parent
96d4126684
commit
2302b39b47
2 changed files with 22 additions and 13 deletions
|
|
@ -49,7 +49,6 @@ import javax.swing.*;
|
|||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import mage.constants.CardType;
|
||||
import mage.cards.MageCard;
|
||||
import mage.client.constants.Constants;
|
||||
import mage.client.constants.Constants.SortBy;
|
||||
import mage.client.deckeditor.SortSetting;
|
||||
import mage.client.deckeditor.table.TableModel;
|
||||
|
|
@ -85,14 +84,14 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
initListViewComponents();
|
||||
}
|
||||
|
||||
public void makeTransparent() {
|
||||
private void makeTransparent() {
|
||||
jScrollPane1.setOpaque(false);
|
||||
cardArea.setOpaque(false);
|
||||
jScrollPane1.getViewport().setOpaque(false);
|
||||
cbSortBy.setModel(new DefaultComboBoxModel(SortBy.values()));
|
||||
}
|
||||
|
||||
public void initListViewComponents() {
|
||||
private void initListViewComponents() {
|
||||
mainTable = new JTable();
|
||||
|
||||
mainModel = new TableModel();
|
||||
|
|
@ -172,7 +171,8 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
this.bigCard = bigCard;
|
||||
this.gameId = gameId;
|
||||
|
||||
boolean piles = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DRAFT_PILES_TOGGLE, "True").equals("True");
|
||||
boolean piles = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DRAFT_PILES_TOGGLE, "True").equals("True");
|
||||
cbSortBy.setSelectedItem(sortSetting.getSortBy());
|
||||
chkPiles.setSelected(piles);
|
||||
currentView.loadCards(showCards, sortSetting, piles, bigCard, gameId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue