Package com.eteks.sweethome3d.model

Examples of com.eteks.sweethome3d.model.FurnitureCatalog


      addPieceOfFurniture(isDoorOrWindow()
          ? new HomeDoorOrWindow((DoorOrWindow)newPiece)
          : new HomePieceOfFurniture(newPiece));
    }
    // Remove the edited piece from catalog
    FurnitureCatalog catalog = this.preferences.getFurnitureCatalog();
    if (this.piece != null) {
      catalog.delete(this.piece);
    }
    // If a category exists, add new piece to catalog
    if (this.category != null) {
      catalog.add(this.category, newPiece);
    }
  }
View Full Code Here


  /**
   * Reloads furniture default catalogs.
   */
  private void updateFurnitureDefaultCatalog() {
    // Delete default pieces of current furniture catalog         
    FurnitureCatalog furnitureCatalog = getFurnitureCatalog();
    for (FurnitureCategory category : furnitureCatalog.getCategories()) {
      for (CatalogPieceOfFurniture piece : category.getFurniture()) {
        if (!piece.isModifiable()) {
          furnitureCatalog.delete(piece);
        }
      }
    }
    // Read again default furniture catalog with new default locale
    // Add default pieces that don't have homonym among user catalog
    FurnitureCatalog defaultFurnitureCatalog =
        new DefaultFurnitureCatalog(this, getFurnitureLibrariesPluginFolders());
    for (FurnitureCategory category : defaultFurnitureCatalog.getCategories()) {
      for (CatalogPieceOfFurniture piece : category.getFurniture()) {
        try {
          furnitureCatalog.add(category, piece);
        } catch (IllegalHomonymException ex) {
          // Ignore pieces that have the same name as an existing piece
View Full Code Here

TOP

Related Classes of com.eteks.sweethome3d.model.FurnitureCatalog

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.