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.DruExpandingTextArea;
9
10
11 public class ExpandingTextArea extends TextArea {
12
13 public boolean autoResize = false;
14
15 public DruPanel instantiatePanel() {
16 return new DruExpandingTextArea(action, width, height);
17 }
18
19
20 public void populatePanel(DruPanel dp, Context ctx, GUIPath gpath) {
21
22 DruExpandingTextArea dta = (DruExpandingTextArea)dp;
23
24 dta.setEditable(editable);
25
26 if (antialias) {
27 dta.setAntialiased();
28 }
29 if (fontSize > 5) {
30 dta.setFontSize(fontSize);
31 }
32
33 if (padding > 0) {
34 dta.setPadding(padding);
35 }
36
37 if (autoResize) {
38 dta.setAutoResize(true);
39 }
40
41 }
42
43 }