Sweet Home 3D 4.0

com.eteks.sweethome3d.viewcontroller
Class LabelController

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

public class LabelController
extends Object
implements Controller

A MVC controller for label view.

Author:
Emmanuel Puybaret

Nested Class Summary
static class LabelController.Property
          The property that may be edited by the view associated to this controller.
 
Constructor Summary
LabelController(Home home, float x, float y, UserPreferences preferences, ViewFactory viewFactory, UndoableEditSupport undoSupport)
          Creates the controller of label creation with undo support.
LabelController(Home home, UserPreferences preferences, ViewFactory viewFactory, UndoableEditSupport undoSupport)
          Creates the controller of label modifications with undo support.
 
Method Summary
 void addPropertyChangeListener(LabelController.Property property, PropertyChangeListener listener)
          Adds the property change listener in parameter to this controller.
 void createLabel()
          Controls the creation of a label.
 void displayView(View parentView)
          Displays the view controlled by this controller.
 String getText()
          Returns the edited text.
 DialogView getView()
          Returns the view associated with this controller.
protected  boolean isLabelPartOfBasePlan(Label label)
          Returns true.
 void modifyLabels()
          Controls the modification of selected labels.
 void removePropertyChangeListener(LabelController.Property property, PropertyChangeListener listener)
          Removes the property change listener in parameter from this controller.
 void setText(String text)
          Sets the edited text.
protected  void updateProperties()
          Updates edited properties from selected labels in 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

LabelController

public LabelController(Home home,
                       UserPreferences preferences,
                       ViewFactory viewFactory,
                       UndoableEditSupport undoSupport)
Creates the controller of label modifications with undo support.


LabelController

public LabelController(Home home,
                       float x,
                       float y,
                       UserPreferences preferences,
                       ViewFactory viewFactory,
                       UndoableEditSupport undoSupport)
Creates the controller of label creation with undo support.

Method Detail

updateProperties

protected void updateProperties()
Updates edited properties from selected labels in the home edited by this controller.


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(LabelController.Property property,
                                      PropertyChangeListener listener)
Adds the property change listener in parameter to this controller.


removePropertyChangeListener

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


setText

public void setText(String text)
Sets the edited text.


getText

public String getText()
Returns the edited text.


createLabel

public void createLabel()
Controls the creation of a label.


isLabelPartOfBasePlan

protected boolean isLabelPartOfBasePlan(Label label)
Returns true.


modifyLabels

public void modifyLabels()
Controls the modification of selected labels.


Sweet Home 3D 4.0

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