scalation.scala2d

Arrow

case class Arrow(p1: R2, p2: R2, len: Int) extends Double with CurvilinearShape with Product with Serializable

The Arrow class uses Java's Path2D class to create a line with an arrowhead on the far end. The main line is defined by points p1 and p2. Points p3 and p4 are the corners of the triangular arrowhead.

p1

the starting point for the line/arrow

p2

the ending point for the line/arrow

len

the length of the arrowhead on the line/arrow

Linear Supertypes
Serializable, Product, Equals, CurvilinearShape, Error, Double, Serializable, Path2D, Cloneable, Shape, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Arrow
  2. Serializable
  3. Product
  4. Equals
  5. CurvilinearShape
  6. Error
  7. Double
  8. Serializable
  9. Path2D
  10. Cloneable
  11. Shape
  12. AnyRef
  13. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Arrow(p1: R2 = new scalation.scala2d.R2(0.0, 0.0), p2: R2 = new scalation.scala2d.R2(0.0, 0.0), len: Int = 10)

    p1

    the starting point for the line/arrow

    p2

    the ending point for the line/arrow

    len

    the length of the arrowhead on the line/arrow

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def append(arg0: PathIterator, arg1: Boolean): Unit

    Definition Classes
    Double → Path2D
  7. final def append(arg0: Shape, arg1: Boolean): Unit

    Definition Classes
    Path2D
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def canEqual(arg0: Any): Boolean

    Definition Classes
    Arrow → Equals
  10. final def clone(): AnyRef

    Definition Classes
    Double → Path2D → AnyRef
  11. final def closePath(): Unit

    Definition Classes
    Path2D
  12. final def contains(arg0: Rectangle2D): Boolean

    Definition Classes
    Path2D → Shape
  13. final def contains(arg0: Double, arg1: Double, arg2: Double, arg3: Double): Boolean

    Definition Classes
    Path2D → Shape
  14. final def contains(arg0: Point2D): Boolean

    Definition Classes
    Path2D → Shape
  15. final def contains(arg0: Double, arg1: Double): Boolean

    Definition Classes
    Path2D → Shape
  16. final def createTransformedShape(arg0: AffineTransform): Shape

    Definition Classes
    Path2D
  17. final def curveTo(arg0: Double, arg1: Double, arg2: Double, arg3: Double, arg4: Double, arg5: Double): Unit

    Definition Classes
    Double → Path2D
  18. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Definition Classes
    Arrow → Equals → AnyRef → Any
  20. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  22. final def getBounds(): Rectangle

    Definition Classes
    Path2D → Shape
  23. final def getBounds2D(): Rectangle2D

    Definition Classes
    Double → Shape
  24. def getCenterX(): Double

    Get the x-coordinate of the center of the main line.

    Get the x-coordinate of the center of the main line.

    Definition Classes
    ArrowCurvilinearShape
  25. def getCenterY(): Double

    Get the y-coordinate of the center of the main line.

    Get the y-coordinate of the center of the main line.

    Definition Classes
    ArrowCurvilinearShape
  26. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  27. final def getCurrentPoint(): Point2D

    Definition Classes
    Path2D
  28. final def getPathIterator(arg0: AffineTransform): PathIterator

    Definition Classes
    Double → Shape
  29. final def getPathIterator(arg0: AffineTransform, arg1: Double): PathIterator

    Definition Classes
    Path2D → Shape
  30. final def getWindingRule(): Int

    Definition Classes
    Path2D
  31. def hashCode(): Int

    Definition Classes
    Arrow → AnyRef → Any
  32. final def intersects(arg0: Rectangle2D): Boolean

    Definition Classes
    Path2D → Shape
  33. final def intersects(arg0: Double, arg1: Double, arg2: Double, arg3: Double): Boolean

    Definition Classes
    Path2D → Shape
  34. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  35. var len: Int

    the length of the arrowhead on the line/arrow

  36. final def lineTo(arg0: Double, arg1: Double): Unit

    Definition Classes
    Double → Path2D
  37. final def moveTo(arg0: Double, arg1: Double): Unit

    Definition Classes
    Double → Path2D
  38. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. def next(width: Double, height: Double): R2

    Return the next point on the CurvilinearShape (one step beyond current point) and adjust from top-left to center coordinates for the object traversing the curve based on its width and height.

    Return the next point on the CurvilinearShape (one step beyond current point) and adjust from top-left to center coordinates for the object traversing the curve based on its width and height. Return null if past end point. This is an optional method.

    width

    the width of object traversing the curve

    height

    the height of object traversing the curve

    Definition Classes
    CurvilinearShape
  40. final def notify(): Unit

    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  42. var p1: R2

    the starting point for the line/arrow

  43. var p2: R2

    the ending point for the line/arrow

  44. def productArity: Int

    Definition Classes
    Arrow → Product
  45. def productElement(arg0: Int): Any

    Definition Classes
    Arrow → Product
  46. def productIterator: Iterator[Any]

    Definition Classes
    Product
  47. def productPrefix: String

    Definition Classes
    Arrow → Product
  48. final def quadTo(arg0: Double, arg1: Double, arg2: Double, arg3: Double): Unit

    Definition Classes
    Double → Path2D
  49. final def reset(): Unit

    Definition Classes
    Path2D
  50. def setLine(_p1: R2, _p2: R2, bend: Double): Unit

    Set (or reset) the location for the Arrow as a line.

    Set (or reset) the location for the Arrow as a line. The bend parameter is ignored for this class, since arrows are straight.

    _p1

    the starting point

    _p2

    the ending point

    bend

    the bend or curvature (0. => straight line)

    Definition Classes
    ArrowCurvilinearShape
  51. def setLine(_p1: R2, _p2: R2): Unit

    Set (or reset) the location for the Arrow as a line.

    Set (or reset) the location for the Arrow as a line.

    _p1

    the starting point

    _p2

    the ending point

    Definition Classes
    ArrowCurvilinearShape
  52. def setLine(p1: R2, pc: R2, p2: R2): Unit

    Set (or reset) the location for a line/curve using an explicitly given control point.

    Set (or reset) the location for a line/curve using an explicitly given control point. This is an optional method.

    Definition Classes
    CurvilinearShape
  53. final def setWindingRule(arg0: Int): Unit

    Definition Classes
    Path2D
  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  55. def toString(): String

    Definition Classes
    Arrow → AnyRef → Any
  56. final def transform(arg0: AffineTransform): Unit

    Definition Classes
    Double → Path2D
  57. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  58. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  59. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def productElements: Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) use productIterator instead

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from CurvilinearShape

Inherited from Error

Inherited from Double

Inherited from Serializable

Inherited from Path2D

Inherited from Cloneable

Inherited from Shape

Inherited from AnyRef

Inherited from Any