Package design_patterns.strategy

Examples of design_patterns.strategy.Book


        System.exit(0);
    }//GEN-LAST:event_exit_btnActionPerformed

    private void book_reservation_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_book_reservation_btnActionPerformed
        // TODO add your handling code here:
        new ReservationUI(this,new Book()).setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_book_reservation_btnActionPerformed
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);
                        }
                        Book book = new Book (Integer.parseInt((String)jsonObject.get("id")),author,(String) jsonObject.get("name"),(String) jsonObject.get("genre"),date);
                        book.setCount((long) jsonObject.get("count"));
                        login.getBooks().add(book);                 
                        login.getBooks_map().put(book.getId(), book);
                    }
                } catch (ParseException ex) {
                    Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
                }
                flag = true;
View Full Code Here

            }
        }
        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 books_node = new DefaultMutableTreeNode("Books");
        for (int i = 0; i < products.size();i++){
            Book temp = (Book)products.get(i);
            if (temp!=null){
                books_node.add(new javax.swing.tree.DefaultMutableTreeNode(temp.getName()));
            }
        }
       
        return books_node;
       
View Full Code Here

        * 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.book = new Book();
              }
       }
View Full Code Here

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

TOP

Related Classes of design_patterns.strategy.Book

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.