Class Index | File Index

Classes


Class Compass


Extends HomeObject.

Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Compass(x, y, diameter)
Creates a compass drawn at the given point.
Method Summary
Method Attributes Method Name and Description
 
Adds the property change listener in parameter to this compass.
 
Returns a clone of this compass.
 
containsPoint(x, y, margin)
Returns true if the disc of this compass contains the point at (x, y) with a given margin.
 
Returns the diameter of this compass.
 
Returns the latitudeInDegrees of this compass in radians.
 
Returns the longitudeInDegrees of this compass in radians.
 
Returns the North direction angle of this compass in radians.
 
Returns the corner points of the square that contains compass disc.
 
Returns the time zone identifier of this compass.
 
getX()
Returns the abscissa of the center of this compass.
 
getY()
Returns the ordinate of the center of this compass.
 
intersectsRectangle(x0, y0, x1, y1)
Returns true if the disc of this compass intersects with the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).
 
Returns true if this compass is visible.
 
move(dx, dy)
Moves this compass of (dx, dy) units.
 
Removes the property change listener in parameter from this compass.
 
setDiameter(diameter)
Sets the diameter of this compass.
 
setLatitude(latitude)
Sets the latitudeInDegrees of this compass.
 
setLongitude(longitude)
Sets the longitudeInDegrees of the center of this compass.
 
setNorthDirection(northDirection)
Sets the North direction angle of this compass.
 
setTimeZone(timeZone)
Sets the time zone identifier of this compass.
 
setVisible(visible)
Sets whether this compass is visible or not.
 
setX(x)
Sets the abscissa of the center of this compass.
 
setY(y)
Sets the ordinate of the center of this compass.
Methods borrowed from class HomeObject:
getProperty, getPropertyNames, setProperty
Class Detail
Compass(x, y, diameter)
Creates a compass drawn at the given point. North direction is set to zero, time zone to default and the latitudeInDegrees and the longitudeInDegrees of this new compass is equal to the geographic point matching the default time zone.
Author: Emmanuel Puybaret.
Parameters:
{number} x
{number} y
{number} diameter
Method Detail
addPropertyChangeListener(listener)
Adds the property change listener in parameter to this compass.
Parameters:
{PropertyChangeListener} listener

{Compass} clone()
Returns a clone of this compass.
Returns:
{Compass}

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

{number} getDiameter()
Returns the diameter of this compass.
Returns:
{number}

{number} getLatitude()
Returns the latitudeInDegrees of this compass in radians.
Returns:
{number}

{number} getLongitude()
Returns the longitudeInDegrees of this compass in radians.
Returns:
{number}

{number} getNorthDirection()
Returns the North direction angle of this compass in radians.
Returns:
{number}

{Array} getPoints()
Returns the corner points of the square that contains compass disc.
Returns:
{Array}

{string} getTimeZone()
Returns the time zone identifier of this compass.
Returns:
{string}
See:
java.util.TimeZone

{number} getX()
Returns the abscissa of the center of this compass.
Returns:
{number}

{number} getY()
Returns the ordinate of the center of this compass.
Returns:
{number}

{boolean} intersectsRectangle(x0, y0, x1, y1)
Returns true if the disc of this compass 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} isVisible()
Returns true if this compass is visible.
Returns:
{boolean}

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

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

setDiameter(diameter)
Sets the diameter of this compass. Once this compass is updated, listeners added to this compass will receive a change notification.
Parameters:
{number} diameter

setLatitude(latitude)
Sets the latitudeInDegrees of this compass. Once this compass is updated, listeners added to this compass will receive a change notification.
Parameters:
{number} latitude

setLongitude(longitude)
Sets the longitudeInDegrees of the center of this compass. Once this compass is updated, listeners added to this compass will receive a change notification.
Parameters:
{number} longitude

setNorthDirection(northDirection)
Sets the North direction angle of this compass. Once this compass is updated, listeners added to this compass will receive a change notification.
Parameters:
{number} northDirection

setTimeZone(timeZone)
Sets the time zone identifier of this compass. Once this compass is updated, listeners added to this compass will receive a change notification.
Parameters:
{string} timeZone
Throws:
IllegalArgumentException if timeZone is null or contains an unknown identifier.
See:
java.util.TimeZone

setVisible(visible)
Sets whether this compass is visible or not. Once this compass is updated, listeners added to this piece will receive a change notification.
Parameters:
{boolean} visible

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

setY(y)
Sets the ordinate of the center of this compass. Once this compass is updated, listeners added to this compass 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:08 GMT+0200 (CEST)