Examples of BView


Examples of com.tivo.hme.bananas.BView

        //NOTE: this is a big hack because the API is not extendable
        String prefix = HDKeyboard.class.getPackage().getName().replace('.', '/') + "/images/";
       
        //move the keyboard down
        BView kbBgImage = (BView)getChild(0);
        kbBgImage.setLocation(0, 80);
       
        //modify the resource of the text input fields
        BView dataField = (BView)getChild(getChildCount()-1);
        dataField.setBounds(0, 0, textEntryWidth, 70);
       
        BView dataFieldLeft = (BView)dataField.getChild(0);
        dataFieldLeft.setBounds(0, 0, textEntryWidth - 40, 70);
        dataFieldLeft.clearResource();
        dataFieldLeft.setResource(prefix + "keyboard-datafield.png", RSRC_HALIGN_LEFT);
       
        BView dataFieldRight = (BView)dataField.getChild(1);
        dataFieldRight.setBounds(textEntryWidth - 40, 0, 40, 70);
        dataFieldRight.clearResource();
        dataFieldRight.setResource(prefix + "keyboard-datafield.png", RSRC_HALIGN_RIGHT);

        BText textField = (BText)dataField.getChild(2);
        textField.setBounds(20, 2, dataField.getWidth() - 40, 70);
        textField.setFont("default-36.font");

        if (tips) {
            BView tipsView = new BView(this, 600, 120, 276, 278);
            tipsView.setResource(prefix + "keyboard-tips.png");
        }
    }
View Full Code Here

Examples of com.tivo.hme.bananas.BView

            }
        }
        int iconWidth = 0;
        if (element != null) {
            iconWidth = element.getWidth();
            BView icon = new BView(parent, 20, 0, element.getWidth(), parent.getHeight());
            icon.setResource(element.getResource());
        }
       
        BText text = new BText(parent, iconWidth + 30, 0, parent.getWidth() - 70, parent.getHeight());
        text.setFlags(RSRC_HALIGN_LEFT);
        text.setShadow(true);
View Full Code Here

Examples of com.tivo.hme.bananas.BView

            scrollPane = new BScrollPane(getNormal(), getContentX(), getContentY(),
                    getContentWidth(), getContentHeight() - 22, 25);
        }

        //the icon
        icon = new BView(scrollPane, 0, 0, 130, 182);
       
        int top = 0;
        int left = 150;
       
        if (!isHighDef()) {
View Full Code Here

Examples of com.tivo.hme.bananas.BView

       
        int top = (height-star.getHeight())/2;

        stars = new BView[5];
        for (int i=0; i < stars.length; i++) {
            stars[i] = new BView(this, i*(star.getWidth()+spacing), top,
                    star.getWidth(), star.getHeight(), false);
        }
       
    }
View Full Code Here

Examples of com.tivo.hme.bananas.BView

            // 3. fix rows
            //

            for (int index = fixMin; index < fixMax; ++index) {
                if (index < popMin || index >= popMax) {
                    BView v = (BView) rows.elementAt(index);
                    if (v != null) {
                        v.remove();
                        rows.setElementAt(null, index);
                    }
                } else {
                    getRow(index);
                }
View Full Code Here

Examples of com.tivo.hme.bananas.BView

    public void movePosition(int oldIndex, int newIndex) {
        markModified();
       
        //System.out.println("move o=" + oldIndex + " n=" + newIndex);
        Object moveObject = elements.get(oldIndex);
        BView moveView = (BView)rows.get(oldIndex);
       
        if (oldIndex < newIndex) {
            for (int i=oldIndex; i < newIndex; i++) {
                Object obj = elements.get(i+1);
                BView v = (BView)rows.get(i+1);
               
                elements.set(i, obj);
                rows.set(i, v);
            }
        } else {
            for (int i=oldIndex; i > newIndex; i--) {
                Object obj = elements.get(i-1);
                BView v = (BView)rows.get(i-1);
               
                elements.set(i, obj);
                rows.set(i, v);
            }
        }
View Full Code Here

Examples of com.tivo.hme.bananas.BView

    /**
     * Clear the list.
     */
    public void clear() {
        for (Enumeration e = rows.elements(); e.hasMoreElements();) {
            BView v = (BView) e.nextElement();
            if (v != null) {
                // we have to remove() old views
                if (v.getResource() != null) {
                    v.getResource().remove();
                }
                v.remove();
            }
        }
        elements.clear();
        rows.clear();

View Full Code Here

Examples of com.tivo.hme.bananas.BView

     */
    @SuppressWarnings("unchecked")
    public BView getRow(int index) {
        // Since this is our main accessor this a good place to make sure that
        // we move the row to the correct height.
        BView view = (BView) rows.get(index);
        if (view == null) {
            view = new BView(this, 0, index * rowHeight, getWidth() - getUpDownWidth(), rowHeight);
            view.setFocusable(true);
            view.setHighlights(rowHighlights);
            createRow(view, index);
            rows.set(index, view);
        } else {
            view.setLocation(0, index * rowHeight);
        }
        return view;
    }
View Full Code Here

Examples of com.tivo.hme.bananas.BView

        }
        return view;
    }
   
    public void refreshRow(int index) {
        BView view = (BView) rows.get(index);
        if (view != null) {
            view.remove();
            rows.set(index, null);
        }
        getRow(index);
    }
View Full Code Here

Examples of com.tivo.hme.bananas.BView

        return UPDOWN_WIDTH;
    }
   
    private BView getUpDownButton(int index, Resource animation) {
        if (upDownButton == null) {
            upDownButton = new BView(this, getWidth()-getUpDownWidth(), index * rowHeight, getUpDownWidth(), rowHeight);
            upDownButton.setFocusable(true);
            upDownButton.setHighlights(upDownHighlights);
        } else {
            upDownButton.setLocation(getWidth()-getUpDownWidth(), index * rowHeight, animation);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.