Package JavaFX.shapes

Class DrawableLine

  • All Implemented Interfaces:
    Drawable

    public class DrawableLine
    extends java.lang.Object
    implements Drawable
    DrawableLine implements the Drawable interface. It`s used to implement the mouse related events.
    Author:
    Leonardo-Rocha, GabrielChiquetto
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javafx.scene.canvas.Canvas canvas  
      (package private) javafx.scene.canvas.GraphicsContext graphicsContext  
      private javafx.util.Pair<java.lang.Double,​java.lang.Double> initialPressCoordinate  
      (package private) javafx.scene.shape.Line line  
    • Constructor Summary

      Constructors 
      Constructor Description
      DrawableLine()  
    • Method Summary

      Modifier and Type Method Description
      javafx.scene.shape.Shape getShape()  
      void onMouseDragged​(javafx.scene.input.MouseEvent event)  
      void onMouseReleased​(javafx.scene.input.MouseEvent event)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • canvas

        private javafx.scene.canvas.Canvas canvas
      • line

        javafx.scene.shape.Line line
      • graphicsContext

        javafx.scene.canvas.GraphicsContext graphicsContext
      • initialPressCoordinate

        private javafx.util.Pair<java.lang.Double,​java.lang.Double> initialPressCoordinate
    • Constructor Detail

      • DrawableLine

        public DrawableLine()
    • Method Detail

      • onMouseDragged

        public void onMouseDragged​(javafx.scene.input.MouseEvent event)
        Specified by:
        onMouseDragged in interface Drawable
      • onMouseReleased

        public void onMouseReleased​(javafx.scene.input.MouseEvent event)
        Specified by:
        onMouseReleased in interface Drawable
      • getShape

        public javafx.scene.shape.Shape getShape()
        Specified by:
        getShape in interface Drawable