APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.javafx.geom

public final Class RectBounds

extends BaseBounds
Class Inheritance

A simple object which carries bounds information as floats, and has no Z components.

Field Summary

Modifier and TypeField and Description
private float
private float
private float
private float

Constructor Summary

AccessConstructor and Description
public
RectBounds()

Create an axis aligned bounding rectangle object, with an empty bounds where maxX < minX and maxY < minY.

public
RectBounds(float minX, float minY, float maxX, float maxY)

Creates a RectBounds based on the minX, minY, maxX, and maxY values specified.

public
RectBounds(RectBounds other)

Creates a RectBounds object as a copy of the specified RectBounds object.

public
RectBounds(Rectangle other)

Creates a RectBounds object as a copy of the specified RECTANGLE.

Method Summary

Modifier and TypeMethod and Description
public void
add(float x, float y, float z)

Implements abstract com.sun.javafx.geom.BaseBounds.add.

public void
add(float x, float y)

public void
public boolean
public boolean
contains(float x, float y)

Implements abstract com.sun.javafx.geom.BaseBounds.contains.

public boolean

Returns:

Whether the other rect bounds is contained within this one, which also includes equivalence.
contains
(RectBounds
The other rect bounds to check against.
other
)

Determines whether the given other RectBounds is completely contained within this RectBounds.

public BaseBounds
copy()

Implements abstract com.sun.javafx.geom.BaseBounds.copy.

Duplicates this instance.

public BaseBounds
public BaseBounds
public BaseBounds
deriveWithNewBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithNewBounds.

public BaseBounds
deriveWithNewBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithNewBoundsAndSort.

public BaseBounds
deriveWithPadding(float h, float v, float d)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithPadding.

public BaseBounds
public boolean
disjoint(float x, float y, float width, float height)

Implements abstract com.sun.javafx.geom.BaseBounds.disjoint.

public boolean
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public RectBounds
flattenInto(RectBounds bounds)

Implements abstract com.sun.javafx.geom.BaseBounds.flattenInto.

Sets the given RectBounds (or creates a new instance of bounds is null) to have the minX, minY, maxX, and maxY of this BoxBounds, dropping the Z values.

public BaseBounds.BoundsType
public float
getDepth()

Implements abstract com.sun.javafx.geom.BaseBounds.getDepth.

Convenience function for getting the depth of this RectBounds The dimension along the Z-Axis, since this is a 2D bounds the return value is always 0.0f.

public float
getHeight()

Implements abstract com.sun.javafx.geom.BaseBounds.getHeight.

Convenience function for getting the height of this RectBounds The dimension along the Y-Axis.

public Vec2f
public Vec3f
public float
public float
public float
public Vec2f
public Vec3f
public float
public float
public float
public float
getWidth()

Implements abstract com.sun.javafx.geom.BaseBounds.getWidth.

Convenience function for getting the width of this RectBounds.

public void
grow(float h, float v)

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
intersects(float x, float y, float width, float height)

Implements abstract com.sun.javafx.geom.BaseBounds.intersects.

public boolean
public void
public void
public void
intersectWith(float minX, float minY, float maxX, float maxY)

public void
intersectWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Implements abstract com.sun.javafx.geom.BaseBounds.intersectWith.

public boolean
is2D()

Implements abstract com.sun.javafx.geom.BaseBounds.is2D.

Return true if this bounds is of a 2D BoundsType, else false.

public boolean
public RectBounds
public void
roundOut()

Implements abstract com.sun.javafx.geom.BaseBounds.roundOut.

Adjusts the edges of this RectBounds "outward" toward integral boundaries, such that the rounded bounding box will always full enclose the original bounding box.

public final void
setBounds(RectBounds other)

Set the bounds to match that of the RectBounds object specified.

public final void
setBounds(float minX, float minY, float maxX, float maxY)

Set the bounds to the given values.

public void
setBoundsAndSort(float minX, float minY, float maxX, float maxY)

Sets the bounds based on the given coords, and also ensures that after having done so that this RectBounds instance is normalized.

public void
setBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Implements abstract com.sun.javafx.geom.BaseBounds.setBoundsAndSort.

public void
setBoundsAndSort(Point2D p1, Point2D p2)

Implements abstract com.sun.javafx.geom.BaseBounds.setBoundsAndSort.

Sets the bounds based on the given points, and also ensures that after having done so that this bounds instance is sorted (x1<=x2 and y1<=y2).

public void
setMaxX(float maxX)

public void
setMaxY(float maxY)

public void
setMinX(float minX)

public void
setMinY(float minY)

protected void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
translate(float x, float y, float z)

Implements abstract com.sun.javafx.geom.BaseBounds.translate.

public void
public void
unionWith(float minX, float minY, float maxX, float maxY)

Inherited from com.sun.javafx.geom.BaseBounds:
getInstancegetInstance

Field Detail

maxXback to summary
private float maxX
maxYback to summary
private float maxY
minXback to summary
private float minX
minYback to summary
private float minY

Constructor Detail

RectBoundsback to summary
public RectBounds()

Create an axis aligned bounding rectangle object, with an empty bounds where maxX < minX and maxY < minY.

RectBoundsback to summary
public RectBounds(float minX, float minY, float maxX, float maxY)

Creates a RectBounds based on the minX, minY, maxX, and maxY values specified.

RectBoundsback to summary
public RectBounds(RectBounds other)

Creates a RectBounds object as a copy of the specified RectBounds object.

RectBoundsback to summary
public RectBounds(Rectangle other)

Creates a RectBounds object as a copy of the specified RECTANGLE.

Method Detail

addback to summary
public void add(float x, float y, float z)

Implements abstract com.sun.javafx.geom.BaseBounds.add.

Annotations
@Override
addback to summary
public void add(float x, float y)
addback to summary
public void add(Point2D p)

Implements abstract com.sun.javafx.geom.BaseBounds.add.

Annotations
@Override
containsback to summary
public boolean contains(Point2D p)

Implements abstract com.sun.javafx.geom.BaseBounds.contains.

Annotations
@Override
containsback to summary
public boolean contains(float x, float y)

Implements abstract com.sun.javafx.geom.BaseBounds.contains.

Annotations
@Override
containsback to summary
public boolean contains(RectBounds other)

Determines whether the given other RectBounds is completely contained within this RectBounds. Equivalent RectBounds will return true.

Parameters
other:RectBounds

The other rect bounds to check against.

Returns:boolean

Whether the other rect bounds is contained within this one, which also includes equivalence.

copyback to summary
public BaseBounds copy()

Implements abstract com.sun.javafx.geom.BaseBounds.copy.

Doc from com.sun.javafx.geom.BaseBounds.copy.

Duplicates this instance. This differs from deriveWithNewBounds(other) where "other" would be this, in that derive methods may return the same instance, whereas copy will always return a new instance.

Annotations
@Override
deriveWithNewBoundsback to summary
public BaseBounds deriveWithNewBounds(Rectangle other)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithNewBounds.

Annotations
@Override
deriveWithNewBoundsback to summary
public BaseBounds deriveWithNewBounds(BaseBounds other)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithNewBounds.

Annotations
@Override
deriveWithNewBoundsback to summary
public BaseBounds deriveWithNewBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithNewBounds.

Annotations
@Override
deriveWithNewBoundsAndSortback to summary
public BaseBounds deriveWithNewBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithNewBoundsAndSort.

Annotations
@Override
deriveWithPaddingback to summary
public BaseBounds deriveWithPadding(float h, float v, float d)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithPadding.

Annotations
@Override
deriveWithUnionback to summary
public BaseBounds deriveWithUnion(BaseBounds other)

Implements abstract com.sun.javafx.geom.BaseBounds.deriveWithUnion.

Annotations
@Override
disjointback to summary
public boolean disjoint(float x, float y, float width, float height)

Implements abstract com.sun.javafx.geom.BaseBounds.disjoint.

Annotations
@Override
disjointback to summary
public boolean disjoint(RectBounds other)
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
flattenIntoback to summary
public RectBounds flattenInto(RectBounds bounds)

Implements abstract com.sun.javafx.geom.BaseBounds.flattenInto.

Doc from com.sun.javafx.geom.BaseBounds.flattenInto.

Sets the given RectBounds (or creates a new instance of bounds is null) to have the minX, minY, maxX, and maxY of this BoxBounds, dropping the Z values.

Annotations
@Override
getBoundsTypeback to summary
public BaseBounds.BoundsType getBoundsType()

Implements abstract com.sun.javafx.geom.BaseBounds.getBoundsType.

Annotations
@Override
getDepthback to summary
public float getDepth()

Implements abstract com.sun.javafx.geom.BaseBounds.getDepth.

Convenience function for getting the depth of this RectBounds The dimension along the Z-Axis, since this is a 2D bounds the return value is always 0.0f.

Annotations
@Override
getHeightback to summary
public float getHeight()

Implements abstract com.sun.javafx.geom.BaseBounds.getHeight.

Convenience function for getting the height of this RectBounds The dimension along the Y-Axis.

Annotations
@Override
getMaxback to summary
public Vec2f getMax(Vec2f max)

Implements abstract com.sun.javafx.geom.BaseBounds.getMax.

Annotations
@Override
getMaxback to summary
public Vec3f getMax(Vec3f max)

Implements abstract com.sun.javafx.geom.BaseBounds.getMax.

Annotations
@Override
getMaxXback to summary
public float getMaxX()

Implements abstract com.sun.javafx.geom.BaseBounds.getMaxX.

Annotations
@Override
getMaxYback to summary
public float getMaxY()

Implements abstract com.sun.javafx.geom.BaseBounds.getMaxY.

Annotations
@Override
getMaxZback to summary
public float getMaxZ()

Implements abstract com.sun.javafx.geom.BaseBounds.getMaxZ.

Annotations
@Override
getMinback to summary
public Vec2f getMin(Vec2f min)

Implements abstract com.sun.javafx.geom.BaseBounds.getMin.

Annotations
@Override
getMinback to summary
public Vec3f getMin(Vec3f min)

Implements abstract com.sun.javafx.geom.BaseBounds.getMin.

Annotations
@Override
getMinXback to summary
public float getMinX()

Implements abstract com.sun.javafx.geom.BaseBounds.getMinX.

Annotations
@Override
getMinYback to summary
public float getMinY()

Implements abstract com.sun.javafx.geom.BaseBounds.getMinY.

Annotations
@Override
getMinZback to summary
public float getMinZ()

Implements abstract com.sun.javafx.geom.BaseBounds.getMinZ.

Annotations
@Override
getWidthback to summary
public float getWidth()

Implements abstract com.sun.javafx.geom.BaseBounds.getWidth.

Convenience function for getting the width of this RectBounds. The dimension along the X-Axis.

Annotations
@Override
growback to summary
public void grow(float h, float v)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
intersectsback to summary
public boolean intersects(float x, float y, float width, float height)

Implements abstract com.sun.javafx.geom.BaseBounds.intersects.

Annotations
@Override
intersectsback to summary
public boolean intersects(BaseBounds other)
intersectWithback to summary
public void intersectWith(BaseBounds other)

Implements abstract com.sun.javafx.geom.BaseBounds.intersectWith.

Annotations
@Override
intersectWithback to summary
public void intersectWith(Rectangle other)

Implements abstract com.sun.javafx.geom.BaseBounds.intersectWith.

Annotations
@Override
intersectWithback to summary
public void intersectWith(float minX, float minY, float maxX, float maxY)
intersectWithback to summary
public void intersectWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Implements abstract com.sun.javafx.geom.BaseBounds.intersectWith.

Annotations
@Override
is2Dback to summary
public boolean is2D()

Implements abstract com.sun.javafx.geom.BaseBounds.is2D.

Doc from com.sun.javafx.geom.BaseBounds.is2D.

Return true if this bounds is of a 2D BoundsType, else false.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Implements abstract com.sun.javafx.geom.BaseBounds.isEmpty.

Annotations
@Override
makeEmptyback to summary
public RectBounds makeEmpty()

Implements abstract com.sun.javafx.geom.BaseBounds.makeEmpty.

Annotations
@Override
roundOutback to summary
public void roundOut()

Implements abstract com.sun.javafx.geom.BaseBounds.roundOut.

Adjusts the edges of this RectBounds "outward" toward integral boundaries, such that the rounded bounding box will always full enclose the original bounding box.

Annotations
@Override
setBoundsback to summary
public final void setBounds(RectBounds other)

Set the bounds to match that of the RectBounds object specified. The specified bounds object must not be null.

setBoundsback to summary
public final void setBounds(float minX, float minY, float maxX, float maxY)

Set the bounds to the given values.

setBoundsAndSortback to summary
public void setBoundsAndSort(float minX, float minY, float maxX, float maxY)

Sets the bounds based on the given coords, and also ensures that after having done so that this RectBounds instance is normalized.

setBoundsAndSortback to summary
public void setBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Implements abstract com.sun.javafx.geom.BaseBounds.setBoundsAndSort.

Annotations
@Override
setBoundsAndSortback to summary
public void setBoundsAndSort(Point2D p1, Point2D p2)

Implements abstract com.sun.javafx.geom.BaseBounds.setBoundsAndSort.

Doc from com.sun.javafx.geom.BaseBounds.setBoundsAndSort.

Sets the bounds based on the given points, and also ensures that after having done so that this bounds instance is sorted (x1<=x2 and y1<=y2).

Annotations
@Override
setMaxXback to summary
public void setMaxX(float maxX)
setMaxYback to summary
public void setMaxY(float maxY)
setMinXback to summary
public void setMinX(float minX)
setMinYback to summary
public void setMinY(float minY)
sortMinMaxback to summary
protected void sortMinMax()

Implements abstract com.sun.javafx.geom.BaseBounds.sortMinMax.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
translateback to summary
public void translate(float x, float y, float z)

Implements abstract com.sun.javafx.geom.BaseBounds.translate.

Annotations
@Override
unionWithback to summary
public void unionWith(RectBounds other)
unionWithback to summary
public void unionWith(float minX, float minY, float maxX, float maxY)