Package jltk.shape

Class Line


  • public class Line
    extends Shape
    Beschreiben Sie hier die Klasse Line.
    Version:
    1.0
    Author:
    ms
    • Field Detail

      • fxLine

        protected javafx.scene.shape.Line fxLine
    • Constructor Detail

      • Line

        public Line​(double pStartX,
                    double pStartY,
                    double pEndX,
                    double pEndY)
        Creates a new line from (pStartX|pStartY) to (pEndX|pEndY). The specified position describes the left upper corner of this rectangle.
        Parameters:
        pStartX - The x-coordinate of the starting point
        pStartY - The y-coordinate of the starting point
        pEndX - The x-coordinate of the endpoint
        pEndY - The y-coordinate of the endpoint
      • Line

        public Line​(double pStartX,
                    double pStartY,
                    double pEndX,
                    double pEndY,
                    Window pWindow)
        Creates a new rectangle width the specified width and height. It is placed on the specified window The specified position describes the left upper corner of this rectangle.
        Parameters:
        pX - The x-coordinate of the left upper corner
        pY - The y-coordinate of the left upper corner
        pWidth - The width of this rectangle
        pHeight - The height of tis rectangle
        pWindow - The windows, the rectangle should place
    • Method Detail

      • setStartX

        public void setStartX​(double pValue)
        Set the new x coordinate for the start point
        Parameters:
        pWidth - The x coordinate for the start point
      • setStartY

        public void setStartY​(double pValue)
        Set the new y coordinate for the start point
        Parameters:
        pWidth - The y coordinate for the start point
      • setEndX

        public void setEndX​(double pValue)
        Set the new x coordinate for the end point
        Parameters:
        pWidth - The x coordinate for the end point
      • setEndY

        public void setEndY​(double pValue)
        Set the new y coordinate for the end point
        Parameters:
        pWidth - The y coordinate for the end point
      • getStartX

        public double getStartX()
        Return the x coordinate of the starting point.
        Returns:
        The x coordinate of the starting point
      • getStartY

        public double getStartY()
        Return the y coordinate of the starting point.
        Returns:
        The y coordinate of the starting point
      • getEndX

        public double getEndX()
        Return the x coordinate of the end point.
        Returns:
        The x coordinate of the end point
      • getEndY

        public double getEndY()
        Return the y coordinate of the end point.
        Returns:
        The y coordinate of the end point
      • getWidth

        public double getWidth()
        Return the width of this line
        Overrides:
        getWidth in class Shape
        Returns:
        The width of this line.
      • getHeight

        public double getHeight()
        Return the height of this line
        Overrides:
        getHeight in class Shape
        Returns:
        The height of this line.
      • turn

        public void turn​(double pAngle)
        Description copied from class: Shape
        Turn this shape by the specified angle (in degrees). Zero degrees is to the east (right-hand side of the window), and the angle increases clockwise.
        Overrides:
        turn in class Shape
        Parameters:
        pAngle - The angle in degrees; positive values turn clockwise