Package javafx.scene.shape

Examples of javafx.scene.shape.LineTo


    monthYear.setMinWidth(CELL_WIDTH * 6.0);
    monthYear.setAlignment(Pos.CENTER);
    monthYearRow.getStyleClass().add(DATEPICKER_MONTHYEAR);
    Path decrementArrow = new Path();
    decrementArrow.setId(DATEPICKER_ARROW);
    decrementArrow.getElements().addAll(new MoveTo(0, ARROW_SIZE), new LineTo(0, -ARROW_SIZE),
        new LineTo(-ARROW_SIZE, 0), new LineTo(0, ARROW_SIZE));
    decrementArrow.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        month--;
        if(month < 0) {
          month = Calendar.DECEMBER;
          year--;
        }
        monthYear.setText(getMonthYear((new GregorianCalendar(year, month, 1)).getTime()));
        setDayCells();
        me.consume();
      }
    });
    Path inreamentArrow = new Path();
    inreamentArrow.setId(DATEPICKER_ARROW);
    inreamentArrow.getElements().addAll(new MoveTo(0, ARROW_SIZE), new LineTo(0, -ARROW_SIZE),
        new LineTo(ARROW_SIZE, 0), new LineTo(0, ARROW_SIZE));
    inreamentArrow.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        month++;
        if(month > Calendar.DECEMBER) {
View Full Code Here


    private Path createToolBarPath(Paint fill, Paint stroke) {
        Path toolBarBackground = new Path();
        toolBarBackground.setFill(fill);
        toolBarBackground.setStroke(stroke);
        toolBarBackground.setStrokeType(StrokeType.OUTSIDE);
        LineTo arrowTop = new LineTo(TOOLBAR_WIDTH,0);
        arrowTop.yProperty().bind(arrowH.add(-8));
        LineTo arrowTip = new LineTo(TOOLBAR_WIDTH-10,0);
        arrowTip.yProperty().bind(arrowH);
        LineTo arrowBottom = new LineTo(TOOLBAR_WIDTH,0);
        arrowBottom.yProperty().bind(arrowH.add(8));
        LineTo bottomRight = new LineTo(TOOLBAR_WIDTH,0);
        bottomRight.yProperty().bind(root.heightProperty());
        LineTo bottomLeft = new LineTo(0,0);
        bottomLeft.yProperty().bind(root.heightProperty());
        toolBarBackground.getElements().addAll(
                new MoveTo(0,0),
                new LineTo(TOOLBAR_WIDTH,0),
                arrowTop, arrowTip, arrowBottom,
                bottomRight, bottomLeft,
                new ClosePath()
        );
        return toolBarBackground;
View Full Code Here

        PATH.setFillRule(FillRule.EVEN_ODD);
        while (!PATH_LIST.isEmpty()) {
            if ("M".equals(READER.read())) {
                PATH.getElements().add(new MoveTo(READER.nextX(), READER.nextY()));
            } else if ("L".equals(READER.read())) {
                PATH.getElements().add(new LineTo(READER.nextX(), READER.nextY()));
            } else if ("C".equals(READER.read())) {
                PATH.getElements().add(new CubicCurveTo(READER.nextX(), READER.nextY(), READER.nextX(), READER.nextY(), READER.nextX(), READER.nextY()));
            } else if ("Q".equals(READER.read())) {
                PATH.getElements().add(new QuadCurveTo(READER.nextX(), READER.nextY(), READER.nextX(), READER.nextY()));
            } else if ("H".equals(READER.read())) {
View Full Code Here

                                                  0.725 * size, 0.62426575 * size,
                                                  0.725 * size, 0.5 * size));
        needle.getElements().add(new CubicCurveTo(0.725 * size, 0.3891265 * size,
                                                  0.6448105 * size, 0.296985 * size,
                                                  0.5392625 * size, 0.2784125 * size));
        needle.getElements().add(new LineTo(0.5 * size, 0.0225));
        needle.getElements().add(new LineTo(0.4607375 * size, 0.2784125 * size));
        needle.getElements().add(new CubicCurveTo(0.3551895 * size, 0.296985 * size,
                                                  0.275 * size, 0.3891265 * size,
                                                  0.275 * size, 0.5 * size));
        needle.getElements().add(new ClosePath());
        needle.setStrokeWidth(size * 0.03);
 
View Full Code Here

            if (width > height && width > 0 && height > 0) {
                final Path UPPER = new Path();
                UPPER.setFillRule(FillRule.EVEN_ODD);
                UPPER.getElements().add(new MoveTo(width, 0.0));
                UPPER.getElements().add(new LineTo(width, 0.4074074074074074 * height));
                UPPER.getElements().add(new LineTo(width - 0.0582010582 * height, 0.4074074074074074 * height));
                UPPER.getElements().add(new LineTo(width - 0.0582010582 * height, 0.49206349206349204 * height));
                UPPER.getElements().add(new LineTo(0.0582010582 * height, 0.49206349206349204 * height));
                UPPER.getElements().add(new LineTo(0.0582010582 * height, 0.4074074074074074 * height));
                UPPER.getElements().add(new LineTo(0.0, 0.4074074074074074 * height));
                UPPER.getElements().add(new LineTo(0.0, 0.0));
                UPPER.getElements().add(new LineTo(width, 0.0));
                UPPER.getElements().add(new ClosePath());
                final String UPPER_SVG = ShapeConverter.shapeToSvgString(UPPER);

                final Path LOWER = new Path();
                LOWER.setFillRule(FillRule.EVEN_ODD);
                LOWER.getElements().add(new MoveTo(width, height));
                LOWER.getElements().add(new LineTo(width, 0.5925925925925926 * height));
                LOWER.getElements().add(new LineTo(width - 0.0582010582 * height, 0.5925925925925926 * height));
                LOWER.getElements().add(new LineTo(width - 0.0582010582 * height, 0.5079365079365079 * height));
                LOWER.getElements().add(new LineTo(0.0582010582 * height, 0.5079365079365079 * height));
                LOWER.getElements().add(new LineTo(0.0582010582 * height, 0.5925925925925926 * height));
                LOWER.getElements().add(new LineTo(0.0, 0.5925925925925926 * height));
                LOWER.getElements().add(new LineTo(0.0, height));
                LOWER.getElements().add(new LineTo(width, height));
                LOWER.getElements().add(new ClosePath());
                final String LOWER_SVG = ShapeConverter.shapeToSvgString(LOWER);

                upperBackground.setStyle(new StringBuilder("-fx-shape:").append("\"").append(UPPER_SVG).append("\";").toString());
                lowerBackground.setStyle(new StringBuilder("-fx-shape:").append("\"").append(LOWER_SVG).append("\";").toString());
View Full Code Here

  this.path = new Path();
  this.moveTo = new MoveTo();
  this.arcToInner = new ArcTo();
  this.arcTo = new ArcTo();
  this.lineTo = new LineTo();
  this.lineTo2 = new LineTo();

  this.path.getElements().add(this.moveTo);
  this.path.getElements().add(this.arcToInner);
  this.path.getElements().add(this.lineTo);
  this.path.getElements().add(this.arcTo);
View Full Code Here

        // Button Up
        btnUp = new StackPane();
        btnUp.getStyleClass().add("arrow-button");
        arrowUp = new Path();
        arrowUp.getStyleClass().add("spinner-arrow");
        arrowUp.getElements().addAll(new MoveTo(-ARROW_SIZE, 0), new LineTo(0, -ARROW_SIZE * ARROW_HEIGHT),
                new LineTo(ARROW_SIZE, 0));
        btnUp.getChildren().add(arrowUp);

        // Button Down
        btnDown = new StackPane();
        btnDown.getStyleClass().add("arrow-button");
        arrowDown = new Path();
        arrowDown.getStyleClass().add("spinner-arrow");
        arrowDown.getElements().addAll(new MoveTo(-ARROW_SIZE, 0), new LineTo(0, ARROW_SIZE * ARROW_HEIGHT),
                new LineTo(ARROW_SIZE, 0));
        btnDown.getChildren().add(arrowDown);


        this.getChildren().addAll(textField, btnUp, btnDown);

View Full Code Here

            if (width > height && width > 0 && height > 0) {
                final Path UPPER = new Path();
                UPPER.setFillRule(FillRule.EVEN_ODD);
                UPPER.getElements().add(new MoveTo(width, 0.0));
                UPPER.getElements().add(new LineTo(width, 0.4074074074074074 * height));
                UPPER.getElements().add(new LineTo(width - 0.0582010582 * height, 0.4074074074074074 * height));
                UPPER.getElements().add(new LineTo(width - 0.0582010582 * height, 0.49206349206349204 * height));
                UPPER.getElements().add(new LineTo(0.0582010582 * height, 0.49206349206349204 * height));
                UPPER.getElements().add(new LineTo(0.0582010582 * height, 0.4074074074074074 * height));
                UPPER.getElements().add(new LineTo(0.0, 0.4074074074074074 * height));
                UPPER.getElements().add(new LineTo(0.0, 0.0));
                UPPER.getElements().add(new LineTo(width, 0.0));
                UPPER.getElements().add(new ClosePath());
                final String UPPER_SVG = ShapeConverter.shapeToSvgString(UPPER);

                final Path LOWER = new Path();
                LOWER.setFillRule(FillRule.EVEN_ODD);
                LOWER.getElements().add(new MoveTo(width, height));
                LOWER.getElements().add(new LineTo(width, 0.5925925925925926 * height));
                LOWER.getElements().add(new LineTo(width - 0.0582010582 * height, 0.5925925925925926 * height));
                LOWER.getElements().add(new LineTo(width - 0.0582010582 * height, 0.5079365079365079 * height));
                LOWER.getElements().add(new LineTo(0.0582010582 * height, 0.5079365079365079 * height));
                LOWER.getElements().add(new LineTo(0.0582010582 * height, 0.5925925925925926 * height));
                LOWER.getElements().add(new LineTo(0.0, 0.5925925925925926 * height));
                LOWER.getElements().add(new LineTo(0.0, height));
                LOWER.getElements().add(new LineTo(width, height));
                LOWER.getElements().add(new ClosePath());
                final String LOWER_SVG = ShapeConverter.shapeToSvgString(LOWER);

                upperBackground.setStyle(new StringBuilder("-fx-shape:").append("\"").append(UPPER_SVG).append("\";").toString());
                lowerBackground.setStyle(new StringBuilder("-fx-shape:").append("\"").append(LOWER_SVG).append("\";").toString());
View Full Code Here

        innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.3), 30d, 0d, 0d, 10d);

        barBackgroundStart          = new MoveTo(0, 0.675 * PREFERRED_HEIGHT);
        barBackgroundOuterArc       = new ArcTo(0.675 * PREFERRED_HEIGHT, 0.675 * PREFERRED_HEIGHT, 0, PREFERRED_WIDTH, 0.675 * PREFERRED_HEIGHT, true, true);
        barBackgroundLineToInnerArc = new LineTo(0.72222 * PREFERRED_WIDTH, 0.675 * PREFERRED_HEIGHT);
        barBackgroundInnerArc       = new ArcTo(0.3 * PREFERRED_HEIGHT, 0.3 * PREFERRED_HEIGHT, 0, 0.27778 * PREFERRED_WIDTH, 0.675 * PREFERRED_HEIGHT, false, false);

        barBackground = new Path();
        barBackground.setFillRule(FillRule.EVEN_ODD);
        barBackground.getElements().add(barBackgroundStart);
        barBackground.getElements().add(barBackgroundOuterArc);
        barBackground.getElements().add(barBackgroundLineToInnerArc);
        barBackground.getElements().add(barBackgroundInnerArc);
        barBackground.getElements().add(new ClosePath());
        barBackground.getStyleClass().setAll("bar-background");
        barBackground.setFill(getSkinnable().getBarBackgroundColor());
        barBackground.setEffect(getSkinnable().isShadowsEnabled() ? innerShadow : null);       

        dataBarStart          = new MoveTo(0, 0.675 * PREFERRED_HEIGHT);
        dataBarOuterArc       = new ArcTo(0.675 * PREFERRED_HEIGHT, 0.675 * PREFERRED_HEIGHT, 0, 0, 0, false, true);
        dataBarLineToInnerArc = new LineTo(0.27778 * PREFERRED_WIDTH, 0.675 * PREFERRED_HEIGHT);
        dataBarInnerArc       = new ArcTo(0.3 * PREFERRED_HEIGHT, 0.3 * PREFERRED_HEIGHT, 0, 0, 0, false, false);

        dataBar = new Path();
        dataBar.setFillRule(FillRule.EVEN_ODD);
        dataBar.getElements().add(dataBarStart);
View Full Code Here

        barBackground = new Region();
        barBackground.getStyleClass().setAll("bar-background");

        barBackgroundBorderStart1 = new MoveTo();
        barBackgroundBorderStop1  = new LineTo();
        barBackgroundBorderStart2 = new MoveTo();
        barBackgroundBorderStop2  = new LineTo();
        barBackgroundBorder       = new Path(barBackgroundBorderStart1, barBackgroundBorderStop1, barBackgroundBorderStart2, barBackgroundBorderStop2);
        barBackgroundBorder.getStyleClass().setAll("bar-background-border");

        ticksAndSectionsCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        ticksAndSections = ticksAndSectionsCanvas.getGraphicsContext2D();
View Full Code Here

TOP

Related Classes of javafx.scene.shape.LineTo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.