Package org.jdesktop.swingx

Examples of org.jdesktop.swingx.EnumerationValue


        }
    }

    @Override
    public String getJavaInitializationString() {
        EnumerationValue value = values.get(getValue());
        if (value == null) {
            return defaultValue == null ? "null" : defaultValue.getJavaInitializationString();
        } else {
            return value.getJavaInitializationString();
        }
    }
View Full Code Here


        return tags;
    }

    @Override
    public String getAsText() {
        EnumerationValue value = values.get(getValue());
        if (value == null) {
            return defaultValue == null ? null : defaultValue.getName();
        } else {
            return value.getName();
        }
    }
View Full Code Here

        }
    }
   
    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        EnumerationValue v = getValueByName(text);
        if (v == null) {
            //hmmmm, try again but trim text
            if (text != null) {
                v = getValueByName(text.trim());
            }
        }
       
        if (v == null) {
            v = defaultValue;
        }
       
        setValue(v == null ? null : v.getValue());
    }
View Full Code Here

    @Override
    protected void initialize() {
        setHidden(true, "class", "borderOpaque");
        setEnumerationValues(new EnumerationValue[] {
            new EnumerationValue("Leading", SwingConstants.LEADING, "SwingConstants.LEADING"),
            new EnumerationValue("Trailing", SwingConstants.TRAILING, "SwingConstants.TRAILING"),
            new EnumerationValue("East", SwingConstants.EAST, "SwingConstants.EAST"),
            new EnumerationValue("West", SwingConstants.WEST, "SwingConstants.WEST")
        }, "iconPosition");
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.EnumerationValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.