mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[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:
parent
6e3a7ede39
commit
f66fd8fc97
11 changed files with 221 additions and 150 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue