1
2 package org.catacomb.druid.blocks;
3
4 import org.catacomb.datalish.SColor;
5 import org.catacomb.druid.build.Context;
6 import org.catacomb.druid.build.Druid;
7 import org.catacomb.druid.build.GUIPath;
8 import org.catacomb.druid.gui.base.DruAssemblyPanel;
9 import org.catacomb.druid.gui.base.DruPanel;
10 import org.catacomb.interlish.structure.ModeController;
11
12
13
14 public class AssemblyPanel extends Panel {
15
16 public int width;
17 public int height;
18
19 public String dataModel;
20
21 public SColor canvasColor;
22 public SColor shelfColor;
23
24 public AssemblyPanel() {
25 width = 400;
26 height = 200;
27 }
28
29
30
31 public DruPanel instantiatePanel() {
32 return new DruAssemblyPanel(width, height, dataModel);
33 }
34
35 public void populatePanel(DruPanel dpp, Context ctx, GUIPath gpath) {
36
37 DruAssemblyPanel drap = (DruAssemblyPanel)dpp;
38
39
40 Druid druid = new Druid("org.catacomb.druid.chunk.MouseModes", ctx);
41 druid.whizzBang();
42 DruPanel dp = druid.getMainPanel();
43
44
45
46
47
48 drap.addNorth(dp);
49 drap.setModeController((ModeController)druid.getController());
50
51 if (canvasColor != null) {
52 drap.setCanvasColor(canvasColor.getColor());
53 }
54
55 if (shelfColor != null) {
56 drap.setShelfColor(shelfColor.getColor());
57 }
58
59 }
60
61 }