public class DimensionLine extends HomeObject implements Selectable, Elevatable
Modifier and Type | Class and Description |
---|---|
static class |
DimensionLine.Property
The properties of a dimension line that may change.
|
Constructor and Description |
---|
DimensionLine(float xStart,
float yStart,
float xEnd,
float yEnd,
float offset)
Creates a dimension line from (
xStart , yStart )
to (xEnd , yEnd ), with a given offset. |
DimensionLine(float xStart,
float yStart,
float elevationStart,
float xEnd,
float yEnd,
float elevationEnd,
float offset)
Creates a dimension line from (
xStart , yStart , elevationStart )
to (xEnd , yEnd , elevationEnd ), with a given offset. |
DimensionLine(java.lang.String id,
float xStart,
float yStart,
float xEnd,
float yEnd,
float offset)
Creates a dimension line from (
xStart ,yStart )
to (xEnd , yEnd ), with a given offset. |
DimensionLine(java.lang.String id,
float xStart,
float yStart,
float elevationStart,
float xEnd,
float yEnd,
float elevationEnd,
float offset)
Creates a dimension line from (
xStart , yStart , elevationStart )
to (xEnd , yEnd , elevationEnd ), with a given offset. |
Modifier and Type | Method and Description |
---|---|
DimensionLine |
clone()
Returns a clone of this dimension line.
|
boolean |
containsEndExtensionLineAt(float x,
float y,
float 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. |
boolean |
containsPoint(float x,
float y,
float margin)
Returns
true if this dimension line contains
the point at (x , y )
with a given margin . |
boolean |
containsStartExtensionLinetAt(float x,
float y,
float 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. |
java.lang.Integer |
getColor()
Returns the color used to display the text of this dimension line.
|
float |
getElevationEnd()
Returns the end point elevation of this dimension line.
|
float |
getElevationStart()
Returns the start point elevation of this dimension line.
|
float |
getEndMarkSize()
Returns the size of marks drawn at the end of the dimension line.
|
float |
getLength()
Returns the length of this dimension line.
|
TextStyle |
getLengthStyle()
Returns the text style used to display dimension line length.
|
Level |
getLevel()
Returns the level which this dimension line belongs to.
|
float |
getOffset()
Returns the offset of this dimension line.
|
float |
getPitch()
Returns the pitch angle in radians of this dimension line around its axis.
|
float[][] |
getPoints()
Returns the points of the rectangle surrounding
this dimension line and its extension lines.
|
float |
getXEnd()
Returns the end point abscissa of this dimension line.
|
float |
getXStart()
Returns the start point abscissa of this dimension line.
|
float |
getYEnd()
Returns the end point ordinate of this dimension line.
|
float |
getYStart()
Returns the start point ordinate of this dimension line.
|
boolean |
intersectsRectangle(float x0,
float y0,
float x1,
float y1)
Returns
true if this dimension line intersects
with the horizontal rectangle which opposite corners are at points
(x0 , y0 ) and (x1 , y1 ). |
boolean |
isAtLevel(Level 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
or if the elevation of its highest end is higher than level elevation. |
boolean |
isBottomPointAt(float x,
float y,
float margin)
Returns
true if the bottom left point of this dimension line is
the point at (x , y ) with a given margin . |
boolean |
isElevationDimensionLine()
Returns
true if this dimension line is an elevation (vertical) dimension line. |
boolean |
isLeftPointAt(float x,
float y,
float margin)
Returns
true if the left point of this dimension line is
the point at (x , y ) with a given margin . |
boolean |
isMiddlePointAt(float x,
float y,
float margin)
Returns
true if the middle point of this dimension line
is the point at (x , y )
with a given margin . |
boolean |
isRightPointAt(float x,
float y,
float margin)
Returns
true if the right point of this dimension line is
the point at (x , y ) with a given margin . |
boolean |
isTopPointAt(float x,
float y,
float margin)
Returns
true if the top point of this dimension line is
the point at (x , y ) with a given margin . |
boolean |
isVisibleIn3D()
Returns
true if this dimension line should be displayed in 3D. |
void |
move(float dx,
float dy)
Moves this dimension line of (
dx , dy ) units. |
void |
setColor(java.lang.Integer color)
Sets the color used to display the text of this dimension line.
|
void |
setElevationEnd(float elevationEnd)
Sets the end point elevation of this dimension line.
|
void |
setElevationStart(float elevationStart)
Sets the start point elevation of this dimension line.
|
void |
setEndMarkSize(float endMarkSize)
Sets the size of marks drawn at the end of the dimension line.
|
void |
setLengthStyle(TextStyle lengthStyle)
Sets the text style used to display dimension line length.
|
void |
setLevel(Level level)
Sets the level of this dimension line.
|
void |
setOffset(float offset)
Sets the offset of this dimension line.
|
void |
setPitch(float pitch)
Sets the pitch angle of this dimension line.
|
void |
setVisibleIn3D(boolean visibleIn3D)
Sets whether this dimension line should be displayed in 3D.
|
void |
setXEnd(float xEnd)
Sets the end point abscissa of this dimension line.
|
void |
setXStart(float xStart)
Sets the start point abscissa of this dimension line.
|
void |
setYEnd(float yEnd)
Sets the end point ordinate of this dimension line.
|
void |
setYStart(float yStart)
Sets the start point ordinate of this dimension line.
|
addPropertyChangeListener, addPropertyChangeListener, createId, duplicate, firePropertyChange, getContentProperty, getId, getProperty, getPropertyNames, isContentProperty, removePropertyChangeListener, removePropertyChangeListener, setProperty, setProperty
public DimensionLine(float xStart, float yStart, float xEnd, float yEnd, float offset)
xStart
, yStart
)
to (xEnd
, yEnd
), with a given offset.public DimensionLine(float xStart, float yStart, float elevationStart, float xEnd, float yEnd, float elevationEnd, float offset)
xStart
, yStart
, elevationStart
)
to (xEnd
, yEnd
, elevationEnd
), with a given offset.public DimensionLine(java.lang.String id, float xStart, float yStart, float xEnd, float yEnd, float offset)
xStart
,yStart
)
to (xEnd
, yEnd
), with a given offset.public DimensionLine(java.lang.String id, float xStart, float yStart, float elevationStart, float xEnd, float yEnd, float elevationEnd, float offset)
xStart
, yStart
, elevationStart
)
to (xEnd
, yEnd
, elevationEnd
), with a given offset.public float getXStart()
public void setXStart(float xStart)
public float getYStart()
public void setYStart(float yStart)
public float getElevationStart()
public void setElevationStart(float elevationStart)
public float getXEnd()
public void setXEnd(float xEnd)
public float getYEnd()
public void setYEnd(float yEnd)
public float getElevationEnd()
public void setElevationEnd(float elevationEnd)
public boolean isElevationDimensionLine()
true
if this dimension line is an elevation (vertical) dimension line.public float getOffset()
public void setOffset(float offset)
public float getPitch()
public void setPitch(float pitch)
public float getLength()
public TextStyle getLengthStyle()
public void setLengthStyle(TextStyle lengthStyle)
public java.lang.Integer getColor()
public void setColor(java.lang.Integer color)
public float getEndMarkSize()
public void setEndMarkSize(float endMarkSize)
public boolean isVisibleIn3D()
true
if this dimension line should be displayed in 3D.public void setVisibleIn3D(boolean visibleIn3D)
public Level getLevel()
getLevel
in interface Elevatable
public void setLevel(Level level)
public boolean isAtLevel(Level level)
true
if this dimension line is at the given level
or at a level with the same elevation and a smaller elevation index
or if the elevation of its highest end is higher than level
elevation.isAtLevel
in interface Elevatable
public float[][] getPoints()
getPoints
in interface Selectable
public boolean intersectsRectangle(float x0, float y0, float x1, float y1)
true
if this dimension line intersects
with the horizontal rectangle which opposite corners are at points
(x0
, y0
) and (x1
, y1
).intersectsRectangle
in interface Selectable
public boolean containsPoint(float x, float y, float margin)
true
if this dimension line contains
the point at (x
, y
)
with a given margin
.containsPoint
in interface Selectable
public boolean isMiddlePointAt(float x, float y, float margin)
true
if the middle point of this dimension line
is the point at (x
, y
)
with a given margin
.public boolean containsStartExtensionLinetAt(float x, float y, float margin)
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.public boolean containsEndExtensionLineAt(float x, float y, float margin)
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.public boolean isTopPointAt(float x, float y, float margin)
true
if the top point of this dimension line is
the point at (x
, y
) with a given margin
.public boolean isRightPointAt(float x, float y, float margin)
true
if the right point of this dimension line is
the point at (x
, y
) with a given margin
.public boolean isBottomPointAt(float x, float y, float margin)
true
if the bottom left point of this dimension line is
the point at (x
, y
) with a given margin
.public boolean isLeftPointAt(float x, float y, float margin)
true
if the left point of this dimension line is
the point at (x
, y
) with a given margin
.public void move(float dx, float dy)
dx
, dy
) units.move
in interface Selectable
public DimensionLine clone()
clone
in interface Selectable
clone
in class HomeObject
© Copyrights 2006-2023 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License