Class Index | File Index

Classes


Class DimensionLine


Extends HomeObject.

Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DimensionLine(xStart, yStart, xEnd, yEnd, offset)
Creates a dimension line from (xStart,yStart) to (xEnd, yEnd), with a given offset.
Method Summary
Method Attributes Method Name and Description
 
Adds the property change listener in parameter to this dimension line.
 
Returns a clone of this dimension line.
 
Returns true if the extension line at the end of this dimension line contains the point at (x, y) with a given margin around the extension line.
 
containsPoint(x, y, margin)
Returns true if this dimension line contains the point at (x, y) with a given margin.
 
Returns true if the extension line at the start of this dimension line contains the point at (x, y) with a given margin around the extension line.
 
Returns the length of this dimension line.
 
Returns the text style used to display dimension line length.
 
Returns the level which this dimension line belongs to.
 
Returns the offset of this dimension line.
 
Returns the points of the rectangle surrounding this dimension line and its extension lines.
 
Returns the end point abscissa of this dimension line.
 
Returns the start point abscissa of this dimension line.
 
Returns the end point ordinate of this dimension line.
 
Returns the start point ordinate of this dimension line.
 
intersectsRectangle(x0, y0, x1, y1)
Returns true if this dimension line intersects with the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).
 
isAtLevel(level)
Returns true if this dimension line is at the given level or at a level with the same elevation and a smaller elevation index.
 
isMiddlePointAt(x, y, margin)
Returns true if the middle point of this dimension line is the point at (x, y) with a given margin.
 
move(dx, dy)
Moves this dimension line of (dx, dy) units.
 
Removes the property change listener in parameter from this dimension line.
 
setLengthStyle(lengthStyle)
Sets the text style used to display dimension line length.
 
setLevel(level)
Sets the level of this dimension line.
 
setOffset(offset)
Sets the offset of this dimension line.
 
setXEnd(xEnd)
Sets the end point abscissa of this dimension line.
 
setXStart(xStart)
Sets the start point abscissa of this dimension line.
 
setYEnd(yEnd)
Sets the end point ordinate of this dimension line.
 
setYStart(yStart)
Sets the start point ordinate of this dimension line.
Methods borrowed from class HomeObject:
getProperty, getPropertyNames, setProperty
Class Detail
DimensionLine(xStart, yStart, xEnd, yEnd, offset)
Creates a dimension line from (xStart,yStart) to (xEnd, yEnd), with a given offset.
Author: Emmanuel Puybaret.
Parameters:
{number} xStart
{number} yStart
{number} xEnd
{number} yEnd
{number} offset
Method Detail
addPropertyChangeListener(listener)
Adds the property change listener in parameter to this dimension line.
Parameters:
{PropertyChangeListener} listener

{DimensionLine} clone()
Returns a clone of this dimension line.
Returns:
{DimensionLine}

{boolean} containsEndExtensionLineAt(x, y, margin)
Returns true if the extension line at the end of this dimension line contains the point at (x, y) with a given margin around the extension line.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

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

{boolean} containsStartExtensionLinetAt(x, y, margin)
Returns true if the extension line at the start of this dimension line contains the point at (x, y) with a given margin around the extension line.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{number} getLength()
Returns the length of this dimension line.
Returns:
{number}

{TextStyle} getLengthStyle()
Returns the text style used to display dimension line length.
Returns:
{TextStyle}

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

{number} getOffset()
Returns the offset of this dimension line.
Returns:
{number}

{Array} getPoints()
Returns the points of the rectangle surrounding this dimension line and its extension lines.
Returns:
{Array} an array of the 4 (x,y) coordinates of the rectangle.

{number} getXEnd()
Returns the end point abscissa of this dimension line.
Returns:
{number}

{number} getXStart()
Returns the start point abscissa of this dimension line.
Returns:
{number}

{number} getYEnd()
Returns the end point ordinate of this dimension line.
Returns:
{number}

{number} getYStart()
Returns the start point ordinate of this dimension line.
Returns:
{number}

{boolean} intersectsRectangle(x0, y0, x1, y1)
Returns true if this dimension line intersects with 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 dimension line is at the given level or at a level with the same elevation and a smaller elevation index.
Parameters:
{Level} level
Returns:
{boolean}

{boolean} isMiddlePointAt(x, y, margin)
Returns true if the middle point of this dimension line is the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

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

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

setLengthStyle(lengthStyle)
Sets the text style used to display dimension line length. Once this dimension line is updated, listeners added to it will receive a change notification.
Parameters:
{TextStyle} lengthStyle

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

setOffset(offset)
Sets the offset of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} offset

setXEnd(xEnd)
Sets the end point abscissa of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} xEnd

setXStart(xStart)
Sets the start point abscissa of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} xStart

setYEnd(yEnd)
Sets the end point ordinate of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} yEnd

setYStart(yStart)
Sets the start point ordinate of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{number} yStart

© 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:08 GMT+0200 (CEST)