01: package org.wingx;
02:
03: import org.wings.*;
04: import org.wings.event.SViewportChangeListener;
05:
06: import java.awt.*;
07:
08: public class XScrollablePanel extends SPanel implements Scrollable {
09: private SScrollPane scrollPane;
10:
11: public XScrollablePanel() {
12: super .setLayout(new SBorderLayout());
13: }
14:
15: public XScrollablePanel(SComponent comp) {
16: this ();
17: add(comp, SBorderLayout.CENTER);
18: }
19:
20: public XScrollablePanel(SComponent comp, SDimension preferredSize) {
21: this ();
22: setPreferredSize(preferredSize);
23: add(comp, SBorderLayout.CENTER);
24: }
25:
26: public Rectangle getScrollableViewportSize() {
27: return null;
28: }
29:
30: public void setViewportSize(Rectangle d) {
31: }
32:
33: public void addViewportChangeListener(SViewportChangeListener l) {
34: }
35:
36: public void removeViewportChangeListener(SViewportChangeListener l) {
37: }
38:
39: public Rectangle getViewportSize() {
40: return null;
41: }
42:
43: public Dimension getPreferredExtent() {
44: return null;
45: }
46:
47: public SScrollPane asScrollPane() {
48: if (scrollPane == null) {
49: scrollPane = new SScrollPane(this);
50: scrollPane.setPreferredSize(SDimension.FULLAREA);
51: scrollPane.setMode(SScrollPane.MODE_COMPLETE);
52: }
53: return scrollPane;
54: }
55: }
|