Sweet Home 3D 4.0

com.eteks.sweethome3d.viewcontroller
Class ObserverCameraController

java.lang.Object
  extended by com.eteks.sweethome3d.viewcontroller.ObserverCameraController
All Implemented Interfaces:
Controller

public class ObserverCameraController
extends Object
implements Controller

A MVC controller for observer camera attributes view.

Author:
Emmanuel Puybaret

Nested Class Summary
static class ObserverCameraController.Property
          The properties that may be edited by the view associated to this controller.
 
Constructor Summary
ObserverCameraController(Home home, UserPreferences preferences, ViewFactory viewFactory)
          Creates the controller of 3D view with undo support.
 
Method Summary
 void addPropertyChangeListener(ObserverCameraController.Property property, PropertyChangeListener listener)
          Adds the property change listener in parameter to this controller.
 void displayView(View parentView)
          Displays the view controlled by this controller.
 float getElevation()
          Returns the edited camera elevation.
 int getFieldOfViewInDegrees()
          Returns the edited observer field of view in degrees.
 float getMinimumElevation()
          Returns the minimum elevation.
 int getPitchInDegrees()
          Returns the edited pitch in degrees.
 DialogView getView()
          Returns the view associated with this controller.
 float getX()
          Returns the edited abscissa.
 float getY()
          Returns the edited ordinate.
 int getYawInDegrees()
          Returns the edited yaw in degrees.
 boolean isElevationAdjusted()
          Returns true if the observer elevation should be adjusted according to the elevation of the selected level.
 boolean isObserverCameraElevationAdjustedEditable()
          Returns true if the adjustment of the observer camera according to the current level is modifiable.
 void modifyObserverCamera()
          Controls the modification of the observer camera of the edited home.
 void removePropertyChangeListener(ObserverCameraController.Property property, PropertyChangeListener listener)
          Removes the property change listener in parameter from this controller.
 void setElevation(float elevation)
          Sets the edited camera elevation.
 void setElevationAdjusted(boolean observerCameraElevationAdjusted)
          Sets whether the observer elevation should be adjusted according to the elevation of the selected level.
 void setFieldOfViewInDegrees(int observerFieldOfViewInDegrees)
          Sets the edited observer field of view in degrees.
 void setPitchInDegrees(int pitchInDegrees)
          Sets the edited pitch in degrees.
 void setX(float x)
          Sets the edited abscissa.
 void setY(float y)
          Sets the edited ordinate.
 void setYawInDegrees(int yawInDegrees)
          Sets the edited yaw in degrees.
protected  void updateProperties()
          Updates edited properties from the 3D attributes of the home edited by this controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObserverCameraController

public ObserverCameraController(Home home,
                                UserPreferences preferences,
                                ViewFactory viewFactory)
Creates the controller of 3D view with undo support.

Method Detail

getView

public DialogView getView()
Returns the view associated with this controller.

Specified by:
getView in interface Controller

displayView

public void displayView(View parentView)
Displays the view controlled by this controller.


addPropertyChangeListener

public void addPropertyChangeListener(ObserverCameraController.Property property,
                                      PropertyChangeListener listener)
Adds the property change listener in parameter to this controller.


removePropertyChangeListener

public void removePropertyChangeListener(ObserverCameraController.Property property,
                                         PropertyChangeListener listener)
Removes the property change listener in parameter from this controller.


updateProperties

protected void updateProperties()
Updates edited properties from the 3D attributes of the home edited by this controller.


setX

public void setX(float x)
Sets the edited abscissa.


getX

public float getX()
Returns the edited abscissa.


setY

public void setY(float y)
Sets the edited ordinate.


getY

public float getY()
Returns the edited ordinate.


setElevation

public void setElevation(float elevation)
Sets the edited camera elevation.


getElevation

public float getElevation()
Returns the edited camera elevation.


getMinimumElevation

public float getMinimumElevation()
Returns the minimum elevation.


isElevationAdjusted

public boolean isElevationAdjusted()
Returns true if the observer elevation should be adjusted according to the elevation of the selected level.


setElevationAdjusted

public void setElevationAdjusted(boolean observerCameraElevationAdjusted)
Sets whether the observer elevation should be adjusted according to the elevation of the selected level.


isObserverCameraElevationAdjustedEditable

public boolean isObserverCameraElevationAdjustedEditable()
Returns true if the adjustment of the observer camera according to the current level is modifiable.


setYawInDegrees

public void setYawInDegrees(int yawInDegrees)
Sets the edited yaw in degrees.


getYawInDegrees

public int getYawInDegrees()
Returns the edited yaw in degrees.


setPitchInDegrees

public void setPitchInDegrees(int pitchInDegrees)
Sets the edited pitch in degrees.


getPitchInDegrees

public int getPitchInDegrees()
Returns the edited pitch in degrees.


setFieldOfViewInDegrees

public void setFieldOfViewInDegrees(int observerFieldOfViewInDegrees)
Sets the edited observer field of view in degrees.


getFieldOfViewInDegrees

public int getFieldOfViewInDegrees()
Returns the edited observer field of view in degrees.


modifyObserverCamera

public void modifyObserverCamera()
Controls the modification of the observer camera of the edited home.


Sweet Home 3D 4.0

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License