Red Hat Web Application Framework 6.1 Manuale Utente Pagina 141

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 230
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 140
Chapter 11. Services Tutorials 127
Category movies = new Category("Movies", "long television shows");
// Create the Romantic Comedies category under the Movies category.
Category romance = new Category("Romantic Comedies",
"Comedies with love stories");
romance.setDefaultParentCategory(movies);
// Create the Titanic category under the Romantic Comedies category.
Category titanic = new Category("Titanic", "A category for large movies");
// set this as the default category
titanic.setDefaultParentCategory(romance);
// Create the Drama category under the Movies category.
Category drama = new Category("Drama", "long, not funny stories");
// Make Drama a parent category (but not the default parent) of Titanic.
drama.addChild(titanic);
// Finally, make movies a parent of Drama
drama.setDefaultParentCategory(movies);
Example 11-1. Creating a new category
Vedere la pagina 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 229 230

Commenti su questo manuale

Nessun commento