View Javadoc

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.DruHTMLPanel;
7   import org.catacomb.xdoc.HTMLPage;
8   
9   
10  public class HTMLPanel extends Panel {
11  
12      public String content;
13  
14      public String show;
15  
16      public String linkAction;
17  
18      public boolean preformat;
19  
20  
21      public HTMLPanel() {
22          super();
23          content = "";
24      }
25  
26      public DruPanel instantiatePanel() {
27          return  new DruHTMLPanel();
28      }
29  
30  
31      public void populatePanel(DruPanel dp, Context ctx, GUIPath gpath) {
32          DruHTMLPanel dhp = (DruHTMLPanel)dp;
33  
34          if (preformat) {
35              dhp.setPreformatted(true);
36          }
37  
38          if (content != null) {
39              dhp.setPage(new HTMLPage(content, HTMLPage.DASSIE_TEXT));
40          }
41  
42  
43          if (show != null) {
44              ctx.getMarketplace().addConsumer("Page", dhp, show);
45          }
46  
47          if (linkAction != null) {
48              dhp.setLinkAction(linkAction);
49          }
50  
51      }
52  
53  
54  
55  }