當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。