Package design_patterns.strategy

Examples of design_patterns.strategy.Video


        * it calls this method, which resets the string buffer
        */
       public void startElement(String uri, String localName,String qName, Attributes attributes) throws SAXException {
              temp = "";
              if (qName.equalsIgnoreCase("Object")) {
                     this.video = new Video();
              }
       }
View Full Code Here


    }
       private void readList() {
              System.out.println("Names of  the videos '" + this.login.getVideos().size()  + "'.");
              Iterator<Video> it = this.login.getVideos().iterator();
              while (it.hasNext()) {
                  Video aux = it.next();
                  System.out.println(aux.getName());
              }
       }
View Full Code Here

        this.setVisible(false);
    }//GEN-LAST:event_book_reservation_btnActionPerformed

    private void video_reservation_btn1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_video_reservation_btn1ActionPerformed
        // TODO add your handling code here:  
        new ReservationUI(this,new Video()).setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_video_reservation_btn1ActionPerformed
View Full Code Here

                        try {
                            date = sdf.parse((String) jsonObject.get("pub_date"));
                        } catch (java.text.ParseException ex) {
                            Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
                        }
                        Video video = new Video (Integer.parseInt((String)jsonObject.get("id")),author,(String) jsonObject.get("name"),(String) jsonObject.get("genre"),date);
                        video.setCount((long) jsonObject.get("count"));
                        login.getVideos().add(video);              
                        login.getVideos_map().put(video.getId(), video);
                    }
                } catch (ParseException ex) {
                    Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
                }
                flag = true;
View Full Code Here

        this.user_jComboBox.setEnabled(false);
       
        if (this.type instanceof Video){
            this.products=this.menu_window.getLogin_window().getVideos();
            for (int i=0; i<products.size();i++){       
                Video p = (Video)products.get(i);
                this.products_jComboBox.addItem(p.getName());         
            }
        }
        else if (this.type instanceof Book ){
            this.products=this.menu_window.getLogin_window().getBooks();
            for (int i=0; i<products.size();i++){       
                Book p = (Book)products.get(i);
                this.products_jComboBox.addItem(p.getName());         
            }
        }
       
       
    }
View Full Code Here

    public DefaultMutableTreeNode search(ArrayList products) {
        this.decoratedSearch.search(products)//not doing anything
       
        DefaultMutableTreeNode videos_node = new DefaultMutableTreeNode("Videos");
        for (int i = 0; i < products.size();i++){
            Video temp = (Video)products.get(i);
            if (temp!=null){
                videos_node.add(new javax.swing.tree.DefaultMutableTreeNode(temp.getName()));
            }
        }
       
        return videos_node;
    }
View Full Code Here

TOP

Related Classes of design_patterns.strategy.Video

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.