Package com.tivo.hme.bananas

Examples of com.tivo.hme.bananas.BView


     *            the new element
     */
    @SuppressWarnings("unchecked")
    public Object set(int index, Object element) {
        Object obj = elements.set(index, element);
        BView v = (BView) rows.set(index, null);
        if (v != null) {
            // we have to remove() old views
            v.remove();
        }

        // fix the focus if necessary
        if (v.hasFocus()) {
            getScreen().setFocus(getRow(index));
        }

        refresh();
        return obj;
View Full Code Here


     * @param index
     *            where to remove the element
     */
    public Object remove(int index) {
        Object o = elements.remove(index);
        BView v = (BView) rows.remove(index);
        if (v != null) {
            // we have to remove() old views
            v.remove();
        }
        touch(index, -1);
        return o;
    }
View Full Code Here

        public BScreen getScreen() {
            return BMovableList.this.getScreen();
        }

        public BRect getHighlightBounds() {
            BView row = getRow();
            if (row != null) {
                return row.getHighlightBounds();
            }
            int width = getWidth();
            if (isMutable()) {
                width = width - getUpDownWidth() - 5;
            }
View Full Code Here

            }
            return toScreenBounds(new BRect(0, 0, width, rowHeight));
        }

        public boolean getHighlightIsVisible(int visible) {
            BView row = getRow();
            boolean result = (row != null) ? row.getHighlightIsVisible(visible): false;
            if (!result) {
                BView upDown = getUpDownButton();
                result = (upDown != null) ? upDown.getHighlightIsVisible(visible): false;
            }
            return result;
        }
View Full Code Here

        public BScreen getScreen() {
            return BMovableList.this.getScreen();
        }

        public BRect getHighlightBounds() {
            BView upDown = getUpDownButton();
            if (upDown != null) {
                return upDown.getHighlightBounds();
            }
            return toScreenBounds(new BRect(getWidth()-getUpDownWidth(), 0, getUpDownWidth(), rowHeight));
        }
View Full Code Here

            }
            return toScreenBounds(new BRect(getWidth()-getUpDownWidth(), 0, getUpDownWidth(), rowHeight));
        }

        public boolean getHighlightIsVisible(int visible) {
            BView row = getRow();
            boolean result = (row != null) ? row.getHighlightIsVisible(visible): false;
            if (!result) {
                BView upDown = getUpDownButton();
                result = (upDown != null) ? isMutable() && upDown.getHighlightIsVisible(visible): false;
            }
            return result;
        }
View Full Code Here

TOP

Related Classes of com.tivo.hme.bananas.BView

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.