Package org.jdesktop.swingx.demos.search

Examples of org.jdesktop.swingx.demos.search.Contributor


        // custom String representation: concat various element fields
        StringValue sv = new StringValue() {

            public String getString(Object value) {
                if (value instanceof Contributor) {
                    Contributor c = (Contributor) value;
                    return c.getFirstName() + " " + c.getLastName() + " (" + c.getMerits() + ")";
                }
                return StringValues.TO_STRING.getString(value);
            }
           
        };
View Full Code Here


        // against a fixed value and returns true if "near"
        public boolean isHighlighted(Component renderer,
                ComponentAdapter adapter) {
            if (compare == null) return false;
            if (!(adapter.getValue() instanceof Contributor)) return false;
            Contributor contributor = (Contributor) adapter.getValue();
            return contributor.getMerits() >= compare.getMerits() - 5 &&
                contributor.getMerits() <= compare.getMerits() + 5;
        }
View Full Code Here

        stringValues = new HashMap<String, StringValue>();
        StringValue nameValue = new StringValue() {

            public String getString(Object value) {
                if (value instanceof Contributor) {
                    Contributor c = (Contributor) value;
                    return c.getLastName() + ", " + c.getFirstName();
                }
                return StringValues.TO_STRING.getString(value);
            }
           
        };
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.demos.search.Contributor

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.