Package com.almilli.movierentals

Examples of com.almilli.movierentals.Category


    }

    @Override
    public boolean handleAction(BView view, Object action) {
        if (action.equals("push")) {
            Category selected = categoryList.getSelectedCategory();
            if (selected != null && !selected.getChildren().isEmpty()) {
              //show the subcategory list
              showCategory(selected);

            } else if (selected != null) {
              //browse the movies in the selected category
View Full Code Here


                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

     
      if (links.size() == 0) {
        return;
      }
     
        Category parent = null;
      NodeIterator iter = links.elements();
        while (iter.hasMoreNodes()) {
          LinkTag link = (LinkTag)iter.nextNode();
          Category category = new Category();
          category.setTitle(NodeUtils.getTextData(link));
          category.setId(link.getLink().replaceAll(".*/movieGenres/(.*?)", "$1"));
           
            if (category.getId().indexOf('/') == -1) {
                //it is a root category
                parent = category;
            }
           
            if (parent != null && parent != category) {
View Full Code Here

     
      return categories;
    }
   
    private void parseCategory(LinkTag link, List<Category> categories) throws ParserException {
      Category category = new Category();
      category.setTitle(NodeUtils.getTextData(link));
      category.setId(link.getLink().replaceAll(".*\\?(.*)", "$1"));
     
      if (!categories.contains(category)) {
          categories.add(category);
      }
    }
View Full Code Here

TOP

Related Classes of com.almilli.movierentals.Category

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.