Package net.rim.device.api.unifiedsearch.entity

Examples of net.rim.device.api.unifiedsearch.entity.SearchableEntity


        }

        final Object element = _displayables.elementAt(index);

        if (element instanceof SearchableEntity) {
            final SearchableEntity item = (SearchableEntity) element;

            final int rowHeight = listField.getRowHeight();

            // Paint icon for this item/searchable
            Image image = item.getIcon();
            if (image == null) {
                image = item.getSearchable().getIcon();
            }
            if (image != null) {
                // Paint icon with equal height and width
                image.paint(graphics, 3, y - y % rowHeight, rowHeight,
                        rowHeight);
            }

            // Build up display text
            final StringBuffer buffer = new StringBuffer();
            final String title = item.getTitle();
            final String summary = item.getSummary();
            final boolean equal = title.equals(summary);
            if (title != null) {
                buffer.append(title);
                if (summary != null && summary.length() != 0 && !equal) {
                    buffer.append(", ");
View Full Code Here

TOP

Related Classes of net.rim.device.api.unifiedsearch.entity.SearchableEntity

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.