1 package org.catacomb.druid.gui.base;
2
3
4
5 import org.catacomb.druid.gui.edit.Effect;
6 import org.catacomb.report.E;
7
8
9
10 public class DruCardSelectionEffect extends Effect {
11
12 String cardToShow;
13
14 public DruCardSelectionEffect(String tgt, String s) {
15 super(tgt);
16 cardToShow = s;
17 }
18
19
20
21
22 public void apply(boolean b) {
23 if (b) {
24
25
26
27
28 Object tgt = getTarget();
29
30 if (tgt instanceof DruPseudoCardPanel) {
31 ((DruPseudoCardPanel)tgt).showCard(cardToShow);
32
33 } else if (tgt instanceof DruCardPanel) {
34 ((DruCardPanel)tgt).showCard(cardToShow);
35
36 } else {
37 E.error("must have card panelt, not " + tgt);
38 }
39 }
40 }
41
42 }