1 package org.catacomb.druid.blocks;
2
3 import org.catacomb.druid.build.Context;
4 import org.catacomb.druid.build.GUIPath;
5 import org.catacomb.druid.gui.base.DruPanel;
6 import org.catacomb.druid.gui.edit.DruLogPanel;
7 import org.catacomb.interlish.structure.Marketplace;
8
9
10 public class LogPanel extends Panel {
11
12 public String text;
13
14 public int height;
15
16 public String scope;
17
18 public String sources;
19
20
21
22 public DruPanel instantiatePanel() {
23 if (height == 0) {
24 height = 20;
25 }
26 return new DruLogPanel(height);
27 }
28
29
30 public void populatePanel(DruPanel dp, Context ctx, GUIPath gpath) {
31
32 DruLogPanel drup = (DruLogPanel)dp;
33
34 Marketplace hub = ctx.getMarketplace(scope);
35
36 if (sources != null) {
37 String[] sa = sources.split(",");
38 for (int i = 0; i < sa.length; i++) {
39 hub.addConsumer("Log", drup, sa[i].trim());
40 }
41 } else {
42 hub.addConsumer("Log", drup, "default");
43 }
44
45 }
46
47 }