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