View Javadoc

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.DruPanel;
8   import org.catacomb.druid.gui.edit.DruTextArea;
9   
10  
11  public class TextArea extends Panel {
12  
13  
14      public String store;
15  
16  
17      public String action;
18  
19      public int width;
20      public int height;
21      public int rows;
22  
23      public boolean editable;
24  
25      public boolean antialias;
26      public int padding;
27      public int fontSize;
28  
29  
30  
31      public TextArea() {
32          editable = true;
33      }
34  
35  
36      public DruPanel instantiatePanel() {
37          if (rows > height) {
38              height = rows;
39          }
40          return new DruTextArea(action, width, height);
41      }
42  
43      public void populatePanel(DruPanel dp, Context ctx, GUIPath gpath) {
44  
45          DruTextArea dta = (DruTextArea)dp;
46  
47          dta.setEditable(editable);
48  
49          if (antialias) {
50              dta.setAntialiased();
51          }
52          if (fontSize > 5) {
53              dta.setFontSize(fontSize);
54          }
55  
56          if (padding > 0) {
57              dta.setPadding(padding);
58          }
59  
60      }
61  
62  }