1
2 package org.catacomb.druid.gui.base;
3
4
5 import org.catacomb.druid.swing.DScrollPane;
6 import org.catacomb.interlish.interact.DComponent;
7 import org.catacomb.report.E;
8
9 import java.awt.Color;
10 import java.awt.Dimension;
11
12
13 public class DruScrollPanel extends DruSubcontainerPanel {
14 static final long serialVersionUID = 1001;
15
16 DScrollPane dsp;
17
18
19
20
21 public DruScrollPanel() {
22 super();
23 dsp = new DScrollPane();
24
25 setSingle();
26 getGUIPeer().addDComponent(dsp);
27 }
28
29
30 public void subAddPanel(DruPanel drup) {
31 dsp.setViewportView(drup.getGUIPeer());
32 }
33
34
35 public void subAddDComponent(DComponent dcpt) {
36 dsp.setViewDComponent(dcpt);
37 }
38
39
40
41
42 public void setVerticalScrollbarAsNeeded() {
43 dsp.setVerticalScrollbarAsNeeded();
44 }
45
46 public void setVerticalScrollbarAlways() {
47 dsp.setVerticalScrollBarAlways();
48 }
49
50
51 public void setVerticalScrollbarNever() {
52 dsp.setVerticalScrollbarNever();
53 }
54
55
56 public void setHorizontalScrollbarAsNeeded() {
57 dsp.setHorizontalScrollbarAsNeeded();
58 }
59
60 public void setHorizontalScrollbarAlways() {
61 dsp.setHorizontalScrollbarAlways();
62 }
63
64 public void setHorizontalScrollbarNever() {
65 dsp.setHorizontalScrollbarNever();
66 }
67
68
69
70
71 public void setPreferredSize(int w, int h) {
72 dsp.setPreferredSize(new Dimension(w, h));
73 getGUIPeer().setPreferredSize(new Dimension(w, h));
74 }
75
76
77
78
79
80 public void setBg(Color c) {
81 dsp.setBg(c);
82 super.setBg(c);
83
84 }
85
86
87 public void subRemoveAll() {
88 E.missing();
89 }
90
91
92 }