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


Java Circle.addEventFilter方法代码示例

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


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

示例1: newCircle

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
private void newCircle() {
    Circle circle = buildCircle();
    circle.toBack();

    this.getChildren().add(circle);
    this.gameContext.resetBordersToFront();

    GazeUtils.addEventFilter(circle);

    circle.addEventFilter(MouseEvent.ANY, enterEvent);
    circle.addEventHandler(GazeEvent.ANY, enterEvent);

    moveCircle(circle);
}
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:15,代码来源:Bubble.java

示例2: createGridPattern

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
public ImagePattern createGridPattern() {
    Collections.shuffle(array_sizes);
    index = array_sizes.get(0);
    size = arraypts[ index ].length;
    //size = 10;
    indicator = new ProgressIndicator(0);
    double w = gridSize;
    double h = gridSize;

    circle = new Circle();
    circle.setRadius(45.0f);

    circle.setOpacity(1);
    circle.setFill(Color.LIGHTBLUE);
    circle.setVisible(true);
    canvas.setGridLinesVisible(true);

    GazeUtils.addEventFilter(circle);
    enterEvent = buildEvent();
    circle.addEventFilter(MouseEvent.ANY, enterEvent);
    circle.addEventFilter(GazeEvent.ANY, enterEvent);


    indicator.setOpacity(0.0);
    canvas.add(indicator, arraypts[index][count], arraypts[index][count+1]);
    canvas.add(circle,arraypts[index][count], arraypts[index][count+1]);
    Image image = canvas.snapshot(new SnapshotParameters(), null);
    ImagePattern pattern = new ImagePattern(image, 0, 0, w, h, false);

    return pattern;

}
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:33,代码来源:Circles_handler.java

示例3: createGridPattern

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
public ImagePattern createGridPattern() {
    Collections.shuffle(array_sizes);
    index = array_sizes.get(0);
    size = arraypts[ index ].length;
    //size = 10;
    indicator = new ProgressIndicator(0);
    double w = gridSize;
    double h = gridSize;

    circle = new Circle();
    circle.setRadius(45.0f);

    circle.setOpacity(1);
    circle.setFill(Color.BLUE);
    circle.setVisible(true);
    canvas.setGridLinesVisible(true);

    GazeUtils.addEventFilter(circle);
    enterEvent = buildEvent();
    circle.addEventFilter(MouseEvent.ANY, enterEvent);
    circle.addEventFilter(GazeEvent.ANY, enterEvent);

    indicator.setOpacity(0.0);
    canvas.add(indicator, arraypts[index][count], arraypts[index][count+1]);
    canvas.add(circle,arraypts[index][count], arraypts[index][count+1]);
    Image image = canvas.snapshot(new SnapshotParameters(), null);
    ImagePattern pattern = new ImagePattern(image, 0, 0, w, h, false);

    return pattern;

}
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:32,代码来源:Circles_points_handler.java

示例4: start

import javafx.scene.shape.Circle; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("TestGaze");
    Group root = new Group();
    Scene scene = new Scene(root, 1200, 700, Color.BLACK);

    Circle c = new Circle(300, 300, 100, Color.WHITESMOKE);

    root.getChildren().add(c);

    c.addEventFilter(GazeEvent.GAZE_ENTERED, event -> log.info("Field filtered strike: " + event.getEventType()));

    c.addEventHandler(GazeEvent.GAZE_ENTERED, event -> log.info("Field handled strike: " + event.getEventType()));

    primaryStage.setScene(scene);
    primaryStage.show();

    c.fireEvent(new GazeEvent());

}
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:21,代码来源:TestGaze.java

示例5: newCircle

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

        Circle C = new Circle();

        this.getChildren().add(C);

        GazeUtils.addEventFilter(C);

        C.addEventFilter(MouseEvent.ANY, enterEvent);

        C.addEventHandler(GazeEvent.ANY, enterEvent);

        moveCircle(C);
    }
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:15,代码来源:Bubble.java


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