Java examples for javafx.scene.shape:Line
build JavaFX Line Vertical
//package com.java2s; import javafx.scene.shape.Line; public class Main { public static void main(String[] argv) throws Exception { double sy = 2.45678; double ey = 2.45678; double x = 2.45678; System.out.println(buildLineVer(sy, ey, x)); }/*from www . j a v a 2s. c o m*/ /** * * @param sy * @param ey * @param x * @return */ public static Line buildLineVer(double sy, double ey, double x) { return buildLine(x, sy, x, ey); } /** * * @param sx * @param sy * @param ex * @param ey * @return */ public static Line buildLine(double sx, double sy, double ex, double ey) { Line line = new Line(); line.setStartX(sx); line.setStartY(sy); line.setEndX(ex); line.setEndY(ey); return line; } }