Class AbstractRectangularShape2ifx<IT extends AbstractRectangularShape2ifx<?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx<IT>
-
- org.arakhne.afc.math.geometry.d2.ifx.AbstractRectangularShape2ifx<IT>
-
- Type Parameters:
IT
- is the type of the implementation of this shape.
- All Implemented Interfaces:
Serializable
,Cloneable
,RectangularShape2ai<Shape2ifx<?>,IT,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
,Shape2ai<Shape2ifx<?>,IT,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
,Shape2ifx<IT>
,Shape2D<Shape2ifx<?>,IT,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
,JsonableObject
public abstract class AbstractRectangularShape2ifx<IT extends AbstractRectangularShape2ifx<?>> extends AbstractShape2ifx<IT> implements RectangularShape2ai<Shape2ifx<?>,IT,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
A rectangular shape 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
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javafx.beans.property.ReadOnlyIntegerWrapper
height
height property.(package private) javafx.beans.property.IntegerProperty
maxX
maxX property.(package private) javafx.beans.property.IntegerProperty
maxY
maxY property.(package private) javafx.beans.property.IntegerProperty
minX
minX property.(package private) javafx.beans.property.IntegerProperty
minY
minY property.(package private) javafx.beans.property.ReadOnlyIntegerWrapper
width
width property.-
Fields inherited from class org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx
boundingBox
-
-
Constructor Summary
Constructors Constructor Description AbstractRectangularShape2ifx()
Construct an empty rectangular shape.AbstractRectangularShape2ifx(RectangularShape2ai<?,?,?,?,?,?> shape)
Constructor by copy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IT
clone()
Clone this shape.int
getHeight()
Replies the height.int
getMaxX()
Replies the max x.int
getMaxY()
Replies the max y.int
getMinX()
Replies the min X.int
getMinY()
Replies the min y.int
getWidth()
Replies the width.int
hashCode()
javafx.beans.property.IntegerProperty
heightProperty()
Replies the property that is the height of the box.javafx.beans.property.IntegerProperty
maxXProperty()
Replies the property that is the maximum x coordinate of the box.javafx.beans.property.IntegerProperty
maxYProperty()
Replies the property that is the maximum y coordinate of the box.javafx.beans.property.IntegerProperty
minXProperty()
Replies the property that is the minimum x coordinate of the box.javafx.beans.property.IntegerProperty
minYProperty()
Replies the property that is the minimum y coordinate of the box.void
setFromCorners(int x1, int y1, int x2, int y2)
Change the frame of the rectangle conserving previous min and max if needed.void
setMaxX(int x)
Set the max X conserving previous max if needed.void
setMaxY(int y)
Set the max Y conserving previous max if needed.void
setMinX(int x)
Set the min X conserving previous min if needed.void
setMinY(int y)
Set the min Y conserving previous min if needed.javafx.beans.property.IntegerProperty
widthProperty()
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.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, contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, getPointIterator, intersects, intersects, intersects, intersects, intersects, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
equalsToPathIterator, equalsToShape, getClosestPointTo, getDistance, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo, set
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.ifx.Shape2ifx
boundingBoxProperty
-
-
-
-
Field Detail
-
minX
javafx.beans.property.IntegerProperty minX
minX property.
-
minY
javafx.beans.property.IntegerProperty minY
minY property.
-
maxX
javafx.beans.property.IntegerProperty maxX
maxX property.
-
maxY
javafx.beans.property.IntegerProperty maxY
maxY property.
-
width
javafx.beans.property.ReadOnlyIntegerWrapper width
width property.
-
height
javafx.beans.property.ReadOnlyIntegerWrapper height
height property.
-
-
Constructor Detail
-
AbstractRectangularShape2ifx
public AbstractRectangularShape2ifx()
Construct an empty rectangular shape.
-
AbstractRectangularShape2ifx
public AbstractRectangularShape2ifx(RectangularShape2ai<?,?,?,?,?,?> shape)
Constructor by copy.- Parameters:
shape
- the shape to copy.
-
-
Method Detail
-
clone
public IT clone()
Description copied from interface:Shape2D
Clone this shape.- Specified by:
clone
in interfaceShape2D<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Overrides:
clone
in classAbstractShape2ifx<IT extends AbstractRectangularShape2ifx<?>>
- Returns:
- the clone.
-
setFromCorners
public void setFromCorners(int x1, int y1, int x2, int y2)
Description copied from interface:RectangularShape2ai
Change the frame of the rectangle conserving previous min and max if needed.- Specified by:
setFromCorners
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,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:RectangularShape2ai
Replies the min X.- Specified by:
getMinX
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the min x.
-
setMinX
public void setMinX(int x)
Description copied from interface:RectangularShape2ai
Set the min X conserving previous min if needed.- Specified by:
setMinX
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,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:RectangularShape2ai
Replies the max x.- Specified by:
getMaxX
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the max x.
-
setMaxX
public void setMaxX(int x)
Description copied from interface:RectangularShape2ai
Set the max X conserving previous max if needed.- Specified by:
setMaxX
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,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 maxX property.
-
getMinY
@Pure public int getMinY()
Description copied from interface:RectangularShape2ai
Replies the min y.- Specified by:
getMinY
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the min y.
-
setMinY
public void setMinY(int y)
Description copied from interface:RectangularShape2ai
Set the min Y conserving previous min if needed.- Specified by:
setMinY
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,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 minY property.
-
getMaxY
@Pure public int getMaxY()
Description copied from interface:RectangularShape2ai
Replies the max y.- Specified by:
getMaxY
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the max y.
-
setMaxY
public void setMaxY(int y)
Description copied from interface:RectangularShape2ai
Set the max Y conserving previous max if needed.- Specified by:
setMaxY
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,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 maxY property.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in classAbstractShape2ifx<IT extends AbstractRectangularShape2ifx<?>>
-
getWidth
public int getWidth()
Description copied from interface:RectangularShape2ai
Replies the width.- Specified by:
getWidth
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,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:RectangularShape2ai
Replies the height.- Specified by:
getHeight
in interfaceRectangularShape2ai<Shape2ifx<?>,IT extends AbstractRectangularShape2ifx<?>,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.
-
-