Class Rectangle2ifx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx<Rectangle2ifx>
-
- org.arakhne.afc.math.geometry.d2.ifx.Rectangle2ifx
-
- All Implemented Interfaces:
Serializable,Cloneable,Rectangle2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>,RectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>,Shape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>,Shape2ifx<Rectangle2ifx>,Shape2D<Shape2ifx<?>,Rectangle2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>,JsonableObject
public class Rectangle2ifx extends AbstractShape2ifx<Rectangle2ifx> implements Rectangle2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
A rectangle with 2 integer FX properties.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.ai.Rectangle2ai
Rectangle2ai.RectanglePathIterator<E extends PathElement2ai>, Rectangle2ai.RectangleSideIterator<P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>>, Rectangle2ai.Side, Rectangle2ai.TransformedRectanglePathIterator<E extends PathElement2ai>
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx
boundingBox
-
-
Constructor Summary
Constructors Constructor Description Rectangle2ifx()Construct an empty rectangle.Rectangle2ifx(int x, int y, int width, int height)Construct a rectangle with the given minimum corner and sizes.Rectangle2ifx(Rectangle2ai<?,?,?,?,?,?> rectangle)Constructor by copy.Rectangle2ifx(Point2ifx min, Point2ifx max)Construct a rectangle by setting the given minimum and maximum corners.Rectangle2ifx(Rectangle2ifx rectangle)Constructor by setting.Rectangle2ifx(Point2D<?,?> min, Point2D<?,?> max)Construct a rectangle with the given minimum and maximum corners.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ObjectProperty<Rectangle2ifx>boundingBoxProperty()Replies the property that contains the bounding box for this shape.Rectangle2ifxclone()Clone this shape.intgetHeight()Replies the height.intgetMaxX()Replies the max x.intgetMaxY()Replies the max y.intgetMinX()Replies the min X.intgetMinY()Replies the min y.intgetWidth()Replies the width.inthashCode()javafx.beans.property.IntegerPropertyheightProperty()Replies the property that is the height of the box.javafx.beans.property.IntegerPropertymaxXProperty()Replies the property that is the maximum x coordinate of the box.javafx.beans.property.IntegerPropertymaxYProperty()Replies the property that is the maximum y coordinate of the box.javafx.beans.property.IntegerPropertyminXProperty()Replies the property that is the minimum x coordinate of the box.javafx.beans.property.IntegerPropertyminYProperty()Replies the property that is the minimum y coordinate of the box.voidsetFromCorners(int x1, int y1, int x2, int y2)Change the frame of the rectangle conserving previous min and max if needed.voidsetMaxX(int x)Set the max X conserving previous max if needed.voidsetMaxY(int y)Set the max Y conserving previous max if needed.voidsetMinX(int x)Set the min X conserving previous min if needed.voidsetMinY(int y)Set the min Y conserving previous min if needed.javafx.beans.property.IntegerPropertywidthProperty()Replies the property that is the width of the box.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx
equals, getGeomFactory, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.ai.Rectangle2ai
contains, contains, createIntersection, createUnion, equalsToShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPointIterator, getPointIterator, intersects, intersects, intersects, intersects, intersects, set, setIntersection, setUnion
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.ai.RectangularShape2ai
clear, getCenter, getCenterX, getCenterY, inflate, isEmpty, set, set, setFromCenter, setFromCenter, setFromCorners, setHeight, setWidth, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.ai.Shape2ai
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Constructor Detail
-
Rectangle2ifx
public Rectangle2ifx()
Construct an empty rectangle.
-
Rectangle2ifx
public Rectangle2ifx(Point2D<?,?> min, Point2D<?,?> max)
Construct a rectangle with the given minimum and maximum corners.- Parameters:
min- is the min corner of the rectangle.max- is the max corner of the rectangle.
-
Rectangle2ifx
public Rectangle2ifx(Point2ifx min, Point2ifx max)
Construct a rectangle by setting the given minimum and maximum corners.- Parameters:
min- is the min corner of the rectangle.max- is the max corner of the rectangle.
-
Rectangle2ifx
public Rectangle2ifx(int x, int y, int width, int height)Construct a rectangle with the given minimum corner and sizes.- Parameters:
x- x coordinate of the minimum corner.y- y coordinate of the minimum corner.width- width of the rectangle.height- height of the rectangle.
-
Rectangle2ifx
public Rectangle2ifx(Rectangle2ai<?,?,?,?,?,?> rectangle)
Constructor by copy.- Parameters:
rectangle- the rectangle to copy.
-
Rectangle2ifx
public Rectangle2ifx(Rectangle2ifx rectangle)
Constructor by setting.- Parameters:
rectangle- the rectangle to set.
-
-
Method Detail
-
clone
public Rectangle2ifx clone()
Description copied from interface:Shape2DClone this shape.- Specified by:
clonein interfaceShape2D<Shape2ifx<?>,Rectangle2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>- Overrides:
clonein classAbstractShape2ifx<Rectangle2ifx>- Returns:
- the clone.
-
setFromCorners
public void setFromCorners(int x1, int y1, int x2, int y2)Description copied from interface:RectangularShape2aiChange the frame of the rectangle conserving previous min and max if needed.- Specified by:
setFromCornersin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Parameters:
x1- is the coordinate of the first corner.y1- is the coordinate of the first corner.x2- is the coordinate of the second corner.y2- is the coordinate of the second corner.
-
getMinX
@Pure public int getMinX()
Description copied from interface:RectangularShape2aiReplies the min X.- Specified by:
getMinXin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Returns:
- the min x.
-
setMinX
public void setMinX(int x)
Description copied from interface:RectangularShape2aiSet the min X conserving previous min if needed.- Specified by:
setMinXin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Parameters:
x- the min x.
-
minXProperty
@Pure public javafx.beans.property.IntegerProperty minXProperty()
Replies the property that is the minimum x coordinate of the box.- Returns:
- the minX property.
-
getMaxX
@Pure public int getMaxX()
Description copied from interface:RectangularShape2aiReplies the max x.- Specified by:
getMaxXin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Returns:
- the max x.
-
setMaxX
public void setMaxX(int x)
Description copied from interface:RectangularShape2aiSet the max X conserving previous max if needed.- Specified by:
setMaxXin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Parameters:
x- the max x.
-
maxXProperty
@Pure public javafx.beans.property.IntegerProperty maxXProperty()
Replies the property that is the maximum x coordinate of the box.- Returns:
- the max.x property.
-
getMinY
@Pure public int getMinY()
Description copied from interface:RectangularShape2aiReplies the min y.- Specified by:
getMinYin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Returns:
- the min y.
-
setMinY
public void setMinY(int y)
Description copied from interface:RectangularShape2aiSet the min Y conserving previous min if needed.- Specified by:
setMinYin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Parameters:
y- the min y.
-
minYProperty
@Pure public javafx.beans.property.IntegerProperty minYProperty()
Replies the property that is the minimum y coordinate of the box.- Returns:
- the min.y property.
-
getMaxY
@Pure public int getMaxY()
Description copied from interface:RectangularShape2aiReplies the max y.- Specified by:
getMaxYin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Returns:
- the max y.
-
setMaxY
public void setMaxY(int y)
Description copied from interface:RectangularShape2aiSet the max Y conserving previous max if needed.- Specified by:
setMaxYin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Parameters:
y- the max y.
-
maxYProperty
@Pure public javafx.beans.property.IntegerProperty maxYProperty()
Replies the property that is the maximum y coordinate of the box.- Returns:
- the max.y property.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein classAbstractShape2ifx<Rectangle2ifx>
-
getWidth
public int getWidth()
Description copied from interface:RectangularShape2aiReplies the width.- Specified by:
getWidthin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Returns:
- the width.
-
widthProperty
@Pure public javafx.beans.property.IntegerProperty widthProperty()
Replies the property that is the width of the box.- Returns:
- the width property.
-
getHeight
public int getHeight()
Description copied from interface:RectangularShape2aiReplies the height.- Specified by:
getHeightin interfaceRectangularShape2ai<Shape2ifx<?>,Rectangle2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>- Returns:
- the height.
-
heightProperty
@Pure public javafx.beans.property.IntegerProperty heightProperty()
Replies the property that is the height of the box.- Returns:
- the height property.
-
boundingBoxProperty
public javafx.beans.property.ObjectProperty<Rectangle2ifx> boundingBoxProperty()
Description copied from interface:Shape2ifxReplies the property that contains the bounding box for this shape.- Specified by:
boundingBoxPropertyin interfaceShape2ifx<Rectangle2ifx>- Returns:
- the bounding box.
-
-