Sweet Home 3D 4.0

com.eteks.sweethome3d.viewcontroller
Class WizardController

java.lang.Object
  extended by com.eteks.sweethome3d.viewcontroller.WizardController
All Implemented Interfaces:
Controller
Direct Known Subclasses:
BackgroundImageWizardController, ImportedFurnitureWizardController, ImportedTextureWizardController

public abstract class WizardController
extends Object
implements Controller

An abstract MVC for a wizard view. Subclasses should create a set of wizard steps with subclasses of WizardControllerStepState and and choose the first step with a call to setStepState. The finish method will be called if user completes the wizard steps correctly.

Author:
Emmanuel Puybaret

Nested Class Summary
static class WizardController.Property
          The properties that the view associated to this controller needs.
protected static class WizardController.WizardControllerStepState
          State of a step in wizard.
 
Constructor Summary
WizardController(UserPreferences preferences, ViewFactory viewFactory)
           
 
Method Summary
 void addPropertyChangeListener(WizardController.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.
abstract  void finish()
          Requires the wizard to finish.
 URL getStepIcon()
          Returns the current step icon.
protected  WizardController.WizardControllerStepState getStepState()
           
 View getStepView()
          Returns the current step view.
 String getTitle()
          Returns the wizard title.
 DialogView getView()
          Returns the view associated with this controller.
 void goBackToPreviousStep()
          Requires to the current step to go back to previous step.
 void goToNextStep()
          Requires to the current step to jump to next step.
 boolean isBackStepEnabled()
          Returns whether back step is enabled or not.
 boolean isLastStep()
          Returns whether this is the last step or not.
 boolean isNextStepEnabled()
          Returns whether next step is enabled or not.
 boolean isResizable()
          Returns whether the wizard is resizable or not.
 void removePropertyChangeListener(WizardController.Property property, PropertyChangeListener listener)
          Removes the property change listener in parameter from this controller.
 void setResizable(boolean resizable)
          Sets whether the wizard is resizable or not.
protected  void setStepState(WizardController.WizardControllerStepState stepState)
          Changes current state of controller.
 void setTitle(String title)
          Sets the wizard title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WizardController

public WizardController(UserPreferences preferences,
                        ViewFactory viewFactory)
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(WizardController.Property property,
                                      PropertyChangeListener listener)
Adds the property change listener in parameter to this controller.


removePropertyChangeListener

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


isBackStepEnabled

public boolean isBackStepEnabled()
Returns whether back step is enabled or not.


isNextStepEnabled

public boolean isNextStepEnabled()
Returns whether next step is enabled or not.


isLastStep

public boolean isLastStep()
Returns whether this is the last step or not.


getStepView

public View getStepView()
Returns the current step view.


getStepIcon

public URL getStepIcon()
Returns the current step icon.


setTitle

public void setTitle(String title)
Sets the wizard title.


getTitle

public String getTitle()
Returns the wizard title.


setResizable

public void setResizable(boolean resizable)
Sets whether the wizard is resizable or not.


isResizable

public boolean isResizable()
Returns whether the wizard is resizable or not.


setStepState

protected void setStepState(WizardController.WizardControllerStepState stepState)
Changes current state of controller.


getStepState

protected WizardController.WizardControllerStepState getStepState()

goToNextStep

public void goToNextStep()
Requires to the current step to jump to next step.


goBackToPreviousStep

public void goBackToPreviousStep()
Requires to the current step to go back to previous step.


finish

public abstract void finish()
Requires the wizard to finish.


Sweet Home 3D 4.0

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