1
2 package org.catacomb.druid.blocks;
3
4
5 import org.catacomb.druid.build.Context;
6 import org.catacomb.druid.build.GUIPath;
7 import org.catacomb.druid.gui.base.DruLabelPanel;
8 import org.catacomb.druid.gui.base.DruPanel;
9 import org.catacomb.report.E;
10
11
12 public class Label extends Panel {
13
14
15 public String text;
16
17 public String align;
18
19 public String fontWeight;
20
21 public String style;
22
23
24
25 public DruPanel instantiatePanel() {
26 DruLabelPanel drup = new DruLabelPanel(text, align);
27
28 drup.setTitle(text);
29
30 if (style != null && style.toLowerCase().equals("html")) {
31 drup.setStyleHTML();
32 }
33
34 if (fontWeight != null) {
35 if (fontWeight.equals("bold")) {
36 drup.setFontBold();
37 } else {
38 E.warning("unrecognized font weight " + fontWeight);
39 }
40 }
41
42 return drup;
43
44 }
45
46
47
48 @Override
49 public void populatePanel(DruPanel drup, Context ctx, GUIPath gpath) {
50
51 }
52
53
54
55 }