Package com.tivo.hme.bananas

Examples of com.tivo.hme.bananas.BText


        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


            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);
        if (font != null) {
            text.setFont(font);
        }

        int maxWidth = parent.getWidth() - 60;
       
        if (showingRatings) {
            BSkin.Element star = skin.get("starSmall");
            BSkin.Element starGlow = skin.get("starGlowSmall");
            int width = 5*(star.getWidth()+1);
            maxWidth -= width;
            RatingsView ratings = new RatingsView(parent,
                    maxWidth, 0, width, parent.getHeight(), star, starGlow, 1);
           
            if (item.getMyRating() != 0) {
                ratings.setRating(item.getMyRating(), true);
            } else {
                ratings.setRating(item.getRating(), false);
            }
        }

        int maxlen = maxWidth/10;
        String title = item.getTitle();
        if (title != null && title.length() > maxlen) {
            title = title.substring(0, maxlen) + "...";
        }
        text.setValue(title);
    }
View Full Code Here

        super(app);
        setName(name);
       
        int safeTitleH = app.getSafeTitleHorizontal();
        int safeTitleV = app.getSafeTitleVertical();
        titleView = new BText(getNormal(), safeTitleH + 60, safeTitleV,
                getWidth() - (safeTitleH + 60 + safeTitleV), 54, true);
        titleView.setColor(tivoYellow);
        titleView.setShadow(Color.black, 3);
        titleView.setFlags(RSRC_HALIGN_CENTER);
        titleView.setFont("default-48.font");
View Full Code Here

        int top = 0;
        int left = 150;
       
        if (!isHighDef()) {
            //the short summary
            summary = new BText(scrollPane, left, top, getContentRight()-left, 91);
            summary.setFlags(RSRC_HALIGN_LEFT | RSRC_VALIGN_TOP | RSRC_TEXT_WRAP);
            summary.setFont(labelFont);
            top += 96;
        }
       
        //the actor info
        starring = new BText(scrollPane, left, top, getContentRight()-left, labelHeight);
        starring.setColor(tivoYellow);
        starring.setShadow(Color.black, 3);
        starring.setFlags(RSRC_HALIGN_LEFT | RSRC_VALIGN_TOP);
        starring.setFont(labelFont);
        top += labelHeight;
       
        //the director info
        director = new BText(scrollPane, left, top, getContentRight()-left, labelHeight);
        director.setColor(tivoYellow);
        director.setShadow(Color.black, 3);
        director.setFlags(RSRC_HALIGN_LEFT | RSRC_VALIGN_TOP);
        director.setFont(labelFont);
        top += labelHeight;
       
        //the mpaa rating
        mpaa = new BText(scrollPane, left, top, getContentRight()-left, labelHeight);
        mpaa.setColor(tivoYellow);
        mpaa.setShadow(Color.black, 3);
        mpaa.setFlags(RSRC_HALIGN_LEFT | RSRC_VALIGN_TOP);
        mpaa.setFont(labelFont);
        top += labelHeight;
       
        //the movie category
        category = new BText(scrollPane, left, top, getContentRight()-left, labelHeight);
        category.setColor(tivoYellow);
        category.setShadow(Color.black, 3);
        category.setFlags(RSRC_HALIGN_LEFT | RSRC_VALIGN_TOP);
        category.setFont(labelFont);
        top += labelHeight;
       
        //the availability
        availability = new BText(scrollPane, left, top, getContentRight()-left, labelHeight);
        availability.setColor(tivoYellow);
        availability.setShadow(Color.black, 3);
        availability.setFlags(RSRC_HALIGN_LEFT | RSRC_VALIGN_TOP);
        availability.setFont(labelFont);

        top = icon.getY() + icon.getHeight() + 20;
       
        //the full description
        description = new BText(scrollPane, 0, top, scrollPane.getWidth(), 25);
        description.setFlags(RSRC_HALIGN_LEFT | RSRC_VALIGN_TOP | RSRC_TEXT_WRAP);
        description.setFont(fontRes);

        setFocusDefault(modifyButton);
    }
View Full Code Here

    }
   
    protected void initUI() {
    //the message box
        if (isHighDef()) {
            messageBox = new BText(getNormal(), getContentX(), getContentY(),
                    getContentWidth(), getContentHeight());
            messageBox.setFont("default-32.font");
        } else {
            messageBox = new BText(getNormal(), getContentX(), getContentY(),
                    getContentWidth(), getContentHeight());
            messageBox.setFont("default-24.font");
        }
        messageBox.setFlags(RSRC_HALIGN_LEFT | RSRC_VALIGN_TOP | RSRC_TEXT_WRAP);
       
View Full Code Here

    @Override
    protected void createRow(BView parent, int index) {
      Object item = get(index);

          BText text = new BText(parent, 60, 0, parent.getWidth() - 70, parent.getHeight());
          text.setFlags(RSRC_HALIGN_LEFT);
          text.setShadow(true);
            if (font != null) {
                text.setFont(font);
            }
         
          String title = null;
      if (item instanceof Category) {
        Category cat = (Category)item;
        title = cat.getTitle();
      } else {
        title = item.toString();
      }
          text.setValue(title);
    }
View Full Code Here

    /**
     * create a row that displays text
     */
    protected void createRow(BView parent, int index) {
      BText text = new BText(parent, 20, 4, parent.getWidth() - 40, parent.getHeight() - 4);
      text.setShadow(true);
            if (font != null) {
                text.setFont(font);
            }
      text.setFlags(RSRC_HALIGN_LEFT);

            Class cls = (Class)get(index);
            String key = cls.getSimpleName();
      text.setValue(RESOURCES.getString("mainMenu." + key));
    }
View Full Code Here

TOP

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

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.