~ubuntu-branches/ubuntu/trusty/libswingx-java/trusty

« back to all changes in this revision

Viewing changes to swingx-beaninfo/src/main/java/org/jdesktop/swingx/JXPromptBeanInfo.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-03-06 00:28:45 UTC
  • mfrom: (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110306002845-escned3cbqp5qx0t
Tags: 1:1.6.2-1
* New upstream release.
* Switch to maven as build system:
  - d/control: drop ant, add maven-debian-helper
  - d/rules: use maven.mk
* d/patches/pom.diff: drop, uneeded since upstream fixed its dependencies.
* d/watch: update to use java.net directly.
* d/rules: force debian version for JARs (Closes: #603495).
* d/copyright: Update to lastest DEP-5 r166.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jdesktop.swingx;
 
2
 
 
3
import java.awt.Font;
 
4
 
 
5
import javax.swing.text.JTextComponent;
 
6
 
 
7
import org.jdesktop.swingx.prompt.PromptSupport.FocusBehavior;
 
8
 
 
9
public abstract class JXPromptBeanInfo extends BeanInfoSupport {
 
10
        protected JXPromptBeanInfo(Class<? extends JTextComponent> beanClass) {
 
11
                super(beanClass);
 
12
        }
 
13
 
 
14
        protected void initialize() {
 
15
                setPreferred(true, "prompt", "promptForeground", "promptBackground", "focusBehavior",
 
16
                                "promptFontStyle");
 
17
                
 
18
                setEnumerationValues(new EnumerationValue[] {
 
19
                                new EnumerationValue("Default", null, "null"),
 
20
                                new EnumerationValue("Plain", Font.PLAIN, "java.awt.Font.PLAIN"),
 
21
                                new EnumerationValue("Bold", Font.BOLD, "java.awt.Font.BOLD"),
 
22
                                new EnumerationValue("Italic", Font.ITALIC, "java.awt.Font.ITALIC"),
 
23
                                new EnumerationValue("Bold & Italic", Font.BOLD | Font.ITALIC,
 
24
                                                "java.awt.Font.BOLD | java.awt.Font.ITALIC") }, "promptFontStyle");
 
25
                setEnumerationValues(new EnumerationValue[] {
 
26
                                new EnumerationValue("Show", FocusBehavior.SHOW_PROMPT,
 
27
                                                "org.jdesktop.xwingx.prompt.PromptSupport.FocusBehavior.SHOW_PROMPT"),
 
28
                                new EnumerationValue("Hide", FocusBehavior.HIDE_PROMPT,
 
29
                                                "org.jdesktop.swingx.prompt.PromptSupport.FocusBehavior.HIDE_PROMPT"),
 
30
                                new EnumerationValue("Highlight", FocusBehavior.HIGHLIGHT_PROMPT,
 
31
                                                "org.jdesktop.swingx.prompt.PromptSupport.FocusBehavior.HIGHLIGHT_PROMPT"), }, "focusBehavior");
 
32
        }
 
33
}