Package com.eteks.sweethome3d.model

Examples of com.eteks.sweethome3d.model.TextureImage


        wall1.getThickness(), home.getWallHeight(), wall1.getHeightAtEnd(),
        wall1.getLeftSideColor(), wall1.getLeftSideTexture(),
        wall1.getRightSideColor(), wall1.getRightSideTexture(), wallController);   
    // 3. Modify wall right side texture with first available texture
    TextureImage firstTexture = preferences.getTexturesCatalog().getCategories().get(0).getTexture(0);
    wall1.setRightSideColor(null);
    wall1.setRightSideTexture(new HomeTexture(firstTexture));
    wallController = new WallController(home, preferences, viewFactory, null, null);
    assertWallControllerEquals(wall1.getXStart(), wall1.getYStart(),
        wall1.getXEnd(), wall1.getYEnd(),
View Full Code Here


        (JSlider)TestUtilities.getField(panel, "wallsTransparencySlider");
    // Check edited values
    float oldCameraFieldOfView = observerCamera.getFieldOfView();
    float oldCameraHeight = observerCamera.getHeight();
    int oldGroundColor = home.getEnvironment().getGroundColor();
    TextureImage oldGroundTexture = home.getEnvironment().getGroundTexture();
    int oldSkyColor = home.getEnvironment().getSkyColor();
    int oldLightColor = home.getEnvironment().getLightColor();
    float oldWallsAlpha = home.getEnvironment().getWallsAlpha();
    assertEquals("Wrong field of view", (int)Math.round(Math.toDegrees(oldCameraFieldOfView)),
        observerFieldOfViewSpinner.getValue());
View Full Code Here

      this.wallPatternComboBox = new JComboBox(new DefaultComboBoxModel(patterns.toArray()));
      this.wallPatternComboBox.setRenderer(new DefaultListCellRenderer() {
          @Override
          public Component getListCellRendererComponent(final JList list,
              Object value, int index, boolean isSelected, boolean cellHasFocus) {
            TextureImage wallPattern = (TextureImage)value;
            final Component component = super.getListCellRendererComponent(
                list, "", index, isSelected, cellHasFocus);
            final BufferedImage patternImage = SwingTools.getPatternImage(
                wallPattern, list.getBackground(), list.getForeground());
            setIcon(new Icon() {
View Full Code Here

          }
        });
      dialog.setVisible(true);
      dialog.dispose();
      if (Integer.valueOf(JOptionPane.OK_OPTION).equals(optionPane.getValue())) {
        TextureImage selectedTexture = getPreviewTexture();
        if (selectedTexture instanceof HomeTexture
            || selectedTexture == null) {
          this.controller.setTexture((HomeTexture)selectedTexture);
        } else {
          this.controller.setTexture(new HomeTexture(selectedTexture));
View Full Code Here

   * Sets how furniture should be displayed in plan, and notifies
   * listeners of this change.
   */
  public void setWallPattern(TextureImage wallPattern) {
    if (this.wallPattern != wallPattern) {
      TextureImage oldWallPattern = this.wallPattern;
      this.wallPattern = wallPattern;
      this.propertyChangeSupport.firePropertyChange(Property.WALL_PATTERN.name(),
          oldWallPattern, wallPattern);
    }
  }
View Full Code Here

TOP

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

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.