Package javafx.event

Examples of javafx.event.EventHandler


            Region spacer = new Region();
            HBox.setHgrow(spacer, Priority.ALWAYS);

            // add close min max
            Button closeButton = createWindowButton("close");
            closeButton.setOnAction(new EventHandler() {
                @Override public void handle(Event event) {
                    FXDialog.this.hide();
                }
            });
            minButton = createWindowButton("minimize");
            minButton.setOnAction(new EventHandler() {
                @Override public void handle(Event event) {
                    setIconified(!isIconified());
                }
            });

            maxButton = createWindowButton("maximize");
            maxButton.setOnAction(new EventHandler() {
                private double restoreX;
                private double restoreY;
                private double restoreW;
                private double restoreH;
View Full Code Here


            final DoubleProperty opacity = stage.opacityProperty();

            Timeline fadeIn = new Timeline(
                    new KeyFrame(Duration.ZERO, new KeyValue(opacity, 0d)),
                    new KeyFrame(new Duration(fadeInOutTime * 1000),
                            new EventHandler() {
                                @Override
                                public void handle(Event t) {
                                    Timeline display = new Timeline(
                                            new KeyFrame(Duration.ZERO, new KeyValue(opacity, 1d)),
                                            new KeyFrame(new Duration((displayTime - fadeInOutTime * 2) * 1000),
                                                    new EventHandler() {
                                                        @Override
                                                        public void handle(Event t) {
                                                            Timeline fadeOut = new Timeline(
                                                                    new KeyFrame(Duration.ZERO, new KeyValue(opacity, 1d)),
                                                                    new KeyFrame(new Duration(fadeInOutTime * 1000),
                                                                            new EventHandler() {
                                                                                @Override
                                                                                public void handle(Event t) {
                                                                                    stage.hide();
                                                                                }
                                                                            }, new KeyValue(opacity, 0d)));
View Full Code Here

   
    _joinOnlineMenuItem = new MenuItem("Rejoindre la partie(en ligne)");
    _joinOnlineMenuItem.setOnAction(this);
   
    _createTeamMenuItem = new MenuItem("Cr�er une �quipe");
    _createTeamMenuItem.setOnAction(new EventHandler(){

      @Override
      public void handle(Event arg0) {
        // TODO Auto-generated method stub
        new CreationTeamStage(_userInfo);
View Full Code Here

    FlowPane flow = new FlowPane();
    flow.setAlignment(Pos.CENTER);

    exitButton = new Button("Quitter");
    exitButton.setOnAction(new EventHandler() {

      @Override
      public void handle(Event arg0) {
        // TODO Auto-generated method stub
        close();
View Full Code Here

    okButton.setDefaultButton(true);
    flow.getChildren().add(okButton);
    FlowPane.setMargin(okButton, insets);

    exitButton = new Button("Quitter");
    exitButton.setOnAction(new EventHandler() {

      @Override
      public void handle(Event arg0) {
        // TODO Auto-generated method stub
        close();
View Full Code Here

  {
    super();
    this.controller = controller;
    register();
   
    setOnCloseRequest(new EventHandler()
    {
      @Override
      public void handle(Event event)
      {
        StageView.this.controller.removeView(StageView.this);
View Full Code Here

    FlowPane flow = new FlowPane();
    flow.setAlignment(Pos.CENTER);

    okButton = new Button("Valider");
    okButton.setOnAction(new EventHandler() {
      @Override
      public void handle(Event arg0) {
        // TODO Auto-generated method stub
        try {
          if (sql.getInstance().insertTeam(
              CreationTeamStage.this.teamTextField.getText(),
              CreationTeamStage.this.teammateTextField.getText(),
              CreationTeamStage.this.idS)) {
            MessageBox message = new MessageBox("Equipe Cr��",
                "F�licitation, l'�quipe "
                    + CreationTeamStage.this.teamTextField
                        .getText() + " a �t� cr�e.");
            message.showDialog();

          } else {
            MessageBox message = new MessageBox("Echec",
                "Creation Impossible");
            message.showDialog();
          }
        } catch (SQLException e) {
          MessageBox message = new MessageBox("Echec", e.getMessage());
          message.showDialog();
        }
      }
    });
    okButton.setDefaultButton(true);
    flow.getChildren().add(okButton);
    FlowPane.setMargin(okButton, insets);

    exitButton = new Button("Quitter");
    exitButton.setOnAction(new EventHandler() {

      @Override
      public void handle(Event arg0) {
        // TODO Auto-generated method stub
        close();
View Full Code Here

  {
    super(title);
    this.value = value;
    this.view = view;
   
    setOnAction(new EventHandler()
    {
      @Override
      public void handle(Event event)
      {
        Object[] obj = new Object[1];
View Full Code Here

    initStyle(StageStyle.UTILITY);
    initModality(Modality.APPLICATION_MODAL);

    setResizable(false);
   
    setOnCloseRequest(new EventHandler()
    {
      @Override
      public void handle(Event event)
      {
        _input = null;
View Full Code Here

            Region spacer = new Region();
            HBox.setHgrow(spacer, Priority.ALWAYS);

            // add close min max
            Button closeButton = createWindowButton("close");
            closeButton.setOnAction(new EventHandler() {
                @Override public void handle(Event event) {
                    FXDialog.this.hide();
                }
            });
            minButton = createWindowButton("minimize");
            minButton.setOnAction(new EventHandler() {
                @Override public void handle(Event event) {
                    setIconified(!isIconified());
                }
            });

            maxButton = createWindowButton("maximize");
            maxButton.setOnAction(new EventHandler() {
                private double restoreX;
                private double restoreY;
                private double restoreW;
                private double restoreH;
View Full Code Here

TOP

Related Classes of javafx.event.EventHandler

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.