01: package net.xoetrope.builder.editor.components.swing;
02:
03: import net.xoetrope.swing.XScrollPane;
04: import net.xoetrope.builder.editor.components.PropertyHelper;
05: import net.xoetrope.builder.editor.XPageResource;
06: import java.awt.Component;
07: import javax.swing.JScrollPane;
08: import net.xoetrope.xui.XPage;
09:
10: /**
11: * A helper for the XScrollPane types
12: * <p> Copyright (c) Xoetrope Ltd., 2002-2003</p>
13: * <p> $Revision: 1.9 $</p>
14: */
15: public class XScrollPaneHelper extends PropertyHelper {
16: protected String extraProperties[] = { "HorizontalScrollbar",
17: "VerticalScrollbar" };
18: protected String scrollOptions[] = { "As Needed", "Never", "Always" };
19: protected int horzScrollOptionIds[] = {
20: JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED,
21: JScrollPane.HORIZONTAL_SCROLLBAR_NEVER,
22: JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS };
23: protected int vertScrollOptionIds[] = {
24: JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
25: JScrollPane.VERTICAL_SCROLLBAR_NEVER,
26: JScrollPane.VERTICAL_SCROLLBAR_ALWAYS };
27:
28: public XScrollPaneHelper() {
29: className = XScrollPane.class.toString();
30: componentType = XPage.SCROLLPANE;
31: extraPropertyNames = extraProperties;
32: allowsChildren = true;
33: setListOptions("HorizontalScrollbar",
34: "HorizontalScrollBarPolicy", scrollOptions,
35: horzScrollOptionIds);
36: setListOptions("VerticalScrollbar", "VerticalScrollBarPolicy",
37: scrollOptions, vertScrollOptionIds);
38: }
39: }
|