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