[deckeditor] Refactored card selectors according to MVC. As a result the list and gridcard view have shared filter and it is possible to search cards in gridcard view.

This commit is contained in:
magenoxx 2011-06-16 19:58:36 +04:00
parent 3b4a59b16f
commit cf931fd02e
6 changed files with 384 additions and 42 deletions

View file

@ -710,7 +710,7 @@ public class CardTableSelector extends javax.swing.JPanel implements ComponentLi
}//GEN-LAST:event_jButton2ActionPerformed
private TableModel mainModel;
private javax.swing.JButton btnBooster;
private javax.swing.JButton btnClear;
private JTable mainTable = new JTable();

View file

@ -75,8 +75,7 @@ public class TableModel extends AbstractTableModel implements ICardGrid {
private int recentSortedColumn;
private boolean recentAscending;
public void loadCards(CardsView showCards, SortBy sortBy, boolean piles,
BigCard bigCard, UUID gameId) {
public void loadCards(CardsView showCards, SortBy sortBy, boolean piles, BigCard bigCard, UUID gameId) {
this.bigCard = bigCard;
this.gameId = gameId;
for (CardView card : showCards.values()) {