trait HasEdges extends HasPos with HasAnchor
A supertype for objects that take up a rectangular area and have an anchoring point.
The object’s pos
indicates the position of the anchoring point; the locations of its
edges are determined relative to the anchor.
- Alphabetic
- By Inheritance
- HasEdges
- HasAnchor
- HasSize
- HasPos
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def height: Double
this object’s height: the distance from its top edge to its bottom edge
this object’s height: the distance from its top edge to its bottom edge
- Definition Classes
- HasSize
- abstract def pos: Pos
the object’s location
the object’s location
- Definition Classes
- HasPos
- abstract def width: Double
this object’s width: the distance from its left edge to its right edge
this object’s width: the distance from its left edge to its right edge
- Definition Classes
- HasSize
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def anchor: Anchor
Returns the object’s anchoring point, which is Anchor.Center unless overridden.
Returns the object’s anchoring point, which is Anchor.Center unless overridden.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bottom: Double
Returns the y coordinate of the bottom edge.
- def bottomLeft: Pos
Returns the coordinates of this object’s bottom left-hand corner.
- def bottomRight: Pos
Returns the coordinates of this object’s bottom right-hand corner.
- def center: Pos
Returns the average position between this object’s edges.
- def centerFromTopLeft: Pos
the location of this object’s center: the average point between its edges, expressed in coordinates relative to the object’s top left-hand corner
the location of this object’s center: the average point between its edges, expressed in coordinates relative to the object’s top left-hand corner
- Definition Classes
- HasSize
- def clampWhollyInside(container: HasEdges, desiredPosition: Pos = this.pos): Pos
Looks for a position for this object that is as close to possible to a particular target position but keeps the object's edges within the bounds of the given other object.
Looks for a position for this object that is as close to possible to a particular target position but keeps the object's edges within the bounds of the given other object.
- def clampXWhollyInside(container: HasEdges, desiredPosition: Pos = this.pos): Pos
Looks for a position for this object that is as close to possible to a particular target position but keeps the left and right edges of the object within the bounds of the given other object.
Looks for a position for this object that is as close to possible to a particular target position but keeps the left and right edges of the object within the bounds of the given other object.
- def clampYWhollyInside(container: HasEdges, desiredPosition: Pos = this.pos): Pos
Looks for a position for this object that is as close to possible to a particular target position but keeps the top and bottom edges of the object within the bounds of the given other object.
Looks for a position for this object that is as close to possible to a particular target position but keeps the top and bottom edges of the object within the bounds of the given other object.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def closestPosTo(target: Pos): Pos
Returns the position within this object’s edges that is as close as possible to the given position.
- def containsBetweenEdges(candidate: Pos): Boolean
Determines whether the given
Pos
’s x coordinate is between this object’s left edge (inclusive) and its right edge (exclusive) and if it’s y coordinate is similarly between the top and bottom edges. - def distance(another: HasPos): Double
Determines the distance (“as the crow flies”) between this object’s
pos
and that of the given object.Determines the distance (“as the crow flies”) between this object’s
pos
and that of the given object.- Definition Classes
- HasPos
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def internalAnchorPos: Pos
Returns the Pos of the anchoring point within this object, expressed as coordinates relative to the object’s top left-hand corner.
- def internalAnchorX: Double
Returns the x coordinate of the anchoring point within this object, relative to the object’s left edge.
Returns the x coordinate of the anchoring point within this object, relative to the object’s left edge.
- Definition Classes
- HasAnchor
- def internalAnchorY: Double
Returns the y coordinate of the anchoring point within this object, relative to the object’s top edge.
Returns the y coordinate of the anchoring point within this object, relative to the object’s top edge.
- Definition Classes
- HasAnchor
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def left: Double
Returns the x coordinate of this object’s left edge.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def right: Double
Returns the x coordinate of the right edge.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString: String
- Definition Classes
- AnyRef → Any
- def top: Double
Returns the y coordinate of the top edge.
- def topLeft: Pos
Returns the coordinates of this object’s top left-hand corner.
- def topRight: Pos
Returns the coordinates of this object’s top right-hand corner.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.