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.base.DruScrollingHTMLPanel;
7   
8   
9   public class ScrollingHTMLPanel extends Panel {
10  
11      public String content;
12  
13      public String show;
14  
15      public String stylesheet;
16  
17      public boolean preformat;
18  
19  
20      public DruPanel instantiatePanel() {
21          return new DruScrollingHTMLPanel();
22      }
23  
24  
25      public void populatePanel(DruPanel dp, Context ctx, GUIPath gpath) {
26          DruScrollingHTMLPanel dhp = (DruScrollingHTMLPanel)dp;
27  
28          if (preformat) {
29              dhp.setPreformat(true);
30          }
31  
32          if (content != null) {
33              dhp.setText(content);
34          }
35  
36  
37          if (show != null) {
38              ctx.getMarketplace().addConsumer("Page", dhp, show);
39          }
40  
41          if (stylesheet != null) {
42              dhp.setStylesheetPath(stylesheet);
43          }
44  
45      }
46  
47  
48  
49  }