[deck.editor] Switching between card selectors. Displaying cards from the list. --All sets-- option to show all cards at once (appears only in CardTableSelector).

This commit is contained in:
magenoxx 2011-05-11 17:52:16 +04:00
parent 6e3a7ede39
commit f66fd8fc97
11 changed files with 221 additions and 150 deletions

View file

@ -23,12 +23,14 @@ import org.mage.plugins.card.dl.Downloader;
import org.mage.plugins.card.dl.sources.GathererSets;
import org.mage.plugins.card.dl.sources.GathererSymbols;
import org.mage.plugins.card.images.DownloadPictures;
import org.mage.plugins.card.images.ImageCache;
import org.mage.plugins.card.info.CardInfoPaneImpl;
import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.util.*;
import java.util.List;
@ -463,4 +465,8 @@ public class CardPluginImpl implements CardPlugin {
public JComponent getCardInfoPane() {
return new CardInfoPaneImpl();
}
public BufferedImage getOriginalImage(CardView card) {
return ImageCache.getImageOriginal(card);
}
}

View file

@ -75,12 +75,12 @@ public class ImageCache {
String thumbnailPath = path.replace(".jpg", ".thumb.jpg");
File thumbnailFile = new File(thumbnailPath);
if (thumbnailFile.exists()) {
log.info("loading thumbnail for " + key + ", path="+thumbnailPath);
//log.debug("loading thumbnail for " + key + ", path="+thumbnailPath);
return loadImage(thumbnailFile);
} else {
BufferedImage image = loadImage(file);
if (image == null) return null;
log.info("creating thumbnail for " + key);
//log.debug("creating thumbnail for " + key);
return makeThumbnail(image, thumbnailPath);
}
} else {