Package com.eteks.sweethome3d.model

Examples of com.eteks.sweethome3d.model.CatalogDoorOrWindow


        BigDecimal piecePrice = price != null ? price : piece.getPrice();
        BigDecimal pieceValueAddedTaxPercentage = valueAddedTaxPercentage != null
            ? valueAddedTaxPercentage : piece.getValueAddedTaxPercentage();
       
        if (piece instanceof CatalogDoorOrWindow) {
          CatalogDoorOrWindow opening = (CatalogDoorOrWindow)piece;
          piece = new CatalogDoorOrWindow(pieceId, pieceName, pieceDescription,
              pieceIcon, opening.getPlanIcon(), pieceModel,
              pieceWidth, pieceDepth, pieceHeight, pieceElevation, pieceMovable,
              opening.getWallThickness(), opening.getWallDistance(), opening.getSashes(),
              pieceModelRotation, pieceCreator, pieceResizable, pieceDeformable, piece.isTexturable(),
              piecePrice, pieceValueAddedTaxPercentage);
        } else if (piece instanceof CatalogLight) {
          CatalogLight light = (CatalogLight)piece;
          piece = new CatalogLight(pieceId, pieceName, pieceDescription,
              pieceIcon, light.getPlanIcon(), pieceModel,
              pieceWidth, pieceDepth, pieceHeight, pieceElevation, pieceMovable, light.getLightSources(),
              pieceModelRotation, pieceCreator, pieceResizable, pieceDeformable, piece.isTexturable(),
              piecePrice, pieceValueAddedTaxPercentage);
        } else {
          if (doorOrWindow != null && doorOrWindow) {
            piece = new CatalogDoorOrWindow(pieceId, pieceName, pieceDescription,
                pieceIcon, piece.getPlanIcon(), pieceModel,
                pieceWidth, pieceDepth, pieceHeight, pieceElevation, pieceMovable,
                1, 0, new Sash [0],
                pieceModelRotation, pieceCreator, pieceResizable, pieceDeformable, piece.isTexturable(),
                piecePrice, pieceValueAddedTaxPercentage);
View Full Code Here


      float wallThicknessPercentage = getOptionalFloat(
          resource, PropertyKey.DOOR_OR_WINDOW_WALL_THICKNESS.getKey(index), depth) / depth;
      float wallDistancePercentage = getOptionalFloat(
          resource, PropertyKey.DOOR_OR_WINDOW_WALL_DISTANCE.getKey(index), 0) / depth;
      Sash [] sashes = getDoorOrWindowSashes(resource, index, width, depth);
      return new CatalogDoorOrWindow(id, name, description, icon, planIcon, model,
          width, depth, height, elevation, movable,
          wallThicknessPercentage, wallDistancePercentage, sashes, modelRotation, creator,
          resizable, deformable, texturable, price, valueAddedTaxPercentage);
    } else {
      LightSource [] lightSources = getLightSources(resource, index, width, depth, height);
View Full Code Here

      }
      categoryFurnitureHomonymsCounter.put(piece, ++pieceHomonymCounter);
      // Try to add piece again to catalog with a suffix indicating its sequence
      String suffixedName = String.format(HOMONYM_FURNITURE_FORMAT, piece.getName(), pieceHomonymCounter);
      if (piece instanceof CatalogDoorOrWindow) {
        CatalogDoorOrWindow doorOrWindow = (CatalogDoorOrWindow)piece;
        piece = new CatalogDoorOrWindow(doorOrWindow.getId(), suffixedName,
            doorOrWindow.getDescription(), doorOrWindow.getIcon(), doorOrWindow.getPlanIcon(), doorOrWindow.getModel(),
            doorOrWindow.getWidth(), doorOrWindow.getDepth(), doorOrWindow.getHeight(), doorOrWindow.getElevation(),
            doorOrWindow.isMovable(), doorOrWindow.getWallThickness(),
            doorOrWindow.getWallDistance(), doorOrWindow.getSashes(),
            doorOrWindow.getModelRotation(), doorOrWindow.getCreator(),
            doorOrWindow.isResizable(), doorOrWindow.isDeformable(), doorOrWindow.isTexturable(),
            doorOrWindow.getPrice(), doorOrWindow.getValueAddedTaxPercentage());
      } else if (piece instanceof CatalogLight) {
        CatalogLight light = (CatalogLight)piece;
        piece = new CatalogLight(light.getId(), suffixedName,
            light.getDescription(), light.getIcon(), light.getPlanIcon(), light.getModel(),
            light.getWidth(), light.getDepth(), light.getHeight(), light.getElevation(),
View Full Code Here

   */
  @Override
  public void finish() {
    CatalogPieceOfFurniture newPiece;
    if (isDoorOrWindow()) {
      newPiece = new CatalogDoorOrWindow(getName(), getIcon(), getModel(),
          getWidth(), getDepth(), getHeight(), getElevation(),
          isMovable(), 1, 0, new Sash [0], getColor(),
          getModelRotation(), isBackFaceShown(),
          getIconYaw(), isProportional());
    } else {
View Full Code Here

      boolean proportional = preferences.getBoolean(FURNITURE_PROPORTIONAL + i, true);

      FurnitureCategory pieceCategory = new FurnitureCategory(category);
      CatalogPieceOfFurniture piece;
      if (doorOrWindow) {
        piece = new CatalogDoorOrWindow(name, icon, model,
            width, depth, height, elevation, movable, 1, 0, new Sash [0],
            color, modelRotation, backFaceShown, iconYaw, proportional);
      } else {
        piece = new CatalogPieceOfFurniture(name, icon, model,
            width, depth, height, elevation, movable,
View Full Code Here

TOP

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

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.