Exemplo n.º 1
0
 private void showImage(int row) {
   CardView card = view.get(row);
   if (!card.getId().equals(bigCard.getCardId())) {
     if (!MageFrame.isLite()) {
       Image image = Plugins.getInstance().getOriginalImage(card);
       if (image != null && image instanceof BufferedImage) {
         // XXX: scaled to fit width
         bigCard.setCard(card.getId(), EnlargeMode.NORMAL, image, new ArrayList<String>(), false);
       } else {
         drawCardText(card);
       }
     } else {
       drawCardText(card);
     }
   }
 }
Exemplo n.º 2
0
 private void drawCardText(CardView card) {
   JXPanel panel = GuiDisplayUtil.getDescription(card, bigCard.getWidth(), bigCard.getHeight());
   panel.setVisible(true);
   bigCard.hideTextComponent();
   bigCard.addJXPanel(card.getId(), panel);
 }