Created
September 1, 2015 20:58
-
-
Save anonymous/083229aa670a5c65024a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.lynden.glitter.animation.ResizeHeightTranslation; | |
import java.net.URL; | |
import java.util.ResourceBundle; | |
import javafx.animation.FadeTransition; | |
import javafx.animation.SequentialTransition; | |
import javafx.event.ActionEvent; | |
import javafx.fxml.FXML; | |
import javafx.fxml.Initializable; | |
import javafx.scene.control.Button; | |
import javafx.scene.control.TableView; | |
import javafx.scene.layout.Pane; | |
import javafx.util.Duration; | |
public class FXMLController implements Initializable { | |
@FXML | |
private Button clickMeButton; | |
@FXML | |
private Pane contentPane; | |
@FXML | |
private void handleButtonAction(ActionEvent event) { | |
TableView tableView = new TableView(); | |
tableView.setMaxHeight(250); | |
tableView.setMinHeight(250); | |
ResizeHeightTranslation rht = new ResizeHeightTranslation(Duration.millis(1000), contentPane, tableView.getMinHeight() ); | |
FadeTransition ft = new FadeTransition(Duration.millis(1000), tableView); | |
ft.setFromValue(0); | |
ft.setToValue(1); | |
SequentialTransition pt = new SequentialTransition(rht, ft); | |
pt.play(); | |
contentPane.getChildren().add(tableView); | |
} | |
@Override | |
public void initialize(URL url, ResourceBundle rb) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment