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


Java Circle.setStroke方法代码示例

本文整理汇总了Java中javafx.scene.shape.Circle.setStroke方法的典型用法代码示例。如果您正苦于以下问题:Java Circle.setStroke方法的具体用法?Java Circle.setStroke怎么用?Java Circle.setStroke使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.shape.Circle的用法示例。


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

示例1: CircleSample

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
public CircleSample() {
    super(180,90);
    // Simple red filled circle
    Circle circle1 = new Circle(45,45,40, Color.RED);
    // Blue stroked circle
    Circle circle2 = new Circle(135,45,40);
    circle2.setStroke(Color.DODGERBLUE);
    circle2.setFill(null);
    // Create a group to show all the circles);
    getChildren().add(new Group(circle1,circle2));
    // REMOVE ME
    setControls(
            new SimplePropertySheet.PropDesc("Circle 1 Fill", circle1.fillProperty()),
            new SimplePropertySheet.PropDesc("Circle 1 Radius", circle1.radiusProperty(), 10d, 40d),
            new SimplePropertySheet.PropDesc("Circle 2 Stroke", circle2.strokeProperty()),
            new SimplePropertySheet.PropDesc("Circle 2 Stroke Width", circle2.strokeWidthProperty(), 1d, 5d),
            new SimplePropertySheet.PropDesc("Circle 2 Radius", circle2.radiusProperty(), 10d, 40d)
    );
    // END REMOVE ME
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:21,代码来源:CircleSample.java

示例2: renderPoints

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
private void renderPoints(){
    for(int i = 0; i<points.size(); i++){
        Circle c = new Circle(points.get(i).getX(), points.get(i).getY(),circleStyle.getRadius(), circleStyle.getFill());
        c.setStroke(circleStyle.getStroke());
        c.setStrokeWidth(circleStyle.getStrokeWidth());
        c.setStrokeType(circleStyle.getStrokeType());
        c.setStrokeLineJoin(circleStyle.getStrokeLineJoin());
        c.setStrokeLineCap(circleStyle.getStrokeLineCap());
        c.setStyle(circleStyle.getStyle());
        pointDots.getChildren().add(c);
    }
}
 
开发者ID:DrMerfy,项目名称:GraphCreator,代码行数:13,代码来源:LineGraph.java

示例3: configureBackground

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
private void configureBackground() {
    ImageView imageView = new ImageView();
    Image image = loadImage();
    imageView.setImage(image);

    Circle circle1 = new Circle();
    circle1.setCenterX(140);
    circle1.setCenterY(140);
    circle1.setRadius(120);
    circle1.setFill(Color.TRANSPARENT);
    circle1.setStroke(Color.web("#0A0A0A"));
    circle1.setStrokeWidth(0.3);

    Circle circle2 = new Circle();
    circle2.setCenterX(140);
    circle2.setCenterY(140);
    circle2.setRadius(118);
    circle2.setFill(Color.TRANSPARENT);
    circle2.setStroke(Color.web("#0A0A0A"));
    circle2.setStrokeWidth(0.3);

    Circle circle3 = new Circle();
    circle3.setCenterX(140);
    circle3.setCenterY(140);
    circle3.setRadius(140);
    circle3.setFill(Color.TRANSPARENT);
    circle3.setStroke(Color.web("#818a89"));
    circle3.setStrokeWidth(1);

    Ellipse ellipse = new Ellipse(140, 95, 180, 95);
    Circle ellipseClip = new Circle(140, 140, 140);
    ellipse.setFill(Color.web("#535450"));
    ellipse.setStrokeWidth(0);
    GaussianBlur ellipseEffect = new GaussianBlur();
    ellipseEffect.setRadius(10);
    ellipse.setEffect(ellipseEffect);
    ellipse.setOpacity(0.1);
    ellipse.setClip(ellipseClip);
    background.getChildren().addAll(imageView, circle1, circle2, circle3, ellipse);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:41,代码来源:StopWatch.java

示例4: createCircle

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
/**
 * Ritorna il cerchio che racchiuderà l'indice del nodo
 * @return cerchio che indicherà il nodo.
 */
private Circle createCircle() {
			
	Circle c = new Circle();
	c.setFill((Color) currentPane.getBackground().getFills().get(0).getFill());
	c.setStroke(Color.BLACK);
	c.setStrokeWidth(3);
	
	c.setRadius(Singleton.NODE_RADIUS);
	
	return c;
}
 
开发者ID:steppp,项目名称:Breadth-First-Search,代码行数:16,代码来源:GraphDrawer.java

示例5: createIconContent

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
public static Node createIconContent() {
    Circle circle = new Circle(57,57,40);
    circle.setStroke(Color.web("#b9c0c5"));
    circle.setStrokeWidth(5);
    circle.getStrokeDashArray().addAll(15d,15d);
    circle.setFill(null);
    javafx.scene.effect.InnerShadow effect = new javafx.scene.effect.InnerShadow();
    effect.setOffsetX(1);
    effect.setOffsetY(1);
    effect.setRadius(3);
    effect.setColor(Color.rgb(0,0,0,0.6));
    circle.setEffect(effect);
    return circle;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:15,代码来源:CircleSample.java

示例6: InteractiveWayPointDot

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
public InteractiveWayPointDot(int x, int y) throws FlightZoneException{
	wayPointDot = new Circle();
	wayPointDot.setRadius(radius);;
	wayPointDot.setCenterX(x);
	wayPointDot.setCenterY(y);
	wayPointDot.setFill(Color.LIGHTSTEELBLUE);
	wayPointDot.setStroke(Color.BLACK);
	wayPointDot.setStrokeWidth(1);
	longitude = DecimalDegreesToXYConverter.getInstance().ConvertXCoordsToDecimalDegrees(x);
	latitude = DecimalDegreesToXYConverter.getInstance().ConvertYCoordsToDecimalDegrees(y);
	this.x = x;
	this.y = y;
}
 
开发者ID:JaneClelandHuang,项目名称:Dronology,代码行数:14,代码来源:InteractiveWayPointDot.java

示例7: DroneBase

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
/** 
 * Constructor
 * @param baseName Unique basename
 * @param latitude of base
 * @param longitude of base
 * @param altitude of base
 * @throws FlightZoneException 
 */
public DroneBase(String baseName, long lat, long lon, int alt, int radius) throws FlightZoneException{
	basePosition = new Coordinates(lat,lon,alt);
	coordTransform = DecimalDegreesToXYConverter.getInstance();
	this.baseName = baseName;	
	circle = new Circle();
	circle.setRadius(radius);
	Point point = coordTransform.getPoint(lat, lon);
	circle.setCenterX(point.getX()+radius*.6);
	circle.setCenterY(point.getY()+radius*.6);
	circle.setFill(Color.LIGHTYELLOW);
	circle.setStroke(Color.BLACK);
	circle.setStrokeWidth(1);
}
 
开发者ID:JaneClelandHuang,项目名称:Dronology,代码行数:22,代码来源:DroneBase.java

示例8: createIOButton

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
/**
 * Sets the appearance of an IO button.
 * @return Returns an I/O button.
 */
public Circle createIOButton(){
    Circle channel = new Circle(5.0f);
    channel.setFill(Paint.valueOf(BACKGROUND_COLOR));
    channel.setStroke(Paint.valueOf(FOREGROUND_COLOR));
    channel.setStrokeWidth(2.0f);
    channel.setLayoutY(getMinHeight()/2);
    channel.setEffect( new DropShadow() );
    return channel;
}
 
开发者ID:Theldus,项目名称:PSE,代码行数:14,代码来源:NodeBox.java

示例9: createIndicatorCircle

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
private Circle createIndicatorCircle(int i) {
    Circle circle = new Circle(INDICATOR_RADIUS, Color.WHITE);
    circle.setStroke(Color.BLACK);

    circle.fillProperty().bind(
            new When(
                    currentStep.greaterThanOrEqualTo(i))
                    .then(Color.DODGERBLUE)
                    .otherwise(Color.WHITE));

    return circle;
}
 
开发者ID:scify,项目名称:jedai-ui,代码行数:13,代码来源:WizardController.java

示例10: drawPoint

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
private void drawPoint(ChartValue value) {

		Color fillColor = Color.TRANSPARENT;

		Circle circle = new Circle();

		CustomAxis yAxis;

		double x = value.getX();
		double y = value.getY();

		int axisNum = value.getAxis();

		if (axisNum == 0) {
			yAxis = y1Axis;
			circle.setStroke(strokeColor);
		} else {
			yAxis = y2Axis;
			circle.setStroke(strokeColor2);
		}

		double x_pos = getPosInXAxis(x);
		double y_pos = getPositionInYAxis(yAxis, yLeftAxisLine, y);

		if (isValueInBounds(x_pos, y_pos)) {
			valueComponents.add(circle);
			circle.setFill(fillColor);
			circle.setRadius(value.getStrokeSize());

			circle.setCenterX(x_pos);
			circle.setCenterY(y_pos);

			getChildren().add(circle);
		}

	}
 
开发者ID:JKostikiadis,项目名称:MultiAxisScatterChart,代码行数:37,代码来源:MultiAxisScatterChart.java

示例11: start

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
	Group root = new Group();
	Line seeSaw = new Line (60,340,340,140);
	seeSaw.setStroke(Color.BLACK);
	seeSaw.setStrokeWidth(15);
	Circle circle = new Circle(70,280,40);
	circle.setStroke(Color.GREENYELLOW);
	circle.setFill(Color.ORANGE);
	circle.setStrokeWidth(5);
	
	Rectangle rect = new Rectangle(240,90,80,70);
	rect.setStroke(Color.MEDIUMPURPLE);
	rect.setStrokeWidth(5);
	rect.setFill(Color.MEDIUMPURPLE);
	
	Line left = new Line (200,240,160,340);
	left.setStrokeWidth(5);
	Line right = new Line(200,240,240,340);
	right.setStrokeWidth(5);
	
	root.getChildren().addAll(seeSaw,rect,circle,left,right);
	
	
	
	Scene scene = new Scene(root, 400, 400,Color.WHITE);
	primaryStage.setTitle("SeeSaw");
	primaryStage.setScene(scene);
	primaryStage.show();
	
	
	
}
 
开发者ID:naeemkhan12,项目名称:JavaFx-Material-Design,代码行数:34,代码来源:Playground.java

示例12: CircularDirectionIndicator

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
public CircularDirectionIndicator(String name, double radius){
	this.name = name;
	this.radius = radius;
	
	root = new VBox();
	
	StackPane graphicalData = new StackPane();
	graphicalData.setMaxSize(radius * 2, radius * 2);
	lineBox = new Canvas();
	
	outerCircle = new Circle(graphicalData.getWidth() * 0.5, graphicalData.getHeight() * 0.5, radius);
	outerCircle.setFill(Color.TRANSPARENT);
	outerCircle.setStroke(Color.BLACK);
	/*innerCircle = new Circle(graphicalData.getWidth() * 0.5, graphicalData.getHeight() * 0.5, radius * 0.5);
	innerCircle.setFill(Color.TRANSPARENT);
	innerCircle.setStroke(Color.BLACK);*/
	
	lineBox.setWidth(radius * 2);
	lineBox.setHeight(radius * 2);
	
	graphicalData.getChildren().addAll(outerCircle, lineBox);
	
	valLbl = new Label(name+": 0.0");
	valLbl.setMinWidth(radius * 2);
	valLbl.setTextAlignment(TextAlignment.CENTER);
	
	HBox labalBox = new HBox();
	labalBox.getChildren().add(valLbl);
	labalBox.setAlignment(Pos.CENTER);
	
	root.setAlignment(Pos.CENTER);
	root.setSpacing(2.0);
	root.getChildren().addAll(labalBox, graphicalData);
	
	setValue(0);
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:37,代码来源:CircularDirectionIndicator.java

示例13: createPiece

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
public Node createPiece(int piece, int column, int row) {
	Group group = new Group();

	// A quick hack to ensure all have equal size.
	Rectangle transparent = new Rectangle(0, 0, 160, 160);
	transparent.setFill(Color.TRANSPARENT);
	group.getChildren().add(transparent);

	switch (piece) {
	case 0:
		Line line1 = new Line(30, 30, 130, 130);
		line1.setStrokeWidth(5);
		Line line2 = new Line(30, 130, 130, 30);
		line2.setStrokeWidth(5);
		group.getChildren().addAll(line1, line2);
		break;
	case 1:
		Circle white = new Circle(80, 80, 60);
		white.setStroke(Color.BLACK);
		white.setStrokeWidth(5);
		white.setFill(Color.TRANSPARENT);
		group.getChildren().add(white);
		break;
	}

	return group;
}
 
开发者ID:edwardxia,项目名称:board-client,代码行数:28,代码来源:TicTacToe.java

示例14: createPiece

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
public Node createPiece(int piece, int column, int row) {
	StackPane pane = new StackPane();
	Rectangle background = new Rectangle(0, 0, 60, 60);
	background.setFill(((column + row) % 2) == 0 ? Color.WHITE : Color.GRAY);
	pane.getChildren().add(background);

	if (piece >=0 && piece < 8) {
		Circle circle = new Circle(30, 30, 25);
		if (piece / 4 == 1) {
			circle.setStrokeWidth(3);
		} else {
			circle.setStrokeWidth(0);
		}

		if ((piece % 4) / 2 == 0) {
			circle.setFill(Color.WHITE);
			circle.setStroke(Color.BLACK);
		} else {
			circle.setFill(Color.BLACK);
			circle.setStroke(Color.WHITE);
		}

		pane.getChildren().add(circle);

		if ((piece % 4) % 2 == 1) {
			Text text = new Text("♔");
			text.setFont(new Font(32));
			text.setFill(((piece % 4) / 2 == 0) ? Color.BLACK : Color.WHITE);
			text.setBoundsType(TextBoundsType.VISUAL);
			pane.getChildren().add(text);
		}
	}

	return pane;
}
 
开发者ID:edwardxia,项目名称:board-client,代码行数:36,代码来源:Checkers.java

示例15: start

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
    if (stage == null) {
        return;
    }

    Rectangle clipRect1 = new Rectangle(-130, -130, 115, 115);
    Rectangle clipRect2 = new Rectangle(15, -130, 115, 115);
    Rectangle clipRect3 = new Rectangle(-130, 15, 115, 115);
    Rectangle clipRect4 = new Rectangle(15, 15, 115, 115);
    Group clip = new Group(clipRect1, clipRect2, clipRect3, clipRect4);

    Circle spinnanCircle = new Circle(100);
    spinnanCircle.setFill(null);
    spinnanCircle.setStrokeWidth(30);
    spinnanCircle.setStroke(LTTNG_PURPLE);
    spinnanCircle.setClip(clip);

    Circle magCircle = new Circle(60);
    magCircle.setFill(null);
    magCircle.setStrokeWidth(25);
    magCircle.setStroke(LTTNG_LIGHT_BLUE);

    Rectangle magHandle = new Rectangle(-12.5, 60, 25, 110);
    magHandle.setFill(LTTNG_LIGHT_BLUE);

    Group mag = new Group(magCircle, magHandle);

    Group root = new Group(spinnanCircle, mag);
    root.setRotate(30);
    root.relocate(0, 0);

    Pane pane = new Pane(root);
    pane.setStyle(BACKGROUND_STYLE);

    RotateTransition spinnan = new RotateTransition(Duration.seconds(4), spinnanCircle);
    spinnan.setByAngle(360);
    spinnan.setCycleCount(Animation.INDEFINITE);
    spinnan.setInterpolator(Interpolator.LINEAR);

    Scene scene = new Scene(pane);
    stage.setScene(scene);
    stage.show();

    spinnan.play();
}
 
开发者ID:lttng,项目名称:lttng-scope,代码行数:47,代码来源:Logo.java


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