当前位置: 首页>>代码示例>>Java>>正文


Java VLineTo类代码示例

本文整理汇总了Java中javafx.scene.shape.VLineTo的典型用法代码示例。如果您正苦于以下问题:Java VLineTo类的具体用法?Java VLineTo怎么用?Java VLineTo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VLineTo类属于javafx.scene.shape包,在下文中一共展示了VLineTo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processPath

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private static Path processPath(final List<String> PATH_LIST, final PathReader READER) {
    final Path PATH = new Path();
    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())) {
            PATH.getElements().add(new HLineTo(READER.nextX()));
        } else if ("L".equals(READER.read())) {
            PATH.getElements().add(new VLineTo(READER.nextY()));
        } else if ("A".equals(READER.read())) {
            PATH.getElements().add(new ArcTo(READER.nextX(), READER.nextY(), 0, READER.nextX(), READER.nextY(), false, false));
        } else if ("Z".equals(READER.read())) {
            PATH.getElements().add(new ClosePath());
        }
    }
    return PATH;
}
 
开发者ID:Simego,项目名称:FXImgurUploader,代码行数:25,代码来源:ShapeConverter.java

示例2: Edge

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
/**
 * Constructs a new {@link Edge}, ending at the provided {@link AbstractNode}.
 * @param dst This edge's destination node.
 */
public Edge(AbstractNode dst) {
	// Set start point of the Path.
	MoveTo m = new MoveTo();
	m.xProperty().bindBidirectional(dst.translateXProperty());
	m.yProperty().bindBidirectional(dst.translateYProperty());
	getElements().add(m);

	// Add the horizontal line, starting at the path's start point.
	HLineTo hline = new HLineTo();
	getElements().add(hline);

	// Add the vertical line, starting at the horizontal line's end point.
	VLineTo vline = new VLineTo();
	getElements().add(vline);
}
 
开发者ID:ProgrammingLife2015,项目名称:dnainator,代码行数:20,代码来源:Edge.java

示例3: PathSample

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
public PathSample() {
    super(180,90);
    // Create path shape - square
    Path path1 = new Path();
    path1.getElements().addAll(
            new MoveTo(25, 25),
            new HLineTo(65),
            new VLineTo(65),
            new LineTo(25, 65),
            new ClosePath()         
            );
    path1.setFill(null);
    path1.setStroke(Color.RED);
    path1.setStrokeWidth(2);

    // Create path shape - curves
    Path path2 = new Path();
    path2.getElements().addAll(
            new MoveTo(100, 45),
            new CubicCurveTo(120, 20, 130, 80, 140, 45),
            new QuadCurveTo(150, 0, 160, 45),
            new ArcTo(20, 40, 0, 180, 45, true, true)
            );
    path2.setFill(null);
    path2.setStroke(Color.DODGERBLUE);
    path2.setStrokeWidth(2);

    // show the path shapes;
    getChildren().add(new Group(path1, path2));
    // REMOVE ME
    setControls(
            new SimplePropertySheet.PropDesc("Path 1 Stroke", path1.strokeProperty()),
            new SimplePropertySheet.PropDesc("Path 2 Stroke", path2.strokeProperty())
    );
    // END REMOVE ME
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:37,代码来源:PathSample.java

示例4: drawRectBubbleToplineIndicator

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private void drawRectBubbleToplineIndicator() {
	getElements().addAll(new MoveTo(1.0f, 1.2f),
			new HLineTo(2.5f),
			new LineTo(2.7f, 1.0f),
			new LineTo(2.9f, 1.2f),
			new HLineTo(4.4f),
			new VLineTo(4f),
			new HLineTo(1.0f),
			new VLineTo(1.2f)
			);
}
 
开发者ID:Laity000,项目名称:ChatRoom-JavaFX,代码行数:12,代码来源:Bubble.java

示例5: drawRectBubbleRightBaselineIndicator

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private void drawRectBubbleRightBaselineIndicator() {
	getElements().addAll(new MoveTo(3.0f, 1.0f),
			new HLineTo(0f),
			new VLineTo(4f),
			new HLineTo(3.0f),
			new LineTo(2.8f, 3.8f),
			new VLineTo(1f)
			);
}
 
开发者ID:Laity000,项目名称:ChatRoom-JavaFX,代码行数:10,代码来源:Bubble.java

示例6: drawRectBubbleLeftBaselineIndicator

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private void drawRectBubbleLeftBaselineIndicator() {
	getElements().addAll(new MoveTo(1.2f, 1.0f),
			new HLineTo(3f),
			new VLineTo(4f),
			new HLineTo(1.0f),
			new LineTo(1.2f, 3.8f),
			new VLineTo(1f)
			);
}
 
开发者ID:Laity000,项目名称:ChatRoom-JavaFX,代码行数:10,代码来源:Bubble.java

示例7: drawRectBubbleRightCenterIndicator

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private void drawRectBubbleRightCenterIndicator() {
	getElements().addAll(new MoveTo(3.0f, 2.5f),
			new LineTo(2.8f, 2.4f),
			new VLineTo(1f),
			new HLineTo(0f),
			new VLineTo(4f),
			new HLineTo(2.8f),
			new VLineTo(2.7f),
			new LineTo(3.0f, 2.5f)
			);
}
 
开发者ID:Laity000,项目名称:ChatRoom-JavaFX,代码行数:12,代码来源:Bubble.java

示例8: drawRectBubbleLeftCenterIndicator

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private void drawRectBubbleLeftCenterIndicator() {
	getElements().addAll(new MoveTo(1.0f, 2.5f),
			new LineTo(1.2f, 2.4f),
			new VLineTo(1f),
			new HLineTo(2.9f),
			new VLineTo(4f),
			new HLineTo(1.2f),
			new VLineTo(2.7f),
			new LineTo(1.0f, 2.5f)
			);
}
 
开发者ID:Laity000,项目名称:ChatRoom-JavaFX,代码行数:12,代码来源:Bubble.java

示例9: makeAnimation

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private Animation makeAnimation (Node agent, int x, int y, int z) {
    // create something to follow
    Path path = new Path();
    path.getElements().addAll(new MoveTo(x, y), new VLineTo(z));
    // create an animation where the shape follows a path
    PathTransition pt = new PathTransition(Duration.millis(4000), path, agent);

    // put them together in order
    return new SequentialTransition(agent, pt);
}
 
开发者ID:LtubSalad,项目名称:voogasalad-ltub,代码行数:11,代码来源:LoaderTester.java

示例10: PathMorphTransition

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
/**
 * Create a transition
 *
 * @param sourceElements
 *            the source elements
 * @param targetElements
 *            the target elements
 * @param duation
 *            the duration
 * @param pathNode
 *            the path not the morph is done on
 */
public PathMorphTransition(List<PathElement> sourceElements, List<PathElement> targetElements, Duration duation, Path pathNode) {
    this.pathNode = pathNode;
    setCycleDuration(duation);

    if (sourceElements.size() != targetElements.size()) {
        throw new IllegalArgumentException("Only equal paths are allowed"); //$NON-NLS-1$
    }

    for (int i = 0; i < sourceElements.size(); i++) {
        PathElement sourceElement = sourceElements.get(i);
        PathElement targetElement = targetElements.get(i);
        if (sourceElement.getClass() != targetElement.getClass()) {
            throw new IllegalArgumentException("Only equal paths are allowed"); //$NON-NLS-1$
        }
        if (sourceElement instanceof ArcTo) {
            this.interpolateList.add(new ArcToInterpolatable((ArcTo) sourceElement));
        } else if (sourceElement instanceof CubicCurveTo) {
            this.interpolateList.add(new CubicCurveToInterpolatable((CubicCurveTo) sourceElement));
        } else if (sourceElement instanceof HLineTo) {
            this.interpolateList.add(new HLineToInterpolatable((HLineTo) sourceElement));
        } else if (sourceElement instanceof LineTo) {
            this.interpolateList.add(new LineToInterpolatable((LineTo) sourceElement));
        } else if (sourceElement instanceof MoveTo) {
            this.interpolateList.add(new MoveToInterpolatable((MoveTo) sourceElement));
        } else if (sourceElement instanceof QuadCurveTo) {
            this.interpolateList.add(new QuadCurveToInterpolatable((QuadCurveTo) sourceElement));
        } else if (sourceElement instanceof VLineTo) {
            this.interpolateList.add(new VLineToInterpolatable((VLineTo) sourceElement));
        }
    }

    this.sourceElements = sourceElements;
    this.targetElements = targetElements;
}
 
开发者ID:HanSolo,项目名称:bpmgauge,代码行数:47,代码来源:PathMorphTransition.java

示例11: processPath

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private static Path processPath(final List<String> PATH_LIST, final PathReader READER) {
	final Path PATH = new Path();
	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())) {
			PATH.getElements().add(new HLineTo(READER.nextX()));
		} else if ("L".equals(READER.read())) {
			PATH.getElements().add(new VLineTo(READER.nextY()));
		} else if ("A".equals(READER.read())) {
			PATH.getElements().add(
					new ArcTo(READER.nextX(), READER.nextY(), 0, READER.nextX(), READER.nextY(), false, false));
		} else if ("Z".equals(READER.read())) {
			PATH.getElements().add(new ClosePath());
		}
	}
	return PATH;
}
 
开发者ID:stefaneidelloth,项目名称:JavaFxNodeToSvg,代码行数:32,代码来源:ShapeConverter.java

示例12: buildVpath

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
private void buildVpath() {
    hpth.clear();
    int max = (int) (this.getWidth() / sgap);
    double more = (int) this.getWidth() % sgap;
    double hgap = more / 2;
    for (int i = 0; i <= max; i++) {
        hpth.add(new MoveTo(hgap, more / 2));
        hpth.add(new VLineTo(this.getHeight()));
        hgap += sgap;
    }
}
 
开发者ID:cosysoft,项目名称:agile,代码行数:12,代码来源:Space.java

示例13: interpolate

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
@Override public VLineTo interpolate(VLineTo endValue, double t) {
    VLineTo rv = new VLineTo(this.source.getY() + (endValue.getY() - this.source.getY()) * t);
    rv.setAbsolute(this.source.isAbsolute());
    return rv;
}
 
开发者ID:HanSolo,项目名称:bpmgauge,代码行数:6,代码来源:PathMorphTransition.java

示例14: convertPath

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
public static String convertPath(final Path PATH) {
    final StringBuilder fxPath = new StringBuilder();
    for (PathElement element : PATH.getElements()) {
        if (MoveTo.class.equals(element.getClass())) {
            fxPath.append("M ")
                  .append(((MoveTo) element).getX()).append(" ")
                  .append(((MoveTo) element).getY()).append(" ");
        } else if (LineTo.class.equals(element.getClass())) {
            fxPath.append("L ")
                  .append(((LineTo) element).getX()).append(" ")
                  .append(((LineTo) element).getY()).append(" ");
        } else if (CubicCurveTo.class.equals(element.getClass())) {
            fxPath.append("C ")
                  .append(((CubicCurveTo) element).getControlX1()).append(" ")
                  .append(((CubicCurveTo) element).getControlY1()).append(" ")
                  .append(((CubicCurveTo) element).getControlX2()).append(" ")
                  .append(((CubicCurveTo) element).getControlY2()).append(" ")
                  .append(((CubicCurveTo) element).getX()).append(" ")
                  .append(((CubicCurveTo) element).getY()).append(" ");
        } else if (QuadCurveTo.class.equals(element.getClass())) {
            fxPath.append("Q ")
                  .append(((QuadCurveTo) element).getControlX()).append(" ")
                  .append(((QuadCurveTo) element).getControlY()).append(" ")
                  .append(((QuadCurveTo) element).getX()).append(" ")
                  .append(((QuadCurveTo) element).getY()).append(" ");
        } else if (ArcTo.class.equals(element.getClass())) {
            fxPath.append("A ")
                  .append(((ArcTo) element).getX()).append(" ")
                  .append(((ArcTo) element).getY()).append(" ")
                  .append(((ArcTo) element).getRadiusX()).append(" ")
                  .append(((ArcTo) element).getRadiusY()).append(" ");
        } else if (HLineTo.class.equals(element.getClass())) {
            fxPath.append("H ")
                  .append(((HLineTo) element).getX()).append(" ");
        } else if (VLineTo.class.equals(element.getClass())) {
            fxPath.append("V ")
                  .append(((VLineTo) element).getY()).append(" ");
        } else if (ClosePath.class.equals(element.getClass())) {
            fxPath.append("Z");
        }
    }
    return fxPath.toString();
}
 
开发者ID:Simego,项目名称:FXImgurUploader,代码行数:44,代码来源:ShapeConverter.java

示例15: convertPath

import javafx.scene.shape.VLineTo; //导入依赖的package包/类
public static String convertPath(final Path PATH) {
	final StringBuilder fxPath = new StringBuilder();
	for (PathElement element : PATH.getElements()) {
		if (MoveTo.class.equals(element.getClass())) {
			fxPath
					.append("M ")
					.append(((MoveTo) element).getX())
					.append(" ")
					.append(((MoveTo) element).getY())
					.append(" ");
		} else if (LineTo.class.equals(element.getClass())) {
			fxPath
					.append("L ")
					.append(((LineTo) element).getX())
					.append(" ")
					.append(((LineTo) element).getY())
					.append(" ");
		} else if (CubicCurveTo.class.equals(element.getClass())) {
			fxPath
					.append("C ")
					.append(((CubicCurveTo) element).getControlX1())
					.append(" ")
					.append(((CubicCurveTo) element).getControlY1())
					.append(" ")
					.append(((CubicCurveTo) element).getControlX2())
					.append(" ")
					.append(((CubicCurveTo) element).getControlY2())
					.append(" ")
					.append(((CubicCurveTo) element).getX())
					.append(" ")
					.append(((CubicCurveTo) element).getY())
					.append(" ");
		} else if (QuadCurveTo.class.equals(element.getClass())) {
			fxPath
					.append("Q ")
					.append(((QuadCurveTo) element).getControlX())
					.append(" ")
					.append(((QuadCurveTo) element).getControlY())
					.append(" ")
					.append(((QuadCurveTo) element).getX())
					.append(" ")
					.append(((QuadCurveTo) element).getY())
					.append(" ");
		} else if (ArcTo.class.equals(element.getClass())) {
			fxPath
					.append("A ")
					.append(((ArcTo) element).getX())
					.append(" ")
					.append(((ArcTo) element).getY())
					.append(" ")
					.append(((ArcTo) element).getRadiusX())
					.append(" ")
					.append(((ArcTo) element).getRadiusY())
					.append(" ");
		} else if (HLineTo.class.equals(element.getClass())) {
			fxPath.append("H ").append(((HLineTo) element).getX()).append(" ");
		} else if (VLineTo.class.equals(element.getClass())) {
			fxPath.append("V ").append(((VLineTo) element).getY()).append(" ");
		} else if (ClosePath.class.equals(element.getClass())) {
			fxPath.append("Z");
		}
	}
	return fxPath.toString();
}
 
开发者ID:stefaneidelloth,项目名称:JavaFxNodeToSvg,代码行数:65,代码来源:ShapeConverter.java


注:本文中的javafx.scene.shape.VLineTo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。