Class LabelController
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
LabelController(home, x, y, preferences, viewFactory, undoSupport)
Creates the controller of label creation with undo support.
|
Method Attributes | Method Name and Description |
---|---|
addPropertyChangeListener(property, listener)
Adds the property change
listener in parameter to this controller. |
|
createLabel(text, x, y)
Returns a new label instance placed at the given coordinates and added to home.
|
|
displayView(parentView)
Displays the view controlled by this controller.
|
|
Returns the edited text alignment.
|
|
getColor()
Returns the edited color.
|
|
Returns the edited elevation.
|
|
Returns the edited font name or
null for default system font. |
|
Returns the edited font size.
|
|
getPitch()
Returns the edited pitch.
|
|
getText()
Returns the edited text.
|
|
getView()
Returns the view associated with this controller.
|
|
Returns
true if all edited labels use the same font name. |
|
isLabelPartOfBasePlan(label)
Returns
true . |
|
Returns
Boolean.TRUE if all edited labels are viewed in 3D,
or Boolean.FALSE if no label is viewed in 3D. |
|
Controls the modification of selected labels.
|
|
removePropertyChangeListener(property, listener)
Removes the property change
listener in parameter from this controller. |
|
setAlignment(alignment)
Sets the edited text alignment.
|
|
setColor(color)
Sets the edited color.
|
|
setElevation(elevation)
Sets the edited elevation.
|
|
setFontName(fontName)
Sets the edited font name.
|
|
setFontSize(fontSize)
Sets the edited font size.
|
|
setPitch(pitch)
Sets the edited pitch.
|
|
setText(text)
Sets the edited text.
|
|
Updates edited properties from selected labels in the home edited by this controller.
|
Class Detail
LabelController(home, x, y, preferences, viewFactory, undoSupport)
Creates the controller of label creation with undo support.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {Home} home
- {number} x
- {number} y
- {UserPreferences} preferences
- {Object} viewFactory
- {javax.swing.undo.UndoableEditSupport} undoSupport
Method Detail
addPropertyChangeListener(property, listener)
Adds the property change
listener
in parameter to this controller.
- Parameters:
- {string} property
- {PropertyChangeListener} listener
{Label}
createLabel(text, x, y)
Returns a new label instance placed at the given coordinates and added to home.
- Parameters:
- {string} text
- {number} x
- {number} y
- Returns:
- {Label}
displayView(parentView)
Displays the view controlled by this controller.
- Parameters:
- {Object} parentView
{TextStyle.Alignment}
getAlignment()
Returns the edited text alignment.
- Returns:
- {TextStyle.Alignment}
{number}
getColor()
Returns the edited color.
- Returns:
- {number}
{number}
getElevation()
Returns the edited elevation.
- Returns:
- {number}
{string}
getFontName()
Returns the edited font name or
null
for default system font.
- Returns:
- {string}
{number}
getFontSize()
Returns the edited font size.
- Returns:
- {number}
{number}
getPitch()
Returns the edited pitch.
- Returns:
- {number}
{string}
getText()
Returns the edited text.
- Returns:
- {string}
{Object}
getView()
Returns the view associated with this controller.
- Returns:
- {Object}
{boolean}
isFontNameSet()
Returns
true
if all edited labels use the same font name.
- Returns:
- {boolean}
{boolean}
isLabelPartOfBasePlan(label)
Returns
true
.
- Parameters:
- {Label} label
- Returns:
- {boolean}
{boolean}
isPitchEnabled()
Returns
Boolean.TRUE
if all edited labels are viewed in 3D,
or Boolean.FALSE
if no label is viewed in 3D.
- Returns:
- {boolean}
modifyLabels()
Controls the modification of selected labels.
removePropertyChangeListener(property, listener)
Removes the property change
listener
in parameter from this controller.
- Parameters:
- {string} property
- {PropertyChangeListener} listener
setAlignment(alignment)
Sets the edited text alignment.
- Parameters:
- {TextStyle.Alignment} alignment
setColor(color)
Sets the edited color.
- Parameters:
- {number} color
setElevation(elevation)
Sets the edited elevation.
- Parameters:
- {number} elevation
setFontName(fontName)
Sets the edited font name.
- Parameters:
- {string} fontName
setFontSize(fontSize)
Sets the edited font size.
- Parameters:
- {number} fontSize
setPitch(pitch)
Sets the edited pitch.
- Parameters:
- {number} pitch
setText(text)
Sets the edited text.
- Parameters:
- {string} text
updateProperties()
Updates edited properties from selected labels in the home edited by this controller.