Class Index | File Index

Classes


Class Label


Extends HomeObject.

Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Label(text, x, y)
A free label.
Method Summary
Method Attributes Method Name and Description
 
Adds the property change listener in parameter to this label.
 
Returns a clone of this label.
 
containsPoint(x, y, margin)
Returns true if this text is at the point at (x, y) with a given margin.
 
Returns the angle in radians around vertical axis used to display this label.
 
Returns the color used to display the text of this label.
 
Returns the elevation of this label on its level.
 
Returns the elevation of this label from the ground according to the elevation of its level.
 
Returns the level which this label belongs to.
 
Returns the color used to outline the text of this label.
 
Returns the pitch angle in radians used to rotate this label around horizontal axis in 3D.
 
Returns the point of this label.
 
Returns the style used to display the text of this label.
 
Returns the text of this label.
 
getX()
Returns the abscissa of the text of this label.
 
getY()
Returns the ordinate of the text of this label.
 
intersectsRectangle(x0, y0, x1, y1)
Returns true if the point of this label is contained in the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).
 
isAtLevel(level)
Returns true if this label is at the given level or at a level with the same elevation and a smaller elevation index.
 
move(dx, dy)
Moves this label of (dx, dy) units.
 
Removes the property change listener in parameter from this label.
 
setAngle(angle)
Sets the angle in radians around vertical axis used to display this label.
 
setColor(color)
Sets the color used to display the text of this label.
 
setElevation(elevation)
Sets the elevation of this label on its level.
 
setLevel(level)
Sets the level of this label.
 
setOutlineColor(outlineColor)
Sets the color used to outline the text of this label.
 
setPitch(pitch)
Sets the angle in radians used to rotate this label around horizontal axis in 3D.
 
setStyle(style)
Sets the style used to display the text of this label.
 
setText(text)
Sets the text of this label.
 
setX(x)
Sets the abscissa of the text of this label.
 
setY(y)
Sets the ordinate of the text of this label.
Methods borrowed from class HomeObject:
getProperty, getPropertyNames, setProperty
Class Detail
Label(text, x, y)
A free label.
Author: Emmanuel Puybaret.
Parameters:
{string} text
{number} x
{number} y
Method Detail
addPropertyChangeListener(listener)
Adds the property change listener in parameter to this label.
Parameters:
{PropertyChangeListener} listener

{Label} clone()
Returns a clone of this label.
Returns:
{Label}

{boolean} containsPoint(x, y, margin)
Returns true if this text is at the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{number} getAngle()
Returns the angle in radians around vertical axis used to display this label.
Returns:
{number}

{number} getColor()
Returns the color used to display the text of this label.
Returns:
{number}

{number} getElevation()
Returns the elevation of this label on its level.
Returns:
{number}
See:
#getPitch()

{number} getGroundElevation()
Returns the elevation of this label from the ground according to the elevation of its level.
Returns:
{number}

{Level} getLevel()
Returns the level which this label belongs to.
Returns:
{Level}

{number} getOutlineColor()
Returns the color used to outline the text of this label.
Returns:
{number}

{number} getPitch()
Returns the pitch angle in radians used to rotate this label around horizontal axis in 3D.
Returns:
{number} an angle in radians or null if the label shouldn't be displayed in 3D. A pitch angle equal to 0 should make this label fully visible when seen from top.

{Array} getPoints()
Returns the point of this label.
Returns:
{Array} an array of the (x,y) coordinates of this label.

{TextStyle} getStyle()
Returns the style used to display the text of this label.
Returns:
{TextStyle}

{string} getText()
Returns the text of this label.
Returns:
{string}

{number} getX()
Returns the abscissa of the text of this label.
Returns:
{number}

{number} getY()
Returns the ordinate of the text of this label.
Returns:
{number}

{boolean} intersectsRectangle(x0, y0, x1, y1)
Returns true if the point of this label is contained in the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).
Parameters:
{number} x0
{number} y0
{number} x1
{number} y1
Returns:
{boolean}

{boolean} isAtLevel(level)
Returns true if this label is at the given level or at a level with the same elevation and a smaller elevation index.
Parameters:
{Level} level
Returns:
{boolean}

move(dx, dy)
Moves this label of (dx, dy) units.
Parameters:
{number} dx
{number} dy

removePropertyChangeListener(listener)
Removes the property change listener in parameter from this label.
Parameters:
{PropertyChangeListener} listener

setAngle(angle)
Sets the angle in radians around vertical axis used to display this label. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{number} angle

setColor(color)
Sets the color used to display the text of this label. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{number} color

setElevation(elevation)
Sets the elevation of this label on its level. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{number} elevation

setLevel(level)
Sets the level of this label. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{Level} level

setOutlineColor(outlineColor)
Sets the color used to outline the text of this label. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{number} outlineColor

setPitch(pitch)
Sets the angle in radians used to rotate this label around horizontal axis in 3D. Once this label is updated, listeners added to this label will receive a change notification. Pitch axis is horizontal transverse axis.
Parameters:
{number} pitch

setStyle(style)
Sets the style used to display the text of this label. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{TextStyle} style

setText(text)
Sets the text of this label. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{string} text

setX(x)
Sets the abscissa of the text of this label. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{number} x

setY(y)
Sets the ordinate of the text of this label. Once this label is updated, listeners added to this label will receive a change notification.
Parameters:
{number} y

© Copyrights 2017 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 25 2017 16:36:09 GMT+0200 (CEST)