Last settings for CardView concering view, piles and order are always saved and restored in Java Prefs now.

This commit is contained in:
LevelX2 2013-03-27 08:26:04 +01:00
parent 12a01788e6
commit 39d67eec8a
4 changed files with 62 additions and 15 deletions

View file

@ -81,6 +81,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener,
setOpaque(false);
}
@Override
public void loadCards(CardsView showCards, SortBy sortBy, boolean piles, BigCard bigCard, UUID gameId) {
boolean drawImage = showCards.size() < MAX_IMAGES;
this.bigCard = bigCard;
@ -114,6 +115,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener,
cards.put(card.getId(), cardImg);
}
@Override
public void drawCards(SortBy sortBy, boolean piles) {
int maxWidth = this.getParent().getWidth();
int numColumns = maxWidth / Config.dimensions.frameWidth;
@ -222,11 +224,12 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener,
cards.remove(cardId);
}
@Override
public void addCardEventListener(Listener<Event> listener) {
cardEventSource.addListener(listener);
}
@Override
public void clearCardEventListeners() {
cardEventSource.clearListeners();
}