~ubuntu-branches/ubuntu/natty/libswingx-java/natty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package org.jdesktop.swingx;

import java.awt.Font;

import javax.swing.text.JTextComponent;

import org.jdesktop.swingx.prompt.PromptSupport.FocusBehavior;

public abstract class JXPromptBeanInfo extends BeanInfoSupport {
	protected JXPromptBeanInfo(Class<? extends JTextComponent> beanClass) {
		super(beanClass);
	}

	protected void initialize() {
		setPreferred(true, "prompt", "promptForeground", "promptBackground", "focusBehavior",
				"promptFontStyle");
		
		setEnumerationValues(new EnumerationValue[] {
				new EnumerationValue("Default", null, "null"),
				new EnumerationValue("Plain", Font.PLAIN, "java.awt.Font.PLAIN"),
				new EnumerationValue("Bold", Font.BOLD, "java.awt.Font.BOLD"),
				new EnumerationValue("Italic", Font.ITALIC, "java.awt.Font.ITALIC"),
				new EnumerationValue("Bold & Italic", Font.BOLD | Font.ITALIC,
						"java.awt.Font.BOLD | java.awt.Font.ITALIC") }, "promptFontStyle");
		setEnumerationValues(new EnumerationValue[] {
				new EnumerationValue("Show", FocusBehavior.SHOW_PROMPT,
						"org.jdesktop.xwingx.prompt.PromptSupport.FocusBehavior.SHOW_PROMPT"),
				new EnumerationValue("Hide", FocusBehavior.HIDE_PROMPT,
						"org.jdesktop.swingx.prompt.PromptSupport.FocusBehavior.HIDE_PROMPT"),
				new EnumerationValue("Highlight", FocusBehavior.HIGHLIGHT_PROMPT,
						"org.jdesktop.swingx.prompt.PromptSupport.FocusBehavior.HIGHLIGHT_PROMPT"), }, "focusBehavior");
	}
}