Skip to content

Instantly share code, notes, and snippets.

@skrb
skrb / FlipTransition.java
Created Jun 21, 2014
Page Flipping Demonstration
View FlipTransition.java
import javafx.animation.Interpolator;
import javafx.animation.ParallelTransition;
import javafx.animation.PauseTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.SequentialTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Point3D;
import javafx.scene.Group;
import javafx.scene.Node;
@skrb
skrb / Form.xml
Created Jul 5, 2012
JavaFX Simple FXML-Controler Sample
View Form.xml
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.net.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="100.0" prefWidth="320.0" xmlns:fx="http://javafx.com/fxml" fx:controller="FormController">
@skrb
skrb / InterpolatorDemo.java
Created Dec 9, 2015
Interpolator Demonstration
View InterpolatorDemo.java
import javafx.animation.Animation;
import javafx.animation.Interpolator;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
@skrb
skrb / Main.java
Last active Sep 26, 2019
Swing Image View Demo
View Main.java
package net.javainthebox.imageview;
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
@skrb
skrb / Main.java
Created Sep 26, 2019
JavaFX Image View Demo
View Main.java
package net.javainthebox.imageview;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class Main extends Application {
@skrb
skrb / Test.java
Created Apr 8, 2012
JavaFX WebView Sample
View Test.java
import java.io.IOException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Test extends Application {
@skrb
skrb / AnimationDemo.java
Created Jun 6, 2019
AnimationTimerのサンプル
View AnimationDemo.java
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import javafx.animation.AnimationTimer;
import javafx.application.Application;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
@skrb
skrb / AnimationDemo.java
Created Jun 6, 2019
AnimationTimerのサンプル
View AnimationDemo.java
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import javafx.animation.AnimationTimer;
import javafx.application.Application;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
@skrb
skrb / RingBuffer.java
Created Dec 20, 2013
Zoetrope: Animation using touch interface
View RingBuffer.java
package net.javainthebox.zoetrope;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class RingBuffer<T> {
final private List<T> buffer;
private int index = -1;
@skrb
skrb / ComplexAnimation.java
Created Jun 12, 2012
JavaFX Animation Sample
View ComplexAnimation.java
package net.javainthebox.jfx.animation;
import javafx.animation.FadeTransition;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.ScaleTransition;
import javafx.animation.Timeline;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.event.ActionEvent;